Debian Codegraph @

serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go

raw
1 // Copyright 2026 Google LLC.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Code generated file. DO NOT EDIT.
6
7 // Package serviceconsumermanagement provides access to the Service Consumer Management API.
8 //
9 // For product documentation, see: https://cloud.google.com/service-consumer-management/docs/overview
10 //
11 // # Library status
12 //
13 // These client libraries are officially supported by Google. However, this
14 // library is considered complete and is in maintenance mode. This means
15 // that we will address critical bugs and security issues but will not add
16 // any new features.
17 //
18 // When possible, we recommend using our newer
19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
20 // that are still actively being worked and iterated on.
21 //
22 // # Creating a client
23 //
24 // Usage example:
25 //
26 // import "google.golang.org/api/serviceconsumermanagement/v1beta1"
27 // ...
28 // ctx := context.Background()
29 // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx)
30 //
31 // In this example, Google Application Default Credentials are used for
32 // authentication. For information on how to create and obtain Application
33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
34 //
35 // # Other authentication options
36 //
37 // To use an API key for authentication (note: some APIs do not support API
38 // keys), use [google.golang.org/api/option.WithAPIKey]:
39 //
40 // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx, option.WithAPIKey("AIza..."))
41 //
42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
43 // flow, use [google.golang.org/api/option.WithTokenSource]:
44 //
45 // config := &oauth2.Config{...}
46 // // ...
47 // token, err := config.Exchange(ctx, ...)
48 // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
49 //
50 // See [google.golang.org/api/option.ClientOption] for details on options.
51 package serviceconsumermanagement // import "google.golang.org/api/serviceconsumermanagement/v1beta1"
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "log/slog"
61 "net/http"
62 "net/url"
63 "strconv"
64 "strings"
65
66 "github.com/googleapis/gax-go/v2/internallog"
67 googleapi "google.golang.org/api/googleapi"
68 internal "google.golang.org/api/internal"
69 gensupport "google.golang.org/api/internal/gensupport"
70 option "google.golang.org/api/option"
71 internaloption "google.golang.org/api/option/internaloption"
72 htransport "google.golang.org/api/transport/http"
73 )
74
75 // Always reference these packages, just in case the auto-generated code
76 // below doesn't.
77 var _ = bytes.NewBuffer
78 var _ = strconv.Itoa
79 var _ = fmt.Sprintf
80 var _ = json.NewDecoder
81 var _ = io.Copy
82 var _ = url.Parse
83 var _ = gensupport.MarshalJSON
84 var _ = googleapi.Version
85 var _ = errors.New
86 var _ = strings.Replace
87 var _ = context.Canceled
88 var _ = internaloption.WithDefaultEndpoint
89 var _ = internal.Version
90 var _ = internallog.New
91
92 const apiId = "serviceconsumermanagement:v1beta1"
93 const apiName = "serviceconsumermanagement"
94 const apiVersion = "v1beta1"
95 const basePath = "https://serviceconsumermanagement.googleapis.com/"
96 const basePathTemplate = "https://serviceconsumermanagement.UNIVERSE_DOMAIN/"
97 const mtlsBasePath = "https://serviceconsumermanagement.mtls.googleapis.com/"
98
99 // OAuth2 scopes used by this API.
100 const (
101 // See, edit, configure, and delete your Google Cloud data and see the email
102 // address for your Google Account.
103 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
104 )
105
106 // NewService creates a new APIService.
107 func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) {
108 scopesOption := internaloption.WithDefaultScopes(
109 "https://www.googleapis.com/auth/cloud-platform",
110 )
111 // NOTE: prepend, so we don't override user-specified scopes.
112 opts = append([]option.ClientOption{scopesOption}, opts...)
113 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
114 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
115 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
116 opts = append(opts, internaloption.EnableNewAuthLibrary())
117 client, endpoint, err := htransport.NewClient(ctx, opts...)
118 if err != nil {
119 return nil, err
120 }
121 s := &APIService{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
122 s.Operations = NewOperationsService(s)
123 s.Services = NewServicesService(s)
124 if endpoint != "" {
125 s.BasePath = endpoint
126 }
127 return s, nil
128 }
129
130 // New creates a new APIService. It uses the provided http.Client for requests.
131 //
132 // Deprecated: please use NewService instead.
133 // To provide a custom HTTP client, use option.WithHTTPClient.
134 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
135 func New(client *http.Client) (*APIService, error) {
136 if client == nil {
137 return nil, errors.New("client is nil")
138 }
139 return NewService(context.TODO(), option.WithHTTPClient(client))
140 }
141
142 type APIService struct {
143 client *http.Client
144 logger *slog.Logger
145 BasePath string // API endpoint base URL
146 UserAgent string // optional additional User-Agent fragment
147
148 Operations *OperationsService
149
150 Services *ServicesService
151 }
152
153 func (s *APIService) userAgent() string {
154 if s.UserAgent == "" {
155 return googleapi.UserAgent
156 }
157 return googleapi.UserAgent + " " + s.UserAgent
158 }
159
160 func NewOperationsService(s *APIService) *OperationsService {
161 rs := &OperationsService{s: s}
162 return rs
163 }
164
165 type OperationsService struct {
166 s *APIService
167 }
168
169 func NewServicesService(s *APIService) *ServicesService {
170 rs := &ServicesService{s: s}
171 rs.ConsumerQuotaMetrics = NewServicesConsumerQuotaMetricsService(s)
172 return rs
173 }
174
175 type ServicesService struct {
176 s *APIService
177
178 ConsumerQuotaMetrics *ServicesConsumerQuotaMetricsService
179 }
180
181 func NewServicesConsumerQuotaMetricsService(s *APIService) *ServicesConsumerQuotaMetricsService {
182 rs := &ServicesConsumerQuotaMetricsService{s: s}
183 rs.Limits = NewServicesConsumerQuotaMetricsLimitsService(s)
184 return rs
185 }
186
187 type ServicesConsumerQuotaMetricsService struct {
188 s *APIService
189
190 Limits *ServicesConsumerQuotaMetricsLimitsService
191 }
192
193 func NewServicesConsumerQuotaMetricsLimitsService(s *APIService) *ServicesConsumerQuotaMetricsLimitsService {
194 rs := &ServicesConsumerQuotaMetricsLimitsService{s: s}
195 rs.ProducerOverrides = NewServicesConsumerQuotaMetricsLimitsProducerOverridesService(s)
196 rs.ProducerQuotaPolicies = NewServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesService(s)
197 return rs
198 }
199
200 type ServicesConsumerQuotaMetricsLimitsService struct {
201 s *APIService
202
203 ProducerOverrides *ServicesConsumerQuotaMetricsLimitsProducerOverridesService
204
205 ProducerQuotaPolicies *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesService
206 }
207
208 func NewServicesConsumerQuotaMetricsLimitsProducerOverridesService(s *APIService) *ServicesConsumerQuotaMetricsLimitsProducerOverridesService {
209 rs := &ServicesConsumerQuotaMetricsLimitsProducerOverridesService{s: s}
210 return rs
211 }
212
213 type ServicesConsumerQuotaMetricsLimitsProducerOverridesService struct {
214 s *APIService
215 }
216
217 func NewServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesService(s *APIService) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesService {
218 rs := &ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesService{s: s}
219 return rs
220 }
221
222 type ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesService struct {
223 s *APIService
224 }
225
226 // Api: Api is a light-weight descriptor for an API Interface. Interfaces are
227 // also described as "protocol buffer services" in some contexts, such as by
228 // the "service" keyword in a .proto file, but they are different from API
229 // Services, which represent a concrete implementation of an interface as
230 // opposed to simply a description of methods and bindings. They are also
231 // sometimes simply referred to as "APIs" in other contexts, such as the name
232 // of this message itself. See https://cloud.google.com/apis/design/glossary
233 // for detailed terminology. New usages of this message as an alternative to
234 // ServiceDescriptorProto are strongly discouraged. This message does not
235 // reliability preserve all information necessary to model the schema and
236 // preserve semantics. Instead make use of FileDescriptorSet which preserves
237 // the necessary information.
238 type Api struct {
239 // Edition: The source edition string, only valid when syntax is
240 // SYNTAX_EDITIONS.
241 Edition string `json:"edition,omitempty"`
242 // Methods: The methods of this interface, in unspecified order.
243 Methods []*Method `json:"methods,omitempty"`
244 // Mixins: Included interfaces. See Mixin.
245 Mixins []*Mixin `json:"mixins,omitempty"`
246 // Name: The fully qualified name of this interface, including package name
247 // followed by the interface's simple name.
248 Name string `json:"name,omitempty"`
249 // Options: Any metadata attached to the interface.
250 Options []*Option `json:"options,omitempty"`
251 // SourceContext: Source context for the protocol buffer service represented by
252 // this message.
253 SourceContext *SourceContext `json:"sourceContext,omitempty"`
254 // Syntax: The source syntax of the service.
255 //
256 // Possible values:
257 // "SYNTAX_PROTO2" - Syntax `proto2`.
258 // "SYNTAX_PROTO3" - Syntax `proto3`.
259 // "SYNTAX_EDITIONS" - Syntax `editions`.
260 Syntax string `json:"syntax,omitempty"`
261 // Version: A version string for this interface. If specified, must have the
262 // form `major-version.minor-version`, as in `1.10`. If the minor version is
263 // omitted, it defaults to zero. If the entire version field is empty, the
264 // major version is derived from the package name, as outlined below. If the
265 // field is not empty, the version in the package name will be verified to be
266 // consistent with what is provided here. The versioning schema uses semantic
267 // versioning (http://semver.org) where the major version number indicates a
268 // breaking change and the minor version an additive, non-breaking change. Both
269 // version numbers are signals to users what to expect from different versions,
270 // and should be carefully chosen based on the product plan. The major version
271 // is also reflected in the package name of the interface, which must end in
272 // `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can
273 // be omitted. Zero major versions must only be used for experimental, non-GA
274 // interfaces.
275 Version string `json:"version,omitempty"`
276 // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally
277 // include in API requests. By default, fields with empty or default values are
278 // omitted from API requests. See
279 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
280 // details.
281 ForceSendFields []string `json:"-"`
282 // NullFields is a list of field names (e.g. "Edition") to include in API
283 // requests with the JSON null value. By default, fields with empty values are
284 // omitted from API requests. See
285 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
286 NullFields []string `json:"-"`
287 }
288
289 func (s Api) MarshalJSON() ([]byte, error) {
290 type NoMethod Api
291 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
292 }
293
294 // Aspect: Aspect represents Generic aspect. It is used to configure an aspect
295 // without making direct changes to service.proto
296 type Aspect struct {
297 // Kind: The type of this aspect configuration.
298 Kind string `json:"kind,omitempty"`
299 // Rules: Optional. Rules of the Configuration.
300 Rules []*AspectRule `json:"rules,omitempty"`
301 // Spec: Content of the configuration. The underlying schema should be defined
302 // by Aspect owners as protobuf message under `google/api/configaspects/proto`.
303 Spec googleapi.RawMessage `json:"spec,omitempty"`
304 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
305 // include in API requests. By default, fields with empty or default values are
306 // omitted from API requests. See
307 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
308 // details.
309 ForceSendFields []string `json:"-"`
310 // NullFields is a list of field names (e.g. "Kind") to include in API requests
311 // with the JSON null value. By default, fields with empty values are omitted
312 // from API requests. See
313 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
314 NullFields []string `json:"-"`
315 }
316
317 func (s Aspect) MarshalJSON() ([]byte, error) {
318 type NoMethod Aspect
319 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
320 }
321
322 // AspectRule: Rule-based configuration for an aspect.
323 type AspectRule struct {
324 // Config: Required. Rules of the configuration. The underlying schema should
325 // be defined by Aspect owners as protobuf message under
326 // `google/api/configaspects/proto`.
327 Config googleapi.RawMessage `json:"config,omitempty"`
328 // Selector: Required. Selects the RPC methods to which this rule applies.
329 // Refer to selector for syntax details.
330 Selector string `json:"selector,omitempty"`
331 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally
332 // include in API requests. By default, fields with empty or default values are
333 // omitted from API requests. See
334 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
335 // details.
336 ForceSendFields []string `json:"-"`
337 // NullFields is a list of field names (e.g. "Config") to include in API
338 // requests with the JSON null value. By default, fields with empty values are
339 // omitted from API requests. See
340 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
341 NullFields []string `json:"-"`
342 }
343
344 func (s AspectRule) MarshalJSON() ([]byte, error) {
345 type NoMethod AspectRule
346 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
347 }
348
349 // AuthProvider: Configuration for an authentication provider, including
350 // support for JSON Web Token (JWT)
351 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
352 type AuthProvider struct {
353 // Audiences: The list of JWT audiences
354 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
355 // that are allowed to access. A JWT containing any of these audiences will be
356 // accepted. When this setting is absent, JWTs with audiences: -
357 // "https://[service.name]/[google.protobuf.Api.name]" -
358 // "https://[service.name]/" will be accepted. For example, if no audiences are
359 // in the setting, LibraryService API will accept JWTs with the following
360 // audiences: -
361 // https://library-example.googleapis.com/google.example.library.v1.LibraryService
362 // - https://library-example.googleapis.com/ Example: audiences:
363 // bookstore_android.apps.googleusercontent.com,
364 // bookstore_web.apps.googleusercontent.com
365 Audiences string `json:"audiences,omitempty"`
366 // AuthorizationUrl: Redirect URL if JWT token is required but not present or
367 // is expired. Implement authorizationUrl of securityDefinitions in OpenAPI
368 // spec.
369 AuthorizationUrl string `json:"authorizationUrl,omitempty"`
370 // Id: The unique identifier of the auth provider. It will be referred to by
371 // `AuthRequirement.provider_id`. Example: "bookstore_auth".
372 Id string `json:"id,omitempty"`
373 // Issuer: Identifies the principal that issued the JWT. See
374 // https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
375 // Usually a URL or an email address. Example: https://securetoken.google.com
376 // Example: [email protected]
377 Issuer string `json:"issuer,omitempty"`
378 // JwksUri: URL of the provider's public key set to validate signature of the
379 // JWT. See OpenID Discovery
380 // (https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
381 // Optional if the key set document: - can be retrieved from OpenID Discovery
382 // (https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer.
383 // - can be inferred from the email domain of the issuer (e.g. a Google service
384 // account). Example: https://www.googleapis.com/oauth2/v1/certs
385 JwksUri string `json:"jwksUri,omitempty"`
386 // JwtLocations: Defines the locations to extract the JWT. For now it is only
387 // used by the Cloud Endpoints to store the OpenAPI extension
388 // [x-google-jwt-locations]
389 // (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
390 // JWT locations can be one of HTTP headers, URL query parameters or cookies.
391 // The rule is that the first match wins. If not specified, default to use
392 // following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion
393 // 3) access_token query parameter Default locations can be specified as
394 // followings: jwt_locations: - header: Authorization value_prefix: "Bearer " -
395 // header: x-goog-iap-jwt-assertion - query: access_token
396 JwtLocations []*JwtLocation `json:"jwtLocations,omitempty"`
397 // ForceSendFields is a list of field names (e.g. "Audiences") to
398 // unconditionally include in API requests. By default, fields with empty or
399 // default values are omitted from API requests. See
400 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
401 // details.
402 ForceSendFields []string `json:"-"`
403 // NullFields is a list of field names (e.g. "Audiences") to include in API
404 // requests with the JSON null value. By default, fields with empty values are
405 // omitted from API requests. See
406 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
407 NullFields []string `json:"-"`
408 }
409
410 func (s AuthProvider) MarshalJSON() ([]byte, error) {
411 type NoMethod AuthProvider
412 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
413 }
414
415 // AuthRequirement: User-defined authentication requirements, including support
416 // for JSON Web Token (JWT)
417 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
418 type AuthRequirement struct {
419 // Audiences: NOTE: This will be deprecated soon, once AuthProvider.audiences
420 // is implemented and accepted in all the runtime components. The list of JWT
421 // audiences
422 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
423 // that are allowed to access. A JWT containing any of these audiences will be
424 // accepted. When this setting is absent, only JWTs with audience
425 // "https://Service_name/API_name" will be accepted. For example, if no
426 // audiences are in the setting, LibraryService API will only accept JWTs with
427 // the following audience
428 // "https://library-example.googleapis.com/google.example.library.v1.LibraryServ
429 // ice". Example: audiences: bookstore_android.apps.googleusercontent.com,
430 // bookstore_web.apps.googleusercontent.com
431 Audiences string `json:"audiences,omitempty"`
432 // ProviderId: id from authentication provider. Example: provider_id:
433 // bookstore_auth
434 ProviderId string `json:"providerId,omitempty"`
435 // ForceSendFields is a list of field names (e.g. "Audiences") to
436 // unconditionally include in API requests. By default, fields with empty or
437 // default values are omitted from API requests. See
438 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
439 // details.
440 ForceSendFields []string `json:"-"`
441 // NullFields is a list of field names (e.g. "Audiences") to include in API
442 // requests with the JSON null value. By default, fields with empty values are
443 // omitted from API requests. See
444 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
445 NullFields []string `json:"-"`
446 }
447
448 func (s AuthRequirement) MarshalJSON() ([]byte, error) {
449 type NoMethod AuthRequirement
450 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
451 }
452
453 // Authentication: `Authentication` defines the authentication configuration
454 // for API methods provided by an API service. Example: name:
455 // calendar.googleapis.com authentication: providers: - id:
456 // google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs
457 // issuer: https://securetoken.google.com rules: - selector: "*" requirements:
458 // provider_id: google_calendar_auth - selector: google.calendar.Delegate
459 // oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read
460 type Authentication struct {
461 // Providers: Defines a set of authentication providers that a service
462 // supports.
463 Providers []*AuthProvider `json:"providers,omitempty"`
464 // Rules: A list of authentication rules that apply to individual API methods.
465 // **NOTE:** All service configuration rules follow "last one wins" order.
466 Rules []*AuthenticationRule `json:"rules,omitempty"`
467 // ForceSendFields is a list of field names (e.g. "Providers") to
468 // unconditionally include in API requests. By default, fields with empty or
469 // default values are omitted from API requests. See
470 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
471 // details.
472 ForceSendFields []string `json:"-"`
473 // NullFields is a list of field names (e.g. "Providers") to include in API
474 // requests with the JSON null value. By default, fields with empty values are
475 // omitted from API requests. See
476 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
477 NullFields []string `json:"-"`
478 }
479
480 func (s Authentication) MarshalJSON() ([]byte, error) {
481 type NoMethod Authentication
482 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
483 }
484
485 // AuthenticationRule: Authentication rules for the service. By default, if a
486 // method has any authentication requirements, every request must include a
487 // valid credential matching one of the requirements. It's an error to include
488 // more than one kind of credential in a single request. If a method doesn't
489 // have any auth requirements, request credentials will be ignored.
490 type AuthenticationRule struct {
491 // AllowWithoutCredential: If true, the service accepts API keys without any
492 // other credential. This flag only applies to HTTP and gRPC requests.
493 AllowWithoutCredential bool `json:"allowWithoutCredential,omitempty"`
494 // Oauth: The requirements for OAuth credentials.
495 Oauth *OAuthRequirements `json:"oauth,omitempty"`
496 // Requirements: Requirements for additional authentication providers.
497 Requirements []*AuthRequirement `json:"requirements,omitempty"`
498 // Selector: Selects the methods to which this rule applies. Refer to selector
499 // for syntax details.
500 Selector string `json:"selector,omitempty"`
501 // ForceSendFields is a list of field names (e.g. "AllowWithoutCredential") to
502 // unconditionally include in API requests. By default, fields with empty or
503 // default values are omitted from API requests. See
504 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
505 // details.
506 ForceSendFields []string `json:"-"`
507 // NullFields is a list of field names (e.g. "AllowWithoutCredential") to
508 // include in API requests with the JSON null value. By default, fields with
509 // empty values are omitted from API requests. See
510 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
511 NullFields []string `json:"-"`
512 }
513
514 func (s AuthenticationRule) MarshalJSON() ([]byte, error) {
515 type NoMethod AuthenticationRule
516 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
517 }
518
519 // Backend: `Backend` defines the backend configuration for a service.
520 type Backend struct {
521 // Rules: A list of API backend rules that apply to individual API methods.
522 // **NOTE:** All service configuration rules follow "last one wins" order.
523 Rules []*BackendRule `json:"rules,omitempty"`
524 // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally
525 // include in API requests. By default, fields with empty or default values are
526 // omitted from API requests. See
527 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
528 // details.
529 ForceSendFields []string `json:"-"`
530 // NullFields is a list of field names (e.g. "Rules") to include in API
531 // requests with the JSON null value. By default, fields with empty values are
532 // omitted from API requests. See
533 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
534 NullFields []string `json:"-"`
535 }
536
537 func (s Backend) MarshalJSON() ([]byte, error) {
538 type NoMethod Backend
539 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
540 }
541
542 // BackendRule: A backend rule provides configuration for an individual API
543 // element.
544 type BackendRule struct {
545 // Address: The address of the API backend. The scheme is used to determine the
546 // backend protocol and security. The following schemes are accepted: SCHEME
547 // PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None
548 // grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving
549 // out the scheme may cause constrasting behaviors across platforms. If the
550 // port is unspecified, the default is: - 80 for schemes without TLS - 443 for
551 // schemes with TLS For HTTP backends, use protocol to specify the protocol
552 // version.
553 Address string `json:"address,omitempty"`
554 // Deadline: The number of seconds to wait for a response from a request. The
555 // default varies based on the request protocol and deployment environment.
556 Deadline float64 `json:"deadline,omitempty"`
557 // DisableAuth: When disable_auth is true, a JWT ID token won't be generated
558 // and the original "Authorization" HTTP header will be preserved. If the
559 // header is used to carry the original token and is expected by the backend,
560 // this field must be set to true to preserve the header.
561 DisableAuth bool `json:"disableAuth,omitempty"`
562 // JwtAudience: The JWT audience is used when generating a JWT ID token for the
563 // backend. This ID token will be added in the HTTP "authorization" header, and
564 // sent to the backend.
565 JwtAudience string `json:"jwtAudience,omitempty"`
566 // LoadBalancingPolicy: The load balancing policy used for connection to the
567 // application backend. Defined as an arbitrary string to accomondate custom
568 // load balancing policies supported by the underlying channel, but suggest
569 // most users use one of the standard policies, such as the default,
570 // "RoundRobin".
571 LoadBalancingPolicy string `json:"loadBalancingPolicy,omitempty"`
572 // MinDeadline: Deprecated, do not use.
573 MinDeadline float64 `json:"minDeadline,omitempty"`
574 // OperationDeadline: The number of seconds to wait for the completion of a
575 // long running operation. The default is no deadline.
576 OperationDeadline float64 `json:"operationDeadline,omitempty"`
577 // OverridesByRequestProtocol: The map between request protocol and the backend
578 // address.
579 OverridesByRequestProtocol map[string]BackendRule `json:"overridesByRequestProtocol,omitempty"`
580 // PathTranslation: Path translation specifies how to combine the backend
581 // address with the request path in order to produce the appropriate forwarding
582 // URL for the request. See PathTranslation for more details.
583 //
584 // Possible values:
585 // "PATH_TRANSLATION_UNSPECIFIED"
586 // "CONSTANT_ADDRESS" - Use the backend address as-is, with no modification
587 // to the path. If the URL pattern contains variables, the variable names and
588 // values will be appended to the query string. If a query string parameter and
589 // a URL pattern variable have the same name, this may result in duplicate keys
590 // in the query string. # Examples Given the following operation config: Method
591 // path: /api/company/{cid}/user/{uid} Backend address:
592 // https://example.cloudfunctions.net/getUser Requests to the following request
593 // paths will call the backend at the translated path: Request path:
594 // /api/company/widgetworks/user/johndoe Translated:
595 // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
596 // Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated:
597 // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
598 // "APPEND_PATH_TO_ADDRESS" - The request path will be appended to the
599 // backend address. # Examples Given the following operation config: Method
600 // path: /api/company/{cid}/user/{uid} Backend address:
601 // https://example.appspot.com Requests to the following request paths will
602 // call the backend at the translated path: Request path:
603 // /api/company/widgetworks/user/johndoe Translated:
604 // https://example.appspot.com/api/company/widgetworks/user/johndoe Request
605 // path: /api/company/widgetworks/user/johndoe?timezone=EST Translated:
606 // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
607 PathTranslation string `json:"pathTranslation,omitempty"`
608 // Protocol: The protocol used for sending a request to the backend. The
609 // supported values are "http/1.1" and "h2". The default value is inferred from
610 // the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https://
611 // http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that
612 // support HTTP/2, set this field to "h2" for improved performance. Configuring
613 // this field to non-default values is only supported for secure HTTP backends.
614 // This field will be ignored for all other backends. See
615 // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
616 // for more details on the supported values.
617 Protocol string `json:"protocol,omitempty"`
618 // Selector: Selects the methods to which this rule applies. Refer to selector
619 // for syntax details.
620 Selector string `json:"selector,omitempty"`
621 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally
622 // include in API requests. By default, fields with empty or default values are
623 // omitted from API requests. See
624 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
625 // details.
626 ForceSendFields []string `json:"-"`
627 // NullFields is a list of field names (e.g. "Address") to include in API
628 // requests with the JSON null value. By default, fields with empty values are
629 // omitted from API requests. See
630 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
631 NullFields []string `json:"-"`
632 }
633
634 func (s BackendRule) MarshalJSON() ([]byte, error) {
635 type NoMethod BackendRule
636 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
637 }
638
639 func (s *BackendRule) UnmarshalJSON(data []byte) error {
640 type NoMethod BackendRule
641 var s1 struct {
642 Deadline gensupport.JSONFloat64 `json:"deadline"`
643 MinDeadline gensupport.JSONFloat64 `json:"minDeadline"`
644 OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"`
645 *NoMethod
646 }
647 s1.NoMethod = (*NoMethod)(s)
648 if err := json.Unmarshal(data, &s1); err != nil {
649 return err
650 }
651 s.Deadline = float64(s1.Deadline)
652 s.MinDeadline = float64(s1.MinDeadline)
653 s.OperationDeadline = float64(s1.OperationDeadline)
654 return nil
655 }
656
657 // BatchingConfigProto: `BatchingConfigProto` defines the batching
658 // configuration for an API method.
659 type BatchingConfigProto struct {
660 // BatchDescriptor: The request and response fields used in batching.
661 BatchDescriptor *BatchingDescriptorProto `json:"batchDescriptor,omitempty"`
662 // Thresholds: The thresholds which trigger a batched request to be sent.
663 Thresholds *BatchingSettingsProto `json:"thresholds,omitempty"`
664 // ForceSendFields is a list of field names (e.g. "BatchDescriptor") to
665 // unconditionally include in API requests. By default, fields with empty or
666 // default values are omitted from API requests. See
667 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
668 // details.
669 ForceSendFields []string `json:"-"`
670 // NullFields is a list of field names (e.g. "BatchDescriptor") to include in
671 // API requests with the JSON null value. By default, fields with empty values
672 // are omitted from API requests. See
673 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
674 NullFields []string `json:"-"`
675 }
676
677 func (s BatchingConfigProto) MarshalJSON() ([]byte, error) {
678 type NoMethod BatchingConfigProto
679 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
680 }
681
682 // BatchingDescriptorProto: `BatchingDescriptorProto` specifies the fields of
683 // the request message to be used for batching, and, optionally, the fields of
684 // the response message to be used for demultiplexing.
685 type BatchingDescriptorProto struct {
686 // BatchedField: The repeated field in the request message to be aggregated by
687 // batching.
688 BatchedField string `json:"batchedField,omitempty"`
689 // DiscriminatorFields: A list of the fields in the request message. Two
690 // requests will be batched together only if the values of every field
691 // specified in `request_discriminator_fields` is equal between the two
692 // requests.
693 DiscriminatorFields []string `json:"discriminatorFields,omitempty"`
694 // SubresponseField: Optional. When present, indicates the field in the
695 // response message to be used to demultiplex the response into multiple
696 // response messages, in correspondence with the multiple request messages
697 // originally batched together.
698 SubresponseField string `json:"subresponseField,omitempty"`
699 // ForceSendFields is a list of field names (e.g. "BatchedField") to
700 // unconditionally include in API requests. By default, fields with empty or
701 // default values are omitted from API requests. See
702 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
703 // details.
704 ForceSendFields []string `json:"-"`
705 // NullFields is a list of field names (e.g. "BatchedField") to include in API
706 // requests with the JSON null value. By default, fields with empty values are
707 // omitted from API requests. See
708 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
709 NullFields []string `json:"-"`
710 }
711
712 func (s BatchingDescriptorProto) MarshalJSON() ([]byte, error) {
713 type NoMethod BatchingDescriptorProto
714 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
715 }
716
717 // BatchingSettingsProto: `BatchingSettingsProto` specifies a set of batching
718 // thresholds, each of which acts as a trigger to send a batch of messages as a
719 // request. At least one threshold must be positive nonzero.
720 type BatchingSettingsProto struct {
721 // DelayThreshold: The duration after which a batch should be sent, starting
722 // from the addition of the first message to that batch.
723 DelayThreshold string `json:"delayThreshold,omitempty"`
724 // ElementCountLimit: The maximum number of elements collected in a batch that
725 // could be accepted by server.
726 ElementCountLimit int64 `json:"elementCountLimit,omitempty"`
727 // ElementCountThreshold: The number of elements of a field collected into a
728 // batch which, if exceeded, causes the batch to be sent.
729 ElementCountThreshold int64 `json:"elementCountThreshold,omitempty"`
730 // FlowControlByteLimit: The maximum size of data allowed by flow control.
731 FlowControlByteLimit int64 `json:"flowControlByteLimit,omitempty"`
732 // FlowControlElementLimit: The maximum number of elements allowed by flow
733 // control.
734 FlowControlElementLimit int64 `json:"flowControlElementLimit,omitempty"`
735 // FlowControlLimitExceededBehavior: The behavior to take when the flow control
736 // limit is exceeded.
737 //
738 // Possible values:
739 // "UNSET_BEHAVIOR" - Default behavior, system-defined.
740 // "THROW_EXCEPTION" - Stop operation, raise error.
741 // "BLOCK" - Pause operation until limit clears.
742 // "IGNORE" - Continue operation, disregard limit.
743 FlowControlLimitExceededBehavior string `json:"flowControlLimitExceededBehavior,omitempty"`
744 // RequestByteLimit: The maximum size of the request that could be accepted by
745 // server.
746 RequestByteLimit int64 `json:"requestByteLimit,omitempty"`
747 // RequestByteThreshold: The aggregated size of the batched field which, if
748 // exceeded, causes the batch to be sent. This size is computed by aggregating
749 // the sizes of the request field to be batched, not of the entire request
750 // message.
751 RequestByteThreshold int64 `json:"requestByteThreshold,omitempty,string"`
752 // ForceSendFields is a list of field names (e.g. "DelayThreshold") to
753 // unconditionally include in API requests. By default, fields with empty or
754 // default values are omitted from API requests. See
755 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
756 // details.
757 ForceSendFields []string `json:"-"`
758 // NullFields is a list of field names (e.g. "DelayThreshold") to include in
759 // API requests with the JSON null value. By default, fields with empty values
760 // are omitted from API requests. See
761 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
762 NullFields []string `json:"-"`
763 }
764
765 func (s BatchingSettingsProto) MarshalJSON() ([]byte, error) {
766 type NoMethod BatchingSettingsProto
767 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
768 }
769
770 // Billing: Billing related configuration of the service. The following example
771 // shows how to configure monitored resources and metrics for billing,
772 // `consumer_destinations` is the only supported destination and the monitored
773 // resources need at least one label key `cloud.googleapis.com/location` to
774 // indicate the location of the billing usage, using different monitored
775 // resources between monitoring and billing is recommended so they can be
776 // evolved independently: monitored_resources: - type:
777 // library.googleapis.com/billing_branch labels: - key:
778 // cloud.googleapis.com/location description: | Predefined label to support
779 // billing location restriction. - key: city description: | Custom label to
780 // define the city where the library branch is located in. - key: name
781 // description: Custom label to define the name of the library branch. metrics:
782 // - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA
783 // value_type: INT64 unit: "1" billing: consumer_destinations: -
784 // monitored_resource: library.googleapis.com/billing_branch metrics: -
785 // library.googleapis.com/book/borrowed_count
786 type Billing struct {
787 // ConsumerDestinations: Billing configurations for sending metrics to the
788 // consumer project. There can be multiple consumer destinations per service,
789 // each one must have a different monitored resource type. A metric can be used
790 // in at most one consumer destination.
791 ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"`
792 // ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to
793 // unconditionally include in API requests. By default, fields with empty or
794 // default values are omitted from API requests. See
795 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
796 // details.
797 ForceSendFields []string `json:"-"`
798 // NullFields is a list of field names (e.g. "ConsumerDestinations") to include
799 // in API requests with the JSON null value. By default, fields with empty
800 // values are omitted from API requests. See
801 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
802 NullFields []string `json:"-"`
803 }
804
805 func (s Billing) MarshalJSON() ([]byte, error) {
806 type NoMethod Billing
807 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
808 }
809
810 // BillingDestination: Configuration of a specific billing destination
811 // (Currently only support bill against consumer project).
812 type BillingDestination struct {
813 // Metrics: Names of the metrics to report to this billing destination. Each
814 // name must be defined in Service.metrics section.
815 Metrics []string `json:"metrics,omitempty"`
816 // MonitoredResource: The monitored resource type. The type must be defined in
817 // Service.monitored_resources section.
818 MonitoredResource string `json:"monitoredResource,omitempty"`
819 // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally
820 // include in API requests. By default, fields with empty or default values are
821 // omitted from API requests. See
822 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
823 // details.
824 ForceSendFields []string `json:"-"`
825 // NullFields is a list of field names (e.g. "Metrics") to include in API
826 // requests with the JSON null value. By default, fields with empty values are
827 // omitted from API requests. See
828 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
829 NullFields []string `json:"-"`
830 }
831
832 func (s BillingDestination) MarshalJSON() ([]byte, error) {
833 type NoMethod BillingDestination
834 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
835 }
836
837 // ClientLibrarySettings: Details about how and where to publish client
838 // libraries.
839 type ClientLibrarySettings struct {
840 // CppSettings: Settings for C++ client libraries.
841 CppSettings *CppSettings `json:"cppSettings,omitempty"`
842 // DotnetSettings: Settings for .NET client libraries.
843 DotnetSettings *DotnetSettings `json:"dotnetSettings,omitempty"`
844 // GoSettings: Settings for Go client libraries.
845 GoSettings *GoSettings `json:"goSettings,omitempty"`
846 // JavaSettings: Settings for legacy Java features, supported in the Service
847 // YAML.
848 JavaSettings *JavaSettings `json:"javaSettings,omitempty"`
849 // LaunchStage: Launch stage of this version of the API.
850 //
851 // Possible values:
852 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
853 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use
854 // it.
855 // "PRELAUNCH" - Prelaunch features are hidden from users and are only
856 // visible internally.
857 // "EARLY_ACCESS" - Early Access features are limited to a closed group of
858 // testers. To use these features, you must sign up in advance and sign a
859 // Trusted Tester agreement (which includes confidentiality provisions). These
860 // features may be unstable, changed in backward-incompatible ways, and are not
861 // guaranteed to be released.
862 // "ALPHA" - Alpha is a limited availability test for releases before they
863 // are cleared for widespread use. By Alpha, all significant design issues are
864 // resolved and we are in the process of verifying functionality. Alpha
865 // customers need to apply for access, agree to applicable terms, and have
866 // their projects allowlisted. Alpha releases don't have to be feature
867 // complete, no SLAs are provided, and there are no technical support
868 // obligations, but they will be far enough along that customers can actually
869 // use them in test environments or for limited-use tests -- just like they
870 // would in normal production cases.
871 // "BETA" - Beta is the point at which we are ready to open a release for any
872 // customer to use. There are no SLA or technical support obligations in a Beta
873 // release. Products will be complete from a feature perspective, but may have
874 // some open outstanding issues. Beta releases are suitable for limited
875 // production use cases.
876 // "GA" - GA features are open to all developers and are considered stable
877 // and fully qualified for production use.
878 // "DEPRECATED" - Deprecated features are scheduled to be shut down and
879 // removed. For more information, see the "Deprecation Policy" section of our
880 // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud
881 // Platform Subject to the Deprecation
882 // Policy](https://cloud.google.com/terms/deprecation) documentation.
883 LaunchStage string `json:"launchStage,omitempty"`
884 // NodeSettings: Settings for Node client libraries.
885 NodeSettings *NodeSettings `json:"nodeSettings,omitempty"`
886 // PhpSettings: Settings for PHP client libraries.
887 PhpSettings *PhpSettings `json:"phpSettings,omitempty"`
888 // PythonSettings: Settings for Python client libraries.
889 PythonSettings *PythonSettings `json:"pythonSettings,omitempty"`
890 // RestNumericEnums: When using transport=rest, the client request will encode
891 // enums as numbers rather than strings.
892 RestNumericEnums bool `json:"restNumericEnums,omitempty"`
893 // RubySettings: Settings for Ruby client libraries.
894 RubySettings *RubySettings `json:"rubySettings,omitempty"`
895 // Version: Version of the API to apply these settings to. This is the full
896 // protobuf package for the API, ending in the version element. Examples:
897 // "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
898 Version string `json:"version,omitempty"`
899 // ForceSendFields is a list of field names (e.g. "CppSettings") to
900 // unconditionally include in API requests. By default, fields with empty or
901 // default values are omitted from API requests. See
902 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
903 // details.
904 ForceSendFields []string `json:"-"`
905 // NullFields is a list of field names (e.g. "CppSettings") to include in API
906 // requests with the JSON null value. By default, fields with empty values are
907 // omitted from API requests. See
908 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
909 NullFields []string `json:"-"`
910 }
911
912 func (s ClientLibrarySettings) MarshalJSON() ([]byte, error) {
913 type NoMethod ClientLibrarySettings
914 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
915 }
916
917 // CommonLanguageSettings: Required information for every language.
918 type CommonLanguageSettings struct {
919 // Destinations: The destination where API teams want this client library to be
920 // published.
921 //
922 // Possible values:
923 // "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" - Client libraries will neither
924 // be generated nor published to package managers.
925 // "GITHUB" - Generate the client library in a repo under
926 // github.com/googleapis, but don't publish it to package managers.
927 // "PACKAGE_MANAGER" - Publish the library to package managers like nuget.org
928 // and npmjs.com.
929 Destinations []string `json:"destinations,omitempty"`
930 // ReferenceDocsUri: Link to automatically generated reference documentation.
931 // Example: https://cloud.google.com/nodejs/docs/reference/asset/latest
932 ReferenceDocsUri string `json:"referenceDocsUri,omitempty"`
933 // SelectiveGapicGeneration: Configuration for which RPCs should be generated
934 // in the GAPIC client. Note: This field should not be used in most cases.
935 SelectiveGapicGeneration *SelectiveGapicGeneration `json:"selectiveGapicGeneration,omitempty"`
936 // ForceSendFields is a list of field names (e.g. "Destinations") to
937 // unconditionally include in API requests. By default, fields with empty or
938 // default values are omitted from API requests. See
939 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
940 // details.
941 ForceSendFields []string `json:"-"`
942 // NullFields is a list of field names (e.g. "Destinations") to include in API
943 // requests with the JSON null value. By default, fields with empty values are
944 // omitted from API requests. See
945 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
946 NullFields []string `json:"-"`
947 }
948
949 func (s CommonLanguageSettings) MarshalJSON() ([]byte, error) {
950 type NoMethod CommonLanguageSettings
951 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
952 }
953
954 // Context: `Context` defines which contexts an API requests. Example: context:
955 // rules: - selector: "*" requested: - google.rpc.context.ProjectContext -
956 // google.rpc.context.OriginContext The above specifies that all methods in the
957 // API request `google.rpc.context.ProjectContext` and
958 // `google.rpc.context.OriginContext`. Available context types are defined in
959 // package `google.rpc.context`. This also provides mechanism to allowlist any
960 // protobuf message extension that can be sent in grpc metadata using
961 // “x-goog-ext--bin” and “x-goog-ext--jspb” format. For example, list
962 // any service specific protobuf types that can appear in grpc metadata as
963 // follows in your yaml file: Example: context: rules: - selector:
964 // "google.example.library.v1.LibraryService.CreateBook"
965 // allowed_request_extensions: - google.foo.v1.NewExtension
966 // allowed_response_extensions: - google.foo.v1.NewExtension You can also
967 // specify extension ID instead of fully qualified extension name here.
968 type Context struct {
969 // Rules: A list of RPC context rules that apply to individual API methods.
970 // **NOTE:** All service configuration rules follow "last one wins" order.
971 Rules []*ContextRule `json:"rules,omitempty"`
972 // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally
973 // include in API requests. By default, fields with empty or default values are
974 // omitted from API requests. See
975 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
976 // details.
977 ForceSendFields []string `json:"-"`
978 // NullFields is a list of field names (e.g. "Rules") to include in API
979 // requests with the JSON null value. By default, fields with empty values are
980 // omitted from API requests. See
981 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
982 NullFields []string `json:"-"`
983 }
984
985 func (s Context) MarshalJSON() ([]byte, error) {
986 type NoMethod Context
987 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
988 }
989
990 // ContextRule: A context rule provides information about the context for an
991 // individual API element.
992 type ContextRule struct {
993 // AllowedRequestExtensions: A list of full type names or extension IDs of
994 // extensions allowed in grpc side channel from client to backend.
995 AllowedRequestExtensions []string `json:"allowedRequestExtensions,omitempty"`
996 // AllowedResponseExtensions: A list of full type names or extension IDs of
997 // extensions allowed in grpc side channel from backend to client.
998 AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"`
999 // Provided: A list of full type names of provided contexts. It is used to
1000 // support propagating HTTP headers and ETags from the response extension.
1001 Provided []string `json:"provided,omitempty"`
1002 // Requested: A list of full type names of requested contexts, only the
1003 // requested context will be made available to the backend.
1004 Requested []string `json:"requested,omitempty"`
1005 // Selector: Selects the methods to which this rule applies. Refer to selector
1006 // for syntax details.
1007 Selector string `json:"selector,omitempty"`
1008 // ForceSendFields is a list of field names (e.g. "AllowedRequestExtensions")
1009 // to unconditionally include in API requests. By default, fields with empty or
1010 // default values are omitted from API requests. See
1011 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1012 // details.
1013 ForceSendFields []string `json:"-"`
1014 // NullFields is a list of field names (e.g. "AllowedRequestExtensions") to
1015 // include in API requests with the JSON null value. By default, fields with
1016 // empty values are omitted from API requests. See
1017 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1018 NullFields []string `json:"-"`
1019 }
1020
1021 func (s ContextRule) MarshalJSON() ([]byte, error) {
1022 type NoMethod ContextRule
1023 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1024 }
1025
1026 // Control: Selects and configures the service controller used by the service.
1027 // Example: control: environment: servicecontrol.googleapis.com
1028 type Control struct {
1029 // Environment: The service controller environment to use. If empty, no control
1030 // plane features (like quota and billing) will be enabled. The recommended
1031 // value for most services is servicecontrol.googleapis.com.
1032 Environment string `json:"environment,omitempty"`
1033 // MethodPolicies: Defines policies applying to the API methods of the service.
1034 MethodPolicies []*MethodPolicy `json:"methodPolicies,omitempty"`
1035 // ForceSendFields is a list of field names (e.g. "Environment") to
1036 // unconditionally include in API requests. By default, fields with empty or
1037 // default values are omitted from API requests. See
1038 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1039 // details.
1040 ForceSendFields []string `json:"-"`
1041 // NullFields is a list of field names (e.g. "Environment") to include in API
1042 // requests with the JSON null value. By default, fields with empty values are
1043 // omitted from API requests. See
1044 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1045 NullFields []string `json:"-"`
1046 }
1047
1048 func (s Control) MarshalJSON() ([]byte, error) {
1049 type NoMethod Control
1050 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1051 }
1052
1053 // CppSettings: Settings for C++ client libraries.
1054 type CppSettings struct {
1055 // Common: Some settings.
1056 Common *CommonLanguageSettings `json:"common,omitempty"`
1057 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
1058 // include in API requests. By default, fields with empty or default values are
1059 // omitted from API requests. See
1060 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1061 // details.
1062 ForceSendFields []string `json:"-"`
1063 // NullFields is a list of field names (e.g. "Common") to include in API
1064 // requests with the JSON null value. By default, fields with empty values are
1065 // omitted from API requests. See
1066 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1067 NullFields []string `json:"-"`
1068 }
1069
1070 func (s CppSettings) MarshalJSON() ([]byte, error) {
1071 type NoMethod CppSettings
1072 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1073 }
1074
1075 // CustomError: Customize service error responses. For example, list any
1076 // service specific protobuf types that can appear in error detail lists of
1077 // error responses. Example: custom_error: types: - google.foo.v1.CustomError -
1078 // google.foo.v1.AnotherError
1079 type CustomError struct {
1080 // Rules: The list of custom error rules that apply to individual API messages.
1081 // **NOTE:** All service configuration rules follow "last one wins" order.
1082 Rules []*CustomErrorRule `json:"rules,omitempty"`
1083 // Types: The list of custom error detail types, e.g.
1084 // 'google.foo.v1.CustomError'.
1085 Types []string `json:"types,omitempty"`
1086 // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally
1087 // include in API requests. By default, fields with empty or default values are
1088 // omitted from API requests. See
1089 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1090 // details.
1091 ForceSendFields []string `json:"-"`
1092 // NullFields is a list of field names (e.g. "Rules") to include in API
1093 // requests with the JSON null value. By default, fields with empty values are
1094 // omitted from API requests. See
1095 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1096 NullFields []string `json:"-"`
1097 }
1098
1099 func (s CustomError) MarshalJSON() ([]byte, error) {
1100 type NoMethod CustomError
1101 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1102 }
1103
1104 // CustomErrorRule: A custom error rule.
1105 type CustomErrorRule struct {
1106 // IsErrorType: Mark this message as possible payload in error response.
1107 // Otherwise, objects of this type will be filtered when they appear in error
1108 // payload.
1109 IsErrorType bool `json:"isErrorType,omitempty"`
1110 // Selector: Selects messages to which this rule applies. Refer to selector for
1111 // syntax details.
1112 Selector string `json:"selector,omitempty"`
1113 // ForceSendFields is a list of field names (e.g. "IsErrorType") to
1114 // unconditionally include in API requests. By default, fields with empty or
1115 // default values are omitted from API requests. See
1116 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1117 // details.
1118 ForceSendFields []string `json:"-"`
1119 // NullFields is a list of field names (e.g. "IsErrorType") to include in API
1120 // requests with the JSON null value. By default, fields with empty values are
1121 // omitted from API requests. See
1122 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1123 NullFields []string `json:"-"`
1124 }
1125
1126 func (s CustomErrorRule) MarshalJSON() ([]byte, error) {
1127 type NoMethod CustomErrorRule
1128 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1129 }
1130
1131 // CustomHttpPattern: A custom pattern is used for defining custom HTTP verb.
1132 type CustomHttpPattern struct {
1133 // Kind: The name of this custom HTTP verb.
1134 Kind string `json:"kind,omitempty"`
1135 // Path: The path matched by this custom verb.
1136 Path string `json:"path,omitempty"`
1137 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
1138 // include in API requests. By default, fields with empty or default values are
1139 // omitted from API requests. See
1140 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1141 // details.
1142 ForceSendFields []string `json:"-"`
1143 // NullFields is a list of field names (e.g. "Kind") to include in API requests
1144 // with the JSON null value. By default, fields with empty values are omitted
1145 // from API requests. See
1146 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1147 NullFields []string `json:"-"`
1148 }
1149
1150 func (s CustomHttpPattern) MarshalJSON() ([]byte, error) {
1151 type NoMethod CustomHttpPattern
1152 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1153 }
1154
1155 // Documentation: `Documentation` provides the information for describing a
1156 // service. Example: documentation: summary: > The Google Calendar API gives
1157 // access to most calendar features. pages: - name: Overview content: (==
1158 // include google/foo/overview.md ==) - name: Tutorial content: (== include
1159 // google/foo/tutorial.md ==) subpages: - name: Java content: (== include
1160 // google/foo/tutorial_java.md ==) rules: - selector:
1161 // google.calendar.Calendar.Get description: > ... - selector:
1162 // google.calendar.Calendar.Put description: > ... Documentation is provided in
1163 // markdown syntax. In addition to standard markdown features, definition
1164 // lists, tables and fenced code blocks are supported. Section headers can be
1165 // provided and are interpreted relative to the section nesting of the context
1166 // where a documentation fragment is embedded. Documentation from the IDL is
1167 // merged with documentation defined via the config at normalization time,
1168 // where documentation provided by config rules overrides IDL provided. A
1169 // number of constructs specific to the API platform are supported in
1170 // documentation text. In order to reference a proto element, the following
1171 // notation can be used: [fully.qualified.proto.name][] To override the display
1172 // text used for the link, this can be used: [display
1173 // text][fully.qualified.proto.name] Text can be excluded from doc using the
1174 // following notation: (-- internal comment --) A few directives are available
1175 // in documentation. Note that directives must appear on a single line to be
1176 // properly identified. The `include` directive includes a markdown file from
1177 // an external source: (== include path/to/file ==) The `resource_for`
1178 // directive marks a message to be the resource of a collection in REST view.
1179 // If it is not specified, tools attempt to infer the resource from the
1180 // operations in a collection: (== resource_for v1.shelves.books ==) The
1181 // directive `suppress_warning` does not directly affect documentation and is
1182 // documented together with service config validation.
1183 type Documentation struct {
1184 // AdditionalIamInfo: Optional information about the IAM configuration. This is
1185 // typically used to link to documentation about a product's IAM roles and
1186 // permissions.
1187 AdditionalIamInfo string `json:"additionalIamInfo,omitempty"`
1188 // DocumentationRootUrl: The URL to the root of documentation.
1189 DocumentationRootUrl string `json:"documentationRootUrl,omitempty"`
1190 // Overview: Declares a single overview page. For example: documentation:
1191 // summary: ... overview: (== include overview.md ==) This is a shortcut for
1192 // the following declaration (using pages style): documentation: summary: ...
1193 // pages: - name: Overview content: (== include overview.md ==) Note: you
1194 // cannot specify both `overview` field and `pages` field.
1195 Overview string `json:"overview,omitempty"`
1196 // Pages: The top level pages for the documentation set.
1197 Pages []*Page `json:"pages,omitempty"`
1198 // Rules: A list of documentation rules that apply to individual API elements.
1199 // **NOTE:** All service configuration rules follow "last one wins" order.
1200 Rules []*DocumentationRule `json:"rules,omitempty"`
1201 // SectionOverrides: Specifies section and content to override the boilerplate
1202 // content. Currently overrides following sections: 1.
1203 // rest.service.client_libraries
1204 SectionOverrides []*Page `json:"sectionOverrides,omitempty"`
1205 // ServiceRootUrl: Specifies the service root url if the default one (the
1206 // service name from the yaml file) is not suitable. This can be seen in any
1207 // fully specified service urls as well as sections that show a base that other
1208 // urls are relative to.
1209 ServiceRootUrl string `json:"serviceRootUrl,omitempty"`
1210 // Summary: A short description of what the service does. The summary must be
1211 // plain text. It becomes the overview of the service displayed in Google Cloud
1212 // Console. NOTE: This field is equivalent to the standard field `description`.
1213 Summary string `json:"summary,omitempty"`
1214 // ForceSendFields is a list of field names (e.g. "AdditionalIamInfo") to
1215 // unconditionally include in API requests. By default, fields with empty or
1216 // default values are omitted from API requests. See
1217 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1218 // details.
1219 ForceSendFields []string `json:"-"`
1220 // NullFields is a list of field names (e.g. "AdditionalIamInfo") to include in
1221 // API requests with the JSON null value. By default, fields with empty values
1222 // are omitted from API requests. See
1223 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1224 NullFields []string `json:"-"`
1225 }
1226
1227 func (s Documentation) MarshalJSON() ([]byte, error) {
1228 type NoMethod Documentation
1229 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1230 }
1231
1232 // DocumentationRule: A documentation rule provides information about
1233 // individual API elements.
1234 type DocumentationRule struct {
1235 // DeprecationDescription: Deprecation description of the selected element(s).
1236 // It can be provided if an element is marked as `deprecated`.
1237 DeprecationDescription string `json:"deprecationDescription,omitempty"`
1238 // Description: Description of the selected proto element (e.g. a message, a
1239 // method, a 'service' definition, or a field). Defaults to leading & trailing
1240 // comments taken from the proto source definition of the proto element.
1241 Description string `json:"description,omitempty"`
1242 // DisableReplacementWords: String of comma or space separated case-sensitive
1243 // words for which method/field name replacement will be disabled.
1244 DisableReplacementWords string `json:"disableReplacementWords,omitempty"`
1245 // Selector: The selector is a comma-separated list of patterns for any element
1246 // such as a method, a field, an enum value. Each pattern is a qualified name
1247 // of the element which may end in "*", indicating a wildcard. Wildcards are
1248 // only allowed at the end and for a whole component of the qualified name,
1249 // i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
1250 // one or more components. To specify a default for all applicable elements,
1251 // the whole pattern "*" is used.
1252 Selector string `json:"selector,omitempty"`
1253 // ForceSendFields is a list of field names (e.g. "DeprecationDescription") to
1254 // unconditionally include in API requests. By default, fields with empty or
1255 // default values are omitted from API requests. See
1256 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1257 // details.
1258 ForceSendFields []string `json:"-"`
1259 // NullFields is a list of field names (e.g. "DeprecationDescription") to
1260 // include in API requests with the JSON null value. By default, fields with
1261 // empty values are omitted from API requests. See
1262 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1263 NullFields []string `json:"-"`
1264 }
1265
1266 func (s DocumentationRule) MarshalJSON() ([]byte, error) {
1267 type NoMethod DocumentationRule
1268 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1269 }
1270
1271 // DotnetSettings: Settings for Dotnet client libraries.
1272 type DotnetSettings struct {
1273 // Common: Some settings.
1274 Common *CommonLanguageSettings `json:"common,omitempty"`
1275 // ForcedNamespaceAliases: Namespaces which must be aliased in snippets due to
1276 // a known (but non-generator-predictable) naming collision
1277 ForcedNamespaceAliases []string `json:"forcedNamespaceAliases,omitempty"`
1278 // HandwrittenSignatures: Method signatures (in the form
1279 // "service.method(signature)") which are provided separately, so shouldn't be
1280 // generated. Snippets *calling* these methods are still generated, however.
1281 HandwrittenSignatures []string `json:"handwrittenSignatures,omitempty"`
1282 // IgnoredResources: List of full resource types to ignore during generation.
1283 // This is typically used for API-specific Location resources, which should be
1284 // handled by the generator as if they were actually the common Location
1285 // resources. Example entry: "documentai.googleapis.com/Location"
1286 IgnoredResources []string `json:"ignoredResources,omitempty"`
1287 // RenamedResources: Map from full resource types to the effective short name
1288 // for the resource. This is used when otherwise resource named from different
1289 // services would cause naming collisions. Example entry:
1290 // "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
1291 RenamedResources map[string]string `json:"renamedResources,omitempty"`
1292 // RenamedServices: Map from original service names to renamed versions. This
1293 // is used when the default generated types would cause a naming conflict.
1294 // (Neither name is fully-qualified.) Example: Subscriber to
1295 // SubscriberServiceApi.
1296 RenamedServices map[string]string `json:"renamedServices,omitempty"`
1297 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
1298 // include in API requests. By default, fields with empty or default values are
1299 // omitted from API requests. See
1300 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1301 // details.
1302 ForceSendFields []string `json:"-"`
1303 // NullFields is a list of field names (e.g. "Common") to include in API
1304 // requests with the JSON null value. By default, fields with empty values are
1305 // omitted from API requests. See
1306 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1307 NullFields []string `json:"-"`
1308 }
1309
1310 func (s DotnetSettings) MarshalJSON() ([]byte, error) {
1311 type NoMethod DotnetSettings
1312 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1313 }
1314
1315 // Empty: A generic empty message that you can re-use to avoid defining
1316 // duplicated empty messages in your APIs. A typical example is to use it as
1317 // the request or the response type of an API method. For instance: service Foo
1318 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
1319 type Empty struct {
1320 }
1321
1322 // Endpoint: `Endpoint` describes a network address of a service that serves a
1323 // set of APIs. It is commonly known as a service endpoint. A service may
1324 // expose any number of service endpoints, and all service endpoints share the
1325 // same service definition, such as quota limits and monitoring metrics.
1326 // Example: type: google.api.Service name: library-example.googleapis.com
1327 // endpoints: # Declares network address
1328 // `https://library-example.googleapis.com` # for service
1329 // `library-example.googleapis.com`. The `https` scheme # is implicit for all
1330 // service endpoints. Other schemes may be # supported in the future. - name:
1331 // library-example.googleapis.com allow_cors: false - name:
1332 // content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls
1333 // to be passed to the API frontend, for it # to decide whether the subsequent
1334 // cross-origin request is allowed # to proceed. allow_cors: true
1335 type Endpoint struct {
1336 // Aliases: Aliases for this endpoint, these will be served by the same UrlMap
1337 // as the parent endpoint, and will be provisioned in the GCP stack for the
1338 // Regional Endpoints.
1339 Aliases []string `json:"aliases,omitempty"`
1340 // AllowCors: Allowing CORS
1341 // (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
1342 // cross-domain traffic, would allow the backends served from this endpoint to
1343 // receive and respond to HTTP OPTIONS requests. The response will be used by
1344 // the browser to determine whether the subsequent cross-origin request is
1345 // allowed to proceed.
1346 AllowCors bool `json:"allowCors,omitempty"`
1347 // Name: The canonical name of this endpoint.
1348 Name string `json:"name,omitempty"`
1349 // Target: The specification of an Internet routable address of API frontend
1350 // that will handle requests to this API Endpoint
1351 // (https://cloud.google.com/apis/design/glossary). It should be either a valid
1352 // IPv4 address or a fully-qualified domain name. For example, "8.8.8.8" or
1353 // "myservice.appspot.com".
1354 Target string `json:"target,omitempty"`
1355 // ForceSendFields is a list of field names (e.g. "Aliases") to unconditionally
1356 // include in API requests. By default, fields with empty or default values are
1357 // omitted from API requests. See
1358 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1359 // details.
1360 ForceSendFields []string `json:"-"`
1361 // NullFields is a list of field names (e.g. "Aliases") to include in API
1362 // requests with the JSON null value. By default, fields with empty values are
1363 // omitted from API requests. See
1364 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1365 NullFields []string `json:"-"`
1366 }
1367
1368 func (s Endpoint) MarshalJSON() ([]byte, error) {
1369 type NoMethod Endpoint
1370 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1371 }
1372
1373 // Enum: Enum type definition. New usages of this message as an alternative to
1374 // EnumDescriptorProto are strongly discouraged. This message does not
1375 // reliability preserve all information necessary to model the schema and
1376 // preserve semantics. Instead make use of FileDescriptorSet which preserves
1377 // the necessary information.
1378 type Enum struct {
1379 // Edition: The source edition string, only valid when syntax is
1380 // SYNTAX_EDITIONS.
1381 Edition string `json:"edition,omitempty"`
1382 // Enumvalue: Enum value definitions.
1383 Enumvalue []*EnumValue `json:"enumvalue,omitempty"`
1384 // Name: Enum type name.
1385 Name string `json:"name,omitempty"`
1386 // Options: Protocol buffer options.
1387 Options []*Option `json:"options,omitempty"`
1388 // SourceContext: The source context.
1389 SourceContext *SourceContext `json:"sourceContext,omitempty"`
1390 // Syntax: The source syntax.
1391 //
1392 // Possible values:
1393 // "SYNTAX_PROTO2" - Syntax `proto2`.
1394 // "SYNTAX_PROTO3" - Syntax `proto3`.
1395 // "SYNTAX_EDITIONS" - Syntax `editions`.
1396 Syntax string `json:"syntax,omitempty"`
1397 // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally
1398 // include in API requests. By default, fields with empty or default values are
1399 // omitted from API requests. See
1400 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1401 // details.
1402 ForceSendFields []string `json:"-"`
1403 // NullFields is a list of field names (e.g. "Edition") to include in API
1404 // requests with the JSON null value. By default, fields with empty values are
1405 // omitted from API requests. See
1406 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1407 NullFields []string `json:"-"`
1408 }
1409
1410 func (s Enum) MarshalJSON() ([]byte, error) {
1411 type NoMethod Enum
1412 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1413 }
1414
1415 // EnumValue: Enum value definition. New usages of this message as an
1416 // alternative to EnumValueDescriptorProto are strongly discouraged. This
1417 // message does not reliability preserve all information necessary to model the
1418 // schema and preserve semantics. Instead make use of FileDescriptorSet which
1419 // preserves the necessary information.
1420 type EnumValue struct {
1421 // Name: Enum value name.
1422 Name string `json:"name,omitempty"`
1423 // Number: Enum value number.
1424 Number int64 `json:"number,omitempty"`
1425 // Options: Protocol buffer options.
1426 Options []*Option `json:"options,omitempty"`
1427 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
1428 // include in API requests. By default, fields with empty or default values are
1429 // omitted from API requests. See
1430 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1431 // details.
1432 ForceSendFields []string `json:"-"`
1433 // NullFields is a list of field names (e.g. "Name") to include in API requests
1434 // with the JSON null value. By default, fields with empty values are omitted
1435 // from API requests. See
1436 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1437 NullFields []string `json:"-"`
1438 }
1439
1440 func (s EnumValue) MarshalJSON() ([]byte, error) {
1441 type NoMethod EnumValue
1442 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1443 }
1444
1445 // ExperimentalFeatures: Experimental features to be included during client
1446 // library generation. These fields will be deprecated once the feature
1447 // graduates and is enabled by default.
1448 type ExperimentalFeatures struct {
1449 // ProtobufPythonicTypesEnabled: Enables generation of protobuf code using new
1450 // types that are more Pythonic which are included in `protobuf>=5.29.x`. This
1451 // feature will be enabled by default 1 month after launching the feature in
1452 // preview packages.
1453 ProtobufPythonicTypesEnabled bool `json:"protobufPythonicTypesEnabled,omitempty"`
1454 // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if
1455 // `rest` transport is enabled. By default, asynchronous REST clients will not
1456 // be generated. This feature will be enabled by default 1 month after
1457 // launching the feature in preview packages.
1458 RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"`
1459 // UnversionedPackageDisabled: Disables generation of an unversioned Python
1460 // package for this client library. This means that the module names will need
1461 // to be versioned in import statements. For example `import
1462 // google.cloud.library_v2` instead of `import google.cloud.library`.
1463 UnversionedPackageDisabled bool `json:"unversionedPackageDisabled,omitempty"`
1464 // ForceSendFields is a list of field names (e.g.
1465 // "ProtobufPythonicTypesEnabled") to unconditionally include in API requests.
1466 // By default, fields with empty or default values are omitted from API
1467 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1468 // for more details.
1469 ForceSendFields []string `json:"-"`
1470 // NullFields is a list of field names (e.g. "ProtobufPythonicTypesEnabled") to
1471 // include in API requests with the JSON null value. By default, fields with
1472 // empty values are omitted from API requests. See
1473 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1474 NullFields []string `json:"-"`
1475 }
1476
1477 func (s ExperimentalFeatures) MarshalJSON() ([]byte, error) {
1478 type NoMethod ExperimentalFeatures
1479 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1480 }
1481
1482 // Field: A single field of a message type. New usages of this message as an
1483 // alternative to FieldDescriptorProto are strongly discouraged. This message
1484 // does not reliability preserve all information necessary to model the schema
1485 // and preserve semantics. Instead make use of FileDescriptorSet which
1486 // preserves the necessary information.
1487 type Field struct {
1488 // Cardinality: The field cardinality.
1489 //
1490 // Possible values:
1491 // "CARDINALITY_UNKNOWN" - For fields with unknown cardinality.
1492 // "CARDINALITY_OPTIONAL" - For optional fields.
1493 // "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only.
1494 // "CARDINALITY_REPEATED" - For repeated fields.
1495 Cardinality string `json:"cardinality,omitempty"`
1496 // DefaultValue: The string value of the default value of this field. Proto2
1497 // syntax only.
1498 DefaultValue string `json:"defaultValue,omitempty"`
1499 // JsonName: The field JSON name.
1500 JsonName string `json:"jsonName,omitempty"`
1501 // Kind: The field type.
1502 //
1503 // Possible values:
1504 // "TYPE_UNKNOWN" - Field type unknown.
1505 // "TYPE_DOUBLE" - Field type double.
1506 // "TYPE_FLOAT" - Field type float.
1507 // "TYPE_INT64" - Field type int64.
1508 // "TYPE_UINT64" - Field type uint64.
1509 // "TYPE_INT32" - Field type int32.
1510 // "TYPE_FIXED64" - Field type fixed64.
1511 // "TYPE_FIXED32" - Field type fixed32.
1512 // "TYPE_BOOL" - Field type bool.
1513 // "TYPE_STRING" - Field type string.
1514 // "TYPE_GROUP" - Field type group. Proto2 syntax only, and deprecated.
1515 // "TYPE_MESSAGE" - Field type message.
1516 // "TYPE_BYTES" - Field type bytes.
1517 // "TYPE_UINT32" - Field type uint32.
1518 // "TYPE_ENUM" - Field type enum.
1519 // "TYPE_SFIXED32" - Field type sfixed32.
1520 // "TYPE_SFIXED64" - Field type sfixed64.
1521 // "TYPE_SINT32" - Field type sint32.
1522 // "TYPE_SINT64" - Field type sint64.
1523 Kind string `json:"kind,omitempty"`
1524 // Name: The field name.
1525 Name string `json:"name,omitempty"`
1526 // Number: The field number.
1527 Number int64 `json:"number,omitempty"`
1528 // OneofIndex: The index of the field type in `Type.oneofs`, for message or
1529 // enumeration types. The first type has index 1; zero means the type is not in
1530 // the list.
1531 OneofIndex int64 `json:"oneofIndex,omitempty"`
1532 // Options: The protocol buffer options.
1533 Options []*Option `json:"options,omitempty"`
1534 // Packed: Whether to use alternative packed wire representation.
1535 Packed bool `json:"packed,omitempty"`
1536 // TypeUrl: The field type URL, without the scheme, for message or enumeration
1537 // types. Example: "type.googleapis.com/google.protobuf.Timestamp".
1538 TypeUrl string `json:"typeUrl,omitempty"`
1539 // ForceSendFields is a list of field names (e.g. "Cardinality") to
1540 // unconditionally include in API requests. By default, fields with empty or
1541 // default values are omitted from API requests. See
1542 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1543 // details.
1544 ForceSendFields []string `json:"-"`
1545 // NullFields is a list of field names (e.g. "Cardinality") to include in API
1546 // requests with the JSON null value. By default, fields with empty values are
1547 // omitted from API requests. See
1548 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1549 NullFields []string `json:"-"`
1550 }
1551
1552 func (s Field) MarshalJSON() ([]byte, error) {
1553 type NoMethod Field
1554 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1555 }
1556
1557 // FieldPolicy: Google API Policy Annotation This message defines a simple API
1558 // policy annotation that can be used to annotate API request and response
1559 // message fields with applicable policies. One field may have multiple
1560 // applicable policies that must all be satisfied before a request can be
1561 // processed. This policy annotation is used to generate the overall policy
1562 // that will be used for automatic runtime policy enforcement and documentation
1563 // generation.
1564 type FieldPolicy struct {
1565 // ResourcePermission: Specifies the required permission(s) for the resource
1566 // referred to by the field. It requires the field contains a valid resource
1567 // reference, and the request must pass the permission checks to proceed. For
1568 // example, "resourcemanager.projects.get".
1569 ResourcePermission string `json:"resourcePermission,omitempty"`
1570 // ResourceType: Specifies the resource type for the resource referred to by
1571 // the field.
1572 ResourceType string `json:"resourceType,omitempty"`
1573 // Selector: Selects one or more request or response message fields to apply
1574 // this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the
1575 // selector must be left as empty. The service config generator will
1576 // automatically fill the correct value. When a `FieldPolicy` is used in
1577 // service config, the selector must be a comma-separated string with valid
1578 // request or response field paths, such as "foo.bar" or "foo.bar,foo.baz".
1579 Selector string `json:"selector,omitempty"`
1580 // ForceSendFields is a list of field names (e.g. "ResourcePermission") to
1581 // unconditionally include in API requests. By default, fields with empty or
1582 // default values are omitted from API requests. See
1583 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1584 // details.
1585 ForceSendFields []string `json:"-"`
1586 // NullFields is a list of field names (e.g. "ResourcePermission") to include
1587 // in API requests with the JSON null value. By default, fields with empty
1588 // values are omitted from API requests. See
1589 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1590 NullFields []string `json:"-"`
1591 }
1592
1593 func (s FieldPolicy) MarshalJSON() ([]byte, error) {
1594 type NoMethod FieldPolicy
1595 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1596 }
1597
1598 // GoSettings: Settings for Go client libraries.
1599 type GoSettings struct {
1600 // Common: Some settings.
1601 Common *CommonLanguageSettings `json:"common,omitempty"`
1602 // RenamedServices: Map of service names to renamed services. Keys are the
1603 // package relative service names and values are the name to be used for the
1604 // service client and call options. Example: publishing: go_settings:
1605 // renamed_services: Publisher: TopicAdmin
1606 RenamedServices map[string]string `json:"renamedServices,omitempty"`
1607 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
1608 // include in API requests. By default, fields with empty or default values are
1609 // omitted from API requests. See
1610 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1611 // details.
1612 ForceSendFields []string `json:"-"`
1613 // NullFields is a list of field names (e.g. "Common") to include in API
1614 // requests with the JSON null value. By default, fields with empty values are
1615 // omitted from API requests. See
1616 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1617 NullFields []string `json:"-"`
1618 }
1619
1620 func (s GoSettings) MarshalJSON() ([]byte, error) {
1621 type NoMethod GoSettings
1622 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1623 }
1624
1625 // Http: Defines the HTTP configuration for an API service. It contains a list
1626 // of HttpRule, each specifying the mapping of an RPC method to one or more
1627 // HTTP REST API methods.
1628 type Http struct {
1629 // FullyDecodeReservedExpansion: When set to true, URL path parameters will be
1630 // fully URI-decoded except in cases of single segment matches in reserved
1631 // expansion, where "%2F" will be left encoded. The default behavior is to not
1632 // decode RFC 6570 reserved characters in multi segment matches.
1633 FullyDecodeReservedExpansion bool `json:"fullyDecodeReservedExpansion,omitempty"`
1634 // Rules: A list of HTTP configuration rules that apply to individual API
1635 // methods. **NOTE:** All service configuration rules follow "last one wins"
1636 // order.
1637 Rules []*HttpRule `json:"rules,omitempty"`
1638 // ForceSendFields is a list of field names (e.g.
1639 // "FullyDecodeReservedExpansion") to unconditionally include in API requests.
1640 // By default, fields with empty or default values are omitted from API
1641 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1642 // for more details.
1643 ForceSendFields []string `json:"-"`
1644 // NullFields is a list of field names (e.g. "FullyDecodeReservedExpansion") to
1645 // include in API requests with the JSON null value. By default, fields with
1646 // empty values are omitted from API requests. See
1647 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1648 NullFields []string `json:"-"`
1649 }
1650
1651 func (s Http) MarshalJSON() ([]byte, error) {
1652 type NoMethod Http
1653 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1654 }
1655
1656 // HttpRule: gRPC Transcoding gRPC Transcoding is a feature for mapping between
1657 // a gRPC method and one or more HTTP REST endpoints. It allows developers to
1658 // build a single API service that supports both gRPC APIs and REST APIs. Many
1659 // systems, including Google APIs (https://github.com/googleapis/googleapis),
1660 // Cloud Endpoints (https://cloud.google.com/endpoints), gRPC Gateway
1661 // (https://github.com/grpc-ecosystem/grpc-gateway), and Envoy
1662 // (https://github.com/envoyproxy/envoy) proxy support this feature and use it
1663 // for large scale production services. `HttpRule` defines the schema of the
1664 // gRPC/REST mapping. The mapping specifies how different portions of the gRPC
1665 // request message are mapped to the URL path, URL query parameters, and HTTP
1666 // request body. It also controls how the gRPC response message is mapped to
1667 // the HTTP response body. `HttpRule` is typically specified as an
1668 // `google.api.http` annotation on the gRPC method. Each mapping specifies a
1669 // URL path template and an HTTP method. The path template may refer to one or
1670 // more fields in the gRPC request message, as long as each field is a
1671 // non-repeated field with a primitive (non-message) type. The path template
1672 // controls how fields of the request message are mapped to the URL path.
1673 // Example: service Messaging { rpc GetMessage(GetMessageRequest) returns
1674 // (Message) { option (google.api.http) = { get: "/v1/{name=messages/*}" }; } }
1675 // message GetMessageRequest { string name = 1; // Mapped to URL path. }
1676 // message Message { string text = 1; // The resource content. } This enables
1677 // an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` -
1678 // gRPC: `GetMessage(name: "messages/123456")` Any fields in the request
1679 // message which are not bound by the path template automatically become HTTP
1680 // query parameters if there is no HTTP request body. For example: service
1681 // Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option
1682 // (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message
1683 // GetMessageRequest { message SubMessage { string subfield = 1; } string
1684 // message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL
1685 // query parameter `revision`. SubMessage sub = 3; // Mapped to URL query
1686 // parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as
1687 // below: - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` - gRPC:
1688 // `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
1689 // "foo"))` Note that fields which are mapped to URL query parameters must have
1690 // a primitive type or a repeated primitive type or a non-repeated message
1691 // type. In the case of a repeated type, the parameter can be repeated in the
1692 // URL as `...?param=A&param=B`. In the case of a message type, each field of
1693 // the message is mapped to a separate parameter, such as
1694 // `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body,
1695 // the `body` field specifies the mapping. Consider a REST update method on the
1696 // message resource collection: service Messaging { rpc
1697 // UpdateMessage(UpdateMessageRequest) returns (Message) { option
1698 // (google.api.http) = { patch: "/v1/messages/{message_id}" body: "message" };
1699 // } } message UpdateMessageRequest { string message_id = 1; // mapped to the
1700 // URL Message message = 2; // mapped to the body } The following HTTP JSON to
1701 // RPC mapping is enabled, where the representation of the JSON in the request
1702 // body is determined by protos JSON encoding: - HTTP: `PATCH
1703 // /v1/messages/123456 { "text": "Hi!" }` - gRPC: `UpdateMessage(message_id:
1704 // "123456" message { text: "Hi!" })` The special name `*` can be used in the
1705 // body mapping to define that every field not bound by the path template
1706 // should be mapped to the request body. This enables the following alternative
1707 // definition of the update method: service Messaging { rpc
1708 // UpdateMessage(Message) returns (Message) { option (google.api.http) = {
1709 // patch: "/v1/messages/{message_id}" body: "*" }; } } message Message { string
1710 // message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is
1711 // enabled: - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - gRPC:
1712 // `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using `*`
1713 // in the body mapping, it is not possible to have HTTP parameters, as all
1714 // fields not bound by the path end in the body. This makes this option more
1715 // rarely used in practice when defining REST APIs. The common usage of `*` is
1716 // in custom methods which don't use the URL at all for transferring data. It
1717 // is possible to define multiple HTTP methods for one RPC by using the
1718 // `additional_bindings` option. Example: service Messaging { rpc
1719 // GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) =
1720 // { get: "/v1/messages/{message_id}" additional_bindings { get:
1721 // "/v1/users/{user_id}/messages/{message_id}" } }; } } message
1722 // GetMessageRequest { string message_id = 1; string user_id = 2; } This
1723 // enables the following two alternative HTTP JSON to RPC mappings: - HTTP:
1724 // `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: "123456")` - HTTP:
1725 // `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: "me"
1726 // message_id: "123456")` Rules for HTTP mapping 1. Leaf request fields
1727 // (recursive expansion nested messages in the request message) are classified
1728 // into three categories: - Fields referred by the path template. They are
1729 // passed via the URL path. - Fields referred by the HttpRule.body. They are
1730 // passed via the HTTP request body. - All other fields are passed via the URL
1731 // query parameters, and the parameter name is the field path in the request
1732 // message. A repeated field can be represented as multiple query parameters
1733 // under the same name. 2. If HttpRule.body is "*", there is no URL query
1734 // parameter, all fields are passed via URL path and HTTP request body. 3. If
1735 // HttpRule.body is omitted, there is no HTTP request body, all fields are
1736 // passed via URL path and URL query parameters. Path template syntax Template
1737 // = "/" Segments [ Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*"
1738 // | "**" | LITERAL | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}"
1739 // ; FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*`
1740 // matches a single URL path segment. The syntax `**` matches zero or more URL
1741 // path segments, which must be the last part of the URL path except the
1742 // `Verb`. The syntax `Variable` matches part of the URL path as specified by
1743 // its template. A variable template must not contain other variables. If a
1744 // variable matches a single path segment, its template may be omitted, e.g.
1745 // `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal
1746 // text in the URL path. If the `LITERAL` contains any reserved character, such
1747 // characters should be percent-encoded before the matching. If a variable
1748 // contains exactly one path segment, such as "{var}" or "{var=*}", when
1749 // such a variable is expanded into a URL path on the client side, all
1750 // characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side
1751 // does the reverse decoding. Such variables show up in the Discovery Document
1752 // (https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a
1753 // variable contains multiple path segments, such as "{var=foo/*}" or
1754 // "{var=**}", when such a variable is expanded into a URL path on the client
1755 // side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The
1756 // server side does the reverse decoding, except "%2F" and "%2f" are left
1757 // unchanged. Such variables show up in the Discovery Document
1758 // (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`.
1759 // Using gRPC API Service Configuration gRPC API Service Configuration (service
1760 // config) is a configuration language for configuring a gRPC service to become
1761 // a user-facing product. The service config is simply the YAML representation
1762 // of the `google.api.Service` proto message. As an alternative to annotating
1763 // your proto file, you can configure gRPC transcoding in your service config
1764 // YAML files. You do this by specifying a `HttpRule` that maps the gRPC method
1765 // to a REST endpoint, achieving the same effect as the proto annotation. This
1766 // can be particularly useful if you have a proto that is reused in multiple
1767 // services. Note that any transcoding specified in the service config will
1768 // override any matching transcoding configuration in the proto. The following
1769 // example selects a gRPC method and applies an `HttpRule` to it: http: rules:
1770 // - selector: example.v1.Messaging.GetMessage get:
1771 // /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding
1772 // is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion
1773 // must follow the proto3 specification
1774 // (https://developers.google.com/protocol-buffers/docs/proto3#json). While the
1775 // single segment variable follows the semantics of RFC 6570
1776 // (https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion,
1777 // the multi segment variable **does not** follow RFC 6570 Section 3.2.3
1778 // Reserved Expansion. The reason is that the Reserved Expansion does not
1779 // expand special characters like `?` and `#`, which would lead to invalid
1780 // URLs. As the result, gRPC Transcoding uses a custom encoding for multi
1781 // segment variables. The path variables **must not** refer to any repeated or
1782 // mapped field, because client libraries are not capable of handling such
1783 // variable expansion. The path variables **must not** capture the leading "/"
1784 // character. The reason is that the most common use case "{var}" does not
1785 // capture the leading "/" character. For consistency, all path variables must
1786 // share the same behavior. Repeated message fields must not be mapped to URL
1787 // query parameters, because no client library can support such complicated
1788 // mapping. If an API needs to use a JSON array for request or response body,
1789 // it can map the request or response body to a repeated field. However, some
1790 // gRPC Transcoding implementations may not support this feature.
1791 type HttpRule struct {
1792 // AdditionalBindings: Additional HTTP bindings for the selector. Nested
1793 // bindings must not contain an `additional_bindings` field themselves (that
1794 // is, the nesting may only be one level deep).
1795 AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"`
1796 // Body: The name of the request field whose value is mapped to the HTTP
1797 // request body, or `*` for mapping all request fields not captured by the path
1798 // pattern to the HTTP body, or omitted for not having any HTTP request body.
1799 // NOTE: the referred field must be present at the top-level of the request
1800 // message type.
1801 Body string `json:"body,omitempty"`
1802 // Custom: The custom pattern is used for specifying an HTTP method that is not
1803 // included in the `pattern` field, such as HEAD, or "*" to leave the HTTP
1804 // method unspecified for this rule. The wild-card rule is useful for services
1805 // that provide content to Web (HTML) clients.
1806 Custom *CustomHttpPattern `json:"custom,omitempty"`
1807 // Delete: Maps to HTTP DELETE. Used for deleting a resource.
1808 Delete string `json:"delete,omitempty"`
1809 // Get: Maps to HTTP GET. Used for listing and getting information about
1810 // resources.
1811 Get string `json:"get,omitempty"`
1812 // Patch: Maps to HTTP PATCH. Used for updating a resource.
1813 Patch string `json:"patch,omitempty"`
1814 // Post: Maps to HTTP POST. Used for creating a resource or performing an
1815 // action.
1816 Post string `json:"post,omitempty"`
1817 // Put: Maps to HTTP PUT. Used for replacing a resource.
1818 Put string `json:"put,omitempty"`
1819 // ResponseBody: Optional. The name of the response field whose value is mapped
1820 // to the HTTP response body. When omitted, the entire response message will be
1821 // used as the HTTP response body. NOTE: The referred field must be present at
1822 // the top-level of the response message type.
1823 ResponseBody string `json:"responseBody,omitempty"`
1824 // Selector: Selects a method to which this rule applies. Refer to selector for
1825 // syntax details.
1826 Selector string `json:"selector,omitempty"`
1827 // ForceSendFields is a list of field names (e.g. "AdditionalBindings") to
1828 // unconditionally include in API requests. By default, fields with empty or
1829 // default values are omitted from API requests. See
1830 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1831 // details.
1832 ForceSendFields []string `json:"-"`
1833 // NullFields is a list of field names (e.g. "AdditionalBindings") to include
1834 // in API requests with the JSON null value. By default, fields with empty
1835 // values are omitted from API requests. See
1836 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1837 NullFields []string `json:"-"`
1838 }
1839
1840 func (s HttpRule) MarshalJSON() ([]byte, error) {
1841 type NoMethod HttpRule
1842 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1843 }
1844
1845 // JavaSettings: Settings for Java client libraries.
1846 type JavaSettings struct {
1847 // Common: Some settings.
1848 Common *CommonLanguageSettings `json:"common,omitempty"`
1849 // LibraryPackage: The package name to use in Java. Clobbers the java_package
1850 // option set in the protobuf. This should be used **only** by APIs who have
1851 // already set the language_settings.java.package_name" field in gapic.yaml.
1852 // API teams should use the protobuf java_package option where possible.
1853 // Example of a YAML configuration:: publishing: library_settings:
1854 // java_settings: library_package: com.google.cloud.pubsub.v1
1855 LibraryPackage string `json:"libraryPackage,omitempty"`
1856 // ServiceClassNames: Configure the Java class name to use instead of the
1857 // service's for its corresponding generated GAPIC client. Keys are
1858 // fully-qualified service names as they appear in the protobuf (including the
1859 // full the language_settings.java.interface_names" field in gapic.yaml. API
1860 // teams should otherwise use the service name as it appears in the protobuf.
1861 // Example of a YAML configuration:: publishing: java_settings:
1862 // service_class_names: - google.pubsub.v1.Publisher: TopicAdmin -
1863 // google.pubsub.v1.Subscriber: SubscriptionAdmin
1864 ServiceClassNames map[string]string `json:"serviceClassNames,omitempty"`
1865 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
1866 // include in API requests. By default, fields with empty or default values are
1867 // omitted from API requests. See
1868 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1869 // details.
1870 ForceSendFields []string `json:"-"`
1871 // NullFields is a list of field names (e.g. "Common") to include in API
1872 // requests with the JSON null value. By default, fields with empty values are
1873 // omitted from API requests. See
1874 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1875 NullFields []string `json:"-"`
1876 }
1877
1878 func (s JavaSettings) MarshalJSON() ([]byte, error) {
1879 type NoMethod JavaSettings
1880 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1881 }
1882
1883 // JwtLocation: Specifies a location to extract JWT from an API request.
1884 type JwtLocation struct {
1885 // Cookie: Specifies cookie name to extract JWT token.
1886 Cookie string `json:"cookie,omitempty"`
1887 // Header: Specifies HTTP header name to extract JWT token.
1888 Header string `json:"header,omitempty"`
1889 // Query: Specifies URL query parameter name to extract JWT token.
1890 Query string `json:"query,omitempty"`
1891 // ValuePrefix: The value prefix. The value format is "value_prefix{token}"
1892 // Only applies to "in" header type. Must be empty for "in" query type. If not
1893 // empty, the header value has to match (case sensitive) this prefix. If not
1894 // matched, JWT will not be extracted. If matched, JWT will be extracted after
1895 // the prefix is removed. For example, for "Authorization: Bearer {JWT}",
1896 // value_prefix="Bearer " with a space at the end.
1897 ValuePrefix string `json:"valuePrefix,omitempty"`
1898 // ForceSendFields is a list of field names (e.g. "Cookie") to unconditionally
1899 // include in API requests. By default, fields with empty or default values are
1900 // omitted from API requests. See
1901 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1902 // details.
1903 ForceSendFields []string `json:"-"`
1904 // NullFields is a list of field names (e.g. "Cookie") to include in API
1905 // requests with the JSON null value. By default, fields with empty values are
1906 // omitted from API requests. See
1907 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1908 NullFields []string `json:"-"`
1909 }
1910
1911 func (s JwtLocation) MarshalJSON() ([]byte, error) {
1912 type NoMethod JwtLocation
1913 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1914 }
1915
1916 // LabelDescriptor: A description of a label.
1917 type LabelDescriptor struct {
1918 // Description: A human-readable description for the label.
1919 Description string `json:"description,omitempty"`
1920 // Key: The label key.
1921 Key string `json:"key,omitempty"`
1922 // ValueType: The type of data that can be assigned to the label.
1923 //
1924 // Possible values:
1925 // "STRING" - A variable-length string. This is the default.
1926 // "BOOL" - Boolean; true or false.
1927 // "INT64" - A 64-bit signed integer.
1928 ValueType string `json:"valueType,omitempty"`
1929 // ForceSendFields is a list of field names (e.g. "Description") to
1930 // unconditionally include in API requests. By default, fields with empty or
1931 // default values are omitted from API requests. See
1932 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1933 // details.
1934 ForceSendFields []string `json:"-"`
1935 // NullFields is a list of field names (e.g. "Description") to include in API
1936 // requests with the JSON null value. By default, fields with empty values are
1937 // omitted from API requests. See
1938 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1939 NullFields []string `json:"-"`
1940 }
1941
1942 func (s LabelDescriptor) MarshalJSON() ([]byte, error) {
1943 type NoMethod LabelDescriptor
1944 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1945 }
1946
1947 // LogDescriptor: A description of a log type. Example in YAML format: - name:
1948 // library.googleapis.com/activity_history description: The history of
1949 // borrowing and returning library items. display_name: Activity labels: - key:
1950 // /customer_id description: Identifier of a library customer
1951 type LogDescriptor struct {
1952 // Description: A human-readable description of this log. This information
1953 // appears in the documentation and can contain details.
1954 Description string `json:"description,omitempty"`
1955 // DisplayName: The human-readable name for this log. This information appears
1956 // on the user interface and should be concise.
1957 DisplayName string `json:"displayName,omitempty"`
1958 // Labels: The set of labels that are available to describe a specific log
1959 // entry. Runtime requests that contain labels not specified here are
1960 // considered invalid.
1961 Labels []*LabelDescriptor `json:"labels,omitempty"`
1962 // Name: The name of the log. It must be less than 512 characters long and can
1963 // include the following characters: upper- and lower-case alphanumeric
1964 // characters [A-Za-z0-9], and punctuation characters including slash,
1965 // underscore, hyphen, period [/_-.].
1966 Name string `json:"name,omitempty"`
1967 // ForceSendFields is a list of field names (e.g. "Description") to
1968 // unconditionally include in API requests. By default, fields with empty or
1969 // default values are omitted from API requests. See
1970 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1971 // details.
1972 ForceSendFields []string `json:"-"`
1973 // NullFields is a list of field names (e.g. "Description") to include in API
1974 // requests with the JSON null value. By default, fields with empty values are
1975 // omitted from API requests. See
1976 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1977 NullFields []string `json:"-"`
1978 }
1979
1980 func (s LogDescriptor) MarshalJSON() ([]byte, error) {
1981 type NoMethod LogDescriptor
1982 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1983 }
1984
1985 // Logging: Logging configuration of the service. The following example shows
1986 // how to configure logs to be sent to the producer and consumer projects. In
1987 // the example, the `activity_history` log is sent to both the producer and
1988 // consumer projects, whereas the `purchase_history` log is only sent to the
1989 // producer project. monitored_resources: - type: library.googleapis.com/branch
1990 // labels: - key: /city description: The city where the library branch is
1991 // located in. - key: /name description: The name of the branch. logs: - name:
1992 // activity_history labels: - key: /customer_id - name: purchase_history
1993 // logging: producer_destinations: - monitored_resource:
1994 // library.googleapis.com/branch logs: - activity_history - purchase_history
1995 // consumer_destinations: - monitored_resource: library.googleapis.com/branch
1996 // logs: - activity_history
1997 type Logging struct {
1998 // ConsumerDestinations: Logging configurations for sending logs to the
1999 // consumer project. There can be multiple consumer destinations, each one must
2000 // have a different monitored resource type. A log can be used in at most one
2001 // consumer destination.
2002 ConsumerDestinations []*LoggingDestination `json:"consumerDestinations,omitempty"`
2003 // ProducerDestinations: Logging configurations for sending logs to the
2004 // producer project. There can be multiple producer destinations, each one must
2005 // have a different monitored resource type. A log can be used in at most one
2006 // producer destination.
2007 ProducerDestinations []*LoggingDestination `json:"producerDestinations,omitempty"`
2008 // ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to
2009 // unconditionally include in API requests. By default, fields with empty or
2010 // default values are omitted from API requests. See
2011 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2012 // details.
2013 ForceSendFields []string `json:"-"`
2014 // NullFields is a list of field names (e.g. "ConsumerDestinations") to include
2015 // in API requests with the JSON null value. By default, fields with empty
2016 // values are omitted from API requests. See
2017 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2018 NullFields []string `json:"-"`
2019 }
2020
2021 func (s Logging) MarshalJSON() ([]byte, error) {
2022 type NoMethod Logging
2023 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2024 }
2025
2026 // LoggingDestination: Configuration of a specific logging destination (the
2027 // producer project or the consumer project).
2028 type LoggingDestination struct {
2029 // Logs: Names of the logs to be sent to this destination. Each name must be
2030 // defined in the Service.logs section. If the log name is not a domain scoped
2031 // name, it will be automatically prefixed with the service name followed by
2032 // "/".
2033 Logs []string `json:"logs,omitempty"`
2034 // MonitoredResource: The monitored resource type. The type must be defined in
2035 // the Service.monitored_resources section.
2036 MonitoredResource string `json:"monitoredResource,omitempty"`
2037 // ForceSendFields is a list of field names (e.g. "Logs") to unconditionally
2038 // include in API requests. By default, fields with empty or default values are
2039 // omitted from API requests. See
2040 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2041 // details.
2042 ForceSendFields []string `json:"-"`
2043 // NullFields is a list of field names (e.g. "Logs") to include in API requests
2044 // with the JSON null value. By default, fields with empty values are omitted
2045 // from API requests. See
2046 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2047 NullFields []string `json:"-"`
2048 }
2049
2050 func (s LoggingDestination) MarshalJSON() ([]byte, error) {
2051 type NoMethod LoggingDestination
2052 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2053 }
2054
2055 // LongRunning: Describes settings to use when generating API methods that use
2056 // the long-running operation pattern. All default values below are from those
2057 // used in the client library generators (e.g. Java
2058 // (https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
2059 type LongRunning struct {
2060 // InitialPollDelay: Initial delay after which the first poll request will be
2061 // made. Default value: 5 seconds.
2062 InitialPollDelay string `json:"initialPollDelay,omitempty"`
2063 // MaxPollDelay: Maximum time between two subsequent poll requests. Default
2064 // value: 45 seconds.
2065 MaxPollDelay string `json:"maxPollDelay,omitempty"`
2066 // PollDelayMultiplier: Multiplier to gradually increase delay between
2067 // subsequent polls until it reaches max_poll_delay. Default value: 1.5.
2068 PollDelayMultiplier float64 `json:"pollDelayMultiplier,omitempty"`
2069 // TotalPollTimeout: Total polling timeout. Default value: 5 minutes.
2070 TotalPollTimeout string `json:"totalPollTimeout,omitempty"`
2071 // ForceSendFields is a list of field names (e.g. "InitialPollDelay") to
2072 // unconditionally include in API requests. By default, fields with empty or
2073 // default values are omitted from API requests. See
2074 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2075 // details.
2076 ForceSendFields []string `json:"-"`
2077 // NullFields is a list of field names (e.g. "InitialPollDelay") to include in
2078 // API requests with the JSON null value. By default, fields with empty values
2079 // are omitted from API requests. See
2080 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2081 NullFields []string `json:"-"`
2082 }
2083
2084 func (s LongRunning) MarshalJSON() ([]byte, error) {
2085 type NoMethod LongRunning
2086 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2087 }
2088
2089 func (s *LongRunning) UnmarshalJSON(data []byte) error {
2090 type NoMethod LongRunning
2091 var s1 struct {
2092 PollDelayMultiplier gensupport.JSONFloat64 `json:"pollDelayMultiplier"`
2093 *NoMethod
2094 }
2095 s1.NoMethod = (*NoMethod)(s)
2096 if err := json.Unmarshal(data, &s1); err != nil {
2097 return err
2098 }
2099 s.PollDelayMultiplier = float64(s1.PollDelayMultiplier)
2100 return nil
2101 }
2102
2103 // Method: Method represents a method of an API interface. New usages of this
2104 // message as an alternative to MethodDescriptorProto are strongly discouraged.
2105 // This message does not reliability preserve all information necessary to
2106 // model the schema and preserve semantics. Instead make use of
2107 // FileDescriptorSet which preserves the necessary information.
2108 type Method struct {
2109 // Edition: The source edition string, only valid when syntax is
2110 // SYNTAX_EDITIONS. This field should be ignored, instead the edition should be
2111 // inherited from Api. This is similar to Field and EnumValue.
2112 Edition string `json:"edition,omitempty"`
2113 // Name: The simple name of this method.
2114 Name string `json:"name,omitempty"`
2115 // Options: Any metadata attached to the method.
2116 Options []*Option `json:"options,omitempty"`
2117 // RequestStreaming: If true, the request is streamed.
2118 RequestStreaming bool `json:"requestStreaming,omitempty"`
2119 // RequestTypeUrl: A URL of the input message type.
2120 RequestTypeUrl string `json:"requestTypeUrl,omitempty"`
2121 // ResponseStreaming: If true, the response is streamed.
2122 ResponseStreaming bool `json:"responseStreaming,omitempty"`
2123 // ResponseTypeUrl: The URL of the output message type.
2124 ResponseTypeUrl string `json:"responseTypeUrl,omitempty"`
2125 // Syntax: The source syntax of this method. This field should be ignored,
2126 // instead the syntax should be inherited from Api. This is similar to Field
2127 // and EnumValue.
2128 //
2129 // Possible values:
2130 // "SYNTAX_PROTO2" - Syntax `proto2`.
2131 // "SYNTAX_PROTO3" - Syntax `proto3`.
2132 // "SYNTAX_EDITIONS" - Syntax `editions`.
2133 Syntax string `json:"syntax,omitempty"`
2134 // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally
2135 // include in API requests. By default, fields with empty or default values are
2136 // omitted from API requests. See
2137 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2138 // details.
2139 ForceSendFields []string `json:"-"`
2140 // NullFields is a list of field names (e.g. "Edition") to include in API
2141 // requests with the JSON null value. By default, fields with empty values are
2142 // omitted from API requests. See
2143 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2144 NullFields []string `json:"-"`
2145 }
2146
2147 func (s Method) MarshalJSON() ([]byte, error) {
2148 type NoMethod Method
2149 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2150 }
2151
2152 // MethodPolicy: Defines policies applying to an RPC method.
2153 type MethodPolicy struct {
2154 // RequestPolicies: Policies that are applicable to the request message.
2155 RequestPolicies []*FieldPolicy `json:"requestPolicies,omitempty"`
2156 // Selector: Selects a method to which these policies should be enforced, for
2157 // example, "google.pubsub.v1.Subscriber.CreateSubscription". Refer to selector
2158 // for syntax details. NOTE: This field must not be set in the proto
2159 // annotation. It will be automatically filled by the service config compiler .
2160 Selector string `json:"selector,omitempty"`
2161 // ForceSendFields is a list of field names (e.g. "RequestPolicies") to
2162 // unconditionally include in API requests. By default, fields with empty or
2163 // default values are omitted from API requests. See
2164 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2165 // details.
2166 ForceSendFields []string `json:"-"`
2167 // NullFields is a list of field names (e.g. "RequestPolicies") to include in
2168 // API requests with the JSON null value. By default, fields with empty values
2169 // are omitted from API requests. See
2170 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2171 NullFields []string `json:"-"`
2172 }
2173
2174 func (s MethodPolicy) MarshalJSON() ([]byte, error) {
2175 type NoMethod MethodPolicy
2176 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2177 }
2178
2179 // MethodSettings: Describes the generator configuration for a method.
2180 type MethodSettings struct {
2181 // AutoPopulatedFields: List of top-level fields of the request message, that
2182 // should be automatically populated by the client libraries based on their
2183 // (google.api.field_info).format. Currently supported format: UUID4. Example
2184 // of a YAML configuration: publishing: method_settings: - selector:
2185 // google.example.v1.ExampleService.CreateExample auto_populated_fields: -
2186 // request_id
2187 AutoPopulatedFields []string `json:"autoPopulatedFields,omitempty"`
2188 // Batching: Batching configuration for an API method in client libraries.
2189 // Example of a YAML configuration: publishing: method_settings: - selector:
2190 // google.example.v1.ExampleService.BatchCreateExample batching:
2191 // element_count_threshold: 1000 request_byte_threshold: 100000000
2192 // delay_threshold_millis: 10
2193 Batching *BatchingConfigProto `json:"batching,omitempty"`
2194 // LongRunning: Describes settings to use for long-running operations when
2195 // generating API methods for RPCs. Complements RPCs that use the annotations
2196 // in google/longrunning/operations.proto. Example of a YAML configuration::
2197 // publishing: method_settings: - selector:
2198 // google.cloud.speech.v2.Speech.BatchRecognize long_running:
2199 // initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5
2200 // max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes
2201 LongRunning *LongRunning `json:"longRunning,omitempty"`
2202 // Selector: The fully qualified name of the method, for which the options
2203 // below apply. This is used to find the method to apply the options. Example:
2204 // publishing: method_settings: - selector:
2205 // google.storage.control.v2.StorageControl.CreateFolder # method settings for
2206 // CreateFolder...
2207 Selector string `json:"selector,omitempty"`
2208 // ForceSendFields is a list of field names (e.g. "AutoPopulatedFields") to
2209 // unconditionally include in API requests. By default, fields with empty or
2210 // default values are omitted from API requests. See
2211 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2212 // details.
2213 ForceSendFields []string `json:"-"`
2214 // NullFields is a list of field names (e.g. "AutoPopulatedFields") to include
2215 // in API requests with the JSON null value. By default, fields with empty
2216 // values are omitted from API requests. See
2217 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2218 NullFields []string `json:"-"`
2219 }
2220
2221 func (s MethodSettings) MarshalJSON() ([]byte, error) {
2222 type NoMethod MethodSettings
2223 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2224 }
2225
2226 // MetricDescriptor: Defines a metric type and its schema. Once a metric
2227 // descriptor is created, deleting or altering it stops data collection and
2228 // makes the metric type's existing data unusable.
2229 type MetricDescriptor struct {
2230 // Description: A detailed description of the metric, which can be used in
2231 // documentation.
2232 Description string `json:"description,omitempty"`
2233 // DisplayName: A concise name for the metric, which can be displayed in user
2234 // interfaces. Use sentence case without an ending period, for example "Request
2235 // count". This field is optional but it is recommended to be set for any
2236 // metrics associated with user-visible concepts, such as Quota.
2237 DisplayName string `json:"displayName,omitempty"`
2238 // Labels: The set of labels that can be used to describe a specific instance
2239 // of this metric type. For example, the
2240 // `appengine.googleapis.com/http/server/response_latencies` metric type has a
2241 // label for the HTTP response code, `response_code`, so you can look at
2242 // latencies for successful responses or just for responses that failed.
2243 Labels []*LabelDescriptor `json:"labels,omitempty"`
2244 // LaunchStage: Optional. The launch stage of the metric definition.
2245 //
2246 // Possible values:
2247 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2248 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use
2249 // it.
2250 // "PRELAUNCH" - Prelaunch features are hidden from users and are only
2251 // visible internally.
2252 // "EARLY_ACCESS" - Early Access features are limited to a closed group of
2253 // testers. To use these features, you must sign up in advance and sign a
2254 // Trusted Tester agreement (which includes confidentiality provisions). These
2255 // features may be unstable, changed in backward-incompatible ways, and are not
2256 // guaranteed to be released.
2257 // "ALPHA" - Alpha is a limited availability test for releases before they
2258 // are cleared for widespread use. By Alpha, all significant design issues are
2259 // resolved and we are in the process of verifying functionality. Alpha
2260 // customers need to apply for access, agree to applicable terms, and have
2261 // their projects allowlisted. Alpha releases don't have to be feature
2262 // complete, no SLAs are provided, and there are no technical support
2263 // obligations, but they will be far enough along that customers can actually
2264 // use them in test environments or for limited-use tests -- just like they
2265 // would in normal production cases.
2266 // "BETA" - Beta is the point at which we are ready to open a release for any
2267 // customer to use. There are no SLA or technical support obligations in a Beta
2268 // release. Products will be complete from a feature perspective, but may have
2269 // some open outstanding issues. Beta releases are suitable for limited
2270 // production use cases.
2271 // "GA" - GA features are open to all developers and are considered stable
2272 // and fully qualified for production use.
2273 // "DEPRECATED" - Deprecated features are scheduled to be shut down and
2274 // removed. For more information, see the "Deprecation Policy" section of our
2275 // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud
2276 // Platform Subject to the Deprecation
2277 // Policy](https://cloud.google.com/terms/deprecation) documentation.
2278 LaunchStage string `json:"launchStage,omitempty"`
2279 // Metadata: Optional. Metadata which can be used to guide usage of the metric.
2280 Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"`
2281 // MetricKind: Whether the metric records instantaneous values, changes to a
2282 // value, etc. Some combinations of `metric_kind` and `value_type` might not be
2283 // supported.
2284 //
2285 // Possible values:
2286 // "METRIC_KIND_UNSPECIFIED" - Do not use this default value.
2287 // "GAUGE" - An instantaneous measurement of a value.
2288 // "DELTA" - The change in a value during a time interval.
2289 // "CUMULATIVE" - A value accumulated over a time interval. Cumulative
2290 // measurements in a time series should have the same start time and increasing
2291 // end times, until an event resets the cumulative value to zero and sets a new
2292 // start time for the following points.
2293 MetricKind string `json:"metricKind,omitempty"`
2294 // MonitoredResourceTypes: Read-only. If present, then a time series, which is
2295 // identified partially by a metric type and a MonitoredResourceDescriptor,
2296 // that is associated with this metric type can only be associated with one of
2297 // the monitored resource types listed here.
2298 MonitoredResourceTypes []string `json:"monitoredResourceTypes,omitempty"`
2299 // Name: The resource name of the metric descriptor.
2300 Name string `json:"name,omitempty"`
2301 // Type: The metric type, including its DNS name prefix. The type is not
2302 // URL-encoded. All user-defined metric types have the DNS name
2303 // `custom.googleapis.com` or `external.googleapis.com`. Metric types should
2304 // use a natural hierarchical grouping. For example:
2305 // "custom.googleapis.com/invoice/paid/amount"
2306 // "external.googleapis.com/prometheus/up"
2307 // "appengine.googleapis.com/http/server/response_latencies"
2308 Type string `json:"type,omitempty"`
2309 // Unit: The units in which the metric value is reported. It is only applicable
2310 // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
2311 // defines the representation of the stored metric values. Different systems
2312 // might scale the values to be more easily displayed (so a value of `0.02kBy`
2313 // _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be
2314 // displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of
2315 // the metric is always in thousands of bytes, no matter how it might be
2316 // displayed. If you want a custom metric to record the exact number of
2317 // CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose
2318 // `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses
2319 // 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if
2320 // you want a custom metric to record data in a more granular way, you can
2321 // create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then
2322 // write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and
2323 // write `11.723` (which is `12005/1024`). The supported units are a subset of
2324 // The Unified Code for Units of Measure (https://unitsofmeasure.org/ucum.html)
2325 // standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second *
2326 // `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)**
2327 // * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) *
2328 // `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) *
2329 // `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12)
2330 // * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto
2331 // (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti`
2332 // tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these
2333 // connectors: * `/` division or ratio (as an infix operator). For examples,
2334 // `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in
2335 // a metric `unit`; rates should always be computed at query time from the
2336 // underlying cumulative or delta value). * `.` multiplication or composition
2337 // (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar
2338 // for a unit is as follows: Expression = Component { "." Component } { "/"
2339 // Component } ; Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] |
2340 // Annotation | "1" ; Annotation = "{" NAME "}" ; Notes: * `Annotation` is just
2341 // a comment if it follows a `UNIT`. If the annotation is used alone, then the
2342 // unit is equivalent to `1`. For examples, `{request}/s == 1/s`,
2343 // `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable
2344 // ASCII characters not containing `{` or `}`. * `1` represents a unitary
2345 // dimensionless unit (https://en.wikipedia.org/wiki/Dimensionless_quantity) of
2346 // 1, such as in `1/s`. It is typically used when none of the basic units are
2347 // appropriate. For example, "new users per day" can be represented as `1/d` or
2348 // `{new-users}/d` (and a metric value `5` would mean "5 new users).
2349 // Alternatively, "thousands of page views per day" would be represented as
2350 // `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would
2351 // mean "5300 page views per day"). * `%` represents dimensionless value of
2352 // 1/100, and annotates values giving a percentage (so the metric values are
2353 // typically in the range of 0..100, and a metric value `3` means "3 percent").
2354 // * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1,
2355 // that will be multiplied by 100 and displayed as a percentage (so a metric
2356 // value `0.03` means "3 percent").
2357 Unit string `json:"unit,omitempty"`
2358 // ValueType: Whether the measurement is an integer, a floating-point number,
2359 // etc. Some combinations of `metric_kind` and `value_type` might not be
2360 // supported.
2361 //
2362 // Possible values:
2363 // "VALUE_TYPE_UNSPECIFIED" - Do not use this default value.
2364 // "BOOL" - The value is a boolean. This value type can be used only if the
2365 // metric kind is `GAUGE`.
2366 // "INT64" - The value is a signed 64-bit integer.
2367 // "DOUBLE" - The value is a double precision floating point number.
2368 // "STRING" - The value is a text string. This value type can be used only if
2369 // the metric kind is `GAUGE`.
2370 // "DISTRIBUTION" - The value is a `Distribution`.
2371 // "MONEY" - The value is money.
2372 ValueType string `json:"valueType,omitempty"`
2373 // ForceSendFields is a list of field names (e.g. "Description") to
2374 // unconditionally include in API requests. By default, fields with empty or
2375 // default values are omitted from API requests. See
2376 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2377 // details.
2378 ForceSendFields []string `json:"-"`
2379 // NullFields is a list of field names (e.g. "Description") to include in API
2380 // requests with the JSON null value. By default, fields with empty values are
2381 // omitted from API requests. See
2382 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2383 NullFields []string `json:"-"`
2384 }
2385
2386 func (s MetricDescriptor) MarshalJSON() ([]byte, error) {
2387 type NoMethod MetricDescriptor
2388 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2389 }
2390
2391 // MetricDescriptorMetadata: Additional annotations that can be used to guide
2392 // the usage of a metric.
2393 type MetricDescriptorMetadata struct {
2394 // IngestDelay: The delay of data points caused by ingestion. Data points older
2395 // than this age are guaranteed to be ingested and available to be read,
2396 // excluding data loss due to errors.
2397 IngestDelay string `json:"ingestDelay,omitempty"`
2398 // LaunchStage: Deprecated. Must use the MetricDescriptor.launch_stage instead.
2399 //
2400 // Possible values:
2401 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2402 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use
2403 // it.
2404 // "PRELAUNCH" - Prelaunch features are hidden from users and are only
2405 // visible internally.
2406 // "EARLY_ACCESS" - Early Access features are limited to a closed group of
2407 // testers. To use these features, you must sign up in advance and sign a
2408 // Trusted Tester agreement (which includes confidentiality provisions). These
2409 // features may be unstable, changed in backward-incompatible ways, and are not
2410 // guaranteed to be released.
2411 // "ALPHA" - Alpha is a limited availability test for releases before they
2412 // are cleared for widespread use. By Alpha, all significant design issues are
2413 // resolved and we are in the process of verifying functionality. Alpha
2414 // customers need to apply for access, agree to applicable terms, and have
2415 // their projects allowlisted. Alpha releases don't have to be feature
2416 // complete, no SLAs are provided, and there are no technical support
2417 // obligations, but they will be far enough along that customers can actually
2418 // use them in test environments or for limited-use tests -- just like they
2419 // would in normal production cases.
2420 // "BETA" - Beta is the point at which we are ready to open a release for any
2421 // customer to use. There are no SLA or technical support obligations in a Beta
2422 // release. Products will be complete from a feature perspective, but may have
2423 // some open outstanding issues. Beta releases are suitable for limited
2424 // production use cases.
2425 // "GA" - GA features are open to all developers and are considered stable
2426 // and fully qualified for production use.
2427 // "DEPRECATED" - Deprecated features are scheduled to be shut down and
2428 // removed. For more information, see the "Deprecation Policy" section of our
2429 // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud
2430 // Platform Subject to the Deprecation
2431 // Policy](https://cloud.google.com/terms/deprecation) documentation.
2432 LaunchStage string `json:"launchStage,omitempty"`
2433 // SamplePeriod: The sampling period of metric data points. For metrics which
2434 // are written periodically, consecutive data points are stored at this time
2435 // interval, excluding data loss due to errors. Metrics with a higher
2436 // granularity have a smaller sampling period.
2437 SamplePeriod string `json:"samplePeriod,omitempty"`
2438 // TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the
2439 // metric.
2440 //
2441 // Possible values:
2442 // "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this
2443 // default value.
2444 // "PROJECT" - Scopes a metric to a project.
2445 // "ORGANIZATION" - Scopes a metric to an organization.
2446 // "FOLDER" - Scopes a metric to a folder.
2447 TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"`
2448 // ForceSendFields is a list of field names (e.g. "IngestDelay") to
2449 // unconditionally include in API requests. By default, fields with empty or
2450 // default values are omitted from API requests. See
2451 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2452 // details.
2453 ForceSendFields []string `json:"-"`
2454 // NullFields is a list of field names (e.g. "IngestDelay") to include in API
2455 // requests with the JSON null value. By default, fields with empty values are
2456 // omitted from API requests. See
2457 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2458 NullFields []string `json:"-"`
2459 }
2460
2461 func (s MetricDescriptorMetadata) MarshalJSON() ([]byte, error) {
2462 type NoMethod MetricDescriptorMetadata
2463 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2464 }
2465
2466 // MetricRule: Bind API methods to metrics. Binding a method to a metric causes
2467 // that metric's configured quota behaviors to apply to the method call.
2468 type MetricRule struct {
2469 // MetricCosts: Metrics to update when the selected methods are called, and the
2470 // associated cost applied to each metric. The key of the map is the metric
2471 // name, and the values are the amount increased for the metric against which
2472 // the quota limits are defined. The value must not be negative.
2473 MetricCosts map[string]string `json:"metricCosts,omitempty"`
2474 // Selector: Selects the methods to which this rule applies. Refer to selector
2475 // for syntax details.
2476 Selector string `json:"selector,omitempty"`
2477 // ForceSendFields is a list of field names (e.g. "MetricCosts") to
2478 // unconditionally include in API requests. By default, fields with empty or
2479 // default values are omitted from API requests. See
2480 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2481 // details.
2482 ForceSendFields []string `json:"-"`
2483 // NullFields is a list of field names (e.g. "MetricCosts") to include in API
2484 // requests with the JSON null value. By default, fields with empty values are
2485 // omitted from API requests. See
2486 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2487 NullFields []string `json:"-"`
2488 }
2489
2490 func (s MetricRule) MarshalJSON() ([]byte, error) {
2491 type NoMethod MetricRule
2492 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2493 }
2494
2495 // Mixin: Declares an API Interface to be included in this interface. The
2496 // including interface must redeclare all the methods from the included
2497 // interface, but documentation and options are inherited as follows: - If
2498 // after comment and whitespace stripping, the documentation string of the
2499 // redeclared method is empty, it will be inherited from the original method. -
2500 // Each annotation belonging to the service config (http, visibility) which is
2501 // not set in the redeclared method will be inherited. - If an http annotation
2502 // is inherited, the path pattern will be modified as follows. Any version
2503 // prefix will be replaced by the version of the including interface plus the
2504 // root path if specified. Example of a simple mixin: package google.acl.v1;
2505 // service AccessControl { // Get the underlying ACL object. rpc
2506 // GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get =
2507 // "/v1/{resource=**}:getAcl"; } } package google.storage.v2; service Storage {
2508 // // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc
2509 // GetData(GetDataRequest) returns (Data) { option (google.api.http).get =
2510 // "/v2/{resource=**}"; } } Example of a mixin configuration: apis: - name:
2511 // google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The
2512 // mixin construct implies that all methods in `AccessControl` are also
2513 // declared with same name and request/response types in `Storage`. A
2514 // documentation generator or annotation processor will see the effective
2515 // `Storage.GetAcl` method after inheriting documentation and annotations as
2516 // follows: service Storage { // Get the underlying ACL object. rpc
2517 // GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get =
2518 // "/v2/{resource=**}:getAcl"; } ... } Note how the version in the path pattern
2519 // changed from `v1` to `v2`. If the `root` field in the mixin is specified, it
2520 // should be a relative path under which inherited HTTP paths are placed.
2521 // Example: apis: - name: google.storage.v2.Storage mixins: - name:
2522 // google.acl.v1.AccessControl root: acls This implies the following inherited
2523 // HTTP annotation: service Storage { // Get the underlying ACL object. rpc
2524 // GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get =
2525 // "/v2/acls/{resource=**}:getAcl"; } ... }
2526 type Mixin struct {
2527 // Name: The fully qualified name of the interface which is included.
2528 Name string `json:"name,omitempty"`
2529 // Root: If non-empty specifies a path under which inherited HTTP paths are
2530 // rooted.
2531 Root string `json:"root,omitempty"`
2532 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
2533 // include in API requests. By default, fields with empty or default values are
2534 // omitted from API requests. See
2535 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2536 // details.
2537 ForceSendFields []string `json:"-"`
2538 // NullFields is a list of field names (e.g. "Name") to include in API requests
2539 // with the JSON null value. By default, fields with empty values are omitted
2540 // from API requests. See
2541 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2542 NullFields []string `json:"-"`
2543 }
2544
2545 func (s Mixin) MarshalJSON() ([]byte, error) {
2546 type NoMethod Mixin
2547 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2548 }
2549
2550 // MonitoredResourceDescriptor: An object that describes the schema of a
2551 // MonitoredResource object using a type name and a set of labels. For example,
2552 // the monitored resource descriptor for Google Compute Engine VM instances has
2553 // a type of "gce_instance" and specifies the use of the labels
2554 // "instance_id" and "zone" to identify particular VM instances. Different
2555 // APIs can support different monitored resource types. APIs generally provide
2556 // a `list` method that returns the monitored resource descriptors used by the
2557 // API.
2558 type MonitoredResourceDescriptor struct {
2559 // Description: Optional. A detailed description of the monitored resource type
2560 // that might be used in documentation.
2561 Description string `json:"description,omitempty"`
2562 // DisplayName: Optional. A concise name for the monitored resource type that
2563 // might be displayed in user interfaces. It should be a Title Cased Noun
2564 // Phrase, without any article or other determiners. For example, "Google
2565 // Cloud SQL Database".
2566 DisplayName string `json:"displayName,omitempty"`
2567 // Labels: Required. A set of labels used to describe instances of this
2568 // monitored resource type. For example, an individual Google Cloud SQL
2569 // database is identified by values for the labels "database_id" and
2570 // "zone".
2571 Labels []*LabelDescriptor `json:"labels,omitempty"`
2572 // LaunchStage: Optional. The launch stage of the monitored resource
2573 // definition.
2574 //
2575 // Possible values:
2576 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2577 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use
2578 // it.
2579 // "PRELAUNCH" - Prelaunch features are hidden from users and are only
2580 // visible internally.
2581 // "EARLY_ACCESS" - Early Access features are limited to a closed group of
2582 // testers. To use these features, you must sign up in advance and sign a
2583 // Trusted Tester agreement (which includes confidentiality provisions). These
2584 // features may be unstable, changed in backward-incompatible ways, and are not
2585 // guaranteed to be released.
2586 // "ALPHA" - Alpha is a limited availability test for releases before they
2587 // are cleared for widespread use. By Alpha, all significant design issues are
2588 // resolved and we are in the process of verifying functionality. Alpha
2589 // customers need to apply for access, agree to applicable terms, and have
2590 // their projects allowlisted. Alpha releases don't have to be feature
2591 // complete, no SLAs are provided, and there are no technical support
2592 // obligations, but they will be far enough along that customers can actually
2593 // use them in test environments or for limited-use tests -- just like they
2594 // would in normal production cases.
2595 // "BETA" - Beta is the point at which we are ready to open a release for any
2596 // customer to use. There are no SLA or technical support obligations in a Beta
2597 // release. Products will be complete from a feature perspective, but may have
2598 // some open outstanding issues. Beta releases are suitable for limited
2599 // production use cases.
2600 // "GA" - GA features are open to all developers and are considered stable
2601 // and fully qualified for production use.
2602 // "DEPRECATED" - Deprecated features are scheduled to be shut down and
2603 // removed. For more information, see the "Deprecation Policy" section of our
2604 // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud
2605 // Platform Subject to the Deprecation
2606 // Policy](https://cloud.google.com/terms/deprecation) documentation.
2607 LaunchStage string `json:"launchStage,omitempty"`
2608 // Name: Optional. The resource name of the monitored resource descriptor:
2609 // "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type}
2610 // is the value of the `type` field in this object and {project_id} is a
2611 // project ID that provides API-specific context for accessing the type. APIs
2612 // that do not use project information can use the resource name format
2613 // "monitoredResourceDescriptors/{type}".
2614 Name string `json:"name,omitempty"`
2615 // Type: Required. The monitored resource type. For example, the type
2616 // "cloudsql_database" represents databases in Google Cloud SQL. For a list
2617 // of types, see Monitored resource types
2618 // (https://cloud.google.com/monitoring/api/resources) and Logging resource
2619 // types (https://cloud.google.com/logging/docs/api/v2/resource-list).
2620 Type string `json:"type,omitempty"`
2621 // ForceSendFields is a list of field names (e.g. "Description") to
2622 // unconditionally include in API requests. By default, fields with empty or
2623 // default values are omitted from API requests. See
2624 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2625 // details.
2626 ForceSendFields []string `json:"-"`
2627 // NullFields is a list of field names (e.g. "Description") to include in API
2628 // requests with the JSON null value. By default, fields with empty values are
2629 // omitted from API requests. See
2630 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2631 NullFields []string `json:"-"`
2632 }
2633
2634 func (s MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
2635 type NoMethod MonitoredResourceDescriptor
2636 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2637 }
2638
2639 // Monitoring: Monitoring configuration of the service. The example below shows
2640 // how to configure monitored resources and metrics for monitoring. In the
2641 // example, a monitored resource and two metrics are defined. The
2642 // `library.googleapis.com/book/returned_count` metric is sent to both producer
2643 // and consumer projects, whereas the `library.googleapis.com/book/num_overdue`
2644 // metric is only sent to the consumer project. monitored_resources: - type:
2645 // library.googleapis.com/Branch display_name: "Library Branch" description: "A
2646 // branch of a library." launch_stage: GA labels: - key: resource_container
2647 // description: "The Cloud container (ie. project id) for the Branch." - key:
2648 // location description: "The location of the library branch." - key: branch_id
2649 // description: "The id of the branch." metrics: - name:
2650 // library.googleapis.com/book/returned_count display_name: "Books Returned"
2651 // description: "The count of books that have been returned." launch_stage: GA
2652 // metric_kind: DELTA value_type: INT64 unit: "1" labels: - key: customer_id
2653 // description: "The id of the customer." - name:
2654 // library.googleapis.com/book/num_overdue display_name: "Books Overdue"
2655 // description: "The current number of overdue books." launch_stage: GA
2656 // metric_kind: GAUGE value_type: INT64 unit: "1" labels: - key: customer_id
2657 // description: "The id of the customer." monitoring: producer_destinations: -
2658 // monitored_resource: library.googleapis.com/Branch metrics: -
2659 // library.googleapis.com/book/returned_count consumer_destinations: -
2660 // monitored_resource: library.googleapis.com/Branch metrics: -
2661 // library.googleapis.com/book/returned_count -
2662 // library.googleapis.com/book/num_overdue
2663 type Monitoring struct {
2664 // ConsumerDestinations: Monitoring configurations for sending metrics to the
2665 // consumer project. There can be multiple consumer destinations. A monitored
2666 // resource type may appear in multiple monitoring destinations if different
2667 // aggregations are needed for different sets of metrics associated with that
2668 // monitored resource type. A monitored resource and metric pair may only be
2669 // used once in the Monitoring configuration.
2670 ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"`
2671 // ProducerDestinations: Monitoring configurations for sending metrics to the
2672 // producer project. There can be multiple producer destinations. A monitored
2673 // resource type may appear in multiple monitoring destinations if different
2674 // aggregations are needed for different sets of metrics associated with that
2675 // monitored resource type. A monitored resource and metric pair may only be
2676 // used once in the Monitoring configuration.
2677 ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"`
2678 // ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to
2679 // unconditionally include in API requests. By default, fields with empty or
2680 // default values are omitted from API requests. See
2681 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2682 // details.
2683 ForceSendFields []string `json:"-"`
2684 // NullFields is a list of field names (e.g. "ConsumerDestinations") to include
2685 // in API requests with the JSON null value. By default, fields with empty
2686 // values are omitted from API requests. See
2687 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2688 NullFields []string `json:"-"`
2689 }
2690
2691 func (s Monitoring) MarshalJSON() ([]byte, error) {
2692 type NoMethod Monitoring
2693 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2694 }
2695
2696 // MonitoringDestination: Configuration of a specific monitoring destination
2697 // (the producer project or the consumer project).
2698 type MonitoringDestination struct {
2699 // Metrics: Types of the metrics to report to this monitoring destination. Each
2700 // type must be defined in Service.metrics section.
2701 Metrics []string `json:"metrics,omitempty"`
2702 // MonitoredResource: The monitored resource type. The type must be defined in
2703 // Service.monitored_resources section.
2704 MonitoredResource string `json:"monitoredResource,omitempty"`
2705 // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally
2706 // include in API requests. By default, fields with empty or default values are
2707 // omitted from API requests. See
2708 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2709 // details.
2710 ForceSendFields []string `json:"-"`
2711 // NullFields is a list of field names (e.g. "Metrics") to include in API
2712 // requests with the JSON null value. By default, fields with empty values are
2713 // omitted from API requests. See
2714 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2715 NullFields []string `json:"-"`
2716 }
2717
2718 func (s MonitoringDestination) MarshalJSON() ([]byte, error) {
2719 type NoMethod MonitoringDestination
2720 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2721 }
2722
2723 // NodeSettings: Settings for Node client libraries.
2724 type NodeSettings struct {
2725 // Common: Some settings.
2726 Common *CommonLanguageSettings `json:"common,omitempty"`
2727 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
2728 // include in API requests. By default, fields with empty or default values are
2729 // omitted from API requests. See
2730 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2731 // details.
2732 ForceSendFields []string `json:"-"`
2733 // NullFields is a list of field names (e.g. "Common") to include in API
2734 // requests with the JSON null value. By default, fields with empty values are
2735 // omitted from API requests. See
2736 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2737 NullFields []string `json:"-"`
2738 }
2739
2740 func (s NodeSettings) MarshalJSON() ([]byte, error) {
2741 type NoMethod NodeSettings
2742 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2743 }
2744
2745 // OAuthRequirements: OAuth scopes are a way to define data and permissions on
2746 // data. For example, there are scopes defined for "Read-only access to Google
2747 // Calendar" and "Access to Cloud Platform". Users can consent to a scope for
2748 // an application, giving it permission to access that data on their behalf.
2749 // OAuth scope specifications should be fairly coarse grained; a user will need
2750 // to see and understand the text description of what your scope means. In most
2751 // cases: use one or at most two OAuth scopes for an entire family of products.
2752 // If your product has multiple APIs, you should probably be sharing the OAuth
2753 // scope across all of those APIs. When you need finer grained OAuth consent
2754 // screens: talk with your product management about how developers will use
2755 // them in practice. Please note that even though each of the canonical scopes
2756 // is enough for a request to be accepted and passed to the backend, a request
2757 // can still fail due to the backend requiring additional scopes or
2758 // permissions.
2759 type OAuthRequirements struct {
2760 // CanonicalScopes: The list of publicly documented OAuth scopes that are
2761 // allowed access. An OAuth token containing any of these scopes will be
2762 // accepted. Example: canonical_scopes:
2763 // https://www.googleapis.com/auth/calendar,
2764 // https://www.googleapis.com/auth/calendar.read
2765 CanonicalScopes string `json:"canonicalScopes,omitempty"`
2766 // ForceSendFields is a list of field names (e.g. "CanonicalScopes") to
2767 // unconditionally include in API requests. By default, fields with empty or
2768 // default values are omitted from API requests. See
2769 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2770 // details.
2771 ForceSendFields []string `json:"-"`
2772 // NullFields is a list of field names (e.g. "CanonicalScopes") to include in
2773 // API requests with the JSON null value. By default, fields with empty values
2774 // are omitted from API requests. See
2775 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2776 NullFields []string `json:"-"`
2777 }
2778
2779 func (s OAuthRequirements) MarshalJSON() ([]byte, error) {
2780 type NoMethod OAuthRequirements
2781 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2782 }
2783
2784 // Operation: This resource represents a long-running operation that is the
2785 // result of a network API call.
2786 type Operation struct {
2787 // Done: If the value is `false`, it means the operation is still in progress.
2788 // If `true`, the operation is completed, and either `error` or `response` is
2789 // available.
2790 Done bool `json:"done,omitempty"`
2791 // Error: The error result of the operation in case of failure or cancellation.
2792 Error *Status `json:"error,omitempty"`
2793 // Metadata: Service-specific metadata associated with the operation. It
2794 // typically contains progress information and common metadata such as create
2795 // time. Some services might not provide such metadata. Any method that returns
2796 // a long-running operation should document the metadata type, if any.
2797 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2798 // Name: The server-assigned name, which is only unique within the same service
2799 // that originally returns it. If you use the default HTTP mapping, the `name`
2800 // should be a resource name ending with `operations/{unique_id}`.
2801 Name string `json:"name,omitempty"`
2802 // Response: The normal, successful response of the operation. If the original
2803 // method returns no data on success, such as `Delete`, the response is
2804 // `google.protobuf.Empty`. If the original method is standard
2805 // `Get`/`Create`/`Update`, the response should be the resource. For other
2806 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
2807 // original method name. For example, if the original method name is
2808 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
2809 Response googleapi.RawMessage `json:"response,omitempty"`
2810
2811 // ServerResponse contains the HTTP response code and headers from the server.
2812 googleapi.ServerResponse `json:"-"`
2813 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
2814 // include in API requests. By default, fields with empty or default values are
2815 // omitted from API requests. See
2816 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2817 // details.
2818 ForceSendFields []string `json:"-"`
2819 // NullFields is a list of field names (e.g. "Done") to include in API requests
2820 // with the JSON null value. By default, fields with empty values are omitted
2821 // from API requests. See
2822 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2823 NullFields []string `json:"-"`
2824 }
2825
2826 func (s Operation) MarshalJSON() ([]byte, error) {
2827 type NoMethod Operation
2828 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2829 }
2830
2831 // Option: A protocol buffer option, which can be attached to a message, field,
2832 // enumeration, etc. New usages of this message as an alternative to
2833 // FileOptions, MessageOptions, FieldOptions, EnumOptions, EnumValueOptions,
2834 // ServiceOptions, or MethodOptions are strongly discouraged.
2835 type Option struct {
2836 // Name: The option's name. For protobuf built-in options (options defined in
2837 // descriptor.proto), this is the short name. For example, "map_entry". For
2838 // custom options, it should be the fully-qualified name. For example,
2839 // "google.api.http".
2840 Name string `json:"name,omitempty"`
2841 // Value: The option's value packed in an Any message. If the value is a
2842 // primitive, the corresponding wrapper type defined in
2843 // google/protobuf/wrappers.proto should be used. If the value is an enum, it
2844 // should be stored as an int32 value using the google.protobuf.Int32Value
2845 // type.
2846 Value googleapi.RawMessage `json:"value,omitempty"`
2847 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
2848 // include in API requests. By default, fields with empty or default values are
2849 // omitted from API requests. See
2850 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2851 // details.
2852 ForceSendFields []string `json:"-"`
2853 // NullFields is a list of field names (e.g. "Name") to include in API requests
2854 // with the JSON null value. By default, fields with empty values are omitted
2855 // from API requests. See
2856 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2857 NullFields []string `json:"-"`
2858 }
2859
2860 func (s Option) MarshalJSON() ([]byte, error) {
2861 type NoMethod Option
2862 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2863 }
2864
2865 // Page: Represents a documentation page. A page can contain subpages to
2866 // represent nested documentation set structure.
2867 type Page struct {
2868 // Content: The Markdown content of the page. You can use ```(== include {path}
2869 // ==)``` to include content from a Markdown file. The content can be used to
2870 // produce the documentation page such as HTML format page.
2871 Content string `json:"content,omitempty"`
2872 // Name: The name of the page. It will be used as an identity of the page to
2873 // generate URI of the page, text of the link to this page in navigation, etc.
2874 // The full page name (start from the root page name to this page concatenated
2875 // with `.`) can be used as reference to the page in your documentation. For
2876 // example: pages: - name: Tutorial content: (== include tutorial.md ==)
2877 // subpages: - name: Java content: (== include tutorial_java.md ==) You can
2878 // reference `Java` page using Markdown reference link syntax: `Java`.
2879 Name string `json:"name,omitempty"`
2880 // Subpages: Subpages of this page. The order of subpages specified here will
2881 // be honored in the generated docset.
2882 Subpages []*Page `json:"subpages,omitempty"`
2883 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally
2884 // include in API requests. By default, fields with empty or default values are
2885 // omitted from API requests. See
2886 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2887 // details.
2888 ForceSendFields []string `json:"-"`
2889 // NullFields is a list of field names (e.g. "Content") to include in API
2890 // requests with the JSON null value. By default, fields with empty values are
2891 // omitted from API requests. See
2892 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2893 NullFields []string `json:"-"`
2894 }
2895
2896 func (s Page) MarshalJSON() ([]byte, error) {
2897 type NoMethod Page
2898 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2899 }
2900
2901 // PhpSettings: Settings for Php client libraries.
2902 type PhpSettings struct {
2903 // Common: Some settings.
2904 Common *CommonLanguageSettings `json:"common,omitempty"`
2905 // LibraryPackage: The package name to use in Php. Clobbers the php_namespace
2906 // option set in the protobuf. This should be used **only** by APIs who have
2907 // already set the language_settings.php.package_name" field in gapic.yaml. API
2908 // teams should use the protobuf php_namespace option where possible. Example
2909 // of a YAML configuration:: publishing: library_settings: php_settings:
2910 // library_package: Google\Cloud\PubSub\V1
2911 LibraryPackage string `json:"libraryPackage,omitempty"`
2912 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
2913 // include in API requests. By default, fields with empty or default values are
2914 // omitted from API requests. See
2915 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2916 // details.
2917 ForceSendFields []string `json:"-"`
2918 // NullFields is a list of field names (e.g. "Common") to include in API
2919 // requests with the JSON null value. By default, fields with empty values are
2920 // omitted from API requests. See
2921 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2922 NullFields []string `json:"-"`
2923 }
2924
2925 func (s PhpSettings) MarshalJSON() ([]byte, error) {
2926 type NoMethod PhpSettings
2927 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2928 }
2929
2930 // Publishing: This message configures the settings for publishing Google Cloud
2931 // Client libraries (https://cloud.google.com/apis/docs/cloud-client-libraries)
2932 // generated from the service config.
2933 type Publishing struct {
2934 // ApiShortName: Used as a tracking tag when collecting data about the APIs
2935 // developer relations artifacts like docs, packages delivered to package
2936 // managers, etc. Example: "speech".
2937 ApiShortName string `json:"apiShortName,omitempty"`
2938 // CodeownerGithubTeams: GitHub teams to be added to CODEOWNERS in the
2939 // directory in GitHub containing source code for the client libraries for this
2940 // API.
2941 CodeownerGithubTeams []string `json:"codeownerGithubTeams,omitempty"`
2942 // DocTagPrefix: A prefix used in sample code when demarking regions to be
2943 // included in documentation.
2944 DocTagPrefix string `json:"docTagPrefix,omitempty"`
2945 // DocumentationUri: Link to product home page. Example:
2946 // https://cloud.google.com/asset-inventory/docs/overview
2947 DocumentationUri string `json:"documentationUri,omitempty"`
2948 // GithubLabel: GitHub label to apply to issues and pull requests opened for
2949 // this API.
2950 GithubLabel string `json:"githubLabel,omitempty"`
2951 // LibrarySettings: Client library settings. If the same version string appears
2952 // multiple times in this list, then the last one wins. Settings from earlier
2953 // settings with the same version string are discarded.
2954 LibrarySettings []*ClientLibrarySettings `json:"librarySettings,omitempty"`
2955 // MethodSettings: A list of API method settings, e.g. the behavior for methods
2956 // that use the long-running operation pattern.
2957 MethodSettings []*MethodSettings `json:"methodSettings,omitempty"`
2958 // NewIssueUri: Link to a *public* URI where users can report issues. Example:
2959 // https://issuetracker.google.com/issues/new?component=190865&template=1161103
2960 NewIssueUri string `json:"newIssueUri,omitempty"`
2961 // Organization: For whom the client library is being published.
2962 //
2963 // Possible values:
2964 // "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" - Not useful.
2965 // "CLOUD" - Google Cloud Platform Org.
2966 // "ADS" - Ads (Advertising) Org.
2967 // "PHOTOS" - Photos Org.
2968 // "STREET_VIEW" - Street View Org.
2969 // "SHOPPING" - Shopping Org.
2970 // "GEO" - Geo Org.
2971 // "GENERATIVE_AI" - Generative AI - https://developers.generativeai.google
2972 Organization string `json:"organization,omitempty"`
2973 // ProtoReferenceDocumentationUri: Optional link to proto reference
2974 // documentation. Example:
2975 // https://cloud.google.com/pubsub/lite/docs/reference/rpc
2976 ProtoReferenceDocumentationUri string `json:"protoReferenceDocumentationUri,omitempty"`
2977 // RestReferenceDocumentationUri: Optional link to REST reference
2978 // documentation. Example:
2979 // https://cloud.google.com/pubsub/lite/docs/reference/rest
2980 RestReferenceDocumentationUri string `json:"restReferenceDocumentationUri,omitempty"`
2981 // ForceSendFields is a list of field names (e.g. "ApiShortName") to
2982 // unconditionally include in API requests. By default, fields with empty or
2983 // default values are omitted from API requests. See
2984 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2985 // details.
2986 ForceSendFields []string `json:"-"`
2987 // NullFields is a list of field names (e.g. "ApiShortName") to include in API
2988 // requests with the JSON null value. By default, fields with empty values are
2989 // omitted from API requests. See
2990 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2991 NullFields []string `json:"-"`
2992 }
2993
2994 func (s Publishing) MarshalJSON() ([]byte, error) {
2995 type NoMethod Publishing
2996 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2997 }
2998
2999 // PythonSettings: Settings for Python client libraries.
3000 type PythonSettings struct {
3001 // Common: Some settings.
3002 Common *CommonLanguageSettings `json:"common,omitempty"`
3003 // ExperimentalFeatures: Experimental features to be included during client
3004 // library generation.
3005 ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,omitempty"`
3006 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
3007 // include in API requests. By default, fields with empty or default values are
3008 // omitted from API requests. See
3009 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3010 // details.
3011 ForceSendFields []string `json:"-"`
3012 // NullFields is a list of field names (e.g. "Common") to include in API
3013 // requests with the JSON null value. By default, fields with empty values are
3014 // omitted from API requests. See
3015 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3016 NullFields []string `json:"-"`
3017 }
3018
3019 func (s PythonSettings) MarshalJSON() ([]byte, error) {
3020 type NoMethod PythonSettings
3021 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3022 }
3023
3024 // Quota: Quota configuration helps to achieve fairness and budgeting in
3025 // service usage. The metric based quota configuration works this way: - The
3026 // service configuration defines a set of metrics. - For API calls, the
3027 // quota.metric_rules maps methods to metrics with corresponding costs. - The
3028 // quota.limits defines limits on the metrics, which will be used for quota
3029 // checks at runtime. An example quota configuration in yaml format: quota:
3030 // limits: - name: apiWriteQpsPerProject metric:
3031 // library.googleapis.com/write_calls unit: "1/min/{project}" # rate limit for
3032 // consumer projects values: STANDARD: 10000 (The metric rules bind all methods
3033 // to the read_calls metric, except for the UpdateBook and DeleteBook methods.
3034 // These two methods are mapped to the write_calls metric, with the UpdateBook
3035 // method consuming at twice rate as the DeleteBook method.) metric_rules: -
3036 // selector: "*" metric_costs: library.googleapis.com/read_calls: 1 - selector:
3037 // google.example.library.v1.LibraryService.UpdateBook metric_costs:
3038 // library.googleapis.com/write_calls: 2 - selector:
3039 // google.example.library.v1.LibraryService.DeleteBook metric_costs:
3040 // library.googleapis.com/write_calls: 1 Corresponding Metric definition:
3041 // metrics: - name: library.googleapis.com/read_calls display_name: Read
3042 // requests metric_kind: DELTA value_type: INT64 - name:
3043 // library.googleapis.com/write_calls display_name: Write requests metric_kind:
3044 // DELTA value_type: INT64
3045 type Quota struct {
3046 // Limits: List of QuotaLimit definitions for the service.
3047 Limits []*QuotaLimit `json:"limits,omitempty"`
3048 // MetricRules: List of MetricRule definitions, each one mapping a selected
3049 // method to one or more metrics.
3050 MetricRules []*MetricRule `json:"metricRules,omitempty"`
3051 // ForceSendFields is a list of field names (e.g. "Limits") to unconditionally
3052 // include in API requests. By default, fields with empty or default values are
3053 // omitted from API requests. See
3054 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3055 // details.
3056 ForceSendFields []string `json:"-"`
3057 // NullFields is a list of field names (e.g. "Limits") to include in API
3058 // requests with the JSON null value. By default, fields with empty values are
3059 // omitted from API requests. See
3060 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3061 NullFields []string `json:"-"`
3062 }
3063
3064 func (s Quota) MarshalJSON() ([]byte, error) {
3065 type NoMethod Quota
3066 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3067 }
3068
3069 // QuotaLimit: `QuotaLimit` defines a specific limit that applies over a
3070 // specified duration for a limit type. There can be at most one limit for a
3071 // duration and limit type combination defined within a `QuotaGroup`.
3072 type QuotaLimit struct {
3073 // DefaultLimit: Default number of tokens that can be consumed during the
3074 // specified duration. This is the number of tokens assigned when a client
3075 // application developer activates the service for his/her project. Specifying
3076 // a value of 0 will block all requests. This can be used if you are
3077 // provisioning quota to selected consumers and blocking others. Similarly, a
3078 // value of -1 will indicate an unlimited quota. No other negative values are
3079 // allowed. Used by group-based quotas only.
3080 DefaultLimit int64 `json:"defaultLimit,omitempty,string"`
3081 // Description: Optional. User-visible, extended description for this quota
3082 // limit. Should be used only when more context is needed to understand this
3083 // limit than provided by the limit's display name (see: `display_name`).
3084 Description string `json:"description,omitempty"`
3085 // DisplayName: User-visible display name for this limit. Optional. If not set,
3086 // the UI will provide a default display name based on the quota configuration.
3087 // This field can be used to override the default display name generated from
3088 // the configuration.
3089 DisplayName string `json:"displayName,omitempty"`
3090 // Duration: Duration of this limit in textual notation. Must be "100s" or
3091 // "1d". Used by group-based quotas only.
3092 Duration string `json:"duration,omitempty"`
3093 // FreeTier: Free tier value displayed in the Developers Console for this
3094 // limit. The free tier is the number of tokens that will be subtracted from
3095 // the billed amount when billing is enabled. This field can only be set on a
3096 // limit with duration "1d", in a billable group; it is invalid on any other
3097 // limit. If this field is not set, it defaults to 0, indicating that there is
3098 // no free tier for this service. Used by group-based quotas only.
3099 FreeTier int64 `json:"freeTier,omitempty,string"`
3100 // MaxLimit: Maximum number of tokens that can be consumed during the specified
3101 // duration. Client application developers can override the default limit up to
3102 // this maximum. If specified, this value cannot be set to a value less than
3103 // the default limit. If not specified, it is set to the default limit. To
3104 // allow clients to apply overrides with no upper bound, set this to -1,
3105 // indicating unlimited maximum quota. Used by group-based quotas only.
3106 MaxLimit int64 `json:"maxLimit,omitempty,string"`
3107 // Metric: The name of the metric this quota limit applies to. The quota limits
3108 // with the same metric will be checked together during runtime. The metric
3109 // must be defined within the service config.
3110 Metric string `json:"metric,omitempty"`
3111 // Name: Name of the quota limit. The name must be provided, and it must be
3112 // unique within the service. The name can only include alphanumeric characters
3113 // as well as '-'. The maximum length of the limit name is 64 characters.
3114 Name string `json:"name,omitempty"`
3115 // Unit: Specify the unit of the quota limit. It uses the same syntax as
3116 // MetricDescriptor.unit. The supported unit kinds are determined by the quota
3117 // backend system. Here are some examples: * "1/min/{project}" for quota per
3118 // minute per project. Note: the order of unit components is insignificant. The
3119 // "1" at the beginning is required to follow the metric unit syntax.
3120 Unit string `json:"unit,omitempty"`
3121 // Values: Tiered limit values. You must specify this as a key:value pair, with
3122 // an integer value that is the maximum number of requests allowed for the
3123 // specified unit. Currently only STANDARD is supported.
3124 Values map[string]string `json:"values,omitempty"`
3125 // ForceSendFields is a list of field names (e.g. "DefaultLimit") to
3126 // unconditionally include in API requests. By default, fields with empty or
3127 // default values are omitted from API requests. See
3128 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3129 // details.
3130 ForceSendFields []string `json:"-"`
3131 // NullFields is a list of field names (e.g. "DefaultLimit") to include in API
3132 // requests with the JSON null value. By default, fields with empty values are
3133 // omitted from API requests. See
3134 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3135 NullFields []string `json:"-"`
3136 }
3137
3138 func (s QuotaLimit) MarshalJSON() ([]byte, error) {
3139 type NoMethod QuotaLimit
3140 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3141 }
3142
3143 // RubySettings: Settings for Ruby client libraries.
3144 type RubySettings struct {
3145 // Common: Some settings.
3146 Common *CommonLanguageSettings `json:"common,omitempty"`
3147 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally
3148 // include in API requests. By default, fields with empty or default values are
3149 // omitted from API requests. See
3150 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3151 // details.
3152 ForceSendFields []string `json:"-"`
3153 // NullFields is a list of field names (e.g. "Common") to include in API
3154 // requests with the JSON null value. By default, fields with empty values are
3155 // omitted from API requests. See
3156 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3157 NullFields []string `json:"-"`
3158 }
3159
3160 func (s RubySettings) MarshalJSON() ([]byte, error) {
3161 type NoMethod RubySettings
3162 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3163 }
3164
3165 // SelectiveGapicGeneration: This message is used to configure the generation
3166 // of a subset of the RPCs in a service for client libraries. Note: This
3167 // feature should not be used in most cases.
3168 type SelectiveGapicGeneration struct {
3169 // GenerateOmittedAsInternal: Setting this to true indicates to the client
3170 // generators that methods that would be excluded from the generation should
3171 // instead be generated in a way that indicates these methods should not be
3172 // consumed by end users. How this is expressed is up to individual language
3173 // implementations to decide. Some examples may be: added annotations,
3174 // obfuscated identifiers, or other language idiomatic patterns.
3175 GenerateOmittedAsInternal bool `json:"generateOmittedAsInternal,omitempty"`
3176 // Methods: An allowlist of the fully qualified names of RPCs that should be
3177 // included on public client surfaces.
3178 Methods []string `json:"methods,omitempty"`
3179 // ForceSendFields is a list of field names (e.g. "GenerateOmittedAsInternal")
3180 // to unconditionally include in API requests. By default, fields with empty or
3181 // default values are omitted from API requests. See
3182 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3183 // details.
3184 ForceSendFields []string `json:"-"`
3185 // NullFields is a list of field names (e.g. "GenerateOmittedAsInternal") to
3186 // include in API requests with the JSON null value. By default, fields with
3187 // empty values are omitted from API requests. See
3188 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3189 NullFields []string `json:"-"`
3190 }
3191
3192 func (s SelectiveGapicGeneration) MarshalJSON() ([]byte, error) {
3193 type NoMethod SelectiveGapicGeneration
3194 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3195 }
3196
3197 // Service: `Service` is the root object of Google API service configuration
3198 // (service config). It describes the basic information about a logical
3199 // service, such as the service name and the user-facing title, and delegates
3200 // other aspects to sub-sections. Each sub-section is either a proto message or
3201 // a repeated proto message that configures a specific aspect, such as auth.
3202 // For more information, see each proto message definition. Example: type:
3203 // google.api.Service name: calendar.googleapis.com title: Google Calendar API
3204 // apis: - name: google.calendar.v3.Calendar visibility: rules: - selector:
3205 // "google.calendar.v3.*" restriction: PREVIEW backend: rules: - selector:
3206 // "google.calendar.v3.*" address: calendar.example.com authentication:
3207 // providers: - id: google_calendar_auth jwks_uri:
3208 // https://www.googleapis.com/oauth2/v1/certs issuer:
3209 // https://securetoken.google.com rules: - selector: "*" requirements:
3210 // provider_id: google_calendar_auth
3211 type Service struct {
3212 // Apis: A list of API interfaces exported by this service. Only the `name`
3213 // field of the google.protobuf.Api needs to be provided by the configuration
3214 // author, as the remaining fields will be derived from the IDL during the
3215 // normalization process. It is an error to specify an API interface here which
3216 // cannot be resolved against the associated IDL files.
3217 Apis []*Api `json:"apis,omitempty"`
3218 // Aspects: Configuration aspects. This is a repeated field to allow multiple
3219 // aspects to be configured. The kind field in each ConfigAspect specifies the
3220 // type of aspect. The spec field contains the configuration for that aspect.
3221 // The schema for the spec field is defined by the backend service owners.
3222 Aspects []*Aspect `json:"aspects,omitempty"`
3223 // Authentication: Auth configuration.
3224 Authentication *Authentication `json:"authentication,omitempty"`
3225 // Backend: API backend configuration.
3226 Backend *Backend `json:"backend,omitempty"`
3227 // Billing: Billing configuration.
3228 Billing *Billing `json:"billing,omitempty"`
3229 // ConfigVersion: Obsolete. Do not use. This field has no semantic meaning. The
3230 // service config compiler always sets this field to `3`.
3231 ConfigVersion int64 `json:"configVersion,omitempty"`
3232 // Context: Context configuration.
3233 Context *Context `json:"context,omitempty"`
3234 // Control: Configuration for the service control plane.
3235 Control *Control `json:"control,omitempty"`
3236 // CustomError: Custom error configuration.
3237 CustomError *CustomError `json:"customError,omitempty"`
3238 // Documentation: Additional API documentation.
3239 Documentation *Documentation `json:"documentation,omitempty"`
3240 // Endpoints: Configuration for network endpoints. If this is empty, then an
3241 // endpoint with the same name as the service is automatically generated to
3242 // service all defined APIs.
3243 Endpoints []*Endpoint `json:"endpoints,omitempty"`
3244 // Enums: A list of all enum types included in this API service. Enums
3245 // referenced directly or indirectly by the `apis` are automatically included.
3246 // Enums which are not referenced but shall be included should be listed here
3247 // by name by the configuration author. Example: enums: - name:
3248 // google.someapi.v1.SomeEnum
3249 Enums []*Enum `json:"enums,omitempty"`
3250 // Http: HTTP configuration.
3251 Http *Http `json:"http,omitempty"`
3252 // Id: A unique ID for a specific instance of this message, typically assigned
3253 // by the client for tracking purpose. Must be no longer than 63 characters and
3254 // only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the
3255 // server may choose to generate one instead.
3256 Id string `json:"id,omitempty"`
3257 // Logging: Logging configuration.
3258 Logging *Logging `json:"logging,omitempty"`
3259 // Logs: Defines the logs used by this service.
3260 Logs []*LogDescriptor `json:"logs,omitempty"`
3261 // Metrics: Defines the metrics used by this service.
3262 Metrics []*MetricDescriptor `json:"metrics,omitempty"`
3263 // MonitoredResources: Defines the monitored resources used by this service.
3264 // This is required by the `Service.monitoring` and `Service.logging`
3265 // configurations.
3266 MonitoredResources []*MonitoredResourceDescriptor `json:"monitoredResources,omitempty"`
3267 // Monitoring: Monitoring configuration.
3268 Monitoring *Monitoring `json:"monitoring,omitempty"`
3269 // Name: The service name, which is a DNS-like logical identifier for the
3270 // service, such as `calendar.googleapis.com`. The service name typically goes
3271 // through DNS verification to make sure the owner of the service also owns the
3272 // DNS name.
3273 Name string `json:"name,omitempty"`
3274 // ProducerProjectId: The Google project that owns this service.
3275 ProducerProjectId string `json:"producerProjectId,omitempty"`
3276 // Publishing: Settings for Google Cloud Client libraries
3277 // (https://cloud.google.com/apis/docs/cloud-client-libraries) generated from
3278 // APIs defined as protocol buffers.
3279 Publishing *Publishing `json:"publishing,omitempty"`
3280 // Quota: Quota configuration.
3281 Quota *Quota `json:"quota,omitempty"`
3282 // SourceInfo: Output only. The source information for this configuration if
3283 // available.
3284 SourceInfo *SourceInfo `json:"sourceInfo,omitempty"`
3285 // SystemParameters: System parameter configuration.
3286 SystemParameters *SystemParameters `json:"systemParameters,omitempty"`
3287 // SystemTypes: A list of all proto message types included in this API service.
3288 // It serves similar purpose as [google.api.Service.types], except that these
3289 // types are not needed by user-defined APIs. Therefore, they will not show up
3290 // in the generated discovery doc. This field should only be used to define
3291 // system APIs in ESF.
3292 SystemTypes []*Type `json:"systemTypes,omitempty"`
3293 // Title: The product title for this service, it is the name displayed in
3294 // Google Cloud Console.
3295 Title string `json:"title,omitempty"`
3296 // Types: A list of all proto message types included in this API service. Types
3297 // referenced directly or indirectly by the `apis` are automatically included.
3298 // Messages which are not referenced but shall be included, such as types used
3299 // by the `google.protobuf.Any` type, should be listed here by name by the
3300 // configuration author. Example: types: - name: google.protobuf.Int32
3301 Types []*Type `json:"types,omitempty"`
3302 // Usage: Configuration controlling usage of this service.
3303 Usage *Usage `json:"usage,omitempty"`
3304 // ForceSendFields is a list of field names (e.g. "Apis") to unconditionally
3305 // include in API requests. By default, fields with empty or default values are
3306 // omitted from API requests. See
3307 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3308 // details.
3309 ForceSendFields []string `json:"-"`
3310 // NullFields is a list of field names (e.g. "Apis") to include in API requests
3311 // with the JSON null value. By default, fields with empty values are omitted
3312 // from API requests. See
3313 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3314 NullFields []string `json:"-"`
3315 }
3316
3317 func (s Service) MarshalJSON() ([]byte, error) {
3318 type NoMethod Service
3319 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3320 }
3321
3322 // SourceContext: `SourceContext` represents information about the source of a
3323 // protobuf element, like the file in which it is defined.
3324 type SourceContext struct {
3325 // FileName: The path-qualified name of the .proto file that contained the
3326 // associated protobuf element. For example:
3327 // "google/protobuf/source_context.proto".
3328 FileName string `json:"fileName,omitempty"`
3329 // ForceSendFields is a list of field names (e.g. "FileName") to
3330 // unconditionally include in API requests. By default, fields with empty or
3331 // default values are omitted from API requests. See
3332 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3333 // details.
3334 ForceSendFields []string `json:"-"`
3335 // NullFields is a list of field names (e.g. "FileName") to include in API
3336 // requests with the JSON null value. By default, fields with empty values are
3337 // omitted from API requests. See
3338 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3339 NullFields []string `json:"-"`
3340 }
3341
3342 func (s SourceContext) MarshalJSON() ([]byte, error) {
3343 type NoMethod SourceContext
3344 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3345 }
3346
3347 // SourceInfo: Source information used to create a Service Config
3348 type SourceInfo struct {
3349 // SourceFiles: All files used during config generation.
3350 SourceFiles []googleapi.RawMessage `json:"sourceFiles,omitempty"`
3351 // ForceSendFields is a list of field names (e.g. "SourceFiles") to
3352 // unconditionally include in API requests. By default, fields with empty or
3353 // default values are omitted from API requests. See
3354 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3355 // details.
3356 ForceSendFields []string `json:"-"`
3357 // NullFields is a list of field names (e.g. "SourceFiles") to include in API
3358 // requests with the JSON null value. By default, fields with empty values are
3359 // omitted from API requests. See
3360 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3361 NullFields []string `json:"-"`
3362 }
3363
3364 func (s SourceInfo) MarshalJSON() ([]byte, error) {
3365 type NoMethod SourceInfo
3366 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3367 }
3368
3369 // Status: The `Status` type defines a logical error model that is suitable for
3370 // different programming environments, including REST APIs and RPC APIs. It is
3371 // used by gRPC (https://github.com/grpc). Each `Status` message contains three
3372 // pieces of data: error code, error message, and error details. You can find
3373 // out more about this error model and how to work with it in the API Design
3374 // Guide (https://cloud.google.com/apis/design/errors).
3375 type Status struct {
3376 // Code: The status code, which should be an enum value of google.rpc.Code.
3377 Code int64 `json:"code,omitempty"`
3378 // Details: A list of messages that carry the error details. There is a common
3379 // set of message types for APIs to use.
3380 Details []googleapi.RawMessage `json:"details,omitempty"`
3381 // Message: A developer-facing error message, which should be in English. Any
3382 // user-facing error message should be localized and sent in the
3383 // google.rpc.Status.details field, or localized by the client.
3384 Message string `json:"message,omitempty"`
3385 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3386 // include in API requests. By default, fields with empty or default values are
3387 // omitted from API requests. See
3388 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3389 // details.
3390 ForceSendFields []string `json:"-"`
3391 // NullFields is a list of field names (e.g. "Code") to include in API requests
3392 // with the JSON null value. By default, fields with empty values are omitted
3393 // from API requests. See
3394 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3395 NullFields []string `json:"-"`
3396 }
3397
3398 func (s Status) MarshalJSON() ([]byte, error) {
3399 type NoMethod Status
3400 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3401 }
3402
3403 // SystemParameter: Define a parameter's name and location. The parameter may
3404 // be passed as either an HTTP header or a URL query parameter, and if both are
3405 // passed the behavior is implementation-dependent.
3406 type SystemParameter struct {
3407 // HttpHeader: Define the HTTP header name to use for the parameter. It is case
3408 // insensitive.
3409 HttpHeader string `json:"httpHeader,omitempty"`
3410 // Name: Define the name of the parameter, such as "api_key" . It is case
3411 // sensitive.
3412 Name string `json:"name,omitempty"`
3413 // UrlQueryParameter: Define the URL query parameter name to use for the
3414 // parameter. It is case sensitive.
3415 UrlQueryParameter string `json:"urlQueryParameter,omitempty"`
3416 // ForceSendFields is a list of field names (e.g. "HttpHeader") to
3417 // unconditionally include in API requests. By default, fields with empty or
3418 // default values are omitted from API requests. See
3419 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3420 // details.
3421 ForceSendFields []string `json:"-"`
3422 // NullFields is a list of field names (e.g. "HttpHeader") to include in API
3423 // requests with the JSON null value. By default, fields with empty values are
3424 // omitted from API requests. See
3425 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3426 NullFields []string `json:"-"`
3427 }
3428
3429 func (s SystemParameter) MarshalJSON() ([]byte, error) {
3430 type NoMethod SystemParameter
3431 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3432 }
3433
3434 // SystemParameterRule: Define a system parameter rule mapping system parameter
3435 // definitions to methods.
3436 type SystemParameterRule struct {
3437 // Parameters: Define parameters. Multiple names may be defined for a
3438 // parameter. For a given method call, only one of them should be used. If
3439 // multiple names are used the behavior is implementation-dependent. If none of
3440 // the specified names are present the behavior is parameter-dependent.
3441 Parameters []*SystemParameter `json:"parameters,omitempty"`
3442 // Selector: Selects the methods to which this rule applies. Use '*' to
3443 // indicate all methods in all APIs. Refer to selector for syntax details.
3444 Selector string `json:"selector,omitempty"`
3445 // ForceSendFields is a list of field names (e.g. "Parameters") to
3446 // unconditionally include in API requests. By default, fields with empty or
3447 // default values are omitted from API requests. See
3448 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3449 // details.
3450 ForceSendFields []string `json:"-"`
3451 // NullFields is a list of field names (e.g. "Parameters") to include in API
3452 // requests with the JSON null value. By default, fields with empty values are
3453 // omitted from API requests. See
3454 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3455 NullFields []string `json:"-"`
3456 }
3457
3458 func (s SystemParameterRule) MarshalJSON() ([]byte, error) {
3459 type NoMethod SystemParameterRule
3460 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3461 }
3462
3463 // SystemParameters: ### System parameter configuration A system parameter is a
3464 // special kind of parameter defined by the API system, not by an individual
3465 // API. It is typically mapped to an HTTP header and/or a URL query parameter.
3466 // This configuration specifies which methods change the names of the system
3467 // parameters.
3468 type SystemParameters struct {
3469 // Rules: Define system parameters. The parameters defined here will override
3470 // the default parameters implemented by the system. If this field is missing
3471 // from the service config, default system parameters will be used. Default
3472 // system parameters and names is implementation-dependent. Example: define api
3473 // key for all methods system_parameters rules: - selector: "*" parameters: -
3474 // name: api_key url_query_parameter: api_key Example: define 2 api key names
3475 // for a specific method. system_parameters rules: - selector: "/ListShelves"
3476 // parameters: - name: api_key http_header: Api-Key1 - name: api_key
3477 // http_header: Api-Key2 **NOTE:** All service configuration rules follow "last
3478 // one wins" order.
3479 Rules []*SystemParameterRule `json:"rules,omitempty"`
3480 // ForceSendFields is a list of field names (e.g. "Rules") to unconditionally
3481 // include in API requests. By default, fields with empty or default values are
3482 // omitted from API requests. See
3483 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3484 // details.
3485 ForceSendFields []string `json:"-"`
3486 // NullFields is a list of field names (e.g. "Rules") to include in API
3487 // requests with the JSON null value. By default, fields with empty values are
3488 // omitted from API requests. See
3489 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3490 NullFields []string `json:"-"`
3491 }
3492
3493 func (s SystemParameters) MarshalJSON() ([]byte, error) {
3494 type NoMethod SystemParameters
3495 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3496 }
3497
3498 // Type: A protocol buffer message type. New usages of this message as an
3499 // alternative to DescriptorProto are strongly discouraged. This message does
3500 // not reliability preserve all information necessary to model the schema and
3501 // preserve semantics. Instead make use of FileDescriptorSet which preserves
3502 // the necessary information.
3503 type Type struct {
3504 // Edition: The source edition string, only valid when syntax is
3505 // SYNTAX_EDITIONS.
3506 Edition string `json:"edition,omitempty"`
3507 // Fields: The list of fields.
3508 Fields []*Field `json:"fields,omitempty"`
3509 // Name: The fully qualified message name.
3510 Name string `json:"name,omitempty"`
3511 // Oneofs: The list of types appearing in `oneof` definitions in this type.
3512 Oneofs []string `json:"oneofs,omitempty"`
3513 // Options: The protocol buffer options.
3514 Options []*Option `json:"options,omitempty"`
3515 // SourceContext: The source context.
3516 SourceContext *SourceContext `json:"sourceContext,omitempty"`
3517 // Syntax: The source syntax.
3518 //
3519 // Possible values:
3520 // "SYNTAX_PROTO2" - Syntax `proto2`.
3521 // "SYNTAX_PROTO3" - Syntax `proto3`.
3522 // "SYNTAX_EDITIONS" - Syntax `editions`.
3523 Syntax string `json:"syntax,omitempty"`
3524 // ForceSendFields is a list of field names (e.g. "Edition") to unconditionally
3525 // include in API requests. By default, fields with empty or default values are
3526 // omitted from API requests. See
3527 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3528 // details.
3529 ForceSendFields []string `json:"-"`
3530 // NullFields is a list of field names (e.g. "Edition") to include in API
3531 // requests with the JSON null value. By default, fields with empty values are
3532 // omitted from API requests. See
3533 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3534 NullFields []string `json:"-"`
3535 }
3536
3537 func (s Type) MarshalJSON() ([]byte, error) {
3538 type NoMethod Type
3539 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3540 }
3541
3542 // Usage: Configuration controlling usage of a service.
3543 type Usage struct {
3544 // ProducerNotificationChannel: The full resource name of a channel used for
3545 // sending notifications to the service producer. Google Service Management
3546 // currently only supports Google Cloud Pub/Sub
3547 // (https://cloud.google.com/pubsub) as a notification channel. To use Google
3548 // Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic
3549 // that uses the Cloud Pub/Sub topic name format documented in
3550 // https://cloud.google.com/pubsub/docs/overview.
3551 ProducerNotificationChannel string `json:"producerNotificationChannel,omitempty"`
3552 // Requirements: Requirements that must be satisfied before a consumer project
3553 // can use the service. Each requirement is of the form /; for example
3554 // 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of
3555 // Service requirement must be included here. Google Cloud APIs must include
3556 // "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include
3557 // "serviceusage.googleapis.com/tos/universal". Additional ToS can be included
3558 // based on the business needs.
3559 Requirements []string `json:"requirements,omitempty"`
3560 // Rules: A list of usage rules that apply to individual API methods. **NOTE:**
3561 // All service configuration rules follow "last one wins" order.
3562 Rules []*UsageRule `json:"rules,omitempty"`
3563 // ForceSendFields is a list of field names (e.g.
3564 // "ProducerNotificationChannel") to unconditionally include in API requests.
3565 // By default, fields with empty or default values are omitted from API
3566 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
3567 // for more details.
3568 ForceSendFields []string `json:"-"`
3569 // NullFields is a list of field names (e.g. "ProducerNotificationChannel") to
3570 // include in API requests with the JSON null value. By default, fields with
3571 // empty values are omitted from API requests. See
3572 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3573 NullFields []string `json:"-"`
3574 }
3575
3576 func (s Usage) MarshalJSON() ([]byte, error) {
3577 type NoMethod Usage
3578 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3579 }
3580
3581 // UsageRule: Usage configuration rules for the service.
3582 type UsageRule struct {
3583 // AllowUnregisteredCalls: Use this rule to configure unregistered calls for
3584 // the service. Unregistered calls are calls that do not contain consumer
3585 // project identity. (Example: calls that do not contain an API key). WARNING:
3586 // By default, API methods do not allow unregistered calls, and each method
3587 // call must be identified by a consumer project identity.
3588 AllowUnregisteredCalls bool `json:"allowUnregisteredCalls,omitempty"`
3589 // Selector: Selects the methods to which this rule applies. Use '*' to
3590 // indicate all methods in all APIs. Refer to selector for syntax details.
3591 Selector string `json:"selector,omitempty"`
3592 // SkipServiceControl: If true, the selected method should skip service control
3593 // and the control plane features, such as quota and billing, will not be
3594 // available. This flag is used by Google Cloud Endpoints to bypass checks for
3595 // internal methods, such as service health check methods.
3596 SkipServiceControl bool `json:"skipServiceControl,omitempty"`
3597 // ForceSendFields is a list of field names (e.g. "AllowUnregisteredCalls") to
3598 // unconditionally include in API requests. By default, fields with empty or
3599 // default values are omitted from API requests. See
3600 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3601 // details.
3602 ForceSendFields []string `json:"-"`
3603 // NullFields is a list of field names (e.g. "AllowUnregisteredCalls") to
3604 // include in API requests with the JSON null value. By default, fields with
3605 // empty values are omitted from API requests. See
3606 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3607 NullFields []string `json:"-"`
3608 }
3609
3610 func (s UsageRule) MarshalJSON() ([]byte, error) {
3611 type NoMethod UsageRule
3612 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3613 }
3614
3615 // V1Beta1BatchCreateProducerOverridesResponse: Response message for
3616 // BatchCreateProducerOverrides
3617 type V1Beta1BatchCreateProducerOverridesResponse struct {
3618 // Overrides: The overrides that were created.
3619 Overrides []*V1Beta1QuotaOverride `json:"overrides,omitempty"`
3620 // ForceSendFields is a list of field names (e.g. "Overrides") to
3621 // unconditionally include in API requests. By default, fields with empty or
3622 // default values are omitted from API requests. See
3623 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3624 // details.
3625 ForceSendFields []string `json:"-"`
3626 // NullFields is a list of field names (e.g. "Overrides") to include in API
3627 // requests with the JSON null value. By default, fields with empty values are
3628 // omitted from API requests. See
3629 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3630 NullFields []string `json:"-"`
3631 }
3632
3633 func (s V1Beta1BatchCreateProducerOverridesResponse) MarshalJSON() ([]byte, error) {
3634 type NoMethod V1Beta1BatchCreateProducerOverridesResponse
3635 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3636 }
3637
3638 // V1Beta1ConsumerQuotaLimit: Consumer quota settings for a quota limit.
3639 type V1Beta1ConsumerQuotaLimit struct {
3640 // IsPrecise: Whether this limit is precise or imprecise.
3641 IsPrecise bool `json:"isPrecise,omitempty"`
3642 // Metric: The name of the parent metric of this limit. An example name would
3643 // be: `compute.googleapis.com/cpus`
3644 Metric string `json:"metric,omitempty"`
3645 // Name: The resource name of the quota limit. An example name would be:
3646 // `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.go
3647 // ogleapis.com%2Fcpus/limits/%2Fproject%2Fregion` The resource name is
3648 // intended to be opaque and should not be parsed for its component strings,
3649 // since its representation could change in the future.
3650 Name string `json:"name,omitempty"`
3651 // QuotaBuckets: Summary of the enforced quota buckets, organized by quota
3652 // dimension, ordered from least specific to most specific (for example, the
3653 // global default bucket, with no quota dimensions, will always appear first).
3654 QuotaBuckets []*V1Beta1QuotaBucket `json:"quotaBuckets,omitempty"`
3655 // SupportedLocations: List of all supported locations. This field is present
3656 // only if the limit has a {region} or {zone} dimension.
3657 SupportedLocations []string `json:"supportedLocations,omitempty"`
3658 // Unit: The limit unit. An example unit would be: `1/{project}/{region}` Note
3659 // that `{project}` and `{region}` are not placeholders in this example; the
3660 // literal characters `{` and `}` occur in the string.
3661 Unit string `json:"unit,omitempty"`
3662
3663 // ServerResponse contains the HTTP response code and headers from the server.
3664 googleapi.ServerResponse `json:"-"`
3665 // ForceSendFields is a list of field names (e.g. "IsPrecise") to
3666 // unconditionally include in API requests. By default, fields with empty or
3667 // default values are omitted from API requests. See
3668 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3669 // details.
3670 ForceSendFields []string `json:"-"`
3671 // NullFields is a list of field names (e.g. "IsPrecise") to include in API
3672 // requests with the JSON null value. By default, fields with empty values are
3673 // omitted from API requests. See
3674 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3675 NullFields []string `json:"-"`
3676 }
3677
3678 func (s V1Beta1ConsumerQuotaLimit) MarshalJSON() ([]byte, error) {
3679 type NoMethod V1Beta1ConsumerQuotaLimit
3680 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3681 }
3682
3683 // V1Beta1ConsumerQuotaMetric: Consumer quota settings for a quota metric.
3684 type V1Beta1ConsumerQuotaMetric struct {
3685 // ConsumerQuotaLimits: The consumer quota for each quota limit defined on the
3686 // metric.
3687 ConsumerQuotaLimits []*V1Beta1ConsumerQuotaLimit `json:"consumerQuotaLimits,omitempty"`
3688 // DescendantConsumerQuotaLimits: The quota limits targeting the descendant
3689 // containers of the consumer in request. If the consumer in request is of type
3690 // `organizations` or `folders`, the field will list per-project limits in the
3691 // metric; if the consumer in request is of type `project`, the field will be
3692 // empty. The `quota_buckets` field of each descendant consumer quota limit
3693 // will not be populated.
3694 DescendantConsumerQuotaLimits []*V1Beta1ConsumerQuotaLimit `json:"descendantConsumerQuotaLimits,omitempty"`
3695 // DisplayName: The display name of the metric. An example name would be:
3696 // "CPUs"
3697 DisplayName string `json:"displayName,omitempty"`
3698 // Metric: The name of the metric. An example name would be:
3699 // `compute.googleapis.com/cpus`
3700 Metric string `json:"metric,omitempty"`
3701 // Name: The resource name of the quota settings on this metric for this
3702 // consumer. An example name would be:
3703 // `services/serviceconsumermanagement.googleapis.com/projects/123/consumerQuota
3704 // Metrics/compute.googleapis.com%2Fcpus` The resource name is intended to be
3705 // opaque and should not be parsed for its component strings, since its
3706 // representation could change in the future.
3707 Name string `json:"name,omitempty"`
3708 // Unit: The units in which the metric value is reported.
3709 Unit string `json:"unit,omitempty"`
3710
3711 // ServerResponse contains the HTTP response code and headers from the server.
3712 googleapi.ServerResponse `json:"-"`
3713 // ForceSendFields is a list of field names (e.g. "ConsumerQuotaLimits") to
3714 // unconditionally include in API requests. By default, fields with empty or
3715 // default values are omitted from API requests. See
3716 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3717 // details.
3718 ForceSendFields []string `json:"-"`
3719 // NullFields is a list of field names (e.g. "ConsumerQuotaLimits") to include
3720 // in API requests with the JSON null value. By default, fields with empty
3721 // values are omitted from API requests. See
3722 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3723 NullFields []string `json:"-"`
3724 }
3725
3726 func (s V1Beta1ConsumerQuotaMetric) MarshalJSON() ([]byte, error) {
3727 type NoMethod V1Beta1ConsumerQuotaMetric
3728 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3729 }
3730
3731 // V1Beta1DisableConsumerResponse: Response message for the `DisableConsumer`
3732 // method. This response message is assigned to the `response` field of the
3733 // returned Operation when that operation is done.
3734 type V1Beta1DisableConsumerResponse struct {
3735 }
3736
3737 // V1Beta1EnableConsumerResponse: Response message for the `EnableConsumer`
3738 // method. This response message is assigned to the `response` field of the
3739 // returned Operation when that operation is done.
3740 type V1Beta1EnableConsumerResponse struct {
3741 }
3742
3743 // V1Beta1GenerateServiceIdentityResponse: Response message for the
3744 // `GenerateServiceIdentity` method. This response message is assigned to the
3745 // `response` field of the returned Operation when that operation is done.
3746 type V1Beta1GenerateServiceIdentityResponse struct {
3747 // Identity: ServiceIdentity that was created or retrieved.
3748 Identity *V1Beta1ServiceIdentity `json:"identity,omitempty"`
3749 // ForceSendFields is a list of field names (e.g. "Identity") to
3750 // unconditionally include in API requests. By default, fields with empty or
3751 // default values are omitted from API requests. See
3752 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3753 // details.
3754 ForceSendFields []string `json:"-"`
3755 // NullFields is a list of field names (e.g. "Identity") to include in API
3756 // requests with the JSON null value. By default, fields with empty values are
3757 // omitted from API requests. See
3758 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3759 NullFields []string `json:"-"`
3760 }
3761
3762 func (s V1Beta1GenerateServiceIdentityResponse) MarshalJSON() ([]byte, error) {
3763 type NoMethod V1Beta1GenerateServiceIdentityResponse
3764 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3765 }
3766
3767 // V1Beta1ImportProducerOverridesRequest: Request message for
3768 // ImportProducerOverrides
3769 type V1Beta1ImportProducerOverridesRequest struct {
3770 // Force: Whether to force the creation of the quota overrides. Setting the
3771 // force parameter to 'true' ignores all quota safety checks that would fail
3772 // the request. QuotaSafetyCheck lists all such validations.
3773 Force bool `json:"force,omitempty"`
3774 // ForceJustification: If force option is set to true, force_justification is
3775 // suggested to be set to log the reason in audit logs.
3776 ForceJustification string `json:"forceJustification,omitempty"`
3777 // ForceOnly: The list of quota safety checks to ignore before the override
3778 // mutation. Unlike 'force' field that ignores all the quota safety checks, the
3779 // 'force_only' field ignores only the specified checks; other checks are still
3780 // enforced. The 'force' and 'force_only' fields cannot both be set.
3781 //
3782 // Possible values:
3783 // "QUOTA_SAFETY_CHECK_UNSPECIFIED" - Unspecified quota safety check.
3784 // "LIMIT_DECREASE_BELOW_USAGE" - Validates that a quota mutation would not
3785 // cause the consumer's effective limit to be lower than the consumer's quota
3786 // usage.
3787 // "LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" - Validates that a quota mutation
3788 // would not cause the consumer's effective limit to decrease by more than 10
3789 // percent.
3790 ForceOnly []string `json:"forceOnly,omitempty"`
3791 // InlineSource: The import data is specified in the request message itself
3792 InlineSource *V1Beta1OverrideInlineSource `json:"inlineSource,omitempty"`
3793 // ForceSendFields is a list of field names (e.g. "Force") to unconditionally
3794 // include in API requests. By default, fields with empty or default values are
3795 // omitted from API requests. See
3796 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3797 // details.
3798 ForceSendFields []string `json:"-"`
3799 // NullFields is a list of field names (e.g. "Force") to include in API
3800 // requests with the JSON null value. By default, fields with empty values are
3801 // omitted from API requests. See
3802 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3803 NullFields []string `json:"-"`
3804 }
3805
3806 func (s V1Beta1ImportProducerOverridesRequest) MarshalJSON() ([]byte, error) {
3807 type NoMethod V1Beta1ImportProducerOverridesRequest
3808 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3809 }
3810
3811 // V1Beta1ImportProducerOverridesResponse: Response message for
3812 // ImportProducerOverrides
3813 type V1Beta1ImportProducerOverridesResponse struct {
3814 // Overrides: The overrides that were created from the imported data.
3815 Overrides []*V1Beta1QuotaOverride `json:"overrides,omitempty"`
3816 // ForceSendFields is a list of field names (e.g. "Overrides") to
3817 // unconditionally include in API requests. By default, fields with empty or
3818 // default values are omitted from API requests. See
3819 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3820 // details.
3821 ForceSendFields []string `json:"-"`
3822 // NullFields is a list of field names (e.g. "Overrides") to include in API
3823 // requests with the JSON null value. By default, fields with empty values are
3824 // omitted from API requests. See
3825 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3826 NullFields []string `json:"-"`
3827 }
3828
3829 func (s V1Beta1ImportProducerOverridesResponse) MarshalJSON() ([]byte, error) {
3830 type NoMethod V1Beta1ImportProducerOverridesResponse
3831 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3832 }
3833
3834 // V1Beta1ImportProducerQuotaPoliciesRequest: Request message for
3835 // ImportProducerQuotaPolicies
3836 type V1Beta1ImportProducerQuotaPoliciesRequest struct {
3837 // Force: Whether quota policy can result in a decrease of effective limit.
3838 // Don't allow any decreases if force is not specified. If force is specified,
3839 // then don't allow any decreases below 120% of the 7d quota usage, or for
3840 // cases where usage cannot be examined (custom dimensions/ per user/per
3841 // resource), only allow a 10% decrease.
3842 Force bool `json:"force,omitempty"`
3843 // ForceJustification: If force or force_skip_quota_usage_check option is set
3844 // to true, force_justification is suggested to be set to log the reason in
3845 // audit logs.
3846 ForceJustification string `json:"forceJustification,omitempty"`
3847 // ForceSkipQuotaUsageCheck: If set to true, skip the quota usage check. This
3848 // field is only used when the effective limit can be decreased. If the force
3849 // field is not set, this field will be ignored.
3850 ForceSkipQuotaUsageCheck bool `json:"forceSkipQuotaUsageCheck,omitempty"`
3851 // InlineSource: The import data is specified in the request message itself
3852 InlineSource *V1Beta1PolicyInlineSource `json:"inlineSource,omitempty"`
3853 // ValidateOnly: If set to true, validate the request, but do not actually
3854 // update.
3855 ValidateOnly bool `json:"validateOnly,omitempty"`
3856 // ForceSendFields is a list of field names (e.g. "Force") to unconditionally
3857 // include in API requests. By default, fields with empty or default values are
3858 // omitted from API requests. See
3859 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3860 // details.
3861 ForceSendFields []string `json:"-"`
3862 // NullFields is a list of field names (e.g. "Force") to include in API
3863 // requests with the JSON null value. By default, fields with empty values are
3864 // omitted from API requests. See
3865 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3866 NullFields []string `json:"-"`
3867 }
3868
3869 func (s V1Beta1ImportProducerQuotaPoliciesRequest) MarshalJSON() ([]byte, error) {
3870 type NoMethod V1Beta1ImportProducerQuotaPoliciesRequest
3871 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3872 }
3873
3874 // V1Beta1ImportProducerQuotaPoliciesResponse: Response message for
3875 // ImportProducerQuotaPolicies
3876 type V1Beta1ImportProducerQuotaPoliciesResponse struct {
3877 // Policies: The policies that were created from the imported data.
3878 Policies []*V1Beta1ProducerQuotaPolicy `json:"policies,omitempty"`
3879 // ForceSendFields is a list of field names (e.g. "Policies") to
3880 // unconditionally include in API requests. By default, fields with empty or
3881 // default values are omitted from API requests. See
3882 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3883 // details.
3884 ForceSendFields []string `json:"-"`
3885 // NullFields is a list of field names (e.g. "Policies") to include in API
3886 // requests with the JSON null value. By default, fields with empty values are
3887 // omitted from API requests. See
3888 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3889 NullFields []string `json:"-"`
3890 }
3891
3892 func (s V1Beta1ImportProducerQuotaPoliciesResponse) MarshalJSON() ([]byte, error) {
3893 type NoMethod V1Beta1ImportProducerQuotaPoliciesResponse
3894 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3895 }
3896
3897 // V1Beta1ListConsumerQuotaMetricsResponse: Response message for
3898 // ListConsumerQuotaMetrics.
3899 type V1Beta1ListConsumerQuotaMetricsResponse struct {
3900 // Metrics: Quota settings for the consumer, organized by quota metric.
3901 Metrics []*V1Beta1ConsumerQuotaMetric `json:"metrics,omitempty"`
3902 // NextPageToken: Token identifying which result to start with; returned by a
3903 // previous list call.
3904 NextPageToken string `json:"nextPageToken,omitempty"`
3905
3906 // ServerResponse contains the HTTP response code and headers from the server.
3907 googleapi.ServerResponse `json:"-"`
3908 // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally
3909 // include in API requests. By default, fields with empty or default values are
3910 // omitted from API requests. See
3911 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3912 // details.
3913 ForceSendFields []string `json:"-"`
3914 // NullFields is a list of field names (e.g. "Metrics") to include in API
3915 // requests with the JSON null value. By default, fields with empty values are
3916 // omitted from API requests. See
3917 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3918 NullFields []string `json:"-"`
3919 }
3920
3921 func (s V1Beta1ListConsumerQuotaMetricsResponse) MarshalJSON() ([]byte, error) {
3922 type NoMethod V1Beta1ListConsumerQuotaMetricsResponse
3923 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3924 }
3925
3926 // V1Beta1ListProducerOverridesResponse: Response message for
3927 // ListProducerOverrides.
3928 type V1Beta1ListProducerOverridesResponse struct {
3929 // NextPageToken: Token identifying which result to start with; returned by a
3930 // previous list call.
3931 NextPageToken string `json:"nextPageToken,omitempty"`
3932 // Overrides: Producer overrides on this limit.
3933 Overrides []*V1Beta1QuotaOverride `json:"overrides,omitempty"`
3934
3935 // ServerResponse contains the HTTP response code and headers from the server.
3936 googleapi.ServerResponse `json:"-"`
3937 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3938 // unconditionally include in API requests. By default, fields with empty or
3939 // default values are omitted from API requests. See
3940 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3941 // details.
3942 ForceSendFields []string `json:"-"`
3943 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3944 // requests with the JSON null value. By default, fields with empty values are
3945 // omitted from API requests. See
3946 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3947 NullFields []string `json:"-"`
3948 }
3949
3950 func (s V1Beta1ListProducerOverridesResponse) MarshalJSON() ([]byte, error) {
3951 type NoMethod V1Beta1ListProducerOverridesResponse
3952 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3953 }
3954
3955 // V1Beta1ListProducerQuotaPoliciesResponse: Response message for
3956 // ListProducerQuotaPolicies.
3957 type V1Beta1ListProducerQuotaPoliciesResponse struct {
3958 // NextPageToken: Token identifying which result to start with; returned by a
3959 // previous list call.
3960 NextPageToken string `json:"nextPageToken,omitempty"`
3961 // ProducerQuotaPolicies: Producer policies on this limit.
3962 ProducerQuotaPolicies []*V1Beta1ProducerQuotaPolicy `json:"producerQuotaPolicies,omitempty"`
3963
3964 // ServerResponse contains the HTTP response code and headers from the server.
3965 googleapi.ServerResponse `json:"-"`
3966 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
3967 // unconditionally include in API requests. By default, fields with empty or
3968 // default values are omitted from API requests. See
3969 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3970 // details.
3971 ForceSendFields []string `json:"-"`
3972 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
3973 // requests with the JSON null value. By default, fields with empty values are
3974 // omitted from API requests. See
3975 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3976 NullFields []string `json:"-"`
3977 }
3978
3979 func (s V1Beta1ListProducerQuotaPoliciesResponse) MarshalJSON() ([]byte, error) {
3980 type NoMethod V1Beta1ListProducerQuotaPoliciesResponse
3981 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3982 }
3983
3984 // V1Beta1OverrideInlineSource: Import data embedded in the request message
3985 type V1Beta1OverrideInlineSource struct {
3986 // Overrides: The overrides to create. Each override must have a value for
3987 // 'metric' and 'unit', to specify which metric and which limit the override
3988 // should be applied to. The 'name' field of the override does not need to be
3989 // set; it is ignored.
3990 Overrides []*V1Beta1QuotaOverride `json:"overrides,omitempty"`
3991 // ForceSendFields is a list of field names (e.g. "Overrides") to
3992 // unconditionally include in API requests. By default, fields with empty or
3993 // default values are omitted from API requests. See
3994 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3995 // details.
3996 ForceSendFields []string `json:"-"`
3997 // NullFields is a list of field names (e.g. "Overrides") to include in API
3998 // requests with the JSON null value. By default, fields with empty values are
3999 // omitted from API requests. See
4000 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4001 NullFields []string `json:"-"`
4002 }
4003
4004 func (s V1Beta1OverrideInlineSource) MarshalJSON() ([]byte, error) {
4005 type NoMethod V1Beta1OverrideInlineSource
4006 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4007 }
4008
4009 // V1Beta1PolicyInlineSource: Import data embedded in the request message
4010 type V1Beta1PolicyInlineSource struct {
4011 // Policies: The policies to create. Each policy must have a value for 'metric'
4012 // and 'unit', to specify which metric and which limit the policy should be
4013 // applied to.
4014 Policies []*V1Beta1ProducerQuotaPolicy `json:"policies,omitempty"`
4015 // ForceSendFields is a list of field names (e.g. "Policies") to
4016 // unconditionally include in API requests. By default, fields with empty or
4017 // default values are omitted from API requests. See
4018 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4019 // details.
4020 ForceSendFields []string `json:"-"`
4021 // NullFields is a list of field names (e.g. "Policies") to include in API
4022 // requests with the JSON null value. By default, fields with empty values are
4023 // omitted from API requests. See
4024 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4025 NullFields []string `json:"-"`
4026 }
4027
4028 func (s V1Beta1PolicyInlineSource) MarshalJSON() ([]byte, error) {
4029 type NoMethod V1Beta1PolicyInlineSource
4030 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4031 }
4032
4033 // V1Beta1ProducerQuotaPolicy: Quota policy created by service producer.
4034 type V1Beta1ProducerQuotaPolicy struct {
4035 // Container: The cloud resource container at which the quota policy is
4036 // created. The format is {container_type}/{container_number}
4037 Container string `json:"container,omitempty"`
4038 // Dimensions: If this map is nonempty, then this policy applies only to
4039 // specific values for dimensions defined in the limit unit. For example, a
4040 // policy on a limit with the unit 1/{project}/{region} could contain an entry
4041 // with the key "region" and the value "us-east-1"; the policy is only applied
4042 // to quota consumed in that region. This map has the following restrictions: *
4043 // Keys that are not defined in the limit's unit are not valid keys. Any string
4044 // appearing in {brackets} in the unit (besides {project} or {user}) is a
4045 // defined key. * "project" is not a valid key; the project is already
4046 // specified in the parent resource name. * "user" is not a valid key; the API
4047 // does not support quota polcies that apply only to a specific user. * If
4048 // "region" appears as a key, its value must be a valid Cloud region. * If
4049 // "zone" appears as a key, its value must be a valid Cloud zone. * If any
4050 // valid key other than "region" or "zone" appears in the map, then all valid
4051 // keys other than "region" or "zone" must also appear in the map.
4052 Dimensions map[string]string `json:"dimensions,omitempty"`
4053 // Metric: The name of the metric to which this policy applies. An example name
4054 // would be: `compute.googleapis.com/cpus`
4055 Metric string `json:"metric,omitempty"`
4056 // Name: The resource name of the producer policy. An example name would be:
4057 // `services/compute.googleapis.com/organizations/123/consumerQuotaMetrics/compu
4058 // te.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies/4a3
4059 // f2c1d`
4060 Name string `json:"name,omitempty"`
4061 // PolicyValue: The quota policy value. Can be any nonnegative integer, or -1
4062 // (unlimited quota).
4063 PolicyValue int64 `json:"policyValue,omitempty,string"`
4064 // Unit: The limit unit of the limit to which this policy applies. An example
4065 // unit would be: `1/{project}/{region}` Note that `{project}` and `{region}`
4066 // are not placeholders in this example; the literal characters `{` and `}`
4067 // occur in the string.
4068 Unit string `json:"unit,omitempty"`
4069 // ForceSendFields is a list of field names (e.g. "Container") to
4070 // unconditionally include in API requests. By default, fields with empty or
4071 // default values are omitted from API requests. See
4072 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4073 // details.
4074 ForceSendFields []string `json:"-"`
4075 // NullFields is a list of field names (e.g. "Container") to include in API
4076 // requests with the JSON null value. By default, fields with empty values are
4077 // omitted from API requests. See
4078 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4079 NullFields []string `json:"-"`
4080 }
4081
4082 func (s V1Beta1ProducerQuotaPolicy) MarshalJSON() ([]byte, error) {
4083 type NoMethod V1Beta1ProducerQuotaPolicy
4084 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4085 }
4086
4087 // V1Beta1QuotaBucket: A quota bucket is a quota provisioning unit for a
4088 // specific set of dimensions.
4089 type V1Beta1QuotaBucket struct {
4090 // AdminOverride: Admin override on this quota bucket.
4091 AdminOverride *V1Beta1QuotaOverride `json:"adminOverride,omitempty"`
4092 // ConsumerOverride: Consumer override on this quota bucket.
4093 ConsumerOverride *V1Beta1QuotaOverride `json:"consumerOverride,omitempty"`
4094 // DefaultLimit: The default limit of this quota bucket, as specified by the
4095 // service configuration.
4096 DefaultLimit int64 `json:"defaultLimit,omitempty,string"`
4097 // Dimensions: The dimensions of this quota bucket. If this map is empty, this
4098 // is the global bucket, which is the default quota value applied to all
4099 // requests that do not have a more specific override. If this map is nonempty,
4100 // the default limit, effective limit, and quota overrides apply only to
4101 // requests that have the dimensions given in the map. For example, if the map
4102 // has key "region" and value "us-east-1", then the specified effective limit
4103 // is only effective in that region, and the specified overrides apply only in
4104 // that region.
4105 Dimensions map[string]string `json:"dimensions,omitempty"`
4106 // EffectiveLimit: The effective limit of this quota bucket. Equal to
4107 // default_limit if there are no overrides.
4108 EffectiveLimit int64 `json:"effectiveLimit,omitempty,string"`
4109 // ProducerOverride: Producer override on this quota bucket.
4110 ProducerOverride *V1Beta1QuotaOverride `json:"producerOverride,omitempty"`
4111 // ProducerQuotaPolicy: Producer policy inherited from the closet ancestor of
4112 // the current consumer.
4113 ProducerQuotaPolicy *V1Beta1ProducerQuotaPolicy `json:"producerQuotaPolicy,omitempty"`
4114 // RolloutInfo: Rollout information of this quota bucket. This field is present
4115 // only if the effective limit will change due to the ongoing rollout of the
4116 // service config.
4117 RolloutInfo *V1Beta1RolloutInfo `json:"rolloutInfo,omitempty"`
4118 // ForceSendFields is a list of field names (e.g. "AdminOverride") to
4119 // unconditionally include in API requests. By default, fields with empty or
4120 // default values are omitted from API requests. See
4121 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4122 // details.
4123 ForceSendFields []string `json:"-"`
4124 // NullFields is a list of field names (e.g. "AdminOverride") to include in API
4125 // requests with the JSON null value. By default, fields with empty values are
4126 // omitted from API requests. See
4127 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4128 NullFields []string `json:"-"`
4129 }
4130
4131 func (s V1Beta1QuotaBucket) MarshalJSON() ([]byte, error) {
4132 type NoMethod V1Beta1QuotaBucket
4133 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4134 }
4135
4136 // V1Beta1QuotaOverride: A quota override
4137 type V1Beta1QuotaOverride struct {
4138 // AdminOverrideAncestor: The resource name of the ancestor that requested the
4139 // override. For example: "organizations/12345" or "folders/67890". Used by
4140 // admin overrides only.
4141 AdminOverrideAncestor string `json:"adminOverrideAncestor,omitempty"`
4142 // Dimensions: If this map is nonempty, then this override applies only to
4143 // specific values for dimensions defined in the limit unit. For example, an
4144 // override on a limit with the unit 1/{project}/{region} could contain an
4145 // entry with the key "region" and the value "us-east-1"; the override is only
4146 // applied to quota consumed in that region. This map has the following
4147 // restrictions: * Keys that are not defined in the limit's unit are not valid
4148 // keys. Any string appearing in {brackets} in the unit (besides {project} or
4149 // {user}) is a defined key. * "project" is not a valid key; the project is
4150 // already specified in the parent resource name. * "user" is not a valid key;
4151 // the API does not support quota overrides that apply only to a specific user.
4152 // * If "region" appears as a key, its value must be a valid Cloud region. * If
4153 // "zone" appears as a key, its value must be a valid Cloud zone. * If any
4154 // valid key other than "region" or "zone" appears in the map, then all valid
4155 // keys other than "region" or "zone" must also appear in the map.
4156 Dimensions map[string]string `json:"dimensions,omitempty"`
4157 // Metric: The name of the metric to which this override applies. An example
4158 // name would be: `compute.googleapis.com/cpus`
4159 Metric string `json:"metric,omitempty"`
4160 // Name: The resource name of the producer override. An example name would be:
4161 // `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.go
4162 // ogleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOverrides/4a3f2c1d`
4163 Name string `json:"name,omitempty"`
4164 // OverrideValue: The overriding quota limit value. Can be any nonnegative
4165 // integer, or -1 (unlimited quota).
4166 OverrideValue int64 `json:"overrideValue,omitempty,string"`
4167 // Unit: The limit unit of the limit to which this override applies. An example
4168 // unit would be: `1/{project}/{region}` Note that `{project}` and `{region}`
4169 // are not placeholders in this example; the literal characters `{` and `}`
4170 // occur in the string.
4171 Unit string `json:"unit,omitempty"`
4172 // ForceSendFields is a list of field names (e.g. "AdminOverrideAncestor") to
4173 // unconditionally include in API requests. By default, fields with empty or
4174 // default values are omitted from API requests. See
4175 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4176 // details.
4177 ForceSendFields []string `json:"-"`
4178 // NullFields is a list of field names (e.g. "AdminOverrideAncestor") to
4179 // include in API requests with the JSON null value. By default, fields with
4180 // empty values are omitted from API requests. See
4181 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4182 NullFields []string `json:"-"`
4183 }
4184
4185 func (s V1Beta1QuotaOverride) MarshalJSON() ([]byte, error) {
4186 type NoMethod V1Beta1QuotaOverride
4187 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4188 }
4189
4190 // V1Beta1RefreshConsumerResponse: Response message for the `RefreshConsumer`
4191 // method. This response message is assigned to the `response` field of the
4192 // returned Operation when that operation is done.
4193 type V1Beta1RefreshConsumerResponse struct {
4194 }
4195
4196 // V1Beta1RolloutInfo: [Output only] Rollout information of a quota.
4197 type V1Beta1RolloutInfo struct {
4198 // DefaultLimitOngoingRollout: Whether there is an ongoing rollout for the
4199 // default limit or not.
4200 DefaultLimitOngoingRollout bool `json:"defaultLimitOngoingRollout,omitempty"`
4201 // ForceSendFields is a list of field names (e.g. "DefaultLimitOngoingRollout")
4202 // to unconditionally include in API requests. By default, fields with empty or
4203 // default values are omitted from API requests. See
4204 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4205 // details.
4206 ForceSendFields []string `json:"-"`
4207 // NullFields is a list of field names (e.g. "DefaultLimitOngoingRollout") to
4208 // include in API requests with the JSON null value. By default, fields with
4209 // empty values are omitted from API requests. See
4210 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4211 NullFields []string `json:"-"`
4212 }
4213
4214 func (s V1Beta1RolloutInfo) MarshalJSON() ([]byte, error) {
4215 type NoMethod V1Beta1RolloutInfo
4216 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4217 }
4218
4219 // V1Beta1ServiceIdentity: A service identity in the Identity and Access
4220 // Management API.
4221 type V1Beta1ServiceIdentity struct {
4222 // Email: The email address of the service identity.
4223 Email string `json:"email,omitempty"`
4224 // Name: P4 service identity resource name. An example name would be:
4225 // `services/serviceconsumermanagement.googleapis.com/projects/123/serviceIdenti
4226 // ties/default`
4227 Name string `json:"name,omitempty"`
4228 // ProjectRole: The project-level IAM role defined in the service agent's grant
4229 // configuration. This is the standard role intended for this service agent.
4230 // This field is populated regardless of the `skip_role_attach` option in the
4231 // request. If `skip_role_attach` is true, the caller can use this value to
4232 // know which role they are responsible for granting.
4233 ProjectRole string `json:"projectRole,omitempty"`
4234 // Tag: The P4 service identity configuration tag. This must be defined in
4235 // activation_grants. If not specified when creating the account, the tag is
4236 // set to "default".
4237 Tag string `json:"tag,omitempty"`
4238 // UniqueId: The unique and stable id of the service identity.
4239 UniqueId string `json:"uniqueId,omitempty"`
4240 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
4241 // include in API requests. By default, fields with empty or default values are
4242 // omitted from API requests. See
4243 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4244 // details.
4245 ForceSendFields []string `json:"-"`
4246 // NullFields is a list of field names (e.g. "Email") to include in API
4247 // requests with the JSON null value. By default, fields with empty values are
4248 // omitted from API requests. See
4249 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4250 NullFields []string `json:"-"`
4251 }
4252
4253 func (s V1Beta1ServiceIdentity) MarshalJSON() ([]byte, error) {
4254 type NoMethod V1Beta1ServiceIdentity
4255 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4256 }
4257
4258 // V1beta1AddVisibilityLabelsResponse: Response message for the
4259 // `AddVisibilityLabels` method. This response message is assigned to the
4260 // `response` field of the returned Operation when that operation is done.
4261 type V1beta1AddVisibilityLabelsResponse struct {
4262 // Labels: The updated set of visibility labels for this consumer on this
4263 // service.
4264 Labels []string `json:"labels,omitempty"`
4265 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
4266 // include in API requests. By default, fields with empty or default values are
4267 // omitted from API requests. See
4268 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4269 // details.
4270 ForceSendFields []string `json:"-"`
4271 // NullFields is a list of field names (e.g. "Labels") to include in API
4272 // requests with the JSON null value. By default, fields with empty values are
4273 // omitted from API requests. See
4274 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4275 NullFields []string `json:"-"`
4276 }
4277
4278 func (s V1beta1AddVisibilityLabelsResponse) MarshalJSON() ([]byte, error) {
4279 type NoMethod V1beta1AddVisibilityLabelsResponse
4280 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4281 }
4282
4283 // V1beta1DefaultIdentity: A default identity in the Identity and Access
4284 // Management API.
4285 type V1beta1DefaultIdentity struct {
4286 // Email: The email address of the default identity. Calling
4287 // GenerateDefaultIdentity with a deleted or purged default identity should
4288 // expect [email protected] placeholder
4289 // email.
4290 Email string `json:"email,omitempty"`
4291 // Name: Default identity resource name. An example name would be:
4292 // `services/serviceconsumermanagement.googleapis.com/projects/123/defaultIdenti
4293 // ty`
4294 Name string `json:"name,omitempty"`
4295 // Tag: The Default Identity tag. If specified when creating the account, the
4296 // tag must be present in activation_grants. If not specified when creating the
4297 // account, the tag is set to the tag specified in activation_grants.
4298 Tag string `json:"tag,omitempty"`
4299 // UniqueId: The unique and stable id of the default identity.
4300 UniqueId string `json:"uniqueId,omitempty"`
4301 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
4302 // include in API requests. By default, fields with empty or default values are
4303 // omitted from API requests. See
4304 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4305 // details.
4306 ForceSendFields []string `json:"-"`
4307 // NullFields is a list of field names (e.g. "Email") to include in API
4308 // requests with the JSON null value. By default, fields with empty values are
4309 // omitted from API requests. See
4310 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4311 NullFields []string `json:"-"`
4312 }
4313
4314 func (s V1beta1DefaultIdentity) MarshalJSON() ([]byte, error) {
4315 type NoMethod V1beta1DefaultIdentity
4316 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4317 }
4318
4319 // V1beta1DisableConsumerResponse: Response message for the `DisableConsumer`
4320 // method. This response message is assigned to the `response` field of the
4321 // returned Operation when that operation is done.
4322 type V1beta1DisableConsumerResponse struct {
4323 }
4324
4325 // V1beta1EnableConsumerResponse: Response message for the `EnableConsumer`
4326 // method. This response message is assigned to the `response` field of the
4327 // returned Operation when that operation is done.
4328 type V1beta1EnableConsumerResponse struct {
4329 }
4330
4331 // V1beta1GenerateDefaultIdentityResponse: Response message for the
4332 // `GenerateDefaultIdentity` method. This response message is assigned to the
4333 // `response` field of the returned Operation when that operation is done.
4334 type V1beta1GenerateDefaultIdentityResponse struct {
4335 // AttachStatus: Status of the role attachment. Under development
4336 // (go/si-attach-role), currently always return ATTACH_STATUS_UNSPECIFIED)
4337 //
4338 // Possible values:
4339 // "ATTACH_STATUS_UNSPECIFIED" - Indicates that the AttachStatus was not set.
4340 // "ATTACHED" - The default identity was attached to a role successfully in
4341 // this request.
4342 // "ATTACH_SKIPPED" - The request specified that no attempt should be made to
4343 // attach the role.
4344 // "PREVIOUSLY_ATTACHED" - Role was attached to the consumer project at some
4345 // point in time. Tenant manager doesn't make assertion about the current state
4346 // of the identity with respect to the consumer. Role attachment should happen
4347 // only once after activation and cannot be reattached after customer removes
4348 // it. (go/si-attach-role)
4349 // "ATTACH_DENIED_BY_ORG_POLICY" - Role attachment was denied in this request
4350 // by customer set org policy. (go/si-attach-role)
4351 AttachStatus string `json:"attachStatus,omitempty"`
4352 // Identity: DefaultIdentity that was created or retrieved.
4353 Identity *V1beta1DefaultIdentity `json:"identity,omitempty"`
4354 // Role: Role attached to consumer project. Empty if not attached in this
4355 // request. (Under development, currently always return empty.)
4356 Role string `json:"role,omitempty"`
4357 // ForceSendFields is a list of field names (e.g. "AttachStatus") to
4358 // unconditionally include in API requests. By default, fields with empty or
4359 // default values are omitted from API requests. See
4360 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4361 // details.
4362 ForceSendFields []string `json:"-"`
4363 // NullFields is a list of field names (e.g. "AttachStatus") to include in API
4364 // requests with the JSON null value. By default, fields with empty values are
4365 // omitted from API requests. See
4366 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4367 NullFields []string `json:"-"`
4368 }
4369
4370 func (s V1beta1GenerateDefaultIdentityResponse) MarshalJSON() ([]byte, error) {
4371 type NoMethod V1beta1GenerateDefaultIdentityResponse
4372 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4373 }
4374
4375 // V1beta1GenerateServiceAccountResponse: Response message for the
4376 // `GenerateServiceAccount` method. This response message is assigned to the
4377 // `response` field of the returned Operation when that operation is done.
4378 type V1beta1GenerateServiceAccountResponse struct {
4379 // Account: ServiceAccount that was created or retrieved.
4380 Account *V1beta1ServiceAccount `json:"account,omitempty"`
4381 // ForceSendFields is a list of field names (e.g. "Account") to unconditionally
4382 // include in API requests. By default, fields with empty or default values are
4383 // omitted from API requests. See
4384 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4385 // details.
4386 ForceSendFields []string `json:"-"`
4387 // NullFields is a list of field names (e.g. "Account") to include in API
4388 // requests with the JSON null value. By default, fields with empty values are
4389 // omitted from API requests. See
4390 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4391 NullFields []string `json:"-"`
4392 }
4393
4394 func (s V1beta1GenerateServiceAccountResponse) MarshalJSON() ([]byte, error) {
4395 type NoMethod V1beta1GenerateServiceAccountResponse
4396 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4397 }
4398
4399 // V1beta1RefreshConsumerResponse: Response message for the `RefreshConsumer`
4400 // method. This response message is assigned to the `response` field of the
4401 // returned Operation when that operation is done.
4402 type V1beta1RefreshConsumerResponse struct {
4403 }
4404
4405 // V1beta1RemoveVisibilityLabelsResponse: Response message for the
4406 // `RemoveVisibilityLabels` method. This response message is assigned to the
4407 // `response` field of the returned Operation when that operation is done.
4408 type V1beta1RemoveVisibilityLabelsResponse struct {
4409 // Labels: The updated set of visibility labels for this consumer on this
4410 // service.
4411 Labels []string `json:"labels,omitempty"`
4412 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
4413 // include in API requests. By default, fields with empty or default values are
4414 // omitted from API requests. See
4415 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4416 // details.
4417 ForceSendFields []string `json:"-"`
4418 // NullFields is a list of field names (e.g. "Labels") to include in API
4419 // requests with the JSON null value. By default, fields with empty values are
4420 // omitted from API requests. See
4421 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4422 NullFields []string `json:"-"`
4423 }
4424
4425 func (s V1beta1RemoveVisibilityLabelsResponse) MarshalJSON() ([]byte, error) {
4426 type NoMethod V1beta1RemoveVisibilityLabelsResponse
4427 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4428 }
4429
4430 // V1beta1ServiceAccount: A service account in the Identity and Access
4431 // Management API.
4432 type V1beta1ServiceAccount struct {
4433 // Email: The email address of the service account.
4434 Email string `json:"email,omitempty"`
4435 // IamAccountName: Deprecated. See b/136209818.
4436 IamAccountName string `json:"iamAccountName,omitempty"`
4437 // Name: P4 SA resource name. An example name would be:
4438 // `services/serviceconsumermanagement.googleapis.com/projects/123/serviceAccoun
4439 // ts/default`
4440 Name string `json:"name,omitempty"`
4441 // Tag: The P4 SA configuration tag. This must be defined in activation_grants.
4442 // If not specified when creating the account, the tag is set to "default".
4443 Tag string `json:"tag,omitempty"`
4444 // UniqueId: The unique and stable id of the service account.
4445 UniqueId string `json:"uniqueId,omitempty"`
4446 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
4447 // include in API requests. By default, fields with empty or default values are
4448 // omitted from API requests. See
4449 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
4450 // details.
4451 ForceSendFields []string `json:"-"`
4452 // NullFields is a list of field names (e.g. "Email") to include in API
4453 // requests with the JSON null value. By default, fields with empty values are
4454 // omitted from API requests. See
4455 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
4456 NullFields []string `json:"-"`
4457 }
4458
4459 func (s V1beta1ServiceAccount) MarshalJSON() ([]byte, error) {
4460 type NoMethod V1beta1ServiceAccount
4461 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
4462 }
4463
4464 type OperationsGetCall struct {
4465 s *APIService
4466 name string
4467 urlParams_ gensupport.URLParams
4468 ifNoneMatch_ string
4469 ctx_ context.Context
4470 header_ http.Header
4471 }
4472
4473 // Get: Gets the latest state of a long-running operation. Clients can use this
4474 // method to poll the operation result at intervals as recommended by the API
4475 // service.
4476 //
4477 // - name: The name of the operation resource.
4478 func (r *OperationsService) Get(name string) *OperationsGetCall {
4479 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4480 c.name = name
4481 return c
4482 }
4483
4484 // Fields allows partial responses to be retrieved. See
4485 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4486 // details.
4487 func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
4488 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4489 return c
4490 }
4491
4492 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4493 // object's ETag matches the given value. This is useful for getting updates
4494 // only after the object has changed since the last request.
4495 func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
4496 c.ifNoneMatch_ = entityTag
4497 return c
4498 }
4499
4500 // Context sets the context to be used in this call's Do method.
4501 func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
4502 c.ctx_ = ctx
4503 return c
4504 }
4505
4506 // Header returns a http.Header that can be modified by the caller to add
4507 // headers to the request.
4508 func (c *OperationsGetCall) Header() http.Header {
4509 if c.header_ == nil {
4510 c.header_ = make(http.Header)
4511 }
4512 return c.header_
4513 }
4514
4515 func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
4516 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4517 if c.ifNoneMatch_ != "" {
4518 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4519 }
4520 c.urlParams_.Set("alt", alt)
4521 c.urlParams_.Set("prettyPrint", "false")
4522 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4523 urls += "?" + c.urlParams_.Encode()
4524 req, err := http.NewRequest("GET", urls, nil)
4525 if err != nil {
4526 return nil, err
4527 }
4528 req.Header = reqHeaders
4529 googleapi.Expand(req.URL, map[string]string{
4530 "name": c.name,
4531 })
4532 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.operations.get", "request", internallog.HTTPRequest(req, nil))
4533 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4534 }
4535
4536 // Do executes the "serviceconsumermanagement.operations.get" call.
4537 // Any non-2xx status code is an error. Response headers are in either
4538 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4539 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4540 // whether the returned error was because http.StatusNotModified was returned.
4541 func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4542 gensupport.SetOptions(c.urlParams_, opts...)
4543 res, err := c.doRequest("json")
4544 if res != nil && res.StatusCode == http.StatusNotModified {
4545 if res.Body != nil {
4546 res.Body.Close()
4547 }
4548 return nil, gensupport.WrapError(&googleapi.Error{
4549 Code: res.StatusCode,
4550 Header: res.Header,
4551 })
4552 }
4553 if err != nil {
4554 return nil, err
4555 }
4556 defer googleapi.CloseBody(res)
4557 if err := googleapi.CheckResponse(res); err != nil {
4558 return nil, gensupport.WrapError(err)
4559 }
4560 ret := &Operation{
4561 ServerResponse: googleapi.ServerResponse{
4562 Header: res.Header,
4563 HTTPStatusCode: res.StatusCode,
4564 },
4565 }
4566 target := &ret
4567 b, err := gensupport.DecodeResponseBytes(target, res)
4568 if err != nil {
4569 return nil, err
4570 }
4571 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.operations.get", "response", internallog.HTTPResponse(res, b))
4572 return ret, nil
4573 }
4574
4575 type ServicesConsumerQuotaMetricsGetCall struct {
4576 s *APIService
4577 name string
4578 urlParams_ gensupport.URLParams
4579 ifNoneMatch_ string
4580 ctx_ context.Context
4581 header_ http.Header
4582 }
4583
4584 // Get: Retrieves a summary of quota information for a specific quota metric.
4585 //
4586 // - name: The resource name of the quota metric, returned by a
4587 // ListConsumerQuotaMetrics call. An example name would be:
4588 // `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.
4589 // googleapis.com%2Fcpus`.
4590 func (r *ServicesConsumerQuotaMetricsService) Get(name string) *ServicesConsumerQuotaMetricsGetCall {
4591 c := &ServicesConsumerQuotaMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4592 c.name = name
4593 return c
4594 }
4595
4596 // View sets the optional parameter "view": Specifies the level of detail for
4597 // quota information in the response.
4598 //
4599 // Possible values:
4600 //
4601 // "QUOTA_VIEW_UNSPECIFIED" - No quota view specified. Requests that do not
4602 //
4603 // specify a quota view will typically default to the BASIC view.
4604 //
4605 // "BASIC" - Only buckets with overrides are shown in the response.
4606 // "FULL" - Include per-location buckets even if they do not have overrides.
4607 //
4608 // When the view is FULL, and a limit has regional or zonal quota, the limit
4609 // will include buckets for all regions or zones that could support overrides,
4610 // even if none are currently present. In some cases this will cause the
4611 // response to become very large; callers that do not need this extra
4612 // information should use the BASIC view instead.
4613 func (c *ServicesConsumerQuotaMetricsGetCall) View(view string) *ServicesConsumerQuotaMetricsGetCall {
4614 c.urlParams_.Set("view", view)
4615 return c
4616 }
4617
4618 // Fields allows partial responses to be retrieved. See
4619 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4620 // details.
4621 func (c *ServicesConsumerQuotaMetricsGetCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsGetCall {
4622 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4623 return c
4624 }
4625
4626 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4627 // object's ETag matches the given value. This is useful for getting updates
4628 // only after the object has changed since the last request.
4629 func (c *ServicesConsumerQuotaMetricsGetCall) IfNoneMatch(entityTag string) *ServicesConsumerQuotaMetricsGetCall {
4630 c.ifNoneMatch_ = entityTag
4631 return c
4632 }
4633
4634 // Context sets the context to be used in this call's Do method.
4635 func (c *ServicesConsumerQuotaMetricsGetCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsGetCall {
4636 c.ctx_ = ctx
4637 return c
4638 }
4639
4640 // Header returns a http.Header that can be modified by the caller to add
4641 // headers to the request.
4642 func (c *ServicesConsumerQuotaMetricsGetCall) Header() http.Header {
4643 if c.header_ == nil {
4644 c.header_ = make(http.Header)
4645 }
4646 return c.header_
4647 }
4648
4649 func (c *ServicesConsumerQuotaMetricsGetCall) doRequest(alt string) (*http.Response, error) {
4650 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4651 if c.ifNoneMatch_ != "" {
4652 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4653 }
4654 c.urlParams_.Set("alt", alt)
4655 c.urlParams_.Set("prettyPrint", "false")
4656 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4657 urls += "?" + c.urlParams_.Encode()
4658 req, err := http.NewRequest("GET", urls, nil)
4659 if err != nil {
4660 return nil, err
4661 }
4662 req.Header = reqHeaders
4663 googleapi.Expand(req.URL, map[string]string{
4664 "name": c.name,
4665 })
4666 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.get", "request", internallog.HTTPRequest(req, nil))
4667 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4668 }
4669
4670 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.get" call.
4671 // Any non-2xx status code is an error. Response headers are in either
4672 // *V1Beta1ConsumerQuotaMetric.ServerResponse.Header or (if a response was
4673 // returned at all) in error.(*googleapi.Error).Header. Use
4674 // googleapi.IsNotModified to check whether the returned error was because
4675 // http.StatusNotModified was returned.
4676 func (c *ServicesConsumerQuotaMetricsGetCall) Do(opts ...googleapi.CallOption) (*V1Beta1ConsumerQuotaMetric, error) {
4677 gensupport.SetOptions(c.urlParams_, opts...)
4678 res, err := c.doRequest("json")
4679 if res != nil && res.StatusCode == http.StatusNotModified {
4680 if res.Body != nil {
4681 res.Body.Close()
4682 }
4683 return nil, gensupport.WrapError(&googleapi.Error{
4684 Code: res.StatusCode,
4685 Header: res.Header,
4686 })
4687 }
4688 if err != nil {
4689 return nil, err
4690 }
4691 defer googleapi.CloseBody(res)
4692 if err := googleapi.CheckResponse(res); err != nil {
4693 return nil, gensupport.WrapError(err)
4694 }
4695 ret := &V1Beta1ConsumerQuotaMetric{
4696 ServerResponse: googleapi.ServerResponse{
4697 Header: res.Header,
4698 HTTPStatusCode: res.StatusCode,
4699 },
4700 }
4701 target := &ret
4702 b, err := gensupport.DecodeResponseBytes(target, res)
4703 if err != nil {
4704 return nil, err
4705 }
4706 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.get", "response", internallog.HTTPResponse(res, b))
4707 return ret, nil
4708 }
4709
4710 type ServicesConsumerQuotaMetricsImportProducerOverridesCall struct {
4711 s *APIService
4712 parent string
4713 v1beta1importproduceroverridesrequest *V1Beta1ImportProducerOverridesRequest
4714 urlParams_ gensupport.URLParams
4715 ctx_ context.Context
4716 header_ http.Header
4717 }
4718
4719 // ImportProducerOverrides: Create or update multiple producer overrides
4720 // atomically, all on the same consumer, but on many different metrics or
4721 // limits. The name field in the quota override message should not be set.
4722 //
4723 // - parent: The resource name of the consumer. An example name would be:
4724 // `services/compute.googleapis.com/projects/123`.
4725 func (r *ServicesConsumerQuotaMetricsService) ImportProducerOverrides(parent string, v1beta1importproduceroverridesrequest *V1Beta1ImportProducerOverridesRequest) *ServicesConsumerQuotaMetricsImportProducerOverridesCall {
4726 c := &ServicesConsumerQuotaMetricsImportProducerOverridesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4727 c.parent = parent
4728 c.v1beta1importproduceroverridesrequest = v1beta1importproduceroverridesrequest
4729 return c
4730 }
4731
4732 // Fields allows partial responses to be retrieved. See
4733 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4734 // details.
4735 func (c *ServicesConsumerQuotaMetricsImportProducerOverridesCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsImportProducerOverridesCall {
4736 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4737 return c
4738 }
4739
4740 // Context sets the context to be used in this call's Do method.
4741 func (c *ServicesConsumerQuotaMetricsImportProducerOverridesCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsImportProducerOverridesCall {
4742 c.ctx_ = ctx
4743 return c
4744 }
4745
4746 // Header returns a http.Header that can be modified by the caller to add
4747 // headers to the request.
4748 func (c *ServicesConsumerQuotaMetricsImportProducerOverridesCall) Header() http.Header {
4749 if c.header_ == nil {
4750 c.header_ = make(http.Header)
4751 }
4752 return c.header_
4753 }
4754
4755 func (c *ServicesConsumerQuotaMetricsImportProducerOverridesCall) doRequest(alt string) (*http.Response, error) {
4756 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4757 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.v1beta1importproduceroverridesrequest)
4758 if err != nil {
4759 return nil, err
4760 }
4761 c.urlParams_.Set("alt", alt)
4762 c.urlParams_.Set("prettyPrint", "false")
4763 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/consumerQuotaMetrics:importProducerOverrides")
4764 urls += "?" + c.urlParams_.Encode()
4765 req, err := http.NewRequest("POST", urls, body)
4766 if err != nil {
4767 return nil, err
4768 }
4769 req.Header = reqHeaders
4770 googleapi.Expand(req.URL, map[string]string{
4771 "parent": c.parent,
4772 })
4773 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.importProducerOverrides", "request", internallog.HTTPRequest(req, body.Bytes()))
4774 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4775 }
4776
4777 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.importProducerOverrides" call.
4778 // Any non-2xx status code is an error. Response headers are in either
4779 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4780 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4781 // whether the returned error was because http.StatusNotModified was returned.
4782 func (c *ServicesConsumerQuotaMetricsImportProducerOverridesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4783 gensupport.SetOptions(c.urlParams_, opts...)
4784 res, err := c.doRequest("json")
4785 if res != nil && res.StatusCode == http.StatusNotModified {
4786 if res.Body != nil {
4787 res.Body.Close()
4788 }
4789 return nil, gensupport.WrapError(&googleapi.Error{
4790 Code: res.StatusCode,
4791 Header: res.Header,
4792 })
4793 }
4794 if err != nil {
4795 return nil, err
4796 }
4797 defer googleapi.CloseBody(res)
4798 if err := googleapi.CheckResponse(res); err != nil {
4799 return nil, gensupport.WrapError(err)
4800 }
4801 ret := &Operation{
4802 ServerResponse: googleapi.ServerResponse{
4803 Header: res.Header,
4804 HTTPStatusCode: res.StatusCode,
4805 },
4806 }
4807 target := &ret
4808 b, err := gensupport.DecodeResponseBytes(target, res)
4809 if err != nil {
4810 return nil, err
4811 }
4812 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.importProducerOverrides", "response", internallog.HTTPResponse(res, b))
4813 return ret, nil
4814 }
4815
4816 type ServicesConsumerQuotaMetricsImportProducerQuotaPoliciesCall struct {
4817 s *APIService
4818 parent string
4819 v1beta1importproducerquotapoliciesrequest *V1Beta1ImportProducerQuotaPoliciesRequest
4820 urlParams_ gensupport.URLParams
4821 ctx_ context.Context
4822 header_ http.Header
4823 }
4824
4825 // ImportProducerQuotaPolicies: Create or update multiple producer quota
4826 // policies atomically, all on the same ancestor, but on many different metrics
4827 // or limits. The name field in the quota policy message should not be set.
4828 //
4829 // - parent: The resource name of the consumer. An example name would be:
4830 // `services/compute.googleapis.com/organizations/123`.
4831 func (r *ServicesConsumerQuotaMetricsService) ImportProducerQuotaPolicies(parent string, v1beta1importproducerquotapoliciesrequest *V1Beta1ImportProducerQuotaPoliciesRequest) *ServicesConsumerQuotaMetricsImportProducerQuotaPoliciesCall {
4832 c := &ServicesConsumerQuotaMetricsImportProducerQuotaPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4833 c.parent = parent
4834 c.v1beta1importproducerquotapoliciesrequest = v1beta1importproducerquotapoliciesrequest
4835 return c
4836 }
4837
4838 // Fields allows partial responses to be retrieved. See
4839 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4840 // details.
4841 func (c *ServicesConsumerQuotaMetricsImportProducerQuotaPoliciesCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsImportProducerQuotaPoliciesCall {
4842 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4843 return c
4844 }
4845
4846 // Context sets the context to be used in this call's Do method.
4847 func (c *ServicesConsumerQuotaMetricsImportProducerQuotaPoliciesCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsImportProducerQuotaPoliciesCall {
4848 c.ctx_ = ctx
4849 return c
4850 }
4851
4852 // Header returns a http.Header that can be modified by the caller to add
4853 // headers to the request.
4854 func (c *ServicesConsumerQuotaMetricsImportProducerQuotaPoliciesCall) Header() http.Header {
4855 if c.header_ == nil {
4856 c.header_ = make(http.Header)
4857 }
4858 return c.header_
4859 }
4860
4861 func (c *ServicesConsumerQuotaMetricsImportProducerQuotaPoliciesCall) doRequest(alt string) (*http.Response, error) {
4862 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4863 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.v1beta1importproducerquotapoliciesrequest)
4864 if err != nil {
4865 return nil, err
4866 }
4867 c.urlParams_.Set("alt", alt)
4868 c.urlParams_.Set("prettyPrint", "false")
4869 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/consumerQuotaMetrics:importProducerQuotaPolicies")
4870 urls += "?" + c.urlParams_.Encode()
4871 req, err := http.NewRequest("POST", urls, body)
4872 if err != nil {
4873 return nil, err
4874 }
4875 req.Header = reqHeaders
4876 googleapi.Expand(req.URL, map[string]string{
4877 "parent": c.parent,
4878 })
4879 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.importProducerQuotaPolicies", "request", internallog.HTTPRequest(req, body.Bytes()))
4880 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4881 }
4882
4883 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.importProducerQuotaPolicies" call.
4884 // Any non-2xx status code is an error. Response headers are in either
4885 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4886 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4887 // whether the returned error was because http.StatusNotModified was returned.
4888 func (c *ServicesConsumerQuotaMetricsImportProducerQuotaPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4889 gensupport.SetOptions(c.urlParams_, opts...)
4890 res, err := c.doRequest("json")
4891 if res != nil && res.StatusCode == http.StatusNotModified {
4892 if res.Body != nil {
4893 res.Body.Close()
4894 }
4895 return nil, gensupport.WrapError(&googleapi.Error{
4896 Code: res.StatusCode,
4897 Header: res.Header,
4898 })
4899 }
4900 if err != nil {
4901 return nil, err
4902 }
4903 defer googleapi.CloseBody(res)
4904 if err := googleapi.CheckResponse(res); err != nil {
4905 return nil, gensupport.WrapError(err)
4906 }
4907 ret := &Operation{
4908 ServerResponse: googleapi.ServerResponse{
4909 Header: res.Header,
4910 HTTPStatusCode: res.StatusCode,
4911 },
4912 }
4913 target := &ret
4914 b, err := gensupport.DecodeResponseBytes(target, res)
4915 if err != nil {
4916 return nil, err
4917 }
4918 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.importProducerQuotaPolicies", "response", internallog.HTTPResponse(res, b))
4919 return ret, nil
4920 }
4921
4922 type ServicesConsumerQuotaMetricsListCall struct {
4923 s *APIService
4924 parent string
4925 urlParams_ gensupport.URLParams
4926 ifNoneMatch_ string
4927 ctx_ context.Context
4928 header_ http.Header
4929 }
4930
4931 // List: Retrieves a summary of all quota information about this consumer that
4932 // is visible to the service producer, for each quota metric defined by the
4933 // service. Each metric includes information about all of its defined limits.
4934 // Each limit includes the limit configuration (quota unit, preciseness,
4935 // default value), the current effective limit value, and all of the overrides
4936 // applied to the limit.
4937 //
4938 // - parent: Parent of the quotas resource. An example parent would be:
4939 // `services/serviceconsumermanagement.googleapis.com/projects/123`.
4940 func (r *ServicesConsumerQuotaMetricsService) List(parent string) *ServicesConsumerQuotaMetricsListCall {
4941 c := &ServicesConsumerQuotaMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4942 c.parent = parent
4943 return c
4944 }
4945
4946 // PageSize sets the optional parameter "pageSize": Requested size of the next
4947 // page of data.
4948 func (c *ServicesConsumerQuotaMetricsListCall) PageSize(pageSize int64) *ServicesConsumerQuotaMetricsListCall {
4949 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4950 return c
4951 }
4952
4953 // PageToken sets the optional parameter "pageToken": Token identifying which
4954 // result to start with; returned by a previous list call.
4955 func (c *ServicesConsumerQuotaMetricsListCall) PageToken(pageToken string) *ServicesConsumerQuotaMetricsListCall {
4956 c.urlParams_.Set("pageToken", pageToken)
4957 return c
4958 }
4959
4960 // View sets the optional parameter "view": Specifies the level of detail for
4961 // quota information in the response.
4962 //
4963 // Possible values:
4964 //
4965 // "QUOTA_VIEW_UNSPECIFIED" - No quota view specified. Requests that do not
4966 //
4967 // specify a quota view will typically default to the BASIC view.
4968 //
4969 // "BASIC" - Only buckets with overrides are shown in the response.
4970 // "FULL" - Include per-location buckets even if they do not have overrides.
4971 //
4972 // When the view is FULL, and a limit has regional or zonal quota, the limit
4973 // will include buckets for all regions or zones that could support overrides,
4974 // even if none are currently present. In some cases this will cause the
4975 // response to become very large; callers that do not need this extra
4976 // information should use the BASIC view instead.
4977 func (c *ServicesConsumerQuotaMetricsListCall) View(view string) *ServicesConsumerQuotaMetricsListCall {
4978 c.urlParams_.Set("view", view)
4979 return c
4980 }
4981
4982 // Fields allows partial responses to be retrieved. See
4983 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4984 // details.
4985 func (c *ServicesConsumerQuotaMetricsListCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsListCall {
4986 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4987 return c
4988 }
4989
4990 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4991 // object's ETag matches the given value. This is useful for getting updates
4992 // only after the object has changed since the last request.
4993 func (c *ServicesConsumerQuotaMetricsListCall) IfNoneMatch(entityTag string) *ServicesConsumerQuotaMetricsListCall {
4994 c.ifNoneMatch_ = entityTag
4995 return c
4996 }
4997
4998 // Context sets the context to be used in this call's Do method.
4999 func (c *ServicesConsumerQuotaMetricsListCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsListCall {
5000 c.ctx_ = ctx
5001 return c
5002 }
5003
5004 // Header returns a http.Header that can be modified by the caller to add
5005 // headers to the request.
5006 func (c *ServicesConsumerQuotaMetricsListCall) Header() http.Header {
5007 if c.header_ == nil {
5008 c.header_ = make(http.Header)
5009 }
5010 return c.header_
5011 }
5012
5013 func (c *ServicesConsumerQuotaMetricsListCall) doRequest(alt string) (*http.Response, error) {
5014 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5015 if c.ifNoneMatch_ != "" {
5016 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5017 }
5018 c.urlParams_.Set("alt", alt)
5019 c.urlParams_.Set("prettyPrint", "false")
5020 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/consumerQuotaMetrics")
5021 urls += "?" + c.urlParams_.Encode()
5022 req, err := http.NewRequest("GET", urls, nil)
5023 if err != nil {
5024 return nil, err
5025 }
5026 req.Header = reqHeaders
5027 googleapi.Expand(req.URL, map[string]string{
5028 "parent": c.parent,
5029 })
5030 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.list", "request", internallog.HTTPRequest(req, nil))
5031 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5032 }
5033
5034 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.list" call.
5035 // Any non-2xx status code is an error. Response headers are in either
5036 // *V1Beta1ListConsumerQuotaMetricsResponse.ServerResponse.Header or (if a
5037 // response was returned at all) in error.(*googleapi.Error).Header. Use
5038 // googleapi.IsNotModified to check whether the returned error was because
5039 // http.StatusNotModified was returned.
5040 func (c *ServicesConsumerQuotaMetricsListCall) Do(opts ...googleapi.CallOption) (*V1Beta1ListConsumerQuotaMetricsResponse, error) {
5041 gensupport.SetOptions(c.urlParams_, opts...)
5042 res, err := c.doRequest("json")
5043 if res != nil && res.StatusCode == http.StatusNotModified {
5044 if res.Body != nil {
5045 res.Body.Close()
5046 }
5047 return nil, gensupport.WrapError(&googleapi.Error{
5048 Code: res.StatusCode,
5049 Header: res.Header,
5050 })
5051 }
5052 if err != nil {
5053 return nil, err
5054 }
5055 defer googleapi.CloseBody(res)
5056 if err := googleapi.CheckResponse(res); err != nil {
5057 return nil, gensupport.WrapError(err)
5058 }
5059 ret := &V1Beta1ListConsumerQuotaMetricsResponse{
5060 ServerResponse: googleapi.ServerResponse{
5061 Header: res.Header,
5062 HTTPStatusCode: res.StatusCode,
5063 },
5064 }
5065 target := &ret
5066 b, err := gensupport.DecodeResponseBytes(target, res)
5067 if err != nil {
5068 return nil, err
5069 }
5070 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.list", "response", internallog.HTTPResponse(res, b))
5071 return ret, nil
5072 }
5073
5074 // Pages invokes f for each page of results.
5075 // A non-nil error returned from f will halt the iteration.
5076 // The provided context supersedes any context provided to the Context method.
5077 func (c *ServicesConsumerQuotaMetricsListCall) Pages(ctx context.Context, f func(*V1Beta1ListConsumerQuotaMetricsResponse) error) error {
5078 c.ctx_ = ctx
5079 defer c.PageToken(c.urlParams_.Get("pageToken"))
5080 for {
5081 x, err := c.Do()
5082 if err != nil {
5083 return err
5084 }
5085 if err := f(x); err != nil {
5086 return err
5087 }
5088 if x.NextPageToken == "" {
5089 return nil
5090 }
5091 c.PageToken(x.NextPageToken)
5092 }
5093 }
5094
5095 type ServicesConsumerQuotaMetricsLimitsGetCall struct {
5096 s *APIService
5097 name string
5098 urlParams_ gensupport.URLParams
5099 ifNoneMatch_ string
5100 ctx_ context.Context
5101 header_ http.Header
5102 }
5103
5104 // Get: Retrieves a summary of quota information for a specific quota limit.
5105 //
5106 // - name: The resource name of the quota limit, returned by a
5107 // ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name
5108 // would be:
5109 // `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.
5110 // googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`.
5111 func (r *ServicesConsumerQuotaMetricsLimitsService) Get(name string) *ServicesConsumerQuotaMetricsLimitsGetCall {
5112 c := &ServicesConsumerQuotaMetricsLimitsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5113 c.name = name
5114 return c
5115 }
5116
5117 // View sets the optional parameter "view": Specifies the level of detail for
5118 // quota information in the response.
5119 //
5120 // Possible values:
5121 //
5122 // "QUOTA_VIEW_UNSPECIFIED" - No quota view specified. Requests that do not
5123 //
5124 // specify a quota view will typically default to the BASIC view.
5125 //
5126 // "BASIC" - Only buckets with overrides are shown in the response.
5127 // "FULL" - Include per-location buckets even if they do not have overrides.
5128 //
5129 // When the view is FULL, and a limit has regional or zonal quota, the limit
5130 // will include buckets for all regions or zones that could support overrides,
5131 // even if none are currently present. In some cases this will cause the
5132 // response to become very large; callers that do not need this extra
5133 // information should use the BASIC view instead.
5134 func (c *ServicesConsumerQuotaMetricsLimitsGetCall) View(view string) *ServicesConsumerQuotaMetricsLimitsGetCall {
5135 c.urlParams_.Set("view", view)
5136 return c
5137 }
5138
5139 // Fields allows partial responses to be retrieved. See
5140 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5141 // details.
5142 func (c *ServicesConsumerQuotaMetricsLimitsGetCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsLimitsGetCall {
5143 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5144 return c
5145 }
5146
5147 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5148 // object's ETag matches the given value. This is useful for getting updates
5149 // only after the object has changed since the last request.
5150 func (c *ServicesConsumerQuotaMetricsLimitsGetCall) IfNoneMatch(entityTag string) *ServicesConsumerQuotaMetricsLimitsGetCall {
5151 c.ifNoneMatch_ = entityTag
5152 return c
5153 }
5154
5155 // Context sets the context to be used in this call's Do method.
5156 func (c *ServicesConsumerQuotaMetricsLimitsGetCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsLimitsGetCall {
5157 c.ctx_ = ctx
5158 return c
5159 }
5160
5161 // Header returns a http.Header that can be modified by the caller to add
5162 // headers to the request.
5163 func (c *ServicesConsumerQuotaMetricsLimitsGetCall) Header() http.Header {
5164 if c.header_ == nil {
5165 c.header_ = make(http.Header)
5166 }
5167 return c.header_
5168 }
5169
5170 func (c *ServicesConsumerQuotaMetricsLimitsGetCall) doRequest(alt string) (*http.Response, error) {
5171 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5172 if c.ifNoneMatch_ != "" {
5173 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5174 }
5175 c.urlParams_.Set("alt", alt)
5176 c.urlParams_.Set("prettyPrint", "false")
5177 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5178 urls += "?" + c.urlParams_.Encode()
5179 req, err := http.NewRequest("GET", urls, nil)
5180 if err != nil {
5181 return nil, err
5182 }
5183 req.Header = reqHeaders
5184 googleapi.Expand(req.URL, map[string]string{
5185 "name": c.name,
5186 })
5187 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.get", "request", internallog.HTTPRequest(req, nil))
5188 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5189 }
5190
5191 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.limits.get" call.
5192 // Any non-2xx status code is an error. Response headers are in either
5193 // *V1Beta1ConsumerQuotaLimit.ServerResponse.Header or (if a response was
5194 // returned at all) in error.(*googleapi.Error).Header. Use
5195 // googleapi.IsNotModified to check whether the returned error was because
5196 // http.StatusNotModified was returned.
5197 func (c *ServicesConsumerQuotaMetricsLimitsGetCall) Do(opts ...googleapi.CallOption) (*V1Beta1ConsumerQuotaLimit, error) {
5198 gensupport.SetOptions(c.urlParams_, opts...)
5199 res, err := c.doRequest("json")
5200 if res != nil && res.StatusCode == http.StatusNotModified {
5201 if res.Body != nil {
5202 res.Body.Close()
5203 }
5204 return nil, gensupport.WrapError(&googleapi.Error{
5205 Code: res.StatusCode,
5206 Header: res.Header,
5207 })
5208 }
5209 if err != nil {
5210 return nil, err
5211 }
5212 defer googleapi.CloseBody(res)
5213 if err := googleapi.CheckResponse(res); err != nil {
5214 return nil, gensupport.WrapError(err)
5215 }
5216 ret := &V1Beta1ConsumerQuotaLimit{
5217 ServerResponse: googleapi.ServerResponse{
5218 Header: res.Header,
5219 HTTPStatusCode: res.StatusCode,
5220 },
5221 }
5222 target := &ret
5223 b, err := gensupport.DecodeResponseBytes(target, res)
5224 if err != nil {
5225 return nil, err
5226 }
5227 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.get", "response", internallog.HTTPResponse(res, b))
5228 return ret, nil
5229 }
5230
5231 type ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall struct {
5232 s *APIService
5233 parent string
5234 v1beta1quotaoverride *V1Beta1QuotaOverride
5235 urlParams_ gensupport.URLParams
5236 ctx_ context.Context
5237 header_ http.Header
5238 }
5239
5240 // Create: Creates a producer override. A producer override is applied by the
5241 // owner or administrator of a service to increase or decrease the amount of
5242 // quota a consumer of the service is allowed to use. To create multiple
5243 // overrides at once, use ImportProducerOverrides instead. If an override with
5244 // the specified dimensions already exists, this call will fail. To overwrite
5245 // an existing override if one is already present ("upsert" semantics), use
5246 // ImportProducerOverrides instead.
5247 //
5248 // - parent: The resource name of the parent quota limit, returned by a
5249 // ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name
5250 // would be:
5251 // `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.
5252 // googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`.
5253 func (r *ServicesConsumerQuotaMetricsLimitsProducerOverridesService) Create(parent string, v1beta1quotaoverride *V1Beta1QuotaOverride) *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall {
5254 c := &ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5255 c.parent = parent
5256 c.v1beta1quotaoverride = v1beta1quotaoverride
5257 return c
5258 }
5259
5260 // Force sets the optional parameter "force": Whether to force the creation of
5261 // the quota override. Setting the force parameter to 'true' ignores all quota
5262 // safety checks that would fail the request. QuotaSafetyCheck lists all such
5263 // validations.
5264 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall) Force(force bool) *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall {
5265 c.urlParams_.Set("force", fmt.Sprint(force))
5266 return c
5267 }
5268
5269 // ForceJustification sets the optional parameter "forceJustification": If
5270 // force option is set to true, force_justification is suggested to be set to
5271 // log the reason in audit logs.
5272 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall) ForceJustification(forceJustification string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall {
5273 c.urlParams_.Set("forceJustification", forceJustification)
5274 return c
5275 }
5276
5277 // ForceOnly sets the optional parameter "forceOnly": The list of quota safety
5278 // checks to ignore before the override mutation. Unlike 'force' field that
5279 // ignores all the quota safety checks, the 'force_only' field ignores only the
5280 // specified checks; other checks are still enforced. The 'force' and
5281 // 'force_only' fields cannot both be set.
5282 //
5283 // Possible values:
5284 //
5285 // "QUOTA_SAFETY_CHECK_UNSPECIFIED" - Unspecified quota safety check.
5286 // "LIMIT_DECREASE_BELOW_USAGE" - Validates that a quota mutation would not
5287 //
5288 // cause the consumer's effective limit to be lower than the consumer's quota
5289 // usage.
5290 //
5291 // "LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" - Validates that a quota mutation
5292 //
5293 // would not cause the consumer's effective limit to decrease by more than 10
5294 // percent.
5295 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall) ForceOnly(forceOnly ...string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall {
5296 c.urlParams_.SetMulti("forceOnly", append([]string{}, forceOnly...))
5297 return c
5298 }
5299
5300 // Fields allows partial responses to be retrieved. See
5301 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5302 // details.
5303 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall {
5304 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5305 return c
5306 }
5307
5308 // Context sets the context to be used in this call's Do method.
5309 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall {
5310 c.ctx_ = ctx
5311 return c
5312 }
5313
5314 // Header returns a http.Header that can be modified by the caller to add
5315 // headers to the request.
5316 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall) Header() http.Header {
5317 if c.header_ == nil {
5318 c.header_ = make(http.Header)
5319 }
5320 return c.header_
5321 }
5322
5323 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall) doRequest(alt string) (*http.Response, error) {
5324 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5325 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.v1beta1quotaoverride)
5326 if err != nil {
5327 return nil, err
5328 }
5329 c.urlParams_.Set("alt", alt)
5330 c.urlParams_.Set("prettyPrint", "false")
5331 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/producerOverrides")
5332 urls += "?" + c.urlParams_.Encode()
5333 req, err := http.NewRequest("POST", urls, body)
5334 if err != nil {
5335 return nil, err
5336 }
5337 req.Header = reqHeaders
5338 googleapi.Expand(req.URL, map[string]string{
5339 "parent": c.parent,
5340 })
5341 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.create", "request", internallog.HTTPRequest(req, body.Bytes()))
5342 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5343 }
5344
5345 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.create" call.
5346 // Any non-2xx status code is an error. Response headers are in either
5347 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5348 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5349 // whether the returned error was because http.StatusNotModified was returned.
5350 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5351 gensupport.SetOptions(c.urlParams_, opts...)
5352 res, err := c.doRequest("json")
5353 if res != nil && res.StatusCode == http.StatusNotModified {
5354 if res.Body != nil {
5355 res.Body.Close()
5356 }
5357 return nil, gensupport.WrapError(&googleapi.Error{
5358 Code: res.StatusCode,
5359 Header: res.Header,
5360 })
5361 }
5362 if err != nil {
5363 return nil, err
5364 }
5365 defer googleapi.CloseBody(res)
5366 if err := googleapi.CheckResponse(res); err != nil {
5367 return nil, gensupport.WrapError(err)
5368 }
5369 ret := &Operation{
5370 ServerResponse: googleapi.ServerResponse{
5371 Header: res.Header,
5372 HTTPStatusCode: res.StatusCode,
5373 },
5374 }
5375 target := &ret
5376 b, err := gensupport.DecodeResponseBytes(target, res)
5377 if err != nil {
5378 return nil, err
5379 }
5380 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.create", "response", internallog.HTTPResponse(res, b))
5381 return ret, nil
5382 }
5383
5384 type ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall struct {
5385 s *APIService
5386 name string
5387 urlParams_ gensupport.URLParams
5388 ctx_ context.Context
5389 header_ http.Header
5390 }
5391
5392 // Delete: Deletes a producer override.
5393 //
5394 // - name: The resource name of the override to delete. An example name would
5395 // be:
5396 // `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.
5397 // googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOverrides/4a3f2c1d
5398 // `.
5399 func (r *ServicesConsumerQuotaMetricsLimitsProducerOverridesService) Delete(name string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall {
5400 c := &ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5401 c.name = name
5402 return c
5403 }
5404
5405 // Force sets the optional parameter "force": Whether to force the deletion of
5406 // the quota override. Setting the force parameter to 'true' ignores all quota
5407 // safety checks that would fail the request. QuotaSafetyCheck lists all such
5408 // validations.
5409 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall) Force(force bool) *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall {
5410 c.urlParams_.Set("force", fmt.Sprint(force))
5411 return c
5412 }
5413
5414 // ForceJustification sets the optional parameter "forceJustification": If
5415 // force option is set to true, force_justification is suggested to be set to
5416 // log the reason in audit logs.
5417 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall) ForceJustification(forceJustification string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall {
5418 c.urlParams_.Set("forceJustification", forceJustification)
5419 return c
5420 }
5421
5422 // ForceOnly sets the optional parameter "forceOnly": The list of quota safety
5423 // checks to ignore before the override mutation. Unlike 'force' field that
5424 // ignores all the quota safety checks, the 'force_only' field ignores only the
5425 // specified checks; other checks are still enforced. The 'force' and
5426 // 'force_only' fields cannot both be set.
5427 //
5428 // Possible values:
5429 //
5430 // "QUOTA_SAFETY_CHECK_UNSPECIFIED" - Unspecified quota safety check.
5431 // "LIMIT_DECREASE_BELOW_USAGE" - Validates that a quota mutation would not
5432 //
5433 // cause the consumer's effective limit to be lower than the consumer's quota
5434 // usage.
5435 //
5436 // "LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" - Validates that a quota mutation
5437 //
5438 // would not cause the consumer's effective limit to decrease by more than 10
5439 // percent.
5440 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall) ForceOnly(forceOnly ...string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall {
5441 c.urlParams_.SetMulti("forceOnly", append([]string{}, forceOnly...))
5442 return c
5443 }
5444
5445 // Fields allows partial responses to be retrieved. See
5446 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5447 // details.
5448 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall {
5449 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5450 return c
5451 }
5452
5453 // Context sets the context to be used in this call's Do method.
5454 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall {
5455 c.ctx_ = ctx
5456 return c
5457 }
5458
5459 // Header returns a http.Header that can be modified by the caller to add
5460 // headers to the request.
5461 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall) Header() http.Header {
5462 if c.header_ == nil {
5463 c.header_ = make(http.Header)
5464 }
5465 return c.header_
5466 }
5467
5468 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall) doRequest(alt string) (*http.Response, error) {
5469 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5470 c.urlParams_.Set("alt", alt)
5471 c.urlParams_.Set("prettyPrint", "false")
5472 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5473 urls += "?" + c.urlParams_.Encode()
5474 req, err := http.NewRequest("DELETE", urls, nil)
5475 if err != nil {
5476 return nil, err
5477 }
5478 req.Header = reqHeaders
5479 googleapi.Expand(req.URL, map[string]string{
5480 "name": c.name,
5481 })
5482 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.delete", "request", internallog.HTTPRequest(req, nil))
5483 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5484 }
5485
5486 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.delete" call.
5487 // Any non-2xx status code is an error. Response headers are in either
5488 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5489 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5490 // whether the returned error was because http.StatusNotModified was returned.
5491 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5492 gensupport.SetOptions(c.urlParams_, opts...)
5493 res, err := c.doRequest("json")
5494 if res != nil && res.StatusCode == http.StatusNotModified {
5495 if res.Body != nil {
5496 res.Body.Close()
5497 }
5498 return nil, gensupport.WrapError(&googleapi.Error{
5499 Code: res.StatusCode,
5500 Header: res.Header,
5501 })
5502 }
5503 if err != nil {
5504 return nil, err
5505 }
5506 defer googleapi.CloseBody(res)
5507 if err := googleapi.CheckResponse(res); err != nil {
5508 return nil, gensupport.WrapError(err)
5509 }
5510 ret := &Operation{
5511 ServerResponse: googleapi.ServerResponse{
5512 Header: res.Header,
5513 HTTPStatusCode: res.StatusCode,
5514 },
5515 }
5516 target := &ret
5517 b, err := gensupport.DecodeResponseBytes(target, res)
5518 if err != nil {
5519 return nil, err
5520 }
5521 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.delete", "response", internallog.HTTPResponse(res, b))
5522 return ret, nil
5523 }
5524
5525 type ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall struct {
5526 s *APIService
5527 parent string
5528 urlParams_ gensupport.URLParams
5529 ifNoneMatch_ string
5530 ctx_ context.Context
5531 header_ http.Header
5532 }
5533
5534 // List: Lists all producer overrides on this limit.
5535 //
5536 // - parent: The resource name of the parent quota limit, returned by a
5537 // ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name
5538 // would be:
5539 // `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.
5540 // googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`.
5541 func (r *ServicesConsumerQuotaMetricsLimitsProducerOverridesService) List(parent string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall {
5542 c := &ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5543 c.parent = parent
5544 return c
5545 }
5546
5547 // PageSize sets the optional parameter "pageSize": Requested size of the next
5548 // page of data.
5549 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall) PageSize(pageSize int64) *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall {
5550 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5551 return c
5552 }
5553
5554 // PageToken sets the optional parameter "pageToken": Token identifying which
5555 // result to start with; returned by a previous list call.
5556 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall) PageToken(pageToken string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall {
5557 c.urlParams_.Set("pageToken", pageToken)
5558 return c
5559 }
5560
5561 // Fields allows partial responses to be retrieved. See
5562 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5563 // details.
5564 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall {
5565 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5566 return c
5567 }
5568
5569 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5570 // object's ETag matches the given value. This is useful for getting updates
5571 // only after the object has changed since the last request.
5572 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall) IfNoneMatch(entityTag string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall {
5573 c.ifNoneMatch_ = entityTag
5574 return c
5575 }
5576
5577 // Context sets the context to be used in this call's Do method.
5578 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall {
5579 c.ctx_ = ctx
5580 return c
5581 }
5582
5583 // Header returns a http.Header that can be modified by the caller to add
5584 // headers to the request.
5585 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall) Header() http.Header {
5586 if c.header_ == nil {
5587 c.header_ = make(http.Header)
5588 }
5589 return c.header_
5590 }
5591
5592 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall) doRequest(alt string) (*http.Response, error) {
5593 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5594 if c.ifNoneMatch_ != "" {
5595 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5596 }
5597 c.urlParams_.Set("alt", alt)
5598 c.urlParams_.Set("prettyPrint", "false")
5599 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/producerOverrides")
5600 urls += "?" + c.urlParams_.Encode()
5601 req, err := http.NewRequest("GET", urls, nil)
5602 if err != nil {
5603 return nil, err
5604 }
5605 req.Header = reqHeaders
5606 googleapi.Expand(req.URL, map[string]string{
5607 "parent": c.parent,
5608 })
5609 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.list", "request", internallog.HTTPRequest(req, nil))
5610 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5611 }
5612
5613 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.list" call.
5614 // Any non-2xx status code is an error. Response headers are in either
5615 // *V1Beta1ListProducerOverridesResponse.ServerResponse.Header or (if a
5616 // response was returned at all) in error.(*googleapi.Error).Header. Use
5617 // googleapi.IsNotModified to check whether the returned error was because
5618 // http.StatusNotModified was returned.
5619 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall) Do(opts ...googleapi.CallOption) (*V1Beta1ListProducerOverridesResponse, error) {
5620 gensupport.SetOptions(c.urlParams_, opts...)
5621 res, err := c.doRequest("json")
5622 if res != nil && res.StatusCode == http.StatusNotModified {
5623 if res.Body != nil {
5624 res.Body.Close()
5625 }
5626 return nil, gensupport.WrapError(&googleapi.Error{
5627 Code: res.StatusCode,
5628 Header: res.Header,
5629 })
5630 }
5631 if err != nil {
5632 return nil, err
5633 }
5634 defer googleapi.CloseBody(res)
5635 if err := googleapi.CheckResponse(res); err != nil {
5636 return nil, gensupport.WrapError(err)
5637 }
5638 ret := &V1Beta1ListProducerOverridesResponse{
5639 ServerResponse: googleapi.ServerResponse{
5640 Header: res.Header,
5641 HTTPStatusCode: res.StatusCode,
5642 },
5643 }
5644 target := &ret
5645 b, err := gensupport.DecodeResponseBytes(target, res)
5646 if err != nil {
5647 return nil, err
5648 }
5649 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.list", "response", internallog.HTTPResponse(res, b))
5650 return ret, nil
5651 }
5652
5653 // Pages invokes f for each page of results.
5654 // A non-nil error returned from f will halt the iteration.
5655 // The provided context supersedes any context provided to the Context method.
5656 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesListCall) Pages(ctx context.Context, f func(*V1Beta1ListProducerOverridesResponse) error) error {
5657 c.ctx_ = ctx
5658 defer c.PageToken(c.urlParams_.Get("pageToken"))
5659 for {
5660 x, err := c.Do()
5661 if err != nil {
5662 return err
5663 }
5664 if err := f(x); err != nil {
5665 return err
5666 }
5667 if x.NextPageToken == "" {
5668 return nil
5669 }
5670 c.PageToken(x.NextPageToken)
5671 }
5672 }
5673
5674 type ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall struct {
5675 s *APIService
5676 name string
5677 v1beta1quotaoverride *V1Beta1QuotaOverride
5678 urlParams_ gensupport.URLParams
5679 ctx_ context.Context
5680 header_ http.Header
5681 }
5682
5683 // Patch: Updates a producer override.
5684 //
5685 // - name: The resource name of the override to update. An example name would
5686 // be:
5687 // `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.
5688 // googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOverrides/4a3f2c1d
5689 // `.
5690 func (r *ServicesConsumerQuotaMetricsLimitsProducerOverridesService) Patch(name string, v1beta1quotaoverride *V1Beta1QuotaOverride) *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall {
5691 c := &ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5692 c.name = name
5693 c.v1beta1quotaoverride = v1beta1quotaoverride
5694 return c
5695 }
5696
5697 // Force sets the optional parameter "force": Whether to force the update of
5698 // the quota override. Setting the force parameter to 'true' ignores all quota
5699 // safety checks that would fail the request. QuotaSafetyCheck lists all such
5700 // validations.
5701 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall) Force(force bool) *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall {
5702 c.urlParams_.Set("force", fmt.Sprint(force))
5703 return c
5704 }
5705
5706 // ForceJustification sets the optional parameter "forceJustification": If
5707 // force option is set to true, force_justification is suggested to be set to
5708 // log the reason in audit logs.
5709 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall) ForceJustification(forceJustification string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall {
5710 c.urlParams_.Set("forceJustification", forceJustification)
5711 return c
5712 }
5713
5714 // ForceOnly sets the optional parameter "forceOnly": The list of quota safety
5715 // checks to ignore before the override mutation. Unlike 'force' field that
5716 // ignores all the quota safety checks, the 'force_only' field ignores only the
5717 // specified checks; other checks are still enforced. The 'force' and
5718 // 'force_only' fields cannot both be set.
5719 //
5720 // Possible values:
5721 //
5722 // "QUOTA_SAFETY_CHECK_UNSPECIFIED" - Unspecified quota safety check.
5723 // "LIMIT_DECREASE_BELOW_USAGE" - Validates that a quota mutation would not
5724 //
5725 // cause the consumer's effective limit to be lower than the consumer's quota
5726 // usage.
5727 //
5728 // "LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" - Validates that a quota mutation
5729 //
5730 // would not cause the consumer's effective limit to decrease by more than 10
5731 // percent.
5732 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall) ForceOnly(forceOnly ...string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall {
5733 c.urlParams_.SetMulti("forceOnly", append([]string{}, forceOnly...))
5734 return c
5735 }
5736
5737 // UpdateMask sets the optional parameter "updateMask": Update only the
5738 // specified fields. If unset, all modifiable fields will be updated.
5739 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall) UpdateMask(updateMask string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall {
5740 c.urlParams_.Set("updateMask", updateMask)
5741 return c
5742 }
5743
5744 // Fields allows partial responses to be retrieved. See
5745 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5746 // details.
5747 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall {
5748 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5749 return c
5750 }
5751
5752 // Context sets the context to be used in this call's Do method.
5753 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall {
5754 c.ctx_ = ctx
5755 return c
5756 }
5757
5758 // Header returns a http.Header that can be modified by the caller to add
5759 // headers to the request.
5760 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall) Header() http.Header {
5761 if c.header_ == nil {
5762 c.header_ = make(http.Header)
5763 }
5764 return c.header_
5765 }
5766
5767 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall) doRequest(alt string) (*http.Response, error) {
5768 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5769 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.v1beta1quotaoverride)
5770 if err != nil {
5771 return nil, err
5772 }
5773 c.urlParams_.Set("alt", alt)
5774 c.urlParams_.Set("prettyPrint", "false")
5775 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5776 urls += "?" + c.urlParams_.Encode()
5777 req, err := http.NewRequest("PATCH", urls, body)
5778 if err != nil {
5779 return nil, err
5780 }
5781 req.Header = reqHeaders
5782 googleapi.Expand(req.URL, map[string]string{
5783 "name": c.name,
5784 })
5785 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
5786 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5787 }
5788
5789 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.patch" call.
5790 // Any non-2xx status code is an error. Response headers are in either
5791 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5792 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5793 // whether the returned error was because http.StatusNotModified was returned.
5794 func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5795 gensupport.SetOptions(c.urlParams_, opts...)
5796 res, err := c.doRequest("json")
5797 if res != nil && res.StatusCode == http.StatusNotModified {
5798 if res.Body != nil {
5799 res.Body.Close()
5800 }
5801 return nil, gensupport.WrapError(&googleapi.Error{
5802 Code: res.StatusCode,
5803 Header: res.Header,
5804 })
5805 }
5806 if err != nil {
5807 return nil, err
5808 }
5809 defer googleapi.CloseBody(res)
5810 if err := googleapi.CheckResponse(res); err != nil {
5811 return nil, gensupport.WrapError(err)
5812 }
5813 ret := &Operation{
5814 ServerResponse: googleapi.ServerResponse{
5815 Header: res.Header,
5816 HTTPStatusCode: res.StatusCode,
5817 },
5818 }
5819 target := &ret
5820 b, err := gensupport.DecodeResponseBytes(target, res)
5821 if err != nil {
5822 return nil, err
5823 }
5824 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.patch", "response", internallog.HTTPResponse(res, b))
5825 return ret, nil
5826 }
5827
5828 type ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall struct {
5829 s *APIService
5830 parent string
5831 v1beta1producerquotapolicy *V1Beta1ProducerQuotaPolicy
5832 urlParams_ gensupport.URLParams
5833 ctx_ context.Context
5834 header_ http.Header
5835 }
5836
5837 // Create: Creates a producer quota policy. A producer quota policy is applied
5838 // by the owner or administrator of a service at an org or folder node to set
5839 // the default quota limit for all consumers under the node where the policy is
5840 // created. To create multiple policies at once, use
5841 // ImportProducerQuotaPolicies instead. If a policy with the specified
5842 // dimensions already exists, this call will fail. To overwrite an existing
5843 // policy if one is already present ("upsert" semantics), use
5844 // ImportProducerQuotaPolicies instead.
5845 //
5846 // - parent: The resource name of the parent quota limit. An example name would
5847 // be:
5848 // `services/compute.googleapis.com/organizations/123/consumerQuotaMetrics/com
5849 // pute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`.
5850 func (r *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesService) Create(parent string, v1beta1producerquotapolicy *V1Beta1ProducerQuotaPolicy) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall {
5851 c := &ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5852 c.parent = parent
5853 c.v1beta1producerquotapolicy = v1beta1producerquotapolicy
5854 return c
5855 }
5856
5857 // Force sets the optional parameter "force": Whether to force the creation of
5858 // the quota policy. If the policy creation would decrease the default limit of
5859 // any consumer tier by more than 10 percent, the call is rejected, as a safety
5860 // measure to avoid accidentally decreasing quota too quickly. Setting the
5861 // force parameter to true ignores this restriction.
5862 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall) Force(force bool) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall {
5863 c.urlParams_.Set("force", fmt.Sprint(force))
5864 return c
5865 }
5866
5867 // ForceJustification sets the optional parameter "forceJustification": If
5868 // force option is set to true, force_justification is suggested to be set to
5869 // log the reason in audit logs.
5870 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall) ForceJustification(forceJustification string) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall {
5871 c.urlParams_.Set("forceJustification", forceJustification)
5872 return c
5873 }
5874
5875 // ValidateOnly sets the optional parameter "validateOnly": If set to true,
5876 // validate the request, but do not actually update.
5877 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall) ValidateOnly(validateOnly bool) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall {
5878 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
5879 return c
5880 }
5881
5882 // Fields allows partial responses to be retrieved. See
5883 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5884 // details.
5885 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall {
5886 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5887 return c
5888 }
5889
5890 // Context sets the context to be used in this call's Do method.
5891 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall {
5892 c.ctx_ = ctx
5893 return c
5894 }
5895
5896 // Header returns a http.Header that can be modified by the caller to add
5897 // headers to the request.
5898 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall) Header() http.Header {
5899 if c.header_ == nil {
5900 c.header_ = make(http.Header)
5901 }
5902 return c.header_
5903 }
5904
5905 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
5906 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5907 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.v1beta1producerquotapolicy)
5908 if err != nil {
5909 return nil, err
5910 }
5911 c.urlParams_.Set("alt", alt)
5912 c.urlParams_.Set("prettyPrint", "false")
5913 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/producerQuotaPolicies")
5914 urls += "?" + c.urlParams_.Encode()
5915 req, err := http.NewRequest("POST", urls, body)
5916 if err != nil {
5917 return nil, err
5918 }
5919 req.Header = reqHeaders
5920 googleapi.Expand(req.URL, map[string]string{
5921 "parent": c.parent,
5922 })
5923 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.create", "request", internallog.HTTPRequest(req, body.Bytes()))
5924 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5925 }
5926
5927 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.create" call.
5928 // Any non-2xx status code is an error. Response headers are in either
5929 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5930 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5931 // whether the returned error was because http.StatusNotModified was returned.
5932 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5933 gensupport.SetOptions(c.urlParams_, opts...)
5934 res, err := c.doRequest("json")
5935 if res != nil && res.StatusCode == http.StatusNotModified {
5936 if res.Body != nil {
5937 res.Body.Close()
5938 }
5939 return nil, gensupport.WrapError(&googleapi.Error{
5940 Code: res.StatusCode,
5941 Header: res.Header,
5942 })
5943 }
5944 if err != nil {
5945 return nil, err
5946 }
5947 defer googleapi.CloseBody(res)
5948 if err := googleapi.CheckResponse(res); err != nil {
5949 return nil, gensupport.WrapError(err)
5950 }
5951 ret := &Operation{
5952 ServerResponse: googleapi.ServerResponse{
5953 Header: res.Header,
5954 HTTPStatusCode: res.StatusCode,
5955 },
5956 }
5957 target := &ret
5958 b, err := gensupport.DecodeResponseBytes(target, res)
5959 if err != nil {
5960 return nil, err
5961 }
5962 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.create", "response", internallog.HTTPResponse(res, b))
5963 return ret, nil
5964 }
5965
5966 type ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall struct {
5967 s *APIService
5968 name string
5969 urlParams_ gensupport.URLParams
5970 ctx_ context.Context
5971 header_ http.Header
5972 }
5973
5974 // Delete: Deletes a producer quota policy.
5975 //
5976 // - name: The resource name of the policy to delete. An example name would be:
5977 // `services/compute.googleapis.com/organizations/123/consumerQuotaMetrics/com
5978 // pute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies
5979 // /4a3f2c1d`.
5980 func (r *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesService) Delete(name string) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall {
5981 c := &ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5982 c.name = name
5983 return c
5984 }
5985
5986 // Force sets the optional parameter "force": Whether to force the deletion of
5987 // the quota policy. If the policy deletion would decrease the default limit of
5988 // any consumer tier by more than 10 percent, the call is rejected, as a safety
5989 // measure to avoid accidentally decreasing quota too quickly. Setting the
5990 // force parameter to true ignores this restriction.
5991 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall) Force(force bool) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall {
5992 c.urlParams_.Set("force", fmt.Sprint(force))
5993 return c
5994 }
5995
5996 // ForceJustification sets the optional parameter "forceJustification": If
5997 // force option is set to true, force_justification is suggested to be set to
5998 // log the reason in audit logs.
5999 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall) ForceJustification(forceJustification string) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall {
6000 c.urlParams_.Set("forceJustification", forceJustification)
6001 return c
6002 }
6003
6004 // ValidateOnly sets the optional parameter "validateOnly": If set to true,
6005 // validate the request, but do not actually update.
6006 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall) ValidateOnly(validateOnly bool) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall {
6007 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
6008 return c
6009 }
6010
6011 // Fields allows partial responses to be retrieved. See
6012 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6013 // details.
6014 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall {
6015 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6016 return c
6017 }
6018
6019 // Context sets the context to be used in this call's Do method.
6020 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall {
6021 c.ctx_ = ctx
6022 return c
6023 }
6024
6025 // Header returns a http.Header that can be modified by the caller to add
6026 // headers to the request.
6027 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall) Header() http.Header {
6028 if c.header_ == nil {
6029 c.header_ = make(http.Header)
6030 }
6031 return c.header_
6032 }
6033
6034 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
6035 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6036 c.urlParams_.Set("alt", alt)
6037 c.urlParams_.Set("prettyPrint", "false")
6038 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6039 urls += "?" + c.urlParams_.Encode()
6040 req, err := http.NewRequest("DELETE", urls, nil)
6041 if err != nil {
6042 return nil, err
6043 }
6044 req.Header = reqHeaders
6045 googleapi.Expand(req.URL, map[string]string{
6046 "name": c.name,
6047 })
6048 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.delete", "request", internallog.HTTPRequest(req, nil))
6049 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6050 }
6051
6052 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.delete" call.
6053 // Any non-2xx status code is an error. Response headers are in either
6054 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6055 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6056 // whether the returned error was because http.StatusNotModified was returned.
6057 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6058 gensupport.SetOptions(c.urlParams_, opts...)
6059 res, err := c.doRequest("json")
6060 if res != nil && res.StatusCode == http.StatusNotModified {
6061 if res.Body != nil {
6062 res.Body.Close()
6063 }
6064 return nil, gensupport.WrapError(&googleapi.Error{
6065 Code: res.StatusCode,
6066 Header: res.Header,
6067 })
6068 }
6069 if err != nil {
6070 return nil, err
6071 }
6072 defer googleapi.CloseBody(res)
6073 if err := googleapi.CheckResponse(res); err != nil {
6074 return nil, gensupport.WrapError(err)
6075 }
6076 ret := &Operation{
6077 ServerResponse: googleapi.ServerResponse{
6078 Header: res.Header,
6079 HTTPStatusCode: res.StatusCode,
6080 },
6081 }
6082 target := &ret
6083 b, err := gensupport.DecodeResponseBytes(target, res)
6084 if err != nil {
6085 return nil, err
6086 }
6087 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.delete", "response", internallog.HTTPResponse(res, b))
6088 return ret, nil
6089 }
6090
6091 type ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall struct {
6092 s *APIService
6093 parent string
6094 urlParams_ gensupport.URLParams
6095 ifNoneMatch_ string
6096 ctx_ context.Context
6097 header_ http.Header
6098 }
6099
6100 // List: Lists all producer policies created at current consumer node for a
6101 // limit.
6102 //
6103 // - parent: The resource name of the parent quota limit. An example name would
6104 // be:
6105 // `services/compute.googleapis.com/organizations/123/consumerQuotaMetrics/com
6106 // pute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`.
6107 func (r *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesService) List(parent string) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall {
6108 c := &ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6109 c.parent = parent
6110 return c
6111 }
6112
6113 // PageSize sets the optional parameter "pageSize": Requested size of the next
6114 // page of data.
6115 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall) PageSize(pageSize int64) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall {
6116 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6117 return c
6118 }
6119
6120 // PageToken sets the optional parameter "pageToken": Token identifying which
6121 // result to start with; returned by a previous list call.
6122 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall) PageToken(pageToken string) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall {
6123 c.urlParams_.Set("pageToken", pageToken)
6124 return c
6125 }
6126
6127 // Fields allows partial responses to be retrieved. See
6128 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6129 // details.
6130 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall {
6131 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6132 return c
6133 }
6134
6135 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6136 // object's ETag matches the given value. This is useful for getting updates
6137 // only after the object has changed since the last request.
6138 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall) IfNoneMatch(entityTag string) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall {
6139 c.ifNoneMatch_ = entityTag
6140 return c
6141 }
6142
6143 // Context sets the context to be used in this call's Do method.
6144 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall {
6145 c.ctx_ = ctx
6146 return c
6147 }
6148
6149 // Header returns a http.Header that can be modified by the caller to add
6150 // headers to the request.
6151 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall) Header() http.Header {
6152 if c.header_ == nil {
6153 c.header_ = make(http.Header)
6154 }
6155 return c.header_
6156 }
6157
6158 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall) doRequest(alt string) (*http.Response, error) {
6159 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6160 if c.ifNoneMatch_ != "" {
6161 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6162 }
6163 c.urlParams_.Set("alt", alt)
6164 c.urlParams_.Set("prettyPrint", "false")
6165 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/producerQuotaPolicies")
6166 urls += "?" + c.urlParams_.Encode()
6167 req, err := http.NewRequest("GET", urls, nil)
6168 if err != nil {
6169 return nil, err
6170 }
6171 req.Header = reqHeaders
6172 googleapi.Expand(req.URL, map[string]string{
6173 "parent": c.parent,
6174 })
6175 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.list", "request", internallog.HTTPRequest(req, nil))
6176 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6177 }
6178
6179 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.list" call.
6180 // Any non-2xx status code is an error. Response headers are in either
6181 // *V1Beta1ListProducerQuotaPoliciesResponse.ServerResponse.Header or (if a
6182 // response was returned at all) in error.(*googleapi.Error).Header. Use
6183 // googleapi.IsNotModified to check whether the returned error was because
6184 // http.StatusNotModified was returned.
6185 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall) Do(opts ...googleapi.CallOption) (*V1Beta1ListProducerQuotaPoliciesResponse, error) {
6186 gensupport.SetOptions(c.urlParams_, opts...)
6187 res, err := c.doRequest("json")
6188 if res != nil && res.StatusCode == http.StatusNotModified {
6189 if res.Body != nil {
6190 res.Body.Close()
6191 }
6192 return nil, gensupport.WrapError(&googleapi.Error{
6193 Code: res.StatusCode,
6194 Header: res.Header,
6195 })
6196 }
6197 if err != nil {
6198 return nil, err
6199 }
6200 defer googleapi.CloseBody(res)
6201 if err := googleapi.CheckResponse(res); err != nil {
6202 return nil, gensupport.WrapError(err)
6203 }
6204 ret := &V1Beta1ListProducerQuotaPoliciesResponse{
6205 ServerResponse: googleapi.ServerResponse{
6206 Header: res.Header,
6207 HTTPStatusCode: res.StatusCode,
6208 },
6209 }
6210 target := &ret
6211 b, err := gensupport.DecodeResponseBytes(target, res)
6212 if err != nil {
6213 return nil, err
6214 }
6215 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.list", "response", internallog.HTTPResponse(res, b))
6216 return ret, nil
6217 }
6218
6219 // Pages invokes f for each page of results.
6220 // A non-nil error returned from f will halt the iteration.
6221 // The provided context supersedes any context provided to the Context method.
6222 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesListCall) Pages(ctx context.Context, f func(*V1Beta1ListProducerQuotaPoliciesResponse) error) error {
6223 c.ctx_ = ctx
6224 defer c.PageToken(c.urlParams_.Get("pageToken"))
6225 for {
6226 x, err := c.Do()
6227 if err != nil {
6228 return err
6229 }
6230 if err := f(x); err != nil {
6231 return err
6232 }
6233 if x.NextPageToken == "" {
6234 return nil
6235 }
6236 c.PageToken(x.NextPageToken)
6237 }
6238 }
6239
6240 type ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall struct {
6241 s *APIService
6242 name string
6243 v1beta1producerquotapolicy *V1Beta1ProducerQuotaPolicy
6244 urlParams_ gensupport.URLParams
6245 ctx_ context.Context
6246 header_ http.Header
6247 }
6248
6249 // Patch: Updates a producer quota policy.
6250 //
6251 // - name: The resource name of the producer policy. An example name would be:
6252 // `services/compute.googleapis.com/organizations/123/consumerQuotaMetrics/com
6253 // pute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies
6254 // /4a3f2c1d`.
6255 func (r *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesService) Patch(name string, v1beta1producerquotapolicy *V1Beta1ProducerQuotaPolicy) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall {
6256 c := &ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6257 c.name = name
6258 c.v1beta1producerquotapolicy = v1beta1producerquotapolicy
6259 return c
6260 }
6261
6262 // Force sets the optional parameter "force": Whether to force the update of
6263 // the quota policy. If the policy update would decrease the default limit of
6264 // any consumer tier by more than 10 percent, the call is rejected, as a safety
6265 // measure to avoid accidentally decreasing quota too quickly. Setting the
6266 // force parameter to true ignores this restriction.
6267 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall) Force(force bool) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall {
6268 c.urlParams_.Set("force", fmt.Sprint(force))
6269 return c
6270 }
6271
6272 // ForceJustification sets the optional parameter "forceJustification": If
6273 // force option is set to true, force_justification is suggested to be set to
6274 // log the reason in audit logs.
6275 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall) ForceJustification(forceJustification string) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall {
6276 c.urlParams_.Set("forceJustification", forceJustification)
6277 return c
6278 }
6279
6280 // UpdateMask sets the optional parameter "updateMask": Update only the
6281 // specified fields. If unset, all modifiable fields will be updated.
6282 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall) UpdateMask(updateMask string) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall {
6283 c.urlParams_.Set("updateMask", updateMask)
6284 return c
6285 }
6286
6287 // ValidateOnly sets the optional parameter "validateOnly": If set to true,
6288 // validate the request, but do not actually update.
6289 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall) ValidateOnly(validateOnly bool) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall {
6290 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
6291 return c
6292 }
6293
6294 // Fields allows partial responses to be retrieved. See
6295 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6296 // details.
6297 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall) Fields(s ...googleapi.Field) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall {
6298 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6299 return c
6300 }
6301
6302 // Context sets the context to be used in this call's Do method.
6303 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall) Context(ctx context.Context) *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall {
6304 c.ctx_ = ctx
6305 return c
6306 }
6307
6308 // Header returns a http.Header that can be modified by the caller to add
6309 // headers to the request.
6310 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall) Header() http.Header {
6311 if c.header_ == nil {
6312 c.header_ = make(http.Header)
6313 }
6314 return c.header_
6315 }
6316
6317 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
6318 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6319 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.v1beta1producerquotapolicy)
6320 if err != nil {
6321 return nil, err
6322 }
6323 c.urlParams_.Set("alt", alt)
6324 c.urlParams_.Set("prettyPrint", "false")
6325 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6326 urls += "?" + c.urlParams_.Encode()
6327 req, err := http.NewRequest("PATCH", urls, body)
6328 if err != nil {
6329 return nil, err
6330 }
6331 req.Header = reqHeaders
6332 googleapi.Expand(req.URL, map[string]string{
6333 "name": c.name,
6334 })
6335 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
6336 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6337 }
6338
6339 // Do executes the "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.patch" call.
6340 // Any non-2xx status code is an error. Response headers are in either
6341 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6342 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6343 // whether the returned error was because http.StatusNotModified was returned.
6344 func (c *ServicesConsumerQuotaMetricsLimitsProducerQuotaPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6345 gensupport.SetOptions(c.urlParams_, opts...)
6346 res, err := c.doRequest("json")
6347 if res != nil && res.StatusCode == http.StatusNotModified {
6348 if res.Body != nil {
6349 res.Body.Close()
6350 }
6351 return nil, gensupport.WrapError(&googleapi.Error{
6352 Code: res.StatusCode,
6353 Header: res.Header,
6354 })
6355 }
6356 if err != nil {
6357 return nil, err
6358 }
6359 defer googleapi.CloseBody(res)
6360 if err := googleapi.CheckResponse(res); err != nil {
6361 return nil, gensupport.WrapError(err)
6362 }
6363 ret := &Operation{
6364 ServerResponse: googleapi.ServerResponse{
6365 Header: res.Header,
6366 HTTPStatusCode: res.StatusCode,
6367 },
6368 }
6369 target := &ret
6370 b, err := gensupport.DecodeResponseBytes(target, res)
6371 if err != nil {
6372 return nil, err
6373 }
6374 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerQuotaPolicies.patch", "response", internallog.HTTPResponse(res, b))
6375 return ret, nil
6376 }