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