1// Copyright 2020 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 servicemanagement provides access to the Service Management API. 8// 9// For product documentation, see: https://cloud.google.com/service-management/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/servicemanagement/v1" 16// ... 17// ctx := context.Background() 18// servicemanagementService, err := servicemanagement.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: 27// 28// servicemanagementService, err := servicemanagement.NewService(ctx, option.WithScopes(servicemanagement.ServiceManagementReadonlyScope)) 29// 30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 31// 32// servicemanagementService, err := servicemanagement.NewService(ctx, option.WithAPIKey("AIza...")) 33// 34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 35// 36// config := &oauth2.Config{...} 37// // ... 38// token, err := config.Exchange(ctx, ...) 39// servicemanagementService, err := servicemanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 40// 41// See https://godoc.org/google.golang.org/api/option/ for details on options. 42package servicemanagement // import "google.golang.org/api/servicemanagement/v1" 43 44import ( 45 "bytes" 46 "context" 47 "encoding/json" 48 "errors" 49 "fmt" 50 "io" 51 "net/http" 52 "net/url" 53 "strconv" 54 "strings" 55 56 googleapi "google.golang.org/api/googleapi" 57 gensupport "google.golang.org/api/internal/gensupport" 58 option "google.golang.org/api/option" 59 internaloption "google.golang.org/api/option/internaloption" 60 htransport "google.golang.org/api/transport/http" 61) 62 63// Always reference these packages, just in case the auto-generated code 64// below doesn't. 65var _ = bytes.NewBuffer 66var _ = strconv.Itoa 67var _ = fmt.Sprintf 68var _ = json.NewDecoder 69var _ = io.Copy 70var _ = url.Parse 71var _ = gensupport.MarshalJSON 72var _ = googleapi.Version 73var _ = errors.New 74var _ = strings.Replace 75var _ = context.Canceled 76var _ = internaloption.WithDefaultEndpoint 77 78const apiId = "servicemanagement:v1" 79const apiName = "servicemanagement" 80const apiVersion = "v1" 81const basePath = "https://servicemanagement.googleapis.com/" 82const mtlsBasePath = "https://servicemanagement.mtls.googleapis.com/" 83 84// OAuth2 scopes used by this API. 85const ( 86 // View and manage your data across Google Cloud Platform services 87 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 88 89 // View your data across Google Cloud Platform services 90 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" 91 92 // Manage your Google API service configuration 93 ServiceManagementScope = "https://www.googleapis.com/auth/service.management" 94 95 // View your Google API service configuration 96 ServiceManagementReadonlyScope = "https://www.googleapis.com/auth/service.management.readonly" 97) 98 99// NewService creates a new APIService. 100func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 101 scopesOption := option.WithScopes( 102 "https://www.googleapis.com/auth/cloud-platform", 103 "https://www.googleapis.com/auth/cloud-platform.read-only", 104 "https://www.googleapis.com/auth/service.management", 105 "https://www.googleapis.com/auth/service.management.readonly", 106 ) 107 // NOTE: prepend, so we don't override user-specified scopes. 108 opts = append([]option.ClientOption{scopesOption}, opts...) 109 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 110 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 111 client, endpoint, err := htransport.NewClient(ctx, opts...) 112 if err != nil { 113 return nil, err 114 } 115 s, err := New(client) 116 if err != nil { 117 return nil, err 118 } 119 if endpoint != "" { 120 s.BasePath = endpoint 121 } 122 return s, nil 123} 124 125// New creates a new APIService. It uses the provided http.Client for requests. 126// 127// Deprecated: please use NewService instead. 128// To provide a custom HTTP client, use option.WithHTTPClient. 129// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 130func New(client *http.Client) (*APIService, error) { 131 if client == nil { 132 return nil, errors.New("client is nil") 133 } 134 s := &APIService{client: client, BasePath: basePath} 135 s.Operations = NewOperationsService(s) 136 s.Services = NewServicesService(s) 137 return s, nil 138} 139 140type APIService struct { 141 client *http.Client 142 BasePath string // API endpoint base URL 143 UserAgent string // optional additional User-Agent fragment 144 145 Operations *OperationsService 146 147 Services *ServicesService 148} 149 150func (s *APIService) userAgent() string { 151 if s.UserAgent == "" { 152 return googleapi.UserAgent 153 } 154 return googleapi.UserAgent + " " + s.UserAgent 155} 156 157func NewOperationsService(s *APIService) *OperationsService { 158 rs := &OperationsService{s: s} 159 return rs 160} 161 162type OperationsService struct { 163 s *APIService 164} 165 166func NewServicesService(s *APIService) *ServicesService { 167 rs := &ServicesService{s: s} 168 rs.Configs = NewServicesConfigsService(s) 169 rs.Consumers = NewServicesConsumersService(s) 170 rs.Rollouts = NewServicesRolloutsService(s) 171 return rs 172} 173 174type ServicesService struct { 175 s *APIService 176 177 Configs *ServicesConfigsService 178 179 Consumers *ServicesConsumersService 180 181 Rollouts *ServicesRolloutsService 182} 183 184func NewServicesConfigsService(s *APIService) *ServicesConfigsService { 185 rs := &ServicesConfigsService{s: s} 186 return rs 187} 188 189type ServicesConfigsService struct { 190 s *APIService 191} 192 193func NewServicesConsumersService(s *APIService) *ServicesConsumersService { 194 rs := &ServicesConsumersService{s: s} 195 return rs 196} 197 198type ServicesConsumersService struct { 199 s *APIService 200} 201 202func NewServicesRolloutsService(s *APIService) *ServicesRolloutsService { 203 rs := &ServicesRolloutsService{s: s} 204 return rs 205} 206 207type ServicesRolloutsService struct { 208 s *APIService 209} 210 211// Advice: Generated advice about this change, used for providing 212// more 213// information about how a change will affect the existing service. 214type Advice struct { 215 // Description: Useful description for why this advice was applied and 216 // what actions should 217 // be taken to mitigate any implied risks. 218 Description string `json:"description,omitempty"` 219 220 // ForceSendFields is a list of field names (e.g. "Description") to 221 // unconditionally include in API requests. By default, fields with 222 // empty values are omitted from API requests. However, any non-pointer, 223 // non-interface field appearing in ForceSendFields will be sent to the 224 // server regardless of whether the field is empty or not. This may be 225 // used to include empty fields in Patch requests. 226 ForceSendFields []string `json:"-"` 227 228 // NullFields is a list of field names (e.g. "Description") to include 229 // in API requests with the JSON null value. By default, fields with 230 // empty values are omitted from API requests. However, any field with 231 // an empty value appearing in NullFields will be sent to the server as 232 // null. It is an error if a field in this list has a non-empty value. 233 // This may be used to include null fields in Patch requests. 234 NullFields []string `json:"-"` 235} 236 237func (s *Advice) MarshalJSON() ([]byte, error) { 238 type NoMethod Advice 239 raw := NoMethod(*s) 240 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 241} 242 243// Api: Api is a light-weight descriptor for an API 244// Interface. 245// 246// Interfaces are also described as "protocol buffer services" in some 247// contexts, 248// such as by the "service" keyword in a .proto file, but they are 249// different 250// from API Services, which represent a concrete implementation of an 251// interface 252// as opposed to simply a description of methods and bindings. They are 253// also 254// sometimes simply referred to as "APIs" in other contexts, such as the 255// name of 256// this message itself. See 257// https://cloud.google.com/apis/design/glossary for 258// detailed terminology. 259type Api struct { 260 // Methods: The methods of this interface, in unspecified order. 261 Methods []*Method `json:"methods,omitempty"` 262 263 // Mixins: Included interfaces. See Mixin. 264 Mixins []*Mixin `json:"mixins,omitempty"` 265 266 // Name: The fully qualified name of this interface, including package 267 // name 268 // followed by the interface's simple name. 269 Name string `json:"name,omitempty"` 270 271 // Options: Any metadata attached to the interface. 272 Options []*Option `json:"options,omitempty"` 273 274 // SourceContext: Source context for the protocol buffer service 275 // represented by this 276 // message. 277 SourceContext *SourceContext `json:"sourceContext,omitempty"` 278 279 // Syntax: The source syntax of the service. 280 // 281 // Possible values: 282 // "SYNTAX_PROTO2" - Syntax `proto2`. 283 // "SYNTAX_PROTO3" - Syntax `proto3`. 284 Syntax string `json:"syntax,omitempty"` 285 286 // Version: A version string for this interface. If specified, must have 287 // the form 288 // `major-version.minor-version`, as in `1.10`. If the minor version 289 // is 290 // omitted, it defaults to zero. If the entire version field is empty, 291 // the 292 // major version is derived from the package name, as outlined below. If 293 // the 294 // field is not empty, the version in the package name will be verified 295 // to be 296 // consistent with what is provided here. 297 // 298 // The versioning schema uses [semantic 299 // versioning](http://semver.org) where the major version 300 // number 301 // indicates a breaking change and the minor version an 302 // additive, 303 // non-breaking change. Both version numbers are signals to users 304 // what to expect from different versions, and should be 305 // carefully 306 // chosen based on the product plan. 307 // 308 // The major version is also reflected in the package name of 309 // the 310 // interface, which must end in `v<major-version>`, as 311 // in 312 // `google.feature.v1`. For major versions 0 and 1, the suffix can 313 // be omitted. Zero major versions must only be used for 314 // experimental, non-GA interfaces. 315 // 316 Version string `json:"version,omitempty"` 317 318 // ForceSendFields is a list of field names (e.g. "Methods") to 319 // unconditionally include in API requests. By default, fields with 320 // empty values are omitted from API requests. However, any non-pointer, 321 // non-interface field appearing in ForceSendFields will be sent to the 322 // server regardless of whether the field is empty or not. This may be 323 // used to include empty fields in Patch requests. 324 ForceSendFields []string `json:"-"` 325 326 // NullFields is a list of field names (e.g. "Methods") to include in 327 // API requests with the JSON null value. By default, fields with empty 328 // values are omitted from API requests. However, any field with an 329 // empty value appearing in NullFields will be sent to the server as 330 // null. It is an error if a field in this list has a non-empty value. 331 // This may be used to include null fields in Patch requests. 332 NullFields []string `json:"-"` 333} 334 335func (s *Api) MarshalJSON() ([]byte, error) { 336 type NoMethod Api 337 raw := NoMethod(*s) 338 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 339} 340 341// AuditConfig: Specifies the audit configuration for a service. 342// The configuration determines which permission types are logged, and 343// what 344// identities, if any, are exempted from logging. 345// An AuditConfig must have one or more AuditLogConfigs. 346// 347// If there are AuditConfigs for both `allServices` and a specific 348// service, 349// the union of the two AuditConfigs is used for that service: the 350// log_types 351// specified in each AuditConfig are enabled, and the exempted_members 352// in each 353// AuditLogConfig are exempted. 354// 355// Example Policy with multiple AuditConfigs: 356// 357// { 358// "audit_configs": [ 359// { 360// "service": "allServices", 361// "audit_log_configs": [ 362// { 363// "log_type": "DATA_READ", 364// "exempted_members": [ 365// "user:jose@example.com" 366// ] 367// }, 368// { 369// "log_type": "DATA_WRITE" 370// }, 371// { 372// "log_type": "ADMIN_READ" 373// } 374// ] 375// }, 376// { 377// "service": "sampleservice.googleapis.com", 378// "audit_log_configs": [ 379// { 380// "log_type": "DATA_READ" 381// }, 382// { 383// "log_type": "DATA_WRITE", 384// "exempted_members": [ 385// "user:aliya@example.com" 386// ] 387// } 388// ] 389// } 390// ] 391// } 392// 393// For sampleservice, this policy enables DATA_READ, DATA_WRITE and 394// ADMIN_READ 395// logging. It also exempts jose@example.com from DATA_READ logging, 396// and 397// aliya@example.com from DATA_WRITE logging. 398type AuditConfig struct { 399 // AuditLogConfigs: The configuration for logging of each type of 400 // permission. 401 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 402 403 // Service: Specifies a service that will be enabled for audit 404 // logging. 405 // For example, `storage.googleapis.com`, 406 // `cloudsql.googleapis.com`. 407 // `allServices` is a special value that covers all services. 408 Service string `json:"service,omitempty"` 409 410 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 411 // unconditionally include in API requests. By default, fields with 412 // empty values are omitted from API requests. However, any non-pointer, 413 // non-interface field appearing in ForceSendFields will be sent to the 414 // server regardless of whether the field is empty or not. This may be 415 // used to include empty fields in Patch requests. 416 ForceSendFields []string `json:"-"` 417 418 // NullFields is a list of field names (e.g. "AuditLogConfigs") to 419 // include in API requests with the JSON null value. By default, fields 420 // with empty values are omitted from API requests. However, any field 421 // with an empty value appearing in NullFields will be sent to the 422 // server as null. It is an error if a field in this list has a 423 // non-empty value. This may be used to include null fields in Patch 424 // requests. 425 NullFields []string `json:"-"` 426} 427 428func (s *AuditConfig) MarshalJSON() ([]byte, error) { 429 type NoMethod AuditConfig 430 raw := NoMethod(*s) 431 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 432} 433 434// AuditLogConfig: Provides the configuration for logging a type of 435// permissions. 436// Example: 437// 438// { 439// "audit_log_configs": [ 440// { 441// "log_type": "DATA_READ", 442// "exempted_members": [ 443// "user:jose@example.com" 444// ] 445// }, 446// { 447// "log_type": "DATA_WRITE" 448// } 449// ] 450// } 451// 452// This enables 'DATA_READ' and 'DATA_WRITE' logging, while 453// exempting 454// jose@example.com from DATA_READ logging. 455type AuditLogConfig struct { 456 // ExemptedMembers: Specifies the identities that do not cause logging 457 // for this type of 458 // permission. 459 // Follows the same format of Binding.members. 460 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 461 462 // LogType: The log type that this config enables. 463 // 464 // Possible values: 465 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 466 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 467 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 468 // "DATA_READ" - Data reads. Example: CloudSQL Users list 469 LogType string `json:"logType,omitempty"` 470 471 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 472 // unconditionally include in API requests. By default, fields with 473 // empty values are omitted from API requests. However, any non-pointer, 474 // non-interface field appearing in ForceSendFields will be sent to the 475 // server regardless of whether the field is empty or not. This may be 476 // used to include empty fields in Patch requests. 477 ForceSendFields []string `json:"-"` 478 479 // NullFields is a list of field names (e.g. "ExemptedMembers") to 480 // include in API requests with the JSON null value. By default, fields 481 // with empty values are omitted from API requests. However, any field 482 // with an empty value appearing in NullFields will be sent to the 483 // server as null. It is an error if a field in this list has a 484 // non-empty value. This may be used to include null fields in Patch 485 // requests. 486 NullFields []string `json:"-"` 487} 488 489func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 490 type NoMethod AuditLogConfig 491 raw := NoMethod(*s) 492 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 493} 494 495// AuthProvider: Configuration for an authentication provider, including 496// support for 497// [JSON Web 498// Token 499// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-tok 500// en-32). 501type AuthProvider struct { 502 // Audiences: The list of 503 // JWT 504 // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web- 505 // token-32#section-4.1.3). 506 // that are allowed to access. A JWT containing any of these audiences 507 // will 508 // be accepted. When this setting is absent, JWTs with audiences: 509 // - "https://[service.name]/[google.protobuf.Api.name]" 510 // - "https://[service.name]/" 511 // will be accepted. 512 // For example, if no audiences are in the setting, LibraryService API 513 // will 514 // accept JWTs with the following audiences: 515 // - 516 // 517 // https://library-example.googleapis.com/google.example.library.v1.LibraryService 518 // - https://library-example.googleapis.com/ 519 // 520 // Example: 521 // 522 // audiences: bookstore_android.apps.googleusercontent.com, 523 // bookstore_web.apps.googleusercontent.com 524 Audiences string `json:"audiences,omitempty"` 525 526 // AuthorizationUrl: Redirect URL if JWT token is required but not 527 // present or is expired. 528 // Implement authorizationUrl of securityDefinitions in OpenAPI spec. 529 AuthorizationUrl string `json:"authorizationUrl,omitempty"` 530 531 // Id: The unique identifier of the auth provider. It will be referred 532 // to by 533 // `AuthRequirement.provider_id`. 534 // 535 // Example: "bookstore_auth". 536 Id string `json:"id,omitempty"` 537 538 // Issuer: Identifies the principal that issued the JWT. 539 // See 540 // https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#sec 541 // tion-4.1.1 542 // Usually a URL or an email address. 543 // 544 // Example: https://securetoken.google.com 545 // Example: 1234567-compute@developer.gserviceaccount.com 546 Issuer string `json:"issuer,omitempty"` 547 548 // JwksUri: URL of the provider's public key set to validate signature 549 // of the JWT. 550 // See 551 // [OpenID 552 // Discovery](https://openid.net/specs/openid-connect-discove 553 // ry-1_0.html#ProviderMetadata). 554 // Optional if the key set document: 555 // - can be retrieved from 556 // [OpenID 557 // 558 // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html 559 // of 560 // the issuer. 561 // - can be inferred from the email domain of the issuer (e.g. a 562 // Google 563 // service account). 564 // 565 // Example: https://www.googleapis.com/oauth2/v1/certs 566 JwksUri string `json:"jwksUri,omitempty"` 567 568 // JwtLocations: Defines the locations to extract the JWT. 569 // 570 // JWT locations can be either from HTTP headers or URL query 571 // parameters. 572 // The rule is that the first match wins. The checking order is: 573 // checking 574 // all headers first, then URL query parameters. 575 // 576 // If not specified, default to use following 3 locations: 577 // 1) Authorization: Bearer 578 // 2) x-goog-iap-jwt-assertion 579 // 3) access_token query parameter 580 // 581 // Default locations can be specified as followings: 582 // jwt_locations: 583 // - header: Authorization 584 // value_prefix: "Bearer " 585 // - header: x-goog-iap-jwt-assertion 586 // - query: access_token 587 JwtLocations []*JwtLocation `json:"jwtLocations,omitempty"` 588 589 // ForceSendFields is a list of field names (e.g. "Audiences") to 590 // unconditionally include in API requests. By default, fields with 591 // empty values are omitted from API requests. However, any non-pointer, 592 // non-interface field appearing in ForceSendFields will be sent to the 593 // server regardless of whether the field is empty or not. This may be 594 // used to include empty fields in Patch requests. 595 ForceSendFields []string `json:"-"` 596 597 // NullFields is a list of field names (e.g. "Audiences") to include in 598 // API requests with the JSON null value. By default, fields with empty 599 // values are omitted from API requests. However, any field with an 600 // empty value appearing in NullFields will be sent to the server as 601 // null. It is an error if a field in this list has a non-empty value. 602 // This may be used to include null fields in Patch requests. 603 NullFields []string `json:"-"` 604} 605 606func (s *AuthProvider) MarshalJSON() ([]byte, error) { 607 type NoMethod AuthProvider 608 raw := NoMethod(*s) 609 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 610} 611 612// AuthRequirement: User-defined authentication requirements, including 613// support for 614// [JSON Web 615// Token 616// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-tok 617// en-32). 618type AuthRequirement struct { 619 // Audiences: NOTE: This will be deprecated soon, once 620 // AuthProvider.audiences is 621 // implemented and accepted in all the runtime components. 622 // 623 // The list of 624 // JWT 625 // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web- 626 // token-32#section-4.1.3). 627 // that are allowed to access. A JWT containing any of these audiences 628 // will 629 // be accepted. When this setting is absent, only JWTs with 630 // audience 631 // "https://Service_name/API_name" 632 // will be accepted. For example, if no audiences are in the 633 // setting, 634 // LibraryService API will only accept JWTs with the following 635 // audience 636 // "https://library-example.googleapis.com/google.example.librar 637 // y.v1.LibraryService". 638 // 639 // Example: 640 // 641 // audiences: bookstore_android.apps.googleusercontent.com, 642 // bookstore_web.apps.googleusercontent.com 643 Audiences string `json:"audiences,omitempty"` 644 645 // ProviderId: id from authentication provider. 646 // 647 // Example: 648 // 649 // provider_id: bookstore_auth 650 ProviderId string `json:"providerId,omitempty"` 651 652 // ForceSendFields is a list of field names (e.g. "Audiences") to 653 // unconditionally include in API requests. By default, fields with 654 // empty values are omitted from API requests. However, any non-pointer, 655 // non-interface field appearing in ForceSendFields will be sent to the 656 // server regardless of whether the field is empty or not. This may be 657 // used to include empty fields in Patch requests. 658 ForceSendFields []string `json:"-"` 659 660 // NullFields is a list of field names (e.g. "Audiences") to include in 661 // API requests with the JSON null value. By default, fields with empty 662 // values are omitted from API requests. However, any field with an 663 // empty value appearing in NullFields will be sent to the server as 664 // null. It is an error if a field in this list has a non-empty value. 665 // This may be used to include null fields in Patch requests. 666 NullFields []string `json:"-"` 667} 668 669func (s *AuthRequirement) MarshalJSON() ([]byte, error) { 670 type NoMethod AuthRequirement 671 raw := NoMethod(*s) 672 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 673} 674 675// Authentication: `Authentication` defines the authentication 676// configuration for an API. 677// 678// Example for an API targeted for external use: 679// 680// name: calendar.googleapis.com 681// authentication: 682// providers: 683// - id: google_calendar_auth 684// jwks_uri: https://www.googleapis.com/oauth2/v1/certs 685// issuer: https://securetoken.google.com 686// rules: 687// - selector: "*" 688// requirements: 689// provider_id: google_calendar_auth 690type Authentication struct { 691 // Providers: Defines a set of authentication providers that a service 692 // supports. 693 Providers []*AuthProvider `json:"providers,omitempty"` 694 695 // Rules: A list of authentication rules that apply to individual API 696 // methods. 697 // 698 // **NOTE:** All service configuration rules follow "last one wins" 699 // order. 700 Rules []*AuthenticationRule `json:"rules,omitempty"` 701 702 // ForceSendFields is a list of field names (e.g. "Providers") to 703 // unconditionally include in API requests. By default, fields with 704 // empty values are omitted from API requests. However, any non-pointer, 705 // non-interface field appearing in ForceSendFields will be sent to the 706 // server regardless of whether the field is empty or not. This may be 707 // used to include empty fields in Patch requests. 708 ForceSendFields []string `json:"-"` 709 710 // NullFields is a list of field names (e.g. "Providers") to include in 711 // API requests with the JSON null value. By default, fields with empty 712 // values are omitted from API requests. However, any field with an 713 // empty value appearing in NullFields will be sent to the server as 714 // null. It is an error if a field in this list has a non-empty value. 715 // This may be used to include null fields in Patch requests. 716 NullFields []string `json:"-"` 717} 718 719func (s *Authentication) MarshalJSON() ([]byte, error) { 720 type NoMethod Authentication 721 raw := NoMethod(*s) 722 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 723} 724 725// AuthenticationRule: Authentication rules for the service. 726// 727// By default, if a method has any authentication requirements, every 728// request 729// must include a valid credential matching one of the 730// requirements. 731// It's an error to include more than one kind of credential in a 732// single 733// request. 734// 735// If a method doesn't have any auth requirements, request credentials 736// will be 737// ignored. 738type AuthenticationRule struct { 739 // AllowWithoutCredential: If true, the service accepts API keys without 740 // any other credential. 741 AllowWithoutCredential bool `json:"allowWithoutCredential,omitempty"` 742 743 // Oauth: The requirements for OAuth credentials. 744 Oauth *OAuthRequirements `json:"oauth,omitempty"` 745 746 // Requirements: Requirements for additional authentication providers. 747 Requirements []*AuthRequirement `json:"requirements,omitempty"` 748 749 // Selector: Selects the methods to which this rule applies. 750 // 751 // Refer to selector for syntax details. 752 Selector string `json:"selector,omitempty"` 753 754 // ForceSendFields is a list of field names (e.g. 755 // "AllowWithoutCredential") to unconditionally include in API requests. 756 // By default, fields with empty values are omitted from API requests. 757 // However, any non-pointer, non-interface field appearing in 758 // ForceSendFields will be sent to the server regardless of whether the 759 // field is empty or not. This may be used to include empty fields in 760 // Patch requests. 761 ForceSendFields []string `json:"-"` 762 763 // NullFields is a list of field names (e.g. "AllowWithoutCredential") 764 // to include in API requests with the JSON null value. By default, 765 // fields with empty values are omitted from API requests. However, any 766 // field with an empty value appearing in NullFields will be sent to the 767 // server as null. It is an error if a field in this list has a 768 // non-empty value. This may be used to include null fields in Patch 769 // requests. 770 NullFields []string `json:"-"` 771} 772 773func (s *AuthenticationRule) MarshalJSON() ([]byte, error) { 774 type NoMethod AuthenticationRule 775 raw := NoMethod(*s) 776 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 777} 778 779// Backend: `Backend` defines the backend configuration for a service. 780type Backend struct { 781 // Rules: A list of API backend rules that apply to individual API 782 // methods. 783 // 784 // **NOTE:** All service configuration rules follow "last one wins" 785 // order. 786 Rules []*BackendRule `json:"rules,omitempty"` 787 788 // ForceSendFields is a list of field names (e.g. "Rules") to 789 // unconditionally include in API requests. By default, fields with 790 // empty values are omitted from API requests. However, any non-pointer, 791 // non-interface field appearing in ForceSendFields will be sent to the 792 // server regardless of whether the field is empty or not. This may be 793 // used to include empty fields in Patch requests. 794 ForceSendFields []string `json:"-"` 795 796 // NullFields is a list of field names (e.g. "Rules") to include in API 797 // requests with the JSON null value. By default, fields with empty 798 // values are omitted from API requests. However, any field with an 799 // empty value appearing in NullFields will be sent to the server as 800 // null. It is an error if a field in this list has a non-empty value. 801 // This may be used to include null fields in Patch requests. 802 NullFields []string `json:"-"` 803} 804 805func (s *Backend) MarshalJSON() ([]byte, error) { 806 type NoMethod Backend 807 raw := NoMethod(*s) 808 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 809} 810 811// BackendRule: A backend rule provides configuration for an individual 812// API element. 813type BackendRule struct { 814 // Address: The address of the API backend. 815 // 816 // The scheme is used to determine the backend protocol and 817 // security. 818 // The following schemes are accepted: 819 // 820 // SCHEME PROTOCOL SECURITY 821 // http:// HTTP None 822 // https:// HTTP TLS 823 // grpc:// gRPC None 824 // grpcs:// gRPC TLS 825 // 826 // It is recommended to explicitly include a scheme. Leaving out the 827 // scheme 828 // may cause constrasting behaviors across platforms. 829 // 830 // If the port is unspecified, the default is: 831 // - 80 for schemes without TLS 832 // - 443 for schemes with TLS 833 // 834 // For HTTP backends, use protocol 835 // to specify the protocol version. 836 Address string `json:"address,omitempty"` 837 838 // Deadline: The number of seconds to wait for a response from a 839 // request. The default 840 // varies based on the request protocol and deployment environment. 841 Deadline float64 `json:"deadline,omitempty"` 842 843 // DisableAuth: When disable_auth is true, a JWT ID token won't be 844 // generated and the 845 // original "Authorization" HTTP header will be preserved. If the header 846 // is 847 // used to carry the original token and is expected by the backend, 848 // this 849 // field must be set to true to preserve the header. 850 DisableAuth bool `json:"disableAuth,omitempty"` 851 852 // JwtAudience: The JWT audience is used when generating a JWT ID token 853 // for the backend. 854 // This ID token will be added in the HTTP "authorization" header, and 855 // sent 856 // to the backend. 857 JwtAudience string `json:"jwtAudience,omitempty"` 858 859 // MinDeadline: Minimum deadline in seconds needed for this method. 860 // Calls having deadline 861 // value lower than this will be rejected. 862 MinDeadline float64 `json:"minDeadline,omitempty"` 863 864 // OperationDeadline: The number of seconds to wait for the completion 865 // of a long running 866 // operation. The default is no deadline. 867 OperationDeadline float64 `json:"operationDeadline,omitempty"` 868 869 // Possible values: 870 // "PATH_TRANSLATION_UNSPECIFIED" 871 // "CONSTANT_ADDRESS" - Use the backend address as-is, with no 872 // modification to the path. If the 873 // URL pattern contains variables, the variable names and values will 874 // be 875 // appended to the query string. If a query string parameter and a 876 // URL 877 // pattern variable have the same name, this may result in duplicate 878 // keys in 879 // the query string. 880 // 881 // # Examples 882 // 883 // Given the following operation config: 884 // 885 // Method path: /api/company/{cid}/user/{uid} 886 // Backend address: 887 // https://example.cloudfunctions.net/getUser 888 // 889 // Requests to the following request paths will call the backend at 890 // the 891 // translated path: 892 // 893 // Request path: /api/company/widgetworks/user/johndoe 894 // Translated: 895 // 896 // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe 897 // 898 // Request path: /api/company/widgetworks/user/johndoe?timezone=EST 899 // Translated: 900 // 901 // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe 902 // "APPEND_PATH_TO_ADDRESS" - The request path will be appended to the 903 // backend address. 904 // 905 // # Examples 906 // 907 // Given the following operation config: 908 // 909 // Method path: /api/company/{cid}/user/{uid} 910 // Backend address: https://example.appspot.com 911 // 912 // Requests to the following request paths will call the backend at 913 // the 914 // translated path: 915 // 916 // Request path: /api/company/widgetworks/user/johndoe 917 // Translated: 918 // 919 // https://example.appspot.com/api/company/widgetworks/user/johndoe 920 // 921 // Request path: /api/company/widgetworks/user/johndoe?timezone=EST 922 // Translated: 923 // 924 // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST 925 PathTranslation string `json:"pathTranslation,omitempty"` 926 927 // Protocol: The protocol used for sending a request to the backend. 928 // The supported values are "http/1.1" and "h2". 929 // 930 // The default value is inferred from the scheme in the 931 // address field: 932 // 933 // SCHEME PROTOCOL 934 // http:// http/1.1 935 // https:// http/1.1 936 // grpc:// h2 937 // grpcs:// h2 938 // 939 // For secure HTTP backends (https://) that support HTTP/2, set this 940 // field 941 // to "h2" for improved performance. 942 // 943 // Configuring this field to non-default values is only supported for 944 // secure 945 // HTTP backends. This field will be ignored for all other 946 // backends. 947 // 948 // See 949 // https://www.iana.org/assignments/tls-extensiontype-valu 950 // es/tls-extensiontype-values.xhtml#alpn-protocol-ids 951 // for more details on the supported values. 952 Protocol string `json:"protocol,omitempty"` 953 954 // Selector: Selects the methods to which this rule applies. 955 // 956 // Refer to selector for syntax details. 957 Selector string `json:"selector,omitempty"` 958 959 // ForceSendFields is a list of field names (e.g. "Address") to 960 // unconditionally include in API requests. By default, fields with 961 // empty values are omitted from API requests. However, any non-pointer, 962 // non-interface field appearing in ForceSendFields will be sent to the 963 // server regardless of whether the field is empty or not. This may be 964 // used to include empty fields in Patch requests. 965 ForceSendFields []string `json:"-"` 966 967 // NullFields is a list of field names (e.g. "Address") to include in 968 // API requests with the JSON null value. By default, fields with empty 969 // values are omitted from API requests. However, any field with an 970 // empty value appearing in NullFields will be sent to the server as 971 // null. It is an error if a field in this list has a non-empty value. 972 // This may be used to include null fields in Patch requests. 973 NullFields []string `json:"-"` 974} 975 976func (s *BackendRule) MarshalJSON() ([]byte, error) { 977 type NoMethod BackendRule 978 raw := NoMethod(*s) 979 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 980} 981 982func (s *BackendRule) UnmarshalJSON(data []byte) error { 983 type NoMethod BackendRule 984 var s1 struct { 985 Deadline gensupport.JSONFloat64 `json:"deadline"` 986 MinDeadline gensupport.JSONFloat64 `json:"minDeadline"` 987 OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` 988 *NoMethod 989 } 990 s1.NoMethod = (*NoMethod)(s) 991 if err := json.Unmarshal(data, &s1); err != nil { 992 return err 993 } 994 s.Deadline = float64(s1.Deadline) 995 s.MinDeadline = float64(s1.MinDeadline) 996 s.OperationDeadline = float64(s1.OperationDeadline) 997 return nil 998} 999 1000// Billing: Billing related configuration of the service. 1001// 1002// The following example shows how to configure monitored resources and 1003// metrics 1004// for billing, `consumer_destinations` is the only supported 1005// destination and 1006// the monitored resources need at least one label 1007// key 1008// `cloud.googleapis.com/location` to indicate the location of the 1009// billing 1010// usage, using different monitored resources between monitoring and 1011// billing is 1012// recommended so they can be evolved independently: 1013// 1014// 1015// monitored_resources: 1016// - type: library.googleapis.com/billing_branch 1017// labels: 1018// - key: cloud.googleapis.com/location 1019// description: | 1020// Predefined label to support billing location restriction. 1021// - key: city 1022// description: | 1023// Custom label to define the city where the library branch is 1024// located 1025// in. 1026// - key: name 1027// description: Custom label to define the name of the library 1028// branch. 1029// metrics: 1030// - name: library.googleapis.com/book/borrowed_count 1031// metric_kind: DELTA 1032// value_type: INT64 1033// unit: "1" 1034// billing: 1035// consumer_destinations: 1036// - monitored_resource: library.googleapis.com/billing_branch 1037// metrics: 1038// - library.googleapis.com/book/borrowed_count 1039type Billing struct { 1040 // ConsumerDestinations: Billing configurations for sending metrics to 1041 // the consumer project. 1042 // There can be multiple consumer destinations per service, each one 1043 // must have 1044 // a different monitored resource type. A metric can be used in at 1045 // most 1046 // one consumer destination. 1047 ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"` 1048 1049 // ForceSendFields is a list of field names (e.g. 1050 // "ConsumerDestinations") to unconditionally include in API requests. 1051 // By default, fields with empty values are omitted from API requests. 1052 // However, any non-pointer, non-interface field appearing in 1053 // ForceSendFields will be sent to the server regardless of whether the 1054 // field is empty or not. This may be used to include empty fields in 1055 // Patch requests. 1056 ForceSendFields []string `json:"-"` 1057 1058 // NullFields is a list of field names (e.g. "ConsumerDestinations") to 1059 // include in API requests with the JSON null value. By default, fields 1060 // with empty values are omitted from API requests. However, any field 1061 // with an empty value appearing in NullFields will be sent to the 1062 // server as null. It is an error if a field in this list has a 1063 // non-empty value. This may be used to include null fields in Patch 1064 // requests. 1065 NullFields []string `json:"-"` 1066} 1067 1068func (s *Billing) MarshalJSON() ([]byte, error) { 1069 type NoMethod Billing 1070 raw := NoMethod(*s) 1071 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1072} 1073 1074// BillingDestination: Configuration of a specific billing destination 1075// (Currently only support 1076// bill against consumer project). 1077type BillingDestination struct { 1078 // Metrics: Names of the metrics to report to this billing 1079 // destination. 1080 // Each name must be defined in Service.metrics section. 1081 Metrics []string `json:"metrics,omitempty"` 1082 1083 // MonitoredResource: The monitored resource type. The type must be 1084 // defined in 1085 // Service.monitored_resources section. 1086 MonitoredResource string `json:"monitoredResource,omitempty"` 1087 1088 // ForceSendFields is a list of field names (e.g. "Metrics") to 1089 // unconditionally include in API requests. By default, fields with 1090 // empty values are omitted from API requests. However, any non-pointer, 1091 // non-interface field appearing in ForceSendFields will be sent to the 1092 // server regardless of whether the field is empty or not. This may be 1093 // used to include empty fields in Patch requests. 1094 ForceSendFields []string `json:"-"` 1095 1096 // NullFields is a list of field names (e.g. "Metrics") to include in 1097 // API requests with the JSON null value. By default, fields with empty 1098 // values are omitted from API requests. However, any field with an 1099 // empty value appearing in NullFields will be sent to the server as 1100 // null. It is an error if a field in this list has a non-empty value. 1101 // This may be used to include null fields in Patch requests. 1102 NullFields []string `json:"-"` 1103} 1104 1105func (s *BillingDestination) MarshalJSON() ([]byte, error) { 1106 type NoMethod BillingDestination 1107 raw := NoMethod(*s) 1108 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1109} 1110 1111// Binding: Associates `members` with a `role`. 1112type Binding struct { 1113 // Condition: The condition that is associated with this binding. 1114 // 1115 // If the condition evaluates to `true`, then this binding applies to 1116 // the 1117 // current request. 1118 // 1119 // If the condition evaluates to `false`, then this binding does not 1120 // apply to 1121 // the current request. However, a different role binding might grant 1122 // the same 1123 // role to one or more of the members in this binding. 1124 // 1125 // To learn which resources support conditions in their IAM policies, 1126 // see 1127 // the 1128 // [IAM 1129 // documentation](https://cloud.google.com/iam/help/conditions/r 1130 // esource-policies). 1131 Condition *Expr `json:"condition,omitempty"` 1132 1133 // Members: Specifies the identities requesting access for a Cloud 1134 // Platform resource. 1135 // `members` can have the following values: 1136 // 1137 // * `allUsers`: A special identifier that represents anyone who is 1138 // on the internet; with or without a Google account. 1139 // 1140 // * `allAuthenticatedUsers`: A special identifier that represents 1141 // anyone 1142 // who is authenticated with a Google account or a service 1143 // account. 1144 // 1145 // * `user:{emailid}`: An email address that represents a specific 1146 // Google 1147 // account. For example, `alice@example.com` . 1148 // 1149 // 1150 // * `serviceAccount:{emailid}`: An email address that represents a 1151 // service 1152 // account. For example, 1153 // `my-other-app@appspot.gserviceaccount.com`. 1154 // 1155 // * `group:{emailid}`: An email address that represents a Google 1156 // group. 1157 // For example, `admins@example.com`. 1158 // 1159 // * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 1160 // unique 1161 // identifier) representing a user that has been recently deleted. 1162 // For 1163 // example, `alice@example.com?uid=123456789012345678901`. If the 1164 // user is 1165 // recovered, this value reverts to `user:{emailid}` and the 1166 // recovered user 1167 // retains the role in the binding. 1168 // 1169 // * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address 1170 // (plus 1171 // unique identifier) representing a service account that has been 1172 // recently 1173 // deleted. For example, 1174 // 1175 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. 1176 // 1177 // If the service account is undeleted, this value reverts to 1178 // `serviceAccount:{emailid}` and the undeleted service account 1179 // retains the 1180 // role in the binding. 1181 // 1182 // * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus 1183 // unique 1184 // identifier) representing a Google group that has been recently 1185 // deleted. For example, 1186 // `admins@example.com?uid=123456789012345678901`. If 1187 // the group is recovered, this value reverts to `group:{emailid}` 1188 // and the 1189 // recovered group retains the role in the binding. 1190 // 1191 // 1192 // * `domain:{domain}`: The G Suite domain (primary) that represents all 1193 // the 1194 // users of that domain. For example, `google.com` or 1195 // `example.com`. 1196 // 1197 // 1198 Members []string `json:"members,omitempty"` 1199 1200 // Role: Role that is assigned to `members`. 1201 // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1202 Role string `json:"role,omitempty"` 1203 1204 // ForceSendFields is a list of field names (e.g. "Condition") to 1205 // unconditionally include in API requests. By default, fields with 1206 // empty values are omitted from API requests. However, any non-pointer, 1207 // non-interface field appearing in ForceSendFields will be sent to the 1208 // server regardless of whether the field is empty or not. This may be 1209 // used to include empty fields in Patch requests. 1210 ForceSendFields []string `json:"-"` 1211 1212 // NullFields is a list of field names (e.g. "Condition") to include in 1213 // API requests with the JSON null value. By default, fields with empty 1214 // values are omitted from API requests. However, any field with an 1215 // empty value appearing in NullFields will be sent to the server as 1216 // null. It is an error if a field in this list has a non-empty value. 1217 // This may be used to include null fields in Patch requests. 1218 NullFields []string `json:"-"` 1219} 1220 1221func (s *Binding) MarshalJSON() ([]byte, error) { 1222 type NoMethod Binding 1223 raw := NoMethod(*s) 1224 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1225} 1226 1227// ChangeReport: Change report associated with a particular service 1228// configuration. 1229// 1230// It contains a list of ConfigChanges based on the comparison 1231// between 1232// two service configurations. 1233type ChangeReport struct { 1234 // ConfigChanges: List of changes between two service 1235 // configurations. 1236 // The changes will be alphabetically sorted based on the identifier 1237 // of each change. 1238 // A ConfigChange identifier is a dot separated path to the 1239 // configuration. 1240 // Example: 1241 // visibility.rules[selector='LibraryService.CreateBook'].restriction 1242 ConfigChanges []*ConfigChange `json:"configChanges,omitempty"` 1243 1244 // ForceSendFields is a list of field names (e.g. "ConfigChanges") to 1245 // unconditionally include in API requests. By default, fields with 1246 // empty values are omitted from API requests. However, any non-pointer, 1247 // non-interface field appearing in ForceSendFields will be sent to the 1248 // server regardless of whether the field is empty or not. This may be 1249 // used to include empty fields in Patch requests. 1250 ForceSendFields []string `json:"-"` 1251 1252 // NullFields is a list of field names (e.g. "ConfigChanges") to include 1253 // in API requests with the JSON null value. By default, fields with 1254 // empty values are omitted from API requests. However, any field with 1255 // an empty value appearing in NullFields will be sent to the server as 1256 // null. It is an error if a field in this list has a non-empty value. 1257 // This may be used to include null fields in Patch requests. 1258 NullFields []string `json:"-"` 1259} 1260 1261func (s *ChangeReport) MarshalJSON() ([]byte, error) { 1262 type NoMethod ChangeReport 1263 raw := NoMethod(*s) 1264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1265} 1266 1267// ConfigChange: Output generated from semantically comparing two 1268// versions of a service 1269// configuration. 1270// 1271// Includes detailed information about a field that have changed 1272// with 1273// applicable advice about potential consequences for the change, such 1274// as 1275// backwards-incompatibility. 1276type ConfigChange struct { 1277 // Advices: Collection of advice provided for this change, useful for 1278 // determining the 1279 // possible impact of this change. 1280 Advices []*Advice `json:"advices,omitempty"` 1281 1282 // ChangeType: The type for this change, either ADDED, REMOVED, or 1283 // MODIFIED. 1284 // 1285 // Possible values: 1286 // "CHANGE_TYPE_UNSPECIFIED" - No value was provided. 1287 // "ADDED" - The changed object exists in the 'new' service 1288 // configuration, but not 1289 // in the 'old' service configuration. 1290 // "REMOVED" - The changed object exists in the 'old' service 1291 // configuration, but not 1292 // in the 'new' service configuration. 1293 // "MODIFIED" - The changed object exists in both service 1294 // configurations, but its value 1295 // is different. 1296 ChangeType string `json:"changeType,omitempty"` 1297 1298 // Element: Object hierarchy path to the change, with levels separated 1299 // by a '.' 1300 // character. For repeated fields, an applicable unique identifier field 1301 // is 1302 // used for the index (usually selector, name, or id). For maps, the 1303 // term 1304 // 'key' is used. If the field has no unique identifier, the numeric 1305 // index 1306 // is used. 1307 // Examples: 1308 // - 1309 // visibility.rules[selector=="google.LibraryService.ListBooks"].restrict 1310 // ion 1311 // - 1312 // quota.metric_rules[selector=="google"].metric_costs[key=="reads"].valu 1313 // e 1314 // - logging.producer_destinations[0] 1315 Element string `json:"element,omitempty"` 1316 1317 // NewValue: Value of the changed object in the new Service 1318 // configuration, 1319 // in JSON format. This field will not be populated if ChangeType == 1320 // REMOVED. 1321 NewValue string `json:"newValue,omitempty"` 1322 1323 // OldValue: Value of the changed object in the old Service 1324 // configuration, 1325 // in JSON format. This field will not be populated if ChangeType == 1326 // ADDED. 1327 OldValue string `json:"oldValue,omitempty"` 1328 1329 // ForceSendFields is a list of field names (e.g. "Advices") to 1330 // unconditionally include in API requests. By default, fields with 1331 // empty values are omitted from API requests. However, any non-pointer, 1332 // non-interface field appearing in ForceSendFields will be sent to the 1333 // server regardless of whether the field is empty or not. This may be 1334 // used to include empty fields in Patch requests. 1335 ForceSendFields []string `json:"-"` 1336 1337 // NullFields is a list of field names (e.g. "Advices") to include in 1338 // API requests with the JSON null value. By default, fields with empty 1339 // values are omitted from API requests. However, any field with an 1340 // empty value appearing in NullFields will be sent to the server as 1341 // null. It is an error if a field in this list has a non-empty value. 1342 // This may be used to include null fields in Patch requests. 1343 NullFields []string `json:"-"` 1344} 1345 1346func (s *ConfigChange) MarshalJSON() ([]byte, error) { 1347 type NoMethod ConfigChange 1348 raw := NoMethod(*s) 1349 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1350} 1351 1352// ConfigFile: Generic specification of a source configuration file 1353type ConfigFile struct { 1354 // FileContents: The bytes that constitute the file. 1355 FileContents string `json:"fileContents,omitempty"` 1356 1357 // FilePath: The file name of the configuration file (full or relative 1358 // path). 1359 FilePath string `json:"filePath,omitempty"` 1360 1361 // FileType: The type of configuration file this represents. 1362 // 1363 // Possible values: 1364 // "FILE_TYPE_UNSPECIFIED" - Unknown file type. 1365 // "SERVICE_CONFIG_YAML" - YAML-specification of service. 1366 // "OPEN_API_JSON" - OpenAPI specification, serialized in JSON. 1367 // "OPEN_API_YAML" - OpenAPI specification, serialized in YAML. 1368 // "FILE_DESCRIPTOR_SET_PROTO" - FileDescriptorSet, generated by 1369 // protoc. 1370 // 1371 // To generate, use protoc with imports and source info included. 1372 // For an example test.proto file, the following command would put the 1373 // value 1374 // in a new file named out.pb. 1375 // 1376 // $protoc --include_imports --include_source_info test.proto -o out.pb 1377 // "PROTO_FILE" - Uncompiled Proto file. Used for storage and display 1378 // purposes only, 1379 // currently server-side compilation is not supported. Should match 1380 // the 1381 // inputs to 'protoc' command used to generated 1382 // FILE_DESCRIPTOR_SET_PROTO. A 1383 // file of this type can only be included if at least one file of 1384 // type 1385 // FILE_DESCRIPTOR_SET_PROTO is included. 1386 FileType string `json:"fileType,omitempty"` 1387 1388 // ForceSendFields is a list of field names (e.g. "FileContents") to 1389 // unconditionally include in API requests. By default, fields with 1390 // empty values are omitted from API requests. However, any non-pointer, 1391 // non-interface field appearing in ForceSendFields will be sent to the 1392 // server regardless of whether the field is empty or not. This may be 1393 // used to include empty fields in Patch requests. 1394 ForceSendFields []string `json:"-"` 1395 1396 // NullFields is a list of field names (e.g. "FileContents") to include 1397 // in API requests with the JSON null value. By default, fields with 1398 // empty values are omitted from API requests. However, any field with 1399 // an empty value appearing in NullFields will be sent to the server as 1400 // null. It is an error if a field in this list has a non-empty value. 1401 // This may be used to include null fields in Patch requests. 1402 NullFields []string `json:"-"` 1403} 1404 1405func (s *ConfigFile) MarshalJSON() ([]byte, error) { 1406 type NoMethod ConfigFile 1407 raw := NoMethod(*s) 1408 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1409} 1410 1411// ConfigRef: Represents a service configuration with its name and id. 1412type ConfigRef struct { 1413 // Name: Resource name of a service config. It must have the 1414 // following 1415 // format: "services/{service name}/configs/{config id}". 1416 Name string `json:"name,omitempty"` 1417 1418 // ForceSendFields is a list of field names (e.g. "Name") to 1419 // unconditionally include in API requests. By default, fields with 1420 // empty values are omitted from API requests. However, any non-pointer, 1421 // non-interface field appearing in ForceSendFields will be sent to the 1422 // server regardless of whether the field is empty or not. This may be 1423 // used to include empty fields in Patch requests. 1424 ForceSendFields []string `json:"-"` 1425 1426 // NullFields is a list of field names (e.g. "Name") to include in API 1427 // requests with the JSON null value. By default, fields with empty 1428 // values are omitted from API requests. However, any field with an 1429 // empty value appearing in NullFields will be sent to the server as 1430 // null. It is an error if a field in this list has a non-empty value. 1431 // This may be used to include null fields in Patch requests. 1432 NullFields []string `json:"-"` 1433} 1434 1435func (s *ConfigRef) MarshalJSON() ([]byte, error) { 1436 type NoMethod ConfigRef 1437 raw := NoMethod(*s) 1438 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1439} 1440 1441// ConfigSource: Represents a source file which is used to generate the 1442// service configuration 1443// defined by `google.api.Service`. 1444type ConfigSource struct { 1445 // Files: Set of source configuration files that are used to generate a 1446 // service 1447 // configuration (`google.api.Service`). 1448 Files []*ConfigFile `json:"files,omitempty"` 1449 1450 // Id: A unique ID for a specific instance of this message, typically 1451 // assigned 1452 // by the client for tracking purpose. If empty, the server may choose 1453 // to 1454 // generate one instead. 1455 Id string `json:"id,omitempty"` 1456 1457 // ForceSendFields is a list of field names (e.g. "Files") to 1458 // unconditionally include in API requests. By default, fields with 1459 // empty values are omitted from API requests. However, any non-pointer, 1460 // non-interface field appearing in ForceSendFields will be sent to the 1461 // server regardless of whether the field is empty or not. This may be 1462 // used to include empty fields in Patch requests. 1463 ForceSendFields []string `json:"-"` 1464 1465 // NullFields is a list of field names (e.g. "Files") to include in API 1466 // requests with the JSON null value. By default, fields with empty 1467 // values are omitted from API requests. However, any field with an 1468 // empty value appearing in NullFields will be sent to the server as 1469 // null. It is an error if a field in this list has a non-empty value. 1470 // This may be used to include null fields in Patch requests. 1471 NullFields []string `json:"-"` 1472} 1473 1474func (s *ConfigSource) MarshalJSON() ([]byte, error) { 1475 type NoMethod ConfigSource 1476 raw := NoMethod(*s) 1477 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1478} 1479 1480// Context: `Context` defines which contexts an API 1481// requests. 1482// 1483// Example: 1484// 1485// context: 1486// rules: 1487// - selector: "*" 1488// requested: 1489// - google.rpc.context.ProjectContext 1490// - google.rpc.context.OriginContext 1491// 1492// The above specifies that all methods in the API 1493// request 1494// `google.rpc.context.ProjectContext` 1495// and 1496// `google.rpc.context.OriginContext`. 1497// 1498// Available context types are defined in 1499// package 1500// `google.rpc.context`. 1501// 1502// This also provides mechanism to whitelist any protobuf message 1503// extension that 1504// can be sent in grpc metadata using 1505// “x-goog-ext-<extension_id>-bin” 1506// and 1507// “x-goog-ext-<extension_id>-jspb” format. For example, list any 1508// service 1509// specific protobuf types that can appear in grpc metadata as follows 1510// in your 1511// yaml file: 1512// 1513// Example: 1514// 1515// context: 1516// rules: 1517// - selector: 1518// "google.example.library.v1.LibraryService.CreateBook" 1519// allowed_request_extensions: 1520// - google.foo.v1.NewExtension 1521// allowed_response_extensions: 1522// - google.foo.v1.NewExtension 1523// 1524// You can also specify extension ID instead of fully qualified 1525// extension name 1526// here. 1527type Context struct { 1528 // Rules: A list of RPC context rules that apply to individual API 1529 // methods. 1530 // 1531 // **NOTE:** All service configuration rules follow "last one wins" 1532 // order. 1533 Rules []*ContextRule `json:"rules,omitempty"` 1534 1535 // ForceSendFields is a list of field names (e.g. "Rules") to 1536 // unconditionally include in API requests. By default, fields with 1537 // empty values are omitted from API requests. However, any non-pointer, 1538 // non-interface field appearing in ForceSendFields will be sent to the 1539 // server regardless of whether the field is empty or not. This may be 1540 // used to include empty fields in Patch requests. 1541 ForceSendFields []string `json:"-"` 1542 1543 // NullFields is a list of field names (e.g. "Rules") to include in API 1544 // requests with the JSON null value. By default, fields with empty 1545 // values are omitted from API requests. However, any field with an 1546 // empty value appearing in NullFields will be sent to the server as 1547 // null. It is an error if a field in this list has a non-empty value. 1548 // This may be used to include null fields in Patch requests. 1549 NullFields []string `json:"-"` 1550} 1551 1552func (s *Context) MarshalJSON() ([]byte, error) { 1553 type NoMethod Context 1554 raw := NoMethod(*s) 1555 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1556} 1557 1558// ContextRule: A context rule provides information about the context 1559// for an individual API 1560// element. 1561type ContextRule struct { 1562 // AllowedRequestExtensions: A list of full type names or extension IDs 1563 // of extensions allowed in grpc 1564 // side channel from client to backend. 1565 AllowedRequestExtensions []string `json:"allowedRequestExtensions,omitempty"` 1566 1567 // AllowedResponseExtensions: A list of full type names or extension IDs 1568 // of extensions allowed in grpc 1569 // side channel from backend to client. 1570 AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` 1571 1572 // Provided: A list of full type names of provided contexts. 1573 Provided []string `json:"provided,omitempty"` 1574 1575 // Requested: A list of full type names of requested contexts. 1576 Requested []string `json:"requested,omitempty"` 1577 1578 // Selector: Selects the methods to which this rule applies. 1579 // 1580 // Refer to selector for syntax details. 1581 Selector string `json:"selector,omitempty"` 1582 1583 // ForceSendFields is a list of field names (e.g. 1584 // "AllowedRequestExtensions") to unconditionally include in API 1585 // requests. By default, fields with empty values are omitted from API 1586 // requests. However, any non-pointer, non-interface field appearing in 1587 // ForceSendFields will be sent to the server regardless of whether the 1588 // field is empty or not. This may be used to include empty fields in 1589 // Patch requests. 1590 ForceSendFields []string `json:"-"` 1591 1592 // NullFields is a list of field names (e.g. "AllowedRequestExtensions") 1593 // to include in API requests with the JSON null value. By default, 1594 // fields with empty values are omitted from API requests. However, any 1595 // field with an empty value appearing in NullFields will be sent to the 1596 // server as null. It is an error if a field in this list has a 1597 // non-empty value. This may be used to include null fields in Patch 1598 // requests. 1599 NullFields []string `json:"-"` 1600} 1601 1602func (s *ContextRule) MarshalJSON() ([]byte, error) { 1603 type NoMethod ContextRule 1604 raw := NoMethod(*s) 1605 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1606} 1607 1608// Control: Selects and configures the service controller used by the 1609// service. The 1610// service controller handles features like abuse, quota, billing, 1611// logging, 1612// monitoring, etc. 1613type Control struct { 1614 // Environment: The service control environment to use. If empty, no 1615 // control plane 1616 // feature (like quota and billing) will be enabled. 1617 Environment string `json:"environment,omitempty"` 1618 1619 // ForceSendFields is a list of field names (e.g. "Environment") to 1620 // unconditionally include in API requests. By default, fields with 1621 // empty values are omitted from API requests. However, any non-pointer, 1622 // non-interface field appearing in ForceSendFields will be sent to the 1623 // server regardless of whether the field is empty or not. This may be 1624 // used to include empty fields in Patch requests. 1625 ForceSendFields []string `json:"-"` 1626 1627 // NullFields is a list of field names (e.g. "Environment") to include 1628 // in API requests with the JSON null value. By default, fields with 1629 // empty values are omitted from API requests. However, any field with 1630 // an empty value appearing in NullFields will be sent to the server as 1631 // null. It is an error if a field in this list has a non-empty value. 1632 // This may be used to include null fields in Patch requests. 1633 NullFields []string `json:"-"` 1634} 1635 1636func (s *Control) MarshalJSON() ([]byte, error) { 1637 type NoMethod Control 1638 raw := NoMethod(*s) 1639 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1640} 1641 1642// CustomError: Customize service error responses. For example, list 1643// any service 1644// specific protobuf types that can appear in error detail lists 1645// of 1646// error responses. 1647// 1648// Example: 1649// 1650// custom_error: 1651// types: 1652// - google.foo.v1.CustomError 1653// - google.foo.v1.AnotherError 1654type CustomError struct { 1655 // Rules: The list of custom error rules that apply to individual API 1656 // messages. 1657 // 1658 // **NOTE:** All service configuration rules follow "last one wins" 1659 // order. 1660 Rules []*CustomErrorRule `json:"rules,omitempty"` 1661 1662 // Types: The list of custom error detail types, e.g. 1663 // 'google.foo.v1.CustomError'. 1664 Types []string `json:"types,omitempty"` 1665 1666 // ForceSendFields is a list of field names (e.g. "Rules") to 1667 // unconditionally include in API requests. By default, fields with 1668 // empty values are omitted from API requests. However, any non-pointer, 1669 // non-interface field appearing in ForceSendFields will be sent to the 1670 // server regardless of whether the field is empty or not. This may be 1671 // used to include empty fields in Patch requests. 1672 ForceSendFields []string `json:"-"` 1673 1674 // NullFields is a list of field names (e.g. "Rules") to include in API 1675 // requests with the JSON null value. By default, fields with empty 1676 // values are omitted from API requests. However, any field with an 1677 // empty value appearing in NullFields will be sent to the server as 1678 // null. It is an error if a field in this list has a non-empty value. 1679 // This may be used to include null fields in Patch requests. 1680 NullFields []string `json:"-"` 1681} 1682 1683func (s *CustomError) MarshalJSON() ([]byte, error) { 1684 type NoMethod CustomError 1685 raw := NoMethod(*s) 1686 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1687} 1688 1689// CustomErrorRule: A custom error rule. 1690type CustomErrorRule struct { 1691 // IsErrorType: Mark this message as possible payload in error response. 1692 // Otherwise, 1693 // objects of this type will be filtered when they appear in error 1694 // payload. 1695 IsErrorType bool `json:"isErrorType,omitempty"` 1696 1697 // Selector: Selects messages to which this rule applies. 1698 // 1699 // Refer to selector for syntax details. 1700 Selector string `json:"selector,omitempty"` 1701 1702 // ForceSendFields is a list of field names (e.g. "IsErrorType") to 1703 // unconditionally include in API requests. By default, fields with 1704 // empty values are omitted from API requests. However, any non-pointer, 1705 // non-interface field appearing in ForceSendFields will be sent to the 1706 // server regardless of whether the field is empty or not. This may be 1707 // used to include empty fields in Patch requests. 1708 ForceSendFields []string `json:"-"` 1709 1710 // NullFields is a list of field names (e.g. "IsErrorType") to include 1711 // in API requests with the JSON null value. By default, fields with 1712 // empty values are omitted from API requests. However, any field with 1713 // an empty value appearing in NullFields will be sent to the server as 1714 // null. It is an error if a field in this list has a non-empty value. 1715 // This may be used to include null fields in Patch requests. 1716 NullFields []string `json:"-"` 1717} 1718 1719func (s *CustomErrorRule) MarshalJSON() ([]byte, error) { 1720 type NoMethod CustomErrorRule 1721 raw := NoMethod(*s) 1722 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1723} 1724 1725// CustomHttpPattern: A custom pattern is used for defining custom HTTP 1726// verb. 1727type CustomHttpPattern struct { 1728 // Kind: The name of this custom HTTP verb. 1729 Kind string `json:"kind,omitempty"` 1730 1731 // Path: The path matched by this custom verb. 1732 Path string `json:"path,omitempty"` 1733 1734 // ForceSendFields is a list of field names (e.g. "Kind") to 1735 // unconditionally include in API requests. By default, fields with 1736 // empty values are omitted from API requests. However, any non-pointer, 1737 // non-interface field appearing in ForceSendFields will be sent to the 1738 // server regardless of whether the field is empty or not. This may be 1739 // used to include empty fields in Patch requests. 1740 ForceSendFields []string `json:"-"` 1741 1742 // NullFields is a list of field names (e.g. "Kind") to include in API 1743 // requests with the JSON null value. By default, fields with empty 1744 // values are omitted from API requests. However, any field with an 1745 // empty value appearing in NullFields will be sent to the server as 1746 // null. It is an error if a field in this list has a non-empty value. 1747 // This may be used to include null fields in Patch requests. 1748 NullFields []string `json:"-"` 1749} 1750 1751func (s *CustomHttpPattern) MarshalJSON() ([]byte, error) { 1752 type NoMethod CustomHttpPattern 1753 raw := NoMethod(*s) 1754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1755} 1756 1757// DeleteServiceStrategy: Strategy used to delete a service. This 1758// strategy is a placeholder only 1759// used by the system generated rollout to delete a service. 1760type DeleteServiceStrategy struct { 1761} 1762 1763// Diagnostic: Represents a diagnostic message (error or warning) 1764type Diagnostic struct { 1765 // Kind: The kind of diagnostic information provided. 1766 // 1767 // Possible values: 1768 // "WARNING" - Warnings and errors 1769 // "ERROR" - Only errors 1770 Kind string `json:"kind,omitempty"` 1771 1772 // Location: File name and line number of the error or warning. 1773 Location string `json:"location,omitempty"` 1774 1775 // Message: Message describing the error or warning. 1776 Message string `json:"message,omitempty"` 1777 1778 // ForceSendFields is a list of field names (e.g. "Kind") to 1779 // unconditionally include in API requests. By default, fields with 1780 // empty values are omitted from API requests. However, any non-pointer, 1781 // non-interface field appearing in ForceSendFields will be sent to the 1782 // server regardless of whether the field is empty or not. This may be 1783 // used to include empty fields in Patch requests. 1784 ForceSendFields []string `json:"-"` 1785 1786 // NullFields is a list of field names (e.g. "Kind") to include in API 1787 // requests with the JSON null value. By default, fields with empty 1788 // values are omitted from API requests. However, any field with an 1789 // empty value appearing in NullFields will be sent to the server as 1790 // null. It is an error if a field in this list has a non-empty value. 1791 // This may be used to include null fields in Patch requests. 1792 NullFields []string `json:"-"` 1793} 1794 1795func (s *Diagnostic) MarshalJSON() ([]byte, error) { 1796 type NoMethod Diagnostic 1797 raw := NoMethod(*s) 1798 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1799} 1800 1801// DisableServiceRequest: Request message for DisableService method. 1802type DisableServiceRequest struct { 1803 // ConsumerId: Required. The identity of consumer resource which service 1804 // disablement will be 1805 // applied to. 1806 // 1807 // The Google Service Management implementation accepts the 1808 // following 1809 // forms: 1810 // - "project:<project_id>" 1811 // 1812 // Note: this is made compatible 1813 // with 1814 // google.api.servicecontrol.v1.Operation.consumer_id. 1815 ConsumerId string `json:"consumerId,omitempty"` 1816 1817 // ForceSendFields is a list of field names (e.g. "ConsumerId") to 1818 // unconditionally include in API requests. By default, fields with 1819 // empty values are omitted from API requests. However, any non-pointer, 1820 // non-interface field appearing in ForceSendFields will be sent to the 1821 // server regardless of whether the field is empty or not. This may be 1822 // used to include empty fields in Patch requests. 1823 ForceSendFields []string `json:"-"` 1824 1825 // NullFields is a list of field names (e.g. "ConsumerId") to include in 1826 // API requests with the JSON null value. By default, fields with empty 1827 // values are omitted from API requests. However, any field with an 1828 // empty value appearing in NullFields will be sent to the server as 1829 // null. It is an error if a field in this list has a non-empty value. 1830 // This may be used to include null fields in Patch requests. 1831 NullFields []string `json:"-"` 1832} 1833 1834func (s *DisableServiceRequest) MarshalJSON() ([]byte, error) { 1835 type NoMethod DisableServiceRequest 1836 raw := NoMethod(*s) 1837 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1838} 1839 1840// DisableServiceResponse: Operation payload for DisableService method. 1841type DisableServiceResponse struct { 1842} 1843 1844// Documentation: `Documentation` provides the information for 1845// describing a service. 1846// 1847// Example: 1848// <pre><code>documentation: 1849// summary: > 1850// The Google Calendar API gives access 1851// to most calendar features. 1852// pages: 1853// - name: Overview 1854// content: (== include google/foo/overview.md ==) 1855// - name: Tutorial 1856// content: (== include google/foo/tutorial.md ==) 1857// subpages; 1858// - name: Java 1859// content: (== include google/foo/tutorial_java.md ==) 1860// rules: 1861// - selector: google.calendar.Calendar.Get 1862// description: > 1863// ... 1864// - selector: google.calendar.Calendar.Put 1865// description: > 1866// ... 1867// </code></pre> 1868// Documentation is provided in markdown syntax. In addition to 1869// standard markdown features, definition lists, tables and fenced 1870// code blocks are supported. Section headers can be provided and 1871// are 1872// interpreted relative to the section nesting of the context where 1873// a documentation fragment is embedded. 1874// 1875// Documentation from the IDL is merged with documentation defined 1876// via the config at normalization time, where documentation provided 1877// by config rules overrides IDL provided. 1878// 1879// A number of constructs specific to the API platform are supported 1880// in documentation text. 1881// 1882// In order to reference a proto element, the following 1883// notation can be 1884// used: 1885// <pre><code>[fully.qualified.proto.name][]</code></pre> 1886// T 1887// o override the display text used for the link, this can be 1888// used: 1889// <pre><code>[display 1890// text][fully.qualified.proto.name]</code></pre> 1891// Text can be excluded from doc using the following 1892// notation: 1893// <pre><code>(-- internal comment --)</code></pre> 1894// 1895// A few directives are available in documentation. Note that 1896// directives must appear on a single line to be properly 1897// identified. The `include` directive includes a markdown file from 1898// an external source: 1899// <pre><code>(== include path/to/file ==)</code></pre> 1900// The `resource_for` directive marks a message to be the resource of 1901// a collection in REST view. If it is not specified, tools attempt 1902// to infer the resource from the operations in a 1903// collection: 1904// <pre><code>(== resource_for v1.shelves.books 1905// ==)</code></pre> 1906// The directive `suppress_warning` does not directly affect 1907// documentation 1908// and is documented together with service config validation. 1909type Documentation struct { 1910 // DocumentationRootUrl: The URL to the root of documentation. 1911 DocumentationRootUrl string `json:"documentationRootUrl,omitempty"` 1912 1913 // Overview: Declares a single overview page. For 1914 // example: 1915 // <pre><code>documentation: 1916 // summary: ... 1917 // overview: (== include overview.md ==) 1918 // </code></pre> 1919 // This is a shortcut for the following declaration (using pages 1920 // style): 1921 // <pre><code>documentation: 1922 // summary: ... 1923 // pages: 1924 // - name: Overview 1925 // content: (== include overview.md ==) 1926 // </code></pre> 1927 // Note: you cannot specify both `overview` field and `pages` field. 1928 Overview string `json:"overview,omitempty"` 1929 1930 // Pages: The top level pages for the documentation set. 1931 Pages []*Page `json:"pages,omitempty"` 1932 1933 // Rules: A list of documentation rules that apply to individual API 1934 // elements. 1935 // 1936 // **NOTE:** All service configuration rules follow "last one wins" 1937 // order. 1938 Rules []*DocumentationRule `json:"rules,omitempty"` 1939 1940 // ServiceRootUrl: Specifies the service root url if the default one 1941 // (the service name 1942 // from the yaml file) is not suitable. This can be seen in any 1943 // fully 1944 // specified service urls as well as sections that show a base that 1945 // other 1946 // urls are relative to. 1947 ServiceRootUrl string `json:"serviceRootUrl,omitempty"` 1948 1949 // Summary: A short summary of what the service does. Can only be 1950 // provided by 1951 // plain text. 1952 Summary string `json:"summary,omitempty"` 1953 1954 // ForceSendFields is a list of field names (e.g. 1955 // "DocumentationRootUrl") to unconditionally include in API requests. 1956 // By default, fields with empty values are omitted from API requests. 1957 // However, any non-pointer, non-interface field appearing in 1958 // ForceSendFields will be sent to the server regardless of whether the 1959 // field is empty or not. This may be used to include empty fields in 1960 // Patch requests. 1961 ForceSendFields []string `json:"-"` 1962 1963 // NullFields is a list of field names (e.g. "DocumentationRootUrl") to 1964 // include in API requests with the JSON null value. By default, fields 1965 // with empty values are omitted from API requests. However, any field 1966 // with an empty value appearing in NullFields will be sent to the 1967 // server as null. It is an error if a field in this list has a 1968 // non-empty value. This may be used to include null fields in Patch 1969 // requests. 1970 NullFields []string `json:"-"` 1971} 1972 1973func (s *Documentation) MarshalJSON() ([]byte, error) { 1974 type NoMethod Documentation 1975 raw := NoMethod(*s) 1976 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1977} 1978 1979// DocumentationRule: A documentation rule provides information about 1980// individual API elements. 1981type DocumentationRule struct { 1982 // DeprecationDescription: Deprecation description of the selected 1983 // element(s). It can be provided if 1984 // an element is marked as `deprecated`. 1985 DeprecationDescription string `json:"deprecationDescription,omitempty"` 1986 1987 // Description: Description of the selected API(s). 1988 Description string `json:"description,omitempty"` 1989 1990 // Selector: The selector is a comma-separated list of patterns. Each 1991 // pattern is a 1992 // qualified name of the element which may end in "*", indicating a 1993 // wildcard. 1994 // Wildcards are only allowed at the end and for a whole component of 1995 // the 1996 // qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". 1997 // A 1998 // wildcard will match one or more components. To specify a default for 1999 // all 2000 // applicable elements, the whole pattern "*" is used. 2001 Selector string `json:"selector,omitempty"` 2002 2003 // ForceSendFields is a list of field names (e.g. 2004 // "DeprecationDescription") to unconditionally include in API requests. 2005 // By default, fields with empty values are omitted from API requests. 2006 // However, any non-pointer, non-interface field appearing in 2007 // ForceSendFields will be sent to the server regardless of whether the 2008 // field is empty or not. This may be used to include empty fields in 2009 // Patch requests. 2010 ForceSendFields []string `json:"-"` 2011 2012 // NullFields is a list of field names (e.g. "DeprecationDescription") 2013 // to include in API requests with the JSON null value. By default, 2014 // fields with empty values are omitted from API requests. However, any 2015 // field with an empty value appearing in NullFields will be sent to the 2016 // server as null. It is an error if a field in this list has a 2017 // non-empty value. This may be used to include null fields in Patch 2018 // requests. 2019 NullFields []string `json:"-"` 2020} 2021 2022func (s *DocumentationRule) MarshalJSON() ([]byte, error) { 2023 type NoMethod DocumentationRule 2024 raw := NoMethod(*s) 2025 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2026} 2027 2028// EnableServiceRequest: Request message for EnableService method. 2029type EnableServiceRequest struct { 2030 // ConsumerId: Required. The identity of consumer resource which service 2031 // enablement will be 2032 // applied to. 2033 // 2034 // The Google Service Management implementation accepts the 2035 // following 2036 // forms: 2037 // - "project:<project_id>" 2038 // 2039 // Note: this is made compatible 2040 // with 2041 // google.api.servicecontrol.v1.Operation.consumer_id. 2042 ConsumerId string `json:"consumerId,omitempty"` 2043 2044 // ForceSendFields is a list of field names (e.g. "ConsumerId") to 2045 // unconditionally include in API requests. By default, fields with 2046 // empty values are omitted from API requests. However, any non-pointer, 2047 // non-interface field appearing in ForceSendFields will be sent to the 2048 // server regardless of whether the field is empty or not. This may be 2049 // used to include empty fields in Patch requests. 2050 ForceSendFields []string `json:"-"` 2051 2052 // NullFields is a list of field names (e.g. "ConsumerId") to include in 2053 // API requests with the JSON null value. By default, fields with empty 2054 // values are omitted from API requests. However, any field with an 2055 // empty value appearing in NullFields will be sent to the server as 2056 // null. It is an error if a field in this list has a non-empty value. 2057 // This may be used to include null fields in Patch requests. 2058 NullFields []string `json:"-"` 2059} 2060 2061func (s *EnableServiceRequest) MarshalJSON() ([]byte, error) { 2062 type NoMethod EnableServiceRequest 2063 raw := NoMethod(*s) 2064 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2065} 2066 2067// EnableServiceResponse: Operation payload for EnableService method. 2068type EnableServiceResponse struct { 2069} 2070 2071// Endpoint: `Endpoint` describes a network endpoint that serves a set 2072// of APIs. 2073// A service may expose any number of endpoints, and all endpoints share 2074// the 2075// same service configuration, such as quota configuration and 2076// monitoring 2077// configuration. 2078// 2079// Example service configuration: 2080// 2081// name: library-example.googleapis.com 2082// endpoints: 2083// # Below entry makes 'google.example.library.v1.Library' 2084// # API be served from endpoint address 2085// library-example.googleapis.com. 2086// # It also allows HTTP OPTIONS calls to be passed to the 2087// backend, for 2088// # it to decide whether the subsequent cross-origin request is 2089// # allowed to proceed. 2090// - name: library-example.googleapis.com 2091// allow_cors: true 2092type Endpoint struct { 2093 // Aliases: DEPRECATED: This field is no longer supported. Instead of 2094 // using aliases, 2095 // please specify multiple google.api.Endpoint for each of the 2096 // intended 2097 // aliases. 2098 // 2099 // Additional names that this endpoint will be hosted on. 2100 Aliases []string `json:"aliases,omitempty"` 2101 2102 // AllowCors: 2103 // Allowing 2104 // [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sh 2105 // aring), aka 2106 // cross-domain traffic, would allow the backends served from this 2107 // endpoint to 2108 // receive and respond to HTTP OPTIONS requests. The response will be 2109 // used by 2110 // the browser to determine whether the subsequent cross-origin request 2111 // is 2112 // allowed to proceed. 2113 AllowCors bool `json:"allowCors,omitempty"` 2114 2115 // Name: The canonical name of this endpoint. 2116 Name string `json:"name,omitempty"` 2117 2118 // Target: The specification of an Internet routable address of API 2119 // frontend that will 2120 // handle requests to this 2121 // [API 2122 // Endpoint](https://cloud.google.com/apis/design/glossary). It should 2123 // be 2124 // either a valid IPv4 address or a fully-qualified domain name. For 2125 // example, 2126 // "8.8.8.8" or "myservice.appspot.com". 2127 Target string `json:"target,omitempty"` 2128 2129 // ForceSendFields is a list of field names (e.g. "Aliases") to 2130 // unconditionally include in API requests. By default, fields with 2131 // empty values are omitted from API requests. However, any non-pointer, 2132 // non-interface field appearing in ForceSendFields will be sent to the 2133 // server regardless of whether the field is empty or not. This may be 2134 // used to include empty fields in Patch requests. 2135 ForceSendFields []string `json:"-"` 2136 2137 // NullFields is a list of field names (e.g. "Aliases") to include in 2138 // API requests with the JSON null value. By default, fields with empty 2139 // values are omitted from API requests. However, any field with an 2140 // empty value appearing in NullFields will be sent to the server as 2141 // null. It is an error if a field in this list has a non-empty value. 2142 // This may be used to include null fields in Patch requests. 2143 NullFields []string `json:"-"` 2144} 2145 2146func (s *Endpoint) MarshalJSON() ([]byte, error) { 2147 type NoMethod Endpoint 2148 raw := NoMethod(*s) 2149 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2150} 2151 2152// Enum: Enum type definition. 2153type Enum struct { 2154 // Enumvalue: Enum value definitions. 2155 Enumvalue []*EnumValue `json:"enumvalue,omitempty"` 2156 2157 // Name: Enum type name. 2158 Name string `json:"name,omitempty"` 2159 2160 // Options: Protocol buffer options. 2161 Options []*Option `json:"options,omitempty"` 2162 2163 // SourceContext: The source context. 2164 SourceContext *SourceContext `json:"sourceContext,omitempty"` 2165 2166 // Syntax: The source syntax. 2167 // 2168 // Possible values: 2169 // "SYNTAX_PROTO2" - Syntax `proto2`. 2170 // "SYNTAX_PROTO3" - Syntax `proto3`. 2171 Syntax string `json:"syntax,omitempty"` 2172 2173 // ForceSendFields is a list of field names (e.g. "Enumvalue") to 2174 // unconditionally include in API requests. By default, fields with 2175 // empty values are omitted from API requests. However, any non-pointer, 2176 // non-interface field appearing in ForceSendFields will be sent to the 2177 // server regardless of whether the field is empty or not. This may be 2178 // used to include empty fields in Patch requests. 2179 ForceSendFields []string `json:"-"` 2180 2181 // NullFields is a list of field names (e.g. "Enumvalue") to include in 2182 // API requests with the JSON null value. By default, fields with empty 2183 // values are omitted from API requests. However, any field with an 2184 // empty value appearing in NullFields will be sent to the server as 2185 // null. It is an error if a field in this list has a non-empty value. 2186 // This may be used to include null fields in Patch requests. 2187 NullFields []string `json:"-"` 2188} 2189 2190func (s *Enum) MarshalJSON() ([]byte, error) { 2191 type NoMethod Enum 2192 raw := NoMethod(*s) 2193 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2194} 2195 2196// EnumValue: Enum value definition. 2197type EnumValue struct { 2198 // Name: Enum value name. 2199 Name string `json:"name,omitempty"` 2200 2201 // Number: Enum value number. 2202 Number int64 `json:"number,omitempty"` 2203 2204 // Options: Protocol buffer options. 2205 Options []*Option `json:"options,omitempty"` 2206 2207 // ForceSendFields is a list of field names (e.g. "Name") to 2208 // unconditionally include in API requests. By default, fields with 2209 // empty values are omitted from API requests. However, any non-pointer, 2210 // non-interface field appearing in ForceSendFields will be sent to the 2211 // server regardless of whether the field is empty or not. This may be 2212 // used to include empty fields in Patch requests. 2213 ForceSendFields []string `json:"-"` 2214 2215 // NullFields is a list of field names (e.g. "Name") to include in API 2216 // requests with the JSON null value. By default, fields with empty 2217 // values are omitted from API requests. However, any field with an 2218 // empty value appearing in NullFields will be sent to the server as 2219 // null. It is an error if a field in this list has a non-empty value. 2220 // This may be used to include null fields in Patch requests. 2221 NullFields []string `json:"-"` 2222} 2223 2224func (s *EnumValue) MarshalJSON() ([]byte, error) { 2225 type NoMethod EnumValue 2226 raw := NoMethod(*s) 2227 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2228} 2229 2230// Expr: Represents a textual expression in the Common Expression 2231// Language (CEL) 2232// syntax. CEL is a C-like expression language. The syntax and semantics 2233// of CEL 2234// are documented at https://github.com/google/cel-spec. 2235// 2236// Example (Comparison): 2237// 2238// title: "Summary size limit" 2239// description: "Determines if a summary is less than 100 chars" 2240// expression: "document.summary.size() < 100" 2241// 2242// Example (Equality): 2243// 2244// title: "Requestor is owner" 2245// description: "Determines if requestor is the document owner" 2246// expression: "document.owner == 2247// request.auth.claims.email" 2248// 2249// Example (Logic): 2250// 2251// title: "Public documents" 2252// description: "Determine whether the document should be publicly 2253// visible" 2254// expression: "document.type != 'private' && document.type != 2255// 'internal'" 2256// 2257// Example (Data Manipulation): 2258// 2259// title: "Notification string" 2260// description: "Create a notification string with a timestamp." 2261// expression: "'New message received at ' + 2262// string(document.create_time)" 2263// 2264// The exact variables and functions that may be referenced within an 2265// expression 2266// are determined by the service that evaluates it. See the 2267// service 2268// documentation for additional information. 2269type Expr struct { 2270 // Description: Optional. Description of the expression. This is a 2271 // longer text which 2272 // describes the expression, e.g. when hovered over it in a UI. 2273 Description string `json:"description,omitempty"` 2274 2275 // Expression: Textual representation of an expression in Common 2276 // Expression Language 2277 // syntax. 2278 Expression string `json:"expression,omitempty"` 2279 2280 // Location: Optional. String indicating the location of the expression 2281 // for error 2282 // reporting, e.g. a file name and a position in the file. 2283 Location string `json:"location,omitempty"` 2284 2285 // Title: Optional. Title for the expression, i.e. a short string 2286 // describing 2287 // its purpose. This can be used e.g. in UIs which allow to enter 2288 // the 2289 // expression. 2290 Title string `json:"title,omitempty"` 2291 2292 // ForceSendFields is a list of field names (e.g. "Description") to 2293 // unconditionally include in API requests. By default, fields with 2294 // empty values are omitted from API requests. However, any non-pointer, 2295 // non-interface field appearing in ForceSendFields will be sent to the 2296 // server regardless of whether the field is empty or not. This may be 2297 // used to include empty fields in Patch requests. 2298 ForceSendFields []string `json:"-"` 2299 2300 // NullFields is a list of field names (e.g. "Description") to include 2301 // in API requests with the JSON null value. By default, fields with 2302 // empty values are omitted from API requests. However, any field with 2303 // an empty value appearing in NullFields will be sent to the server as 2304 // null. It is an error if a field in this list has a non-empty value. 2305 // This may be used to include null fields in Patch requests. 2306 NullFields []string `json:"-"` 2307} 2308 2309func (s *Expr) MarshalJSON() ([]byte, error) { 2310 type NoMethod Expr 2311 raw := NoMethod(*s) 2312 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2313} 2314 2315// Field: A single field of a message type. 2316type Field struct { 2317 // Cardinality: The field cardinality. 2318 // 2319 // Possible values: 2320 // "CARDINALITY_UNKNOWN" - For fields with unknown cardinality. 2321 // "CARDINALITY_OPTIONAL" - For optional fields. 2322 // "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only. 2323 // "CARDINALITY_REPEATED" - For repeated fields. 2324 Cardinality string `json:"cardinality,omitempty"` 2325 2326 // DefaultValue: The string value of the default value of this field. 2327 // Proto2 syntax only. 2328 DefaultValue string `json:"defaultValue,omitempty"` 2329 2330 // JsonName: The field JSON name. 2331 JsonName string `json:"jsonName,omitempty"` 2332 2333 // Kind: The field type. 2334 // 2335 // Possible values: 2336 // "TYPE_UNKNOWN" - Field type unknown. 2337 // "TYPE_DOUBLE" - Field type double. 2338 // "TYPE_FLOAT" - Field type float. 2339 // "TYPE_INT64" - Field type int64. 2340 // "TYPE_UINT64" - Field type uint64. 2341 // "TYPE_INT32" - Field type int32. 2342 // "TYPE_FIXED64" - Field type fixed64. 2343 // "TYPE_FIXED32" - Field type fixed32. 2344 // "TYPE_BOOL" - Field type bool. 2345 // "TYPE_STRING" - Field type string. 2346 // "TYPE_GROUP" - Field type group. Proto2 syntax only, and 2347 // deprecated. 2348 // "TYPE_MESSAGE" - Field type message. 2349 // "TYPE_BYTES" - Field type bytes. 2350 // "TYPE_UINT32" - Field type uint32. 2351 // "TYPE_ENUM" - Field type enum. 2352 // "TYPE_SFIXED32" - Field type sfixed32. 2353 // "TYPE_SFIXED64" - Field type sfixed64. 2354 // "TYPE_SINT32" - Field type sint32. 2355 // "TYPE_SINT64" - Field type sint64. 2356 Kind string `json:"kind,omitempty"` 2357 2358 // Name: The field name. 2359 Name string `json:"name,omitempty"` 2360 2361 // Number: The field number. 2362 Number int64 `json:"number,omitempty"` 2363 2364 // OneofIndex: The index of the field type in `Type.oneofs`, for message 2365 // or enumeration 2366 // types. The first type has index 1; zero means the type is not in the 2367 // list. 2368 OneofIndex int64 `json:"oneofIndex,omitempty"` 2369 2370 // Options: The protocol buffer options. 2371 Options []*Option `json:"options,omitempty"` 2372 2373 // Packed: Whether to use alternative packed wire representation. 2374 Packed bool `json:"packed,omitempty"` 2375 2376 // TypeUrl: The field type URL, without the scheme, for message or 2377 // enumeration 2378 // types. Example: "type.googleapis.com/google.protobuf.Timestamp". 2379 TypeUrl string `json:"typeUrl,omitempty"` 2380 2381 // ForceSendFields is a list of field names (e.g. "Cardinality") to 2382 // unconditionally include in API requests. By default, fields with 2383 // empty values are omitted from API requests. However, any non-pointer, 2384 // non-interface field appearing in ForceSendFields will be sent to the 2385 // server regardless of whether the field is empty or not. This may be 2386 // used to include empty fields in Patch requests. 2387 ForceSendFields []string `json:"-"` 2388 2389 // NullFields is a list of field names (e.g. "Cardinality") to include 2390 // in API requests with the JSON null value. By default, fields with 2391 // empty values are omitted from API requests. However, any field with 2392 // an empty value appearing in NullFields will be sent to the server as 2393 // null. It is an error if a field in this list has a non-empty value. 2394 // This may be used to include null fields in Patch requests. 2395 NullFields []string `json:"-"` 2396} 2397 2398func (s *Field) MarshalJSON() ([]byte, error) { 2399 type NoMethod Field 2400 raw := NoMethod(*s) 2401 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2402} 2403 2404// FlowErrorDetails: Encapsulation of flow-specific error details for 2405// debugging. 2406// Used as a details field on an error Status, not intended for external 2407// use. 2408type FlowErrorDetails struct { 2409 // ExceptionType: The type of exception (as a class name). 2410 ExceptionType string `json:"exceptionType,omitempty"` 2411 2412 // FlowStepId: The step that failed. 2413 FlowStepId string `json:"flowStepId,omitempty"` 2414 2415 // ForceSendFields is a list of field names (e.g. "ExceptionType") to 2416 // unconditionally include in API requests. By default, fields with 2417 // empty values are omitted from API requests. However, any non-pointer, 2418 // non-interface field appearing in ForceSendFields will be sent to the 2419 // server regardless of whether the field is empty or not. This may be 2420 // used to include empty fields in Patch requests. 2421 ForceSendFields []string `json:"-"` 2422 2423 // NullFields is a list of field names (e.g. "ExceptionType") to include 2424 // in API requests with the JSON null value. By default, fields with 2425 // empty values are omitted from API requests. However, any field with 2426 // an empty value appearing in NullFields will be sent to the server as 2427 // null. It is an error if a field in this list has a non-empty value. 2428 // This may be used to include null fields in Patch requests. 2429 NullFields []string `json:"-"` 2430} 2431 2432func (s *FlowErrorDetails) MarshalJSON() ([]byte, error) { 2433 type NoMethod FlowErrorDetails 2434 raw := NoMethod(*s) 2435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2436} 2437 2438// GenerateConfigReportRequest: Request message for GenerateConfigReport 2439// method. 2440type GenerateConfigReportRequest struct { 2441 // NewConfig: Required. Service configuration for which we want to 2442 // generate the report. 2443 // For this version of API, the supported types 2444 // are 2445 // google.api.servicemanagement.v1.ConfigRef, 2446 // google.api.servicemanag 2447 // ement.v1.ConfigSource, 2448 // and google.api.Service 2449 NewConfig googleapi.RawMessage `json:"newConfig,omitempty"` 2450 2451 // OldConfig: Optional. Service configuration against which the 2452 // comparison will be done. 2453 // For this version of API, the supported types 2454 // are 2455 // google.api.servicemanagement.v1.ConfigRef, 2456 // google.api.servicemanag 2457 // ement.v1.ConfigSource, 2458 // and google.api.Service 2459 OldConfig googleapi.RawMessage `json:"oldConfig,omitempty"` 2460 2461 // ForceSendFields is a list of field names (e.g. "NewConfig") to 2462 // unconditionally include in API requests. By default, fields with 2463 // empty values are omitted from API requests. However, any non-pointer, 2464 // non-interface field appearing in ForceSendFields will be sent to the 2465 // server regardless of whether the field is empty or not. This may be 2466 // used to include empty fields in Patch requests. 2467 ForceSendFields []string `json:"-"` 2468 2469 // NullFields is a list of field names (e.g. "NewConfig") to include in 2470 // API requests with the JSON null value. By default, fields with empty 2471 // values are omitted from API requests. However, any field with an 2472 // empty value appearing in NullFields will be sent to the server as 2473 // null. It is an error if a field in this list has a non-empty value. 2474 // This may be used to include null fields in Patch requests. 2475 NullFields []string `json:"-"` 2476} 2477 2478func (s *GenerateConfigReportRequest) MarshalJSON() ([]byte, error) { 2479 type NoMethod GenerateConfigReportRequest 2480 raw := NoMethod(*s) 2481 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2482} 2483 2484// GenerateConfigReportResponse: Response message for 2485// GenerateConfigReport method. 2486type GenerateConfigReportResponse struct { 2487 // ChangeReports: list of ChangeReport, each corresponding to comparison 2488 // between two 2489 // service configurations. 2490 ChangeReports []*ChangeReport `json:"changeReports,omitempty"` 2491 2492 // Diagnostics: Errors / Linter warnings associated with the service 2493 // definition this 2494 // report 2495 // belongs to. 2496 Diagnostics []*Diagnostic `json:"diagnostics,omitempty"` 2497 2498 // Id: ID of the service configuration this report belongs to. 2499 Id string `json:"id,omitempty"` 2500 2501 // ServiceName: Name of the service this report belongs to. 2502 ServiceName string `json:"serviceName,omitempty"` 2503 2504 // ServerResponse contains the HTTP response code and headers from the 2505 // server. 2506 googleapi.ServerResponse `json:"-"` 2507 2508 // ForceSendFields is a list of field names (e.g. "ChangeReports") to 2509 // unconditionally include in API requests. By default, fields with 2510 // empty values are omitted from API requests. However, any non-pointer, 2511 // non-interface field appearing in ForceSendFields will be sent to the 2512 // server regardless of whether the field is empty or not. This may be 2513 // used to include empty fields in Patch requests. 2514 ForceSendFields []string `json:"-"` 2515 2516 // NullFields is a list of field names (e.g. "ChangeReports") to include 2517 // in API requests with the JSON null value. By default, fields with 2518 // empty values are omitted from API requests. However, any field with 2519 // an empty value appearing in NullFields will be sent to the server as 2520 // null. It is an error if a field in this list has a non-empty value. 2521 // This may be used to include null fields in Patch requests. 2522 NullFields []string `json:"-"` 2523} 2524 2525func (s *GenerateConfigReportResponse) MarshalJSON() ([]byte, error) { 2526 type NoMethod GenerateConfigReportResponse 2527 raw := NoMethod(*s) 2528 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2529} 2530 2531// GetIamPolicyRequest: Request message for `GetIamPolicy` method. 2532type GetIamPolicyRequest struct { 2533 // Options: OPTIONAL: A `GetPolicyOptions` object for specifying options 2534 // to 2535 // `GetIamPolicy`. 2536 Options *GetPolicyOptions `json:"options,omitempty"` 2537 2538 // ForceSendFields is a list of field names (e.g. "Options") to 2539 // unconditionally include in API requests. By default, fields with 2540 // empty values are omitted from API requests. However, any non-pointer, 2541 // non-interface field appearing in ForceSendFields will be sent to the 2542 // server regardless of whether the field is empty or not. This may be 2543 // used to include empty fields in Patch requests. 2544 ForceSendFields []string `json:"-"` 2545 2546 // NullFields is a list of field names (e.g. "Options") to include in 2547 // API requests with the JSON null value. By default, fields with empty 2548 // values are omitted from API requests. However, any field with an 2549 // empty value appearing in NullFields will be sent to the server as 2550 // null. It is an error if a field in this list has a non-empty value. 2551 // This may be used to include null fields in Patch requests. 2552 NullFields []string `json:"-"` 2553} 2554 2555func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) { 2556 type NoMethod GetIamPolicyRequest 2557 raw := NoMethod(*s) 2558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2559} 2560 2561// GetPolicyOptions: Encapsulates settings provided to GetIamPolicy. 2562type GetPolicyOptions struct { 2563 // RequestedPolicyVersion: Optional. The policy format version to be 2564 // returned. 2565 // 2566 // Valid values are 0, 1, and 3. Requests specifying an invalid value 2567 // will be 2568 // rejected. 2569 // 2570 // Requests for policies with any conditional bindings must specify 2571 // version 3. 2572 // Policies without any conditional bindings may specify any valid value 2573 // or 2574 // leave the field unset. 2575 // 2576 // To learn which resources support conditions in their IAM policies, 2577 // see 2578 // the 2579 // [IAM 2580 // documentation](https://cloud.google.com/iam/help/conditions/r 2581 // esource-policies). 2582 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"` 2583 2584 // ForceSendFields is a list of field names (e.g. 2585 // "RequestedPolicyVersion") to unconditionally include in API requests. 2586 // By default, fields with empty values are omitted from API requests. 2587 // However, any non-pointer, non-interface field appearing in 2588 // ForceSendFields will be sent to the server regardless of whether the 2589 // field is empty or not. This may be used to include empty fields in 2590 // Patch requests. 2591 ForceSendFields []string `json:"-"` 2592 2593 // NullFields is a list of field names (e.g. "RequestedPolicyVersion") 2594 // to include in API requests with the JSON null value. By default, 2595 // fields with empty values are omitted from API requests. However, any 2596 // field with an empty value appearing in NullFields will be sent to the 2597 // server as null. It is an error if a field in this list has a 2598 // non-empty value. This may be used to include null fields in Patch 2599 // requests. 2600 NullFields []string `json:"-"` 2601} 2602 2603func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { 2604 type NoMethod GetPolicyOptions 2605 raw := NoMethod(*s) 2606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2607} 2608 2609// Http: Defines the HTTP configuration for an API service. It contains 2610// a list of 2611// HttpRule, each specifying the mapping of an RPC method 2612// to one or more HTTP REST API methods. 2613type Http struct { 2614 // FullyDecodeReservedExpansion: When set to true, URL path parameters 2615 // will be fully URI-decoded except in 2616 // cases of single segment matches in reserved expansion, where "%2F" 2617 // will be 2618 // left encoded. 2619 // 2620 // The default behavior is to not decode RFC 6570 reserved characters in 2621 // multi 2622 // segment matches. 2623 FullyDecodeReservedExpansion bool `json:"fullyDecodeReservedExpansion,omitempty"` 2624 2625 // Rules: A list of HTTP configuration rules that apply to individual 2626 // API methods. 2627 // 2628 // **NOTE:** All service configuration rules follow "last one wins" 2629 // order. 2630 Rules []*HttpRule `json:"rules,omitempty"` 2631 2632 // ForceSendFields is a list of field names (e.g. 2633 // "FullyDecodeReservedExpansion") to unconditionally include in API 2634 // requests. By default, fields with empty values are omitted from API 2635 // requests. However, any non-pointer, non-interface field appearing in 2636 // ForceSendFields will be sent to the server regardless of whether the 2637 // field is empty or not. This may be used to include empty fields in 2638 // Patch requests. 2639 ForceSendFields []string `json:"-"` 2640 2641 // NullFields is a list of field names (e.g. 2642 // "FullyDecodeReservedExpansion") to include in API requests with the 2643 // JSON null value. By default, fields with empty values are omitted 2644 // from API requests. However, any field with an empty value appearing 2645 // in NullFields will be sent to the server as null. It is an error if a 2646 // field in this list has a non-empty value. This may be used to include 2647 // null fields in Patch requests. 2648 NullFields []string `json:"-"` 2649} 2650 2651func (s *Http) MarshalJSON() ([]byte, error) { 2652 type NoMethod Http 2653 raw := NoMethod(*s) 2654 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2655} 2656 2657// HttpRule: # gRPC Transcoding 2658// 2659// gRPC Transcoding is a feature for mapping between a gRPC method and 2660// one or 2661// more HTTP REST endpoints. It allows developers to build a single API 2662// service 2663// that supports both gRPC APIs and REST APIs. Many systems, including 2664// [Google 2665// APIs](https://github.com/googleapis/googleapis), 2666// [Cloud Endpoints](https://cloud.google.com/endpoints), 2667// [gRPC 2668// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), 2669// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this 2670// feature 2671// and use it for large scale production services. 2672// 2673// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping 2674// specifies 2675// how different portions of the gRPC request message are mapped to the 2676// URL 2677// path, URL query parameters, and HTTP request body. It also controls 2678// how the 2679// gRPC response message is mapped to the HTTP response body. `HttpRule` 2680// is 2681// typically specified as an `google.api.http` annotation on the gRPC 2682// method. 2683// 2684// Each mapping specifies a URL path template and an HTTP method. The 2685// path 2686// template may refer to one or more fields in the gRPC request message, 2687// as long 2688// as each field is a non-repeated field with a primitive (non-message) 2689// type. 2690// The path template controls how fields of the request message are 2691// mapped to 2692// the URL path. 2693// 2694// Example: 2695// 2696// service Messaging { 2697// rpc GetMessage(GetMessageRequest) returns (Message) { 2698// option (google.api.http) = { 2699// get: "/v1/{name=messages/*}" 2700// }; 2701// } 2702// } 2703// message GetMessageRequest { 2704// string name = 1; // Mapped to URL path. 2705// } 2706// message Message { 2707// string text = 1; // The resource content. 2708// } 2709// 2710// This enables an HTTP REST to gRPC mapping as below: 2711// 2712// HTTP | gRPC 2713// -----|----- 2714// `GET /v1/messages/123456` | `GetMessage(name: 2715// "messages/123456")` 2716// 2717// Any fields in the request message which are not bound by the path 2718// template 2719// automatically become HTTP query parameters if there is no HTTP 2720// request body. 2721// For example: 2722// 2723// service Messaging { 2724// rpc GetMessage(GetMessageRequest) returns (Message) { 2725// option (google.api.http) = { 2726// get:"/v1/messages/{message_id}" 2727// }; 2728// } 2729// } 2730// message GetMessageRequest { 2731// message SubMessage { 2732// string subfield = 1; 2733// } 2734// string message_id = 1; // Mapped to URL path. 2735// int64 revision = 2; // Mapped to URL query parameter 2736// `revision`. 2737// SubMessage sub = 3; // Mapped to URL query parameter 2738// `sub.subfield`. 2739// } 2740// 2741// This enables a HTTP JSON to RPC mapping as below: 2742// 2743// HTTP | gRPC 2744// -----|----- 2745// `GET /v1/messages/123456?revision=2&sub.subfield=foo` 2746// | 2747// `GetMessage(message_id: "123456" revision: 2 sub: 2748// SubMessage(subfield: 2749// "foo"))` 2750// 2751// Note that fields which are mapped to URL query parameters must have 2752// a 2753// primitive type or a repeated primitive type or a non-repeated message 2754// type. 2755// In the case of a repeated type, the parameter can be repeated in the 2756// URL 2757// as `...?param=A¶m=B`. In the case of a message type, each field 2758// of the 2759// message is mapped to a separate parameter, such 2760// as 2761// `...?foo.a=A&foo.b=B&foo.c=C`. 2762// 2763// For HTTP methods that allow a request body, the `body` 2764// field 2765// specifies the mapping. Consider a REST update method on the 2766// message resource collection: 2767// 2768// service Messaging { 2769// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { 2770// option (google.api.http) = { 2771// patch: "/v1/messages/{message_id}" 2772// body: "message" 2773// }; 2774// } 2775// } 2776// message UpdateMessageRequest { 2777// string message_id = 1; // mapped to the URL 2778// Message message = 2; // mapped to the body 2779// } 2780// 2781// The following HTTP JSON to RPC mapping is enabled, where 2782// the 2783// representation of the JSON in the request body is determined 2784// by 2785// protos JSON encoding: 2786// 2787// HTTP | gRPC 2788// -----|----- 2789// `PATCH /v1/messages/123456 { "text": "Hi!" }` | 2790// `UpdateMessage(message_id: 2791// "123456" message { text: "Hi!" })` 2792// 2793// The special name `*` can be used in the body mapping to define 2794// that 2795// every field not bound by the path template should be mapped to 2796// the 2797// request body. This enables the following alternative definition 2798// of 2799// the update method: 2800// 2801// service Messaging { 2802// rpc UpdateMessage(Message) returns (Message) { 2803// option (google.api.http) = { 2804// patch: "/v1/messages/{message_id}" 2805// body: "*" 2806// }; 2807// } 2808// } 2809// message Message { 2810// string message_id = 1; 2811// string text = 2; 2812// } 2813// 2814// 2815// The following HTTP JSON to RPC mapping is enabled: 2816// 2817// HTTP | gRPC 2818// -----|----- 2819// `PATCH /v1/messages/123456 { "text": "Hi!" }` | 2820// `UpdateMessage(message_id: 2821// "123456" text: "Hi!")` 2822// 2823// Note that when using `*` in the body mapping, it is not possible 2824// to 2825// have HTTP parameters, as all fields not bound by the path end in 2826// the body. This makes this option more rarely used in practice 2827// when 2828// defining REST APIs. The common usage of `*` is in custom 2829// methods 2830// which don't use the URL at all for transferring data. 2831// 2832// It is possible to define multiple HTTP methods for one RPC by 2833// using 2834// the `additional_bindings` option. Example: 2835// 2836// service Messaging { 2837// rpc GetMessage(GetMessageRequest) returns (Message) { 2838// option (google.api.http) = { 2839// get: "/v1/messages/{message_id}" 2840// additional_bindings { 2841// get: "/v1/users/{user_id}/messages/{message_id}" 2842// } 2843// }; 2844// } 2845// } 2846// message GetMessageRequest { 2847// string message_id = 1; 2848// string user_id = 2; 2849// } 2850// 2851// This enables the following two alternative HTTP JSON to RPC 2852// mappings: 2853// 2854// HTTP | gRPC 2855// -----|----- 2856// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` 2857// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" 2858// message_id: 2859// "123456")` 2860// 2861// ## Rules for HTTP mapping 2862// 2863// 1. Leaf request fields (recursive expansion nested messages in the 2864// request 2865// message) are classified into three categories: 2866// - Fields referred by the path template. They are passed via the 2867// URL path. 2868// - Fields referred by the HttpRule.body. They are passed via the 2869// HTTP 2870// request body. 2871// - All other fields are passed via the URL query parameters, and 2872// the 2873// parameter name is the field path in the request message. A 2874// repeated 2875// field can be represented as multiple query parameters under the 2876// same 2877// name. 2878// 2. If HttpRule.body is "*", there is no URL query parameter, all 2879// fields 2880// are passed via URL path and HTTP request body. 2881// 3. If HttpRule.body is omitted, there is no HTTP request body, all 2882// fields are passed via URL path and URL query parameters. 2883// 2884// ### Path template syntax 2885// 2886// Template = "/" Segments [ Verb ] ; 2887// Segments = Segment { "/" Segment } ; 2888// Segment = "*" | "**" | LITERAL | Variable ; 2889// Variable = "{" FieldPath [ "=" Segments ] "}" ; 2890// FieldPath = IDENT { "." IDENT } ; 2891// Verb = ":" LITERAL ; 2892// 2893// The syntax `*` matches a single URL path segment. The syntax `**` 2894// matches 2895// zero or more URL path segments, which must be the last part of the 2896// URL path 2897// except the `Verb`. 2898// 2899// The syntax `Variable` matches part of the URL path as specified by 2900// its 2901// template. A variable template must not contain other variables. If a 2902// variable 2903// matches a single path segment, its template may be omitted, e.g. 2904// `{var}` 2905// is equivalent to `{var=*}`. 2906// 2907// The syntax `LITERAL` matches literal text in the URL path. If the 2908// `LITERAL` 2909// contains any reserved character, such characters should be 2910// percent-encoded 2911// before the matching. 2912// 2913// If a variable contains exactly one path segment, such as "{var}" 2914// or 2915// "{var=*}", when such a variable is expanded into a URL path on the 2916// client 2917// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. 2918// The 2919// server side does the reverse decoding. Such variables show up in 2920// the 2921// [Discovery 2922// Document](https://developers.google.com/discovery/v1/re 2923// ference/apis) as 2924// `{var}`. 2925// 2926// If a variable contains multiple path segments, such as 2927// "{var=foo/*}" 2928// or "{var=**}", when such a variable is expanded into a URL path on 2929// the 2930// client side, all characters except `[-_.~/0-9a-zA-Z]` are 2931// percent-encoded. 2932// The server side does the reverse decoding, except "%2F" and "%2f" are 2933// left 2934// unchanged. Such variables show up in 2935// the 2936// [Discovery 2937// Document](https://developers.google.com/discovery/v1/re 2938// ference/apis) as 2939// `{+var}`. 2940// 2941// ## Using gRPC API Service Configuration 2942// 2943// gRPC API Service Configuration (service config) is a configuration 2944// language 2945// for configuring a gRPC service to become a user-facing product. 2946// The 2947// service config is simply the YAML representation of the 2948// `google.api.Service` 2949// proto message. 2950// 2951// As an alternative to annotating your proto file, you can configure 2952// gRPC 2953// transcoding in your service config YAML files. You do this by 2954// specifying a 2955// `HttpRule` that maps the gRPC method to a REST endpoint, achieving 2956// the same 2957// effect as the proto annotation. This can be particularly useful if 2958// you 2959// have a proto that is reused in multiple services. Note that any 2960// transcoding 2961// specified in the service config will override any matching 2962// transcoding 2963// configuration in the proto. 2964// 2965// Example: 2966// 2967// http: 2968// rules: 2969// # Selects a gRPC method and applies HttpRule to it. 2970// - selector: example.v1.Messaging.GetMessage 2971// get: /v1/messages/{message_id}/{sub.subfield} 2972// 2973// ## Special notes 2974// 2975// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, 2976// the 2977// proto to JSON conversion must follow the 2978// [proto3 2979// specification](https://developers.google.com/protocol-buffers/ 2980// docs/proto3#json). 2981// 2982// While the single segment variable follows the semantics of 2983// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple 2984// String 2985// Expansion, the multi segment variable **does not** follow RFC 6570 2986// Section 2987// 3.2.3 Reserved Expansion. The reason is that the Reserved 2988// Expansion 2989// does not expand special characters like `?` and `#`, which would 2990// lead 2991// to invalid URLs. As the result, gRPC Transcoding uses a custom 2992// encoding 2993// for multi segment variables. 2994// 2995// The path variables **must not** refer to any repeated or mapped 2996// field, 2997// because client libraries are not capable of handling such variable 2998// expansion. 2999// 3000// The path variables **must not** capture the leading "/" character. 3001// The reason 3002// is that the most common use case "{var}" does not capture the leading 3003// "/" 3004// character. For consistency, all path variables must share the same 3005// behavior. 3006// 3007// Repeated message fields must not be mapped to URL query parameters, 3008// because 3009// no client library can support such complicated mapping. 3010// 3011// If an API needs to use a JSON array for request or response body, it 3012// can map 3013// the request or response body to a repeated field. However, some 3014// gRPC 3015// Transcoding implementations may not support this feature. 3016type HttpRule struct { 3017 // AdditionalBindings: Additional HTTP bindings for the selector. Nested 3018 // bindings must 3019 // not contain an `additional_bindings` field themselves (that is, 3020 // the nesting may only be one level deep). 3021 AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"` 3022 3023 // AllowHalfDuplex: When this flag is set to true, HTTP requests will be 3024 // allowed to invoke a 3025 // half-duplex streaming method. 3026 AllowHalfDuplex bool `json:"allowHalfDuplex,omitempty"` 3027 3028 // Body: The name of the request field whose value is mapped to the HTTP 3029 // request 3030 // body, or `*` for mapping all request fields not captured by the 3031 // path 3032 // pattern to the HTTP body, or omitted for not having any HTTP request 3033 // body. 3034 // 3035 // NOTE: the referred field must be present at the top-level of the 3036 // request 3037 // message type. 3038 Body string `json:"body,omitempty"` 3039 3040 // Custom: The custom pattern is used for specifying an HTTP method that 3041 // is not 3042 // included in the `pattern` field, such as HEAD, or "*" to leave 3043 // the 3044 // HTTP method unspecified for this rule. The wild-card rule is 3045 // useful 3046 // for services that provide content to Web (HTML) clients. 3047 Custom *CustomHttpPattern `json:"custom,omitempty"` 3048 3049 // Delete: Maps to HTTP DELETE. Used for deleting a resource. 3050 Delete string `json:"delete,omitempty"` 3051 3052 // Get: Maps to HTTP GET. Used for listing and getting information 3053 // about 3054 // resources. 3055 Get string `json:"get,omitempty"` 3056 3057 // Patch: Maps to HTTP PATCH. Used for updating a resource. 3058 Patch string `json:"patch,omitempty"` 3059 3060 // Post: Maps to HTTP POST. Used for creating a resource or performing 3061 // an action. 3062 Post string `json:"post,omitempty"` 3063 3064 // Put: Maps to HTTP PUT. Used for replacing a resource. 3065 Put string `json:"put,omitempty"` 3066 3067 // ResponseBody: Optional. The name of the response field whose value is 3068 // mapped to the HTTP 3069 // response body. When omitted, the entire response message will be 3070 // used 3071 // as the HTTP response body. 3072 // 3073 // NOTE: The referred field must be present at the top-level of the 3074 // response 3075 // message type. 3076 ResponseBody string `json:"responseBody,omitempty"` 3077 3078 // Selector: Selects a method to which this rule applies. 3079 // 3080 // Refer to selector for syntax details. 3081 Selector string `json:"selector,omitempty"` 3082 3083 // ForceSendFields is a list of field names (e.g. "AdditionalBindings") 3084 // to unconditionally include in API requests. By default, fields with 3085 // empty values are omitted from API requests. However, any non-pointer, 3086 // non-interface field appearing in ForceSendFields will be sent to the 3087 // server regardless of whether the field is empty or not. This may be 3088 // used to include empty fields in Patch requests. 3089 ForceSendFields []string `json:"-"` 3090 3091 // NullFields is a list of field names (e.g. "AdditionalBindings") to 3092 // include in API requests with the JSON null value. By default, fields 3093 // with empty values are omitted from API requests. However, any field 3094 // with an empty value appearing in NullFields will be sent to the 3095 // server as null. It is an error if a field in this list has a 3096 // non-empty value. This may be used to include null fields in Patch 3097 // requests. 3098 NullFields []string `json:"-"` 3099} 3100 3101func (s *HttpRule) MarshalJSON() ([]byte, error) { 3102 type NoMethod HttpRule 3103 raw := NoMethod(*s) 3104 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3105} 3106 3107// JwtLocation: Specifies a location to extract JWT from an API request. 3108type JwtLocation struct { 3109 // Header: Specifies HTTP header name to extract JWT token. 3110 Header string `json:"header,omitempty"` 3111 3112 // Query: Specifies URL query parameter name to extract JWT token. 3113 Query string `json:"query,omitempty"` 3114 3115 // ValuePrefix: The value prefix. The value format is 3116 // "value_prefix{token}" 3117 // Only applies to "in" header type. Must be empty for "in" query 3118 // type. 3119 // If not empty, the header value has to match (case sensitive) this 3120 // prefix. 3121 // If not matched, JWT will not be extracted. If matched, JWT will 3122 // be 3123 // extracted after the prefix is removed. 3124 // 3125 // For example, for "Authorization: Bearer {JWT}", 3126 // value_prefix="Bearer " with a space at the end. 3127 ValuePrefix string `json:"valuePrefix,omitempty"` 3128 3129 // ForceSendFields is a list of field names (e.g. "Header") to 3130 // unconditionally include in API requests. By default, fields with 3131 // empty values are omitted from API requests. However, any non-pointer, 3132 // non-interface field appearing in ForceSendFields will be sent to the 3133 // server regardless of whether the field is empty or not. This may be 3134 // used to include empty fields in Patch requests. 3135 ForceSendFields []string `json:"-"` 3136 3137 // NullFields is a list of field names (e.g. "Header") to include in API 3138 // requests with the JSON null value. By default, fields with empty 3139 // values are omitted from API requests. However, any field with an 3140 // empty value appearing in NullFields will be sent to the server as 3141 // null. It is an error if a field in this list has a non-empty value. 3142 // This may be used to include null fields in Patch requests. 3143 NullFields []string `json:"-"` 3144} 3145 3146func (s *JwtLocation) MarshalJSON() ([]byte, error) { 3147 type NoMethod JwtLocation 3148 raw := NoMethod(*s) 3149 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3150} 3151 3152// LabelDescriptor: A description of a label. 3153type LabelDescriptor struct { 3154 // Description: A human-readable description for the label. 3155 Description string `json:"description,omitempty"` 3156 3157 // Key: The label key. 3158 Key string `json:"key,omitempty"` 3159 3160 // ValueType: The type of data that can be assigned to the label. 3161 // 3162 // Possible values: 3163 // "STRING" - A variable-length string. This is the default. 3164 // "BOOL" - Boolean; true or false. 3165 // "INT64" - A 64-bit signed integer. 3166 ValueType string `json:"valueType,omitempty"` 3167 3168 // ForceSendFields is a list of field names (e.g. "Description") to 3169 // unconditionally include in API requests. By default, fields with 3170 // empty values are omitted from API requests. However, any non-pointer, 3171 // non-interface field appearing in ForceSendFields will be sent to the 3172 // server regardless of whether the field is empty or not. This may be 3173 // used to include empty fields in Patch requests. 3174 ForceSendFields []string `json:"-"` 3175 3176 // NullFields is a list of field names (e.g. "Description") to include 3177 // in API requests with the JSON null value. By default, fields with 3178 // empty values are omitted from API requests. However, any field with 3179 // an empty value appearing in NullFields will be sent to the server as 3180 // null. It is an error if a field in this list has a non-empty value. 3181 // This may be used to include null fields in Patch requests. 3182 NullFields []string `json:"-"` 3183} 3184 3185func (s *LabelDescriptor) MarshalJSON() ([]byte, error) { 3186 type NoMethod LabelDescriptor 3187 raw := NoMethod(*s) 3188 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3189} 3190 3191// ListOperationsResponse: The response message for 3192// Operations.ListOperations. 3193type ListOperationsResponse struct { 3194 // NextPageToken: The standard List next-page token. 3195 NextPageToken string `json:"nextPageToken,omitempty"` 3196 3197 // Operations: A list of operations that matches the specified filter in 3198 // the request. 3199 Operations []*Operation `json:"operations,omitempty"` 3200 3201 // ServerResponse contains the HTTP response code and headers from the 3202 // server. 3203 googleapi.ServerResponse `json:"-"` 3204 3205 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3206 // unconditionally include in API requests. By default, fields with 3207 // empty values are omitted from API requests. However, any non-pointer, 3208 // non-interface field appearing in ForceSendFields will be sent to the 3209 // server regardless of whether the field is empty or not. This may be 3210 // used to include empty fields in Patch requests. 3211 ForceSendFields []string `json:"-"` 3212 3213 // NullFields is a list of field names (e.g. "NextPageToken") to include 3214 // in API requests with the JSON null value. By default, fields with 3215 // empty values are omitted from API requests. However, any field with 3216 // an empty value appearing in NullFields will be sent to the server as 3217 // null. It is an error if a field in this list has a non-empty value. 3218 // This may be used to include null fields in Patch requests. 3219 NullFields []string `json:"-"` 3220} 3221 3222func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 3223 type NoMethod ListOperationsResponse 3224 raw := NoMethod(*s) 3225 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3226} 3227 3228// ListServiceConfigsResponse: Response message for ListServiceConfigs 3229// method. 3230type ListServiceConfigsResponse struct { 3231 // NextPageToken: The token of the next page of results. 3232 NextPageToken string `json:"nextPageToken,omitempty"` 3233 3234 // ServiceConfigs: The list of service configuration resources. 3235 ServiceConfigs []*Service `json:"serviceConfigs,omitempty"` 3236 3237 // ServerResponse contains the HTTP response code and headers from the 3238 // server. 3239 googleapi.ServerResponse `json:"-"` 3240 3241 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3242 // unconditionally include in API requests. By default, fields with 3243 // empty values are omitted from API requests. However, any non-pointer, 3244 // non-interface field appearing in ForceSendFields will be sent to the 3245 // server regardless of whether the field is empty or not. This may be 3246 // used to include empty fields in Patch requests. 3247 ForceSendFields []string `json:"-"` 3248 3249 // NullFields is a list of field names (e.g. "NextPageToken") to include 3250 // in API requests with the JSON null value. By default, fields with 3251 // empty values are omitted from API requests. However, any field with 3252 // an empty value appearing in NullFields will be sent to the server as 3253 // null. It is an error if a field in this list has a non-empty value. 3254 // This may be used to include null fields in Patch requests. 3255 NullFields []string `json:"-"` 3256} 3257 3258func (s *ListServiceConfigsResponse) MarshalJSON() ([]byte, error) { 3259 type NoMethod ListServiceConfigsResponse 3260 raw := NoMethod(*s) 3261 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3262} 3263 3264// ListServiceRolloutsResponse: Response message for ListServiceRollouts 3265// method. 3266type ListServiceRolloutsResponse struct { 3267 // NextPageToken: The token of the next page of results. 3268 NextPageToken string `json:"nextPageToken,omitempty"` 3269 3270 // Rollouts: The list of rollout resources. 3271 Rollouts []*Rollout `json:"rollouts,omitempty"` 3272 3273 // ServerResponse contains the HTTP response code and headers from the 3274 // server. 3275 googleapi.ServerResponse `json:"-"` 3276 3277 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3278 // unconditionally include in API requests. By default, fields with 3279 // empty values are omitted from API requests. However, any non-pointer, 3280 // non-interface field appearing in ForceSendFields will be sent to the 3281 // server regardless of whether the field is empty or not. This may be 3282 // used to include empty fields in Patch requests. 3283 ForceSendFields []string `json:"-"` 3284 3285 // NullFields is a list of field names (e.g. "NextPageToken") to include 3286 // in API requests with the JSON null value. By default, fields with 3287 // empty values are omitted from API requests. However, any field with 3288 // an empty value appearing in NullFields will be sent to the server as 3289 // null. It is an error if a field in this list has a non-empty value. 3290 // This may be used to include null fields in Patch requests. 3291 NullFields []string `json:"-"` 3292} 3293 3294func (s *ListServiceRolloutsResponse) MarshalJSON() ([]byte, error) { 3295 type NoMethod ListServiceRolloutsResponse 3296 raw := NoMethod(*s) 3297 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3298} 3299 3300// ListServicesResponse: Response message for `ListServices` method. 3301type ListServicesResponse struct { 3302 // NextPageToken: Token that can be passed to `ListServices` to resume a 3303 // paginated query. 3304 NextPageToken string `json:"nextPageToken,omitempty"` 3305 3306 // Services: The returned services will only have the name field set. 3307 Services []*ManagedService `json:"services,omitempty"` 3308 3309 // ServerResponse contains the HTTP response code and headers from the 3310 // server. 3311 googleapi.ServerResponse `json:"-"` 3312 3313 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3314 // unconditionally include in API requests. By default, fields with 3315 // empty values are omitted from API requests. However, any non-pointer, 3316 // non-interface field appearing in ForceSendFields will be sent to the 3317 // server regardless of whether the field is empty or not. This may be 3318 // used to include empty fields in Patch requests. 3319 ForceSendFields []string `json:"-"` 3320 3321 // NullFields is a list of field names (e.g. "NextPageToken") to include 3322 // in API requests with the JSON null value. By default, fields with 3323 // empty values are omitted from API requests. However, any field with 3324 // an empty value appearing in NullFields will be sent to the server as 3325 // null. It is an error if a field in this list has a non-empty value. 3326 // This may be used to include null fields in Patch requests. 3327 NullFields []string `json:"-"` 3328} 3329 3330func (s *ListServicesResponse) MarshalJSON() ([]byte, error) { 3331 type NoMethod ListServicesResponse 3332 raw := NoMethod(*s) 3333 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3334} 3335 3336// LogDescriptor: A description of a log type. Example in YAML format: 3337// 3338// - name: library.googleapis.com/activity_history 3339// description: The history of borrowing and returning library 3340// items. 3341// display_name: Activity 3342// labels: 3343// - key: /customer_id 3344// description: Identifier of a library customer 3345type LogDescriptor struct { 3346 // Description: A human-readable description of this log. This 3347 // information appears in 3348 // the documentation and can contain details. 3349 Description string `json:"description,omitempty"` 3350 3351 // DisplayName: The human-readable name for this log. This information 3352 // appears on 3353 // the user interface and should be concise. 3354 DisplayName string `json:"displayName,omitempty"` 3355 3356 // Labels: The set of labels that are available to describe a specific 3357 // log entry. 3358 // Runtime requests that contain labels not specified here 3359 // are 3360 // considered invalid. 3361 Labels []*LabelDescriptor `json:"labels,omitempty"` 3362 3363 // Name: The name of the log. It must be less than 512 characters long 3364 // and can 3365 // include the following characters: upper- and lower-case 3366 // alphanumeric 3367 // characters [A-Za-z0-9], and punctuation characters including 3368 // slash, underscore, hyphen, period [/_-.]. 3369 Name string `json:"name,omitempty"` 3370 3371 // ForceSendFields is a list of field names (e.g. "Description") to 3372 // unconditionally include in API requests. By default, fields with 3373 // empty values are omitted from API requests. However, any non-pointer, 3374 // non-interface field appearing in ForceSendFields will be sent to the 3375 // server regardless of whether the field is empty or not. This may be 3376 // used to include empty fields in Patch requests. 3377 ForceSendFields []string `json:"-"` 3378 3379 // NullFields is a list of field names (e.g. "Description") to include 3380 // in API requests with the JSON null value. By default, fields with 3381 // empty values are omitted from API requests. However, any field with 3382 // an empty value appearing in NullFields will be sent to the server as 3383 // null. It is an error if a field in this list has a non-empty value. 3384 // This may be used to include null fields in Patch requests. 3385 NullFields []string `json:"-"` 3386} 3387 3388func (s *LogDescriptor) MarshalJSON() ([]byte, error) { 3389 type NoMethod LogDescriptor 3390 raw := NoMethod(*s) 3391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3392} 3393 3394// Logging: Logging configuration of the service. 3395// 3396// The following example shows how to configure logs to be sent to 3397// the 3398// producer and consumer projects. In the example, the 3399// `activity_history` 3400// log is sent to both the producer and consumer projects, whereas 3401// the 3402// `purchase_history` log is only sent to the producer project. 3403// 3404// monitored_resources: 3405// - type: library.googleapis.com/branch 3406// labels: 3407// - key: /city 3408// description: The city where the library branch is located 3409// in. 3410// - key: /name 3411// description: The name of the branch. 3412// logs: 3413// - name: activity_history 3414// labels: 3415// - key: /customer_id 3416// - name: purchase_history 3417// logging: 3418// producer_destinations: 3419// - monitored_resource: library.googleapis.com/branch 3420// logs: 3421// - activity_history 3422// - purchase_history 3423// consumer_destinations: 3424// - monitored_resource: library.googleapis.com/branch 3425// logs: 3426// - activity_history 3427type Logging struct { 3428 // ConsumerDestinations: Logging configurations for sending logs to the 3429 // consumer project. 3430 // There can be multiple consumer destinations, each one must have 3431 // a 3432 // different monitored resource type. A log can be used in at most 3433 // one consumer destination. 3434 ConsumerDestinations []*LoggingDestination `json:"consumerDestinations,omitempty"` 3435 3436 // ProducerDestinations: Logging configurations for sending logs to the 3437 // producer project. 3438 // There can be multiple producer destinations, each one must have 3439 // a 3440 // different monitored resource type. A log can be used in at most 3441 // one producer destination. 3442 ProducerDestinations []*LoggingDestination `json:"producerDestinations,omitempty"` 3443 3444 // ForceSendFields is a list of field names (e.g. 3445 // "ConsumerDestinations") to unconditionally include in API requests. 3446 // By default, fields with empty values are omitted from API requests. 3447 // However, any non-pointer, non-interface field appearing in 3448 // ForceSendFields will be sent to the server regardless of whether the 3449 // field is empty or not. This may be used to include empty fields in 3450 // Patch requests. 3451 ForceSendFields []string `json:"-"` 3452 3453 // NullFields is a list of field names (e.g. "ConsumerDestinations") to 3454 // include in API requests with the JSON null value. By default, fields 3455 // with empty values are omitted from API requests. However, any field 3456 // with an empty value appearing in NullFields will be sent to the 3457 // server as null. It is an error if a field in this list has a 3458 // non-empty value. This may be used to include null fields in Patch 3459 // requests. 3460 NullFields []string `json:"-"` 3461} 3462 3463func (s *Logging) MarshalJSON() ([]byte, error) { 3464 type NoMethod Logging 3465 raw := NoMethod(*s) 3466 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3467} 3468 3469// LoggingDestination: Configuration of a specific logging destination 3470// (the producer project 3471// or the consumer project). 3472type LoggingDestination struct { 3473 // Logs: Names of the logs to be sent to this destination. Each name 3474 // must 3475 // be defined in the Service.logs section. If the log name is 3476 // not a domain scoped name, it will be automatically prefixed with 3477 // the service name followed by "/". 3478 Logs []string `json:"logs,omitempty"` 3479 3480 // MonitoredResource: The monitored resource type. The type must be 3481 // defined in the 3482 // Service.monitored_resources section. 3483 MonitoredResource string `json:"monitoredResource,omitempty"` 3484 3485 // ForceSendFields is a list of field names (e.g. "Logs") to 3486 // unconditionally include in API requests. By default, fields with 3487 // empty values are omitted from API requests. However, any non-pointer, 3488 // non-interface field appearing in ForceSendFields will be sent to the 3489 // server regardless of whether the field is empty or not. This may be 3490 // used to include empty fields in Patch requests. 3491 ForceSendFields []string `json:"-"` 3492 3493 // NullFields is a list of field names (e.g. "Logs") to include in API 3494 // requests with the JSON null value. By default, fields with empty 3495 // values are omitted from API requests. However, any field with an 3496 // empty value appearing in NullFields will be sent to the server as 3497 // null. It is an error if a field in this list has a non-empty value. 3498 // This may be used to include null fields in Patch requests. 3499 NullFields []string `json:"-"` 3500} 3501 3502func (s *LoggingDestination) MarshalJSON() ([]byte, error) { 3503 type NoMethod LoggingDestination 3504 raw := NoMethod(*s) 3505 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3506} 3507 3508// ManagedService: The full representation of a Service that is managed 3509// by 3510// Google Service Management. 3511type ManagedService struct { 3512 // ProducerProjectId: ID of the project that produces and owns this 3513 // service. 3514 ProducerProjectId string `json:"producerProjectId,omitempty"` 3515 3516 // ServiceName: The name of the service. See the 3517 // [overview](/service-management/overview) 3518 // for naming requirements. 3519 ServiceName string `json:"serviceName,omitempty"` 3520 3521 // ServerResponse contains the HTTP response code and headers from the 3522 // server. 3523 googleapi.ServerResponse `json:"-"` 3524 3525 // ForceSendFields is a list of field names (e.g. "ProducerProjectId") 3526 // to unconditionally include in API requests. By default, fields with 3527 // empty values are omitted from API requests. However, any non-pointer, 3528 // non-interface field appearing in ForceSendFields will be sent to the 3529 // server regardless of whether the field is empty or not. This may be 3530 // used to include empty fields in Patch requests. 3531 ForceSendFields []string `json:"-"` 3532 3533 // NullFields is a list of field names (e.g. "ProducerProjectId") to 3534 // include in API requests with the JSON null value. By default, fields 3535 // with empty values are omitted from API requests. However, any field 3536 // with an empty value appearing in NullFields will be sent to the 3537 // server as null. It is an error if a field in this list has a 3538 // non-empty value. This may be used to include null fields in Patch 3539 // requests. 3540 NullFields []string `json:"-"` 3541} 3542 3543func (s *ManagedService) MarshalJSON() ([]byte, error) { 3544 type NoMethod ManagedService 3545 raw := NoMethod(*s) 3546 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3547} 3548 3549// Method: Method represents a method of an API interface. 3550type Method struct { 3551 // Name: The simple name of this method. 3552 Name string `json:"name,omitempty"` 3553 3554 // Options: Any metadata attached to the method. 3555 Options []*Option `json:"options,omitempty"` 3556 3557 // RequestStreaming: If true, the request is streamed. 3558 RequestStreaming bool `json:"requestStreaming,omitempty"` 3559 3560 // RequestTypeUrl: A URL of the input message type. 3561 RequestTypeUrl string `json:"requestTypeUrl,omitempty"` 3562 3563 // ResponseStreaming: If true, the response is streamed. 3564 ResponseStreaming bool `json:"responseStreaming,omitempty"` 3565 3566 // ResponseTypeUrl: The URL of the output message type. 3567 ResponseTypeUrl string `json:"responseTypeUrl,omitempty"` 3568 3569 // Syntax: The source syntax of this method. 3570 // 3571 // Possible values: 3572 // "SYNTAX_PROTO2" - Syntax `proto2`. 3573 // "SYNTAX_PROTO3" - Syntax `proto3`. 3574 Syntax string `json:"syntax,omitempty"` 3575 3576 // ForceSendFields is a list of field names (e.g. "Name") to 3577 // unconditionally include in API requests. By default, fields with 3578 // empty values are omitted from API requests. However, any non-pointer, 3579 // non-interface field appearing in ForceSendFields will be sent to the 3580 // server regardless of whether the field is empty or not. This may be 3581 // used to include empty fields in Patch requests. 3582 ForceSendFields []string `json:"-"` 3583 3584 // NullFields is a list of field names (e.g. "Name") to include in API 3585 // requests with the JSON null value. By default, fields with empty 3586 // values are omitted from API requests. However, any field with an 3587 // empty value appearing in NullFields will be sent to the server as 3588 // null. It is an error if a field in this list has a non-empty value. 3589 // This may be used to include null fields in Patch requests. 3590 NullFields []string `json:"-"` 3591} 3592 3593func (s *Method) MarshalJSON() ([]byte, error) { 3594 type NoMethod Method 3595 raw := NoMethod(*s) 3596 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3597} 3598 3599// MetricDescriptor: Defines a metric type and its schema. Once a metric 3600// descriptor is created, 3601// deleting or altering it stops data collection and makes the metric 3602// type's 3603// existing data unusable. 3604// 3605// The following are specific rules for service defined Monitoring 3606// metric 3607// descriptors: 3608// 3609// * `type`, `metric_kind`, `value_type`, `description`, 3610// `display_name`, 3611// `launch_stage` fields are all required. The `unit` field must be 3612// specified 3613// if the `value_type` is any of DOUBLE, INT64, DISTRIBUTION. 3614// * Maximum of default 500 metric descriptors per service is allowed. 3615// * Maximum of default 10 labels per metric descriptor is allowed. 3616// 3617// The default maximum limit can be overridden. Please 3618// follow 3619// https://cloud.google.com/monitoring/quotas 3620type MetricDescriptor struct { 3621 // Description: A detailed description of the metric, which can be used 3622 // in documentation. 3623 Description string `json:"description,omitempty"` 3624 3625 // DisplayName: A concise name for the metric, which can be displayed in 3626 // user interfaces. 3627 // Use sentence case without an ending period, for example "Request 3628 // count". 3629 // This field is optional but it is recommended to be set for any 3630 // metrics 3631 // associated with user-visible concepts, such as Quota. 3632 DisplayName string `json:"displayName,omitempty"` 3633 3634 // Labels: The set of labels that can be used to describe a 3635 // specific 3636 // instance of this metric type. 3637 // 3638 // The label key name must follow: 3639 // 3640 // * Only upper and lower-case letters, digits and underscores (_) are 3641 // allowed. 3642 // * Label name must start with a letter or digit. 3643 // * The maximum length of a label name is 100 characters. 3644 // 3645 // For example, 3646 // the 3647 // `appengine.googleapis.com/http/server/response_latencies` metric 3648 // type has a label for the HTTP response code, `response_code`, so 3649 // you can look at latencies for successful responses or just 3650 // for responses that failed. 3651 Labels []*LabelDescriptor `json:"labels,omitempty"` 3652 3653 // LaunchStage: Optional. The launch stage of the metric definition. 3654 // 3655 // Possible values: 3656 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. 3657 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not 3658 // use it. 3659 // "PRELAUNCH" - Prelaunch features are hidden from users and are only 3660 // visible internally. 3661 // "EARLY_ACCESS" - Early Access features are limited to a closed 3662 // group of testers. To use 3663 // these features, you must sign up in advance and sign a Trusted 3664 // Tester 3665 // agreement (which includes confidentiality provisions). These features 3666 // may 3667 // be unstable, changed in backward-incompatible ways, and are 3668 // not 3669 // guaranteed to be released. 3670 // "ALPHA" - Alpha is a limited availability test for releases before 3671 // they are cleared 3672 // for widespread use. By Alpha, all significant design issues are 3673 // resolved 3674 // and we are in the process of verifying functionality. Alpha 3675 // customers 3676 // need to apply for access, agree to applicable terms, and have 3677 // their 3678 // projects whitelisted. Alpha releases don’t have to be feature 3679 // complete, 3680 // no SLAs are provided, and there are no technical support obligations, 3681 // but 3682 // they will be far enough along that customers can actually use them 3683 // in 3684 // test environments or for limited-use tests -- just like they would 3685 // in 3686 // normal production cases. 3687 // "BETA" - Beta is the point at which we are ready to open a release 3688 // for any 3689 // customer to use. There are no SLA or technical support obligations in 3690 // a 3691 // Beta release. Products will be complete from a feature perspective, 3692 // but 3693 // may have some open outstanding issues. Beta releases are suitable 3694 // for 3695 // limited production use cases. 3696 // "GA" - GA features are open to all developers and are considered 3697 // stable and 3698 // fully qualified for production use. 3699 // "DEPRECATED" - Deprecated features are scheduled to be shut down 3700 // and removed. For more 3701 // information, see the “Deprecation Policy” section of our [Terms 3702 // of 3703 // Service](https://cloud.google.com/terms/) 3704 // and the [Google Cloud Platform Subject to the 3705 // Deprecation 3706 // Policy](https://cloud.google.com/terms/deprecation) documentation. 3707 LaunchStage string `json:"launchStage,omitempty"` 3708 3709 // Metadata: Optional. Metadata which can be used to guide usage of the 3710 // metric. 3711 Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"` 3712 3713 // MetricKind: Whether the metric records instantaneous values, changes 3714 // to a value, etc. 3715 // Some combinations of `metric_kind` and `value_type` might not be 3716 // supported. 3717 // 3718 // Possible values: 3719 // "METRIC_KIND_UNSPECIFIED" - Do not use this default value. 3720 // "GAUGE" - An instantaneous measurement of a value. 3721 // "DELTA" - The change in a value during a time interval. 3722 // "CUMULATIVE" - A value accumulated over a time interval. 3723 // Cumulative 3724 // measurements in a time series should have the same start time 3725 // and increasing end times, until an event resets the cumulative 3726 // value to zero and sets a new start time for the following 3727 // points. 3728 MetricKind string `json:"metricKind,omitempty"` 3729 3730 // MonitoredResourceTypes: Read-only. If present, then a time 3731 // series, which is identified partially by 3732 // a metric type and a MonitoredResourceDescriptor, that is 3733 // associated 3734 // with this metric type can only be associated with one of the 3735 // monitored 3736 // resource types listed here. 3737 MonitoredResourceTypes []string `json:"monitoredResourceTypes,omitempty"` 3738 3739 // Name: The resource name of the metric descriptor. 3740 Name string `json:"name,omitempty"` 3741 3742 // Type: The metric type, including its DNS name prefix. The type is 3743 // not 3744 // URL-encoded. 3745 // 3746 // All service defined metrics must be prefixed with the service name, 3747 // in the 3748 // format of `{service name}/{relative metric name}`, such 3749 // as 3750 // `cloudsql.googleapis.com/database/cpu/utilization`. The relative 3751 // metric 3752 // name must follow: 3753 // 3754 // * Only upper and lower-case letters, digits, '/' and underscores '_' 3755 // are 3756 // allowed. 3757 // * The maximum number of characters allowed for the 3758 // relative_metric_name is 3759 // 100. 3760 // 3761 // All user-defined metric types have the DNS 3762 // name 3763 // `custom.googleapis.com`, `external.googleapis.com`, 3764 // or 3765 // `logging.googleapis.com/user/`. 3766 // 3767 // Metric types should use a natural hierarchical grouping. For 3768 // example: 3769 // 3770 // "custom.googleapis.com/invoice/paid/amount" 3771 // "external.googleapis.com/prometheus/up" 3772 // "appengine.googleapis.com/http/server/response_latencies" 3773 Type string `json:"type,omitempty"` 3774 3775 // Unit: The units in which the metric value is reported. It is only 3776 // applicable 3777 // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The 3778 // `unit` 3779 // defines the representation of the stored metric values. 3780 // 3781 // Different systems may scale the values to be more easily displayed 3782 // (so a 3783 // value of `0.02KBy` _might_ be displayed as `20By`, and a value 3784 // of 3785 // `3523KBy` _might_ be displayed as `3.5MBy`). However, if the `unit` 3786 // is 3787 // `KBy`, then the value of the metric is always in thousands of bytes, 3788 // no 3789 // matter how it may be displayed.. 3790 // 3791 // If you want a custom metric to record the exact number of CPU-seconds 3792 // used 3793 // by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` 3794 // is 3795 // `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 3796 // 12,005 3797 // CPU-seconds, then the value is written as `12005`. 3798 // 3799 // Alternatively, if you want a custom metric to record data in a 3800 // more 3801 // granular way, you can create a `DOUBLE CUMULATIVE` metric whose 3802 // `unit` is 3803 // `ks{CPU}`, and then write the value `12.005` (which is 3804 // `12005/1000`), 3805 // or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). 3806 // 3807 // The supported units are a subset of [The Unified Code for Units 3808 // of 3809 // Measure](http://unitsofmeasure.org/ucum.html) standard: 3810 // 3811 // **Basic units (UNIT)** 3812 // 3813 // * `bit` bit 3814 // * `By` byte 3815 // * `s` second 3816 // * `min` minute 3817 // * `h` hour 3818 // * `d` day 3819 // * `1` dimensionless 3820 // 3821 // **Prefixes (PREFIX)** 3822 // 3823 // * `k` kilo (10^3) 3824 // * `M` mega (10^6) 3825 // * `G` giga (10^9) 3826 // * `T` tera (10^12) 3827 // * `P` peta (10^15) 3828 // * `E` exa (10^18) 3829 // * `Z` zetta (10^21) 3830 // * `Y` yotta (10^24) 3831 // 3832 // * `m` milli (10^-3) 3833 // * `u` micro (10^-6) 3834 // * `n` nano (10^-9) 3835 // * `p` pico (10^-12) 3836 // * `f` femto (10^-15) 3837 // * `a` atto (10^-18) 3838 // * `z` zepto (10^-21) 3839 // * `y` yocto (10^-24) 3840 // 3841 // * `Ki` kibi (2^10) 3842 // * `Mi` mebi (2^20) 3843 // * `Gi` gibi (2^30) 3844 // * `Ti` tebi (2^40) 3845 // * `Pi` pebi (2^50) 3846 // 3847 // **Grammar** 3848 // 3849 // The grammar also includes these connectors: 3850 // 3851 // * `/` division or ratio (as an infix operator). For examples, 3852 // `kBy/{email}` or `MiBy/10ms` (although you should almost 3853 // never 3854 // have `/s` in a metric `unit`; rates should always be 3855 // computed at 3856 // query time from the underlying cumulative or delta value). 3857 // * `.` multiplication or composition (as an infix operator). For 3858 // examples, `GBy.d` or `k{watt}.h`. 3859 // 3860 // The grammar for a unit is as follows: 3861 // 3862 // Expression = Component { "." Component } { "/" Component } ; 3863 // 3864 // Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] 3865 // | Annotation 3866 // | "1" 3867 // ; 3868 // 3869 // Annotation = "{" NAME "}" ; 3870 // 3871 // Notes: 3872 // 3873 // * `Annotation` is just a comment if it follows a `UNIT`. If the 3874 // annotation 3875 // is used alone, then the unit is equivalent to `1`. For examples, 3876 // `{request}/s == 1/s`, `By{transmitted}/s == By/s`. 3877 // * `NAME` is a sequence of non-blank printable ASCII characters not 3878 // containing `{` or `}`. 3879 // * `1` represents a unitary [dimensionless 3880 // unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, 3881 // such 3882 // as in `1/s`. It is typically used when none of the basic units 3883 // are 3884 // appropriate. For example, "new users per day" can be represented 3885 // as 3886 // `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 3887 // new 3888 // users). Alternatively, "thousands of page views per day" would be 3889 // represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a 3890 // metric 3891 // value of `5.3` would mean "5300 page views per day"). 3892 // * `%` represents dimensionless value of 1/100, and annotates values 3893 // giving 3894 // a percentage (so the metric values are typically in the range of 3895 // 0..100, 3896 // and a metric value `3` means "3 percent"). 3897 // * `10^2.%` indicates a metric contains a ratio, typically in the 3898 // range 3899 // 0..1, that will be multiplied by 100 and displayed as a 3900 // percentage 3901 // (so a metric value `0.03` means "3 percent"). 3902 Unit string `json:"unit,omitempty"` 3903 3904 // ValueType: Whether the measurement is an integer, a floating-point 3905 // number, etc. 3906 // Some combinations of `metric_kind` and `value_type` might not be 3907 // supported. 3908 // 3909 // Possible values: 3910 // "VALUE_TYPE_UNSPECIFIED" - Do not use this default value. 3911 // "BOOL" - The value is a boolean. 3912 // This value type can be used only if the metric kind is `GAUGE`. 3913 // "INT64" - The value is a signed 64-bit integer. 3914 // "DOUBLE" - The value is a double precision floating point number. 3915 // "STRING" - The value is a text string. 3916 // This value type can be used only if the metric kind is `GAUGE`. 3917 // "DISTRIBUTION" - The value is a `Distribution`. 3918 // "MONEY" - The value is money. 3919 ValueType string `json:"valueType,omitempty"` 3920 3921 // ForceSendFields is a list of field names (e.g. "Description") to 3922 // unconditionally include in API requests. By default, fields with 3923 // empty values are omitted from API requests. However, any non-pointer, 3924 // non-interface field appearing in ForceSendFields will be sent to the 3925 // server regardless of whether the field is empty or not. This may be 3926 // used to include empty fields in Patch requests. 3927 ForceSendFields []string `json:"-"` 3928 3929 // NullFields is a list of field names (e.g. "Description") to include 3930 // in API requests with the JSON null value. By default, fields with 3931 // empty values are omitted from API requests. However, any field with 3932 // an empty value appearing in NullFields will be sent to the server as 3933 // null. It is an error if a field in this list has a non-empty value. 3934 // This may be used to include null fields in Patch requests. 3935 NullFields []string `json:"-"` 3936} 3937 3938func (s *MetricDescriptor) MarshalJSON() ([]byte, error) { 3939 type NoMethod MetricDescriptor 3940 raw := NoMethod(*s) 3941 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3942} 3943 3944// MetricDescriptorMetadata: Additional annotations that can be used to 3945// guide the usage of a metric. 3946type MetricDescriptorMetadata struct { 3947 // IngestDelay: The delay of data points caused by ingestion. Data 3948 // points older than this 3949 // age are guaranteed to be ingested and available to be read, 3950 // excluding 3951 // data loss due to errors. 3952 IngestDelay string `json:"ingestDelay,omitempty"` 3953 3954 // LaunchStage: Deprecated. Must use the MetricDescriptor.launch_stage 3955 // instead. 3956 // 3957 // Possible values: 3958 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. 3959 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not 3960 // use it. 3961 // "PRELAUNCH" - Prelaunch features are hidden from users and are only 3962 // visible internally. 3963 // "EARLY_ACCESS" - Early Access features are limited to a closed 3964 // group of testers. To use 3965 // these features, you must sign up in advance and sign a Trusted 3966 // Tester 3967 // agreement (which includes confidentiality provisions). These features 3968 // may 3969 // be unstable, changed in backward-incompatible ways, and are 3970 // not 3971 // guaranteed to be released. 3972 // "ALPHA" - Alpha is a limited availability test for releases before 3973 // they are cleared 3974 // for widespread use. By Alpha, all significant design issues are 3975 // resolved 3976 // and we are in the process of verifying functionality. Alpha 3977 // customers 3978 // need to apply for access, agree to applicable terms, and have 3979 // their 3980 // projects whitelisted. Alpha releases don’t have to be feature 3981 // complete, 3982 // no SLAs are provided, and there are no technical support obligations, 3983 // but 3984 // they will be far enough along that customers can actually use them 3985 // in 3986 // test environments or for limited-use tests -- just like they would 3987 // in 3988 // normal production cases. 3989 // "BETA" - Beta is the point at which we are ready to open a release 3990 // for any 3991 // customer to use. There are no SLA or technical support obligations in 3992 // a 3993 // Beta release. Products will be complete from a feature perspective, 3994 // but 3995 // may have some open outstanding issues. Beta releases are suitable 3996 // for 3997 // limited production use cases. 3998 // "GA" - GA features are open to all developers and are considered 3999 // stable and 4000 // fully qualified for production use. 4001 // "DEPRECATED" - Deprecated features are scheduled to be shut down 4002 // and removed. For more 4003 // information, see the “Deprecation Policy” section of our [Terms 4004 // of 4005 // Service](https://cloud.google.com/terms/) 4006 // and the [Google Cloud Platform Subject to the 4007 // Deprecation 4008 // Policy](https://cloud.google.com/terms/deprecation) documentation. 4009 LaunchStage string `json:"launchStage,omitempty"` 4010 4011 // SamplePeriod: The sampling period of metric data points. For metrics 4012 // which are written 4013 // periodically, consecutive data points are stored at this time 4014 // interval, 4015 // excluding data loss due to errors. Metrics with a higher granularity 4016 // have 4017 // a smaller sampling period. 4018 SamplePeriod string `json:"samplePeriod,omitempty"` 4019 4020 // ForceSendFields is a list of field names (e.g. "IngestDelay") to 4021 // unconditionally include in API requests. By default, fields with 4022 // empty values are omitted from API requests. However, any non-pointer, 4023 // non-interface field appearing in ForceSendFields will be sent to the 4024 // server regardless of whether the field is empty or not. This may be 4025 // used to include empty fields in Patch requests. 4026 ForceSendFields []string `json:"-"` 4027 4028 // NullFields is a list of field names (e.g. "IngestDelay") to include 4029 // in API requests with the JSON null value. By default, fields with 4030 // empty values are omitted from API requests. However, any field with 4031 // an empty value appearing in NullFields will be sent to the server as 4032 // null. It is an error if a field in this list has a non-empty value. 4033 // This may be used to include null fields in Patch requests. 4034 NullFields []string `json:"-"` 4035} 4036 4037func (s *MetricDescriptorMetadata) MarshalJSON() ([]byte, error) { 4038 type NoMethod MetricDescriptorMetadata 4039 raw := NoMethod(*s) 4040 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4041} 4042 4043// MetricRule: Bind API methods to metrics. Binding a method to a metric 4044// causes that 4045// metric's configured quota behaviors to apply to the method call. 4046type MetricRule struct { 4047 // MetricCosts: Metrics to update when the selected methods are called, 4048 // and the associated 4049 // cost applied to each metric. 4050 // 4051 // The key of the map is the metric name, and the values are the 4052 // amount 4053 // increased for the metric against which the quota limits are 4054 // defined. 4055 // The value must not be negative. 4056 MetricCosts map[string]string `json:"metricCosts,omitempty"` 4057 4058 // Selector: Selects the methods to which this rule applies. 4059 // 4060 // Refer to selector for syntax details. 4061 Selector string `json:"selector,omitempty"` 4062 4063 // ForceSendFields is a list of field names (e.g. "MetricCosts") to 4064 // unconditionally include in API requests. By default, fields with 4065 // empty values are omitted from API requests. However, any non-pointer, 4066 // non-interface field appearing in ForceSendFields will be sent to the 4067 // server regardless of whether the field is empty or not. This may be 4068 // used to include empty fields in Patch requests. 4069 ForceSendFields []string `json:"-"` 4070 4071 // NullFields is a list of field names (e.g. "MetricCosts") to include 4072 // in API requests with the JSON null value. By default, fields with 4073 // empty values are omitted from API requests. However, any field with 4074 // an empty value appearing in NullFields will be sent to the server as 4075 // null. It is an error if a field in this list has a non-empty value. 4076 // This may be used to include null fields in Patch requests. 4077 NullFields []string `json:"-"` 4078} 4079 4080func (s *MetricRule) MarshalJSON() ([]byte, error) { 4081 type NoMethod MetricRule 4082 raw := NoMethod(*s) 4083 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4084} 4085 4086// Mixin: Declares an API Interface to be included in this interface. 4087// The including 4088// interface must redeclare all the methods from the included interface, 4089// but 4090// documentation and options are inherited as follows: 4091// 4092// - If after comment and whitespace stripping, the documentation 4093// string of the redeclared method is empty, it will be inherited 4094// from the original method. 4095// 4096// - Each annotation belonging to the service config (http, 4097// visibility) which is not set in the redeclared method will be 4098// inherited. 4099// 4100// - If an http annotation is inherited, the path pattern will be 4101// modified as follows. Any version prefix will be replaced by the 4102// version of the including interface plus the root path if 4103// specified. 4104// 4105// Example of a simple mixin: 4106// 4107// package google.acl.v1; 4108// service AccessControl { 4109// // Get the underlying ACL object. 4110// rpc GetAcl(GetAclRequest) returns (Acl) { 4111// option (google.api.http).get = "/v1/{resource=**}:getAcl"; 4112// } 4113// } 4114// 4115// package google.storage.v2; 4116// service Storage { 4117// // rpc GetAcl(GetAclRequest) returns (Acl); 4118// 4119// // Get a data record. 4120// rpc GetData(GetDataRequest) returns (Data) { 4121// option (google.api.http).get = "/v2/{resource=**}"; 4122// } 4123// } 4124// 4125// Example of a mixin configuration: 4126// 4127// apis: 4128// - name: google.storage.v2.Storage 4129// mixins: 4130// - name: google.acl.v1.AccessControl 4131// 4132// The mixin construct implies that all methods in `AccessControl` 4133// are 4134// also declared with same name and request/response types in 4135// `Storage`. A documentation generator or annotation processor will 4136// see the effective `Storage.GetAcl` method after 4137// inherting 4138// documentation and annotations as follows: 4139// 4140// service Storage { 4141// // Get the underlying ACL object. 4142// rpc GetAcl(GetAclRequest) returns (Acl) { 4143// option (google.api.http).get = "/v2/{resource=**}:getAcl"; 4144// } 4145// ... 4146// } 4147// 4148// Note how the version in the path pattern changed from `v1` to 4149// `v2`. 4150// 4151// If the `root` field in the mixin is specified, it should be 4152// a 4153// relative path under which inherited HTTP paths are placed. Example: 4154// 4155// apis: 4156// - name: google.storage.v2.Storage 4157// mixins: 4158// - name: google.acl.v1.AccessControl 4159// root: acls 4160// 4161// This implies the following inherited HTTP annotation: 4162// 4163// service Storage { 4164// // Get the underlying ACL object. 4165// rpc GetAcl(GetAclRequest) returns (Acl) { 4166// option (google.api.http).get = 4167// "/v2/acls/{resource=**}:getAcl"; 4168// } 4169// ... 4170// } 4171type Mixin struct { 4172 // Name: The fully qualified name of the interface which is included. 4173 Name string `json:"name,omitempty"` 4174 4175 // Root: If non-empty specifies a path under which inherited HTTP 4176 // paths 4177 // are rooted. 4178 Root string `json:"root,omitempty"` 4179 4180 // ForceSendFields is a list of field names (e.g. "Name") to 4181 // unconditionally include in API requests. By default, fields with 4182 // empty values are omitted from API requests. However, any non-pointer, 4183 // non-interface field appearing in ForceSendFields will be sent to the 4184 // server regardless of whether the field is empty or not. This may be 4185 // used to include empty fields in Patch requests. 4186 ForceSendFields []string `json:"-"` 4187 4188 // NullFields is a list of field names (e.g. "Name") to include in API 4189 // requests with the JSON null value. By default, fields with empty 4190 // values are omitted from API requests. However, any field with an 4191 // empty value appearing in NullFields will be sent to the server as 4192 // null. It is an error if a field in this list has a non-empty value. 4193 // This may be used to include null fields in Patch requests. 4194 NullFields []string `json:"-"` 4195} 4196 4197func (s *Mixin) MarshalJSON() ([]byte, error) { 4198 type NoMethod Mixin 4199 raw := NoMethod(*s) 4200 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4201} 4202 4203// MonitoredResourceDescriptor: An object that describes the schema of a 4204// MonitoredResource object using a 4205// type name and a set of labels. For example, the monitored 4206// resource 4207// descriptor for Google Compute Engine VM instances has a type 4208// of 4209// "gce_instance" and specifies the use of the labels "instance_id" 4210// and 4211// "zone" to identify particular VM instances. 4212// 4213// Different services can support different monitored resource 4214// types. 4215// 4216// The following are specific rules to service defined monitored 4217// resources for 4218// Monitoring and Logging: 4219// 4220// * The `type`, `display_name`, `description`, `labels` and 4221// `launch_stage` 4222// fields are all required. 4223// * The first label of the monitored resource descriptor must be 4224// `resource_container`. There are legacy monitored resource 4225// descritptors 4226// start with `project_id`. 4227// * It must include a `location` label. 4228// * Maximum of default 5 service defined monitored resource 4229// descriptors 4230// is allowed per service. 4231// * Maximum of default 10 labels per monitored resource is 4232// allowed. 4233// 4234// The default maximum limit can be overridden. Please 4235// follow 4236// https://cloud.google.com/monitoring/quotas 4237// 4238type MonitoredResourceDescriptor struct { 4239 // Description: Optional. A detailed description of the monitored 4240 // resource type that might 4241 // be used in documentation. 4242 Description string `json:"description,omitempty"` 4243 4244 // DisplayName: Optional. A concise name for the monitored resource type 4245 // that might be 4246 // displayed in user interfaces. It should be a Title Cased Noun 4247 // Phrase, 4248 // without any article or other determiners. For example, 4249 // "Google Cloud SQL Database". 4250 DisplayName string `json:"displayName,omitempty"` 4251 4252 // Labels: Required. A set of labels used to describe instances of this 4253 // monitored 4254 // resource type. 4255 // The label key name must follow: 4256 // 4257 // * Only upper and lower-case letters, digits and underscores (_) are 4258 // allowed. 4259 // * Label name must start with a letter or digit. 4260 // * The maximum length of a label name is 100 characters. 4261 // 4262 // For example, an individual Google Cloud SQL database is 4263 // identified by values for the labels `database_id` and `location`. 4264 Labels []*LabelDescriptor `json:"labels,omitempty"` 4265 4266 // LaunchStage: Optional. The launch stage of the monitored resource 4267 // definition. 4268 // 4269 // Possible values: 4270 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. 4271 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not 4272 // use it. 4273 // "PRELAUNCH" - Prelaunch features are hidden from users and are only 4274 // visible internally. 4275 // "EARLY_ACCESS" - Early Access features are limited to a closed 4276 // group of testers. To use 4277 // these features, you must sign up in advance and sign a Trusted 4278 // Tester 4279 // agreement (which includes confidentiality provisions). These features 4280 // may 4281 // be unstable, changed in backward-incompatible ways, and are 4282 // not 4283 // guaranteed to be released. 4284 // "ALPHA" - Alpha is a limited availability test for releases before 4285 // they are cleared 4286 // for widespread use. By Alpha, all significant design issues are 4287 // resolved 4288 // and we are in the process of verifying functionality. Alpha 4289 // customers 4290 // need to apply for access, agree to applicable terms, and have 4291 // their 4292 // projects whitelisted. Alpha releases don’t have to be feature 4293 // complete, 4294 // no SLAs are provided, and there are no technical support obligations, 4295 // but 4296 // they will be far enough along that customers can actually use them 4297 // in 4298 // test environments or for limited-use tests -- just like they would 4299 // in 4300 // normal production cases. 4301 // "BETA" - Beta is the point at which we are ready to open a release 4302 // for any 4303 // customer to use. There are no SLA or technical support obligations in 4304 // a 4305 // Beta release. Products will be complete from a feature perspective, 4306 // but 4307 // may have some open outstanding issues. Beta releases are suitable 4308 // for 4309 // limited production use cases. 4310 // "GA" - GA features are open to all developers and are considered 4311 // stable and 4312 // fully qualified for production use. 4313 // "DEPRECATED" - Deprecated features are scheduled to be shut down 4314 // and removed. For more 4315 // information, see the “Deprecation Policy” section of our [Terms 4316 // of 4317 // Service](https://cloud.google.com/terms/) 4318 // and the [Google Cloud Platform Subject to the 4319 // Deprecation 4320 // Policy](https://cloud.google.com/terms/deprecation) documentation. 4321 LaunchStage string `json:"launchStage,omitempty"` 4322 4323 // Name: Optional. The resource name of the monitored resource 4324 // descriptor: 4325 // "projects/{project_id}/monitoredResourceDescriptors/{type 4326 // }" where 4327 // {type} is the value of the `type` field in this object 4328 // and 4329 // {project_id} is a project ID that provides API-specific context 4330 // for 4331 // accessing the type. APIs that do not use project information can use 4332 // the 4333 // resource name format "monitoredResourceDescriptors/{type}". 4334 Name string `json:"name,omitempty"` 4335 4336 // Type: Required. The monitored resource type. For example, the 4337 // type 4338 // `cloudsql_database` represents databases in Google Cloud SQL. 4339 // 4340 // All service defined monitored resource types must be prefixed with 4341 // the 4342 // service name, in the format of `{service name}/{relative resource 4343 // name}`. 4344 // The relative resource name must follow: 4345 // 4346 // * Only upper and lower-case letters and digits are allowed. 4347 // * It must start with upper case character and is recommended to use 4348 // Upper 4349 // Camel Case style. 4350 // * The maximum number of characters allowed for the 4351 // relative_resource_name 4352 // is 100. 4353 // 4354 // Note there are legacy service monitored resources not following this 4355 // rule. 4356 Type string `json:"type,omitempty"` 4357 4358 // ForceSendFields is a list of field names (e.g. "Description") to 4359 // unconditionally include in API requests. By default, fields with 4360 // empty values are omitted from API requests. However, any non-pointer, 4361 // non-interface field appearing in ForceSendFields will be sent to the 4362 // server regardless of whether the field is empty or not. This may be 4363 // used to include empty fields in Patch requests. 4364 ForceSendFields []string `json:"-"` 4365 4366 // NullFields is a list of field names (e.g. "Description") to include 4367 // in API requests with the JSON null value. By default, fields with 4368 // empty values are omitted from API requests. However, any field with 4369 // an empty value appearing in NullFields will be sent to the server as 4370 // null. It is an error if a field in this list has a non-empty value. 4371 // This may be used to include null fields in Patch requests. 4372 NullFields []string `json:"-"` 4373} 4374 4375func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) { 4376 type NoMethod MonitoredResourceDescriptor 4377 raw := NoMethod(*s) 4378 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4379} 4380 4381// Monitoring: Monitoring configuration of the service. 4382// 4383// The example below shows how to configure monitored resources and 4384// metrics 4385// for monitoring. In the example, a monitored resource and two metrics 4386// are 4387// defined. The `library.googleapis.com/book/returned_count` metric is 4388// sent 4389// to both producer and consumer projects, whereas 4390// the 4391// `library.googleapis.com/book/num_overdue` metric is only sent to 4392// the 4393// consumer project. 4394// 4395// monitored_resources: 4396// - type: library.googleapis.com/Branch 4397// display_name: "Library Branch" 4398// description: "A branch of a library." 4399// launch_stage: GA 4400// labels: 4401// - key: resource_container 4402// description: "The Cloud container (ie. project id) for the 4403// Branch." 4404// - key: location 4405// description: "The location of the library branch." 4406// - key: branch_id 4407// description: "The id of the branch." 4408// metrics: 4409// - name: library.googleapis.com/book/returned_count 4410// display_name: "Books Returned" 4411// description: "The count of books that have been returned." 4412// launch_stage: GA 4413// metric_kind: DELTA 4414// value_type: INT64 4415// unit: "1" 4416// labels: 4417// - key: customer_id 4418// description: "The id of the customer." 4419// - name: library.googleapis.com/book/num_overdue 4420// display_name: "Books Overdue" 4421// description: "The current number of overdue books." 4422// launch_stage: GA 4423// metric_kind: GAUGE 4424// value_type: INT64 4425// unit: "1" 4426// labels: 4427// - key: customer_id 4428// description: "The id of the customer." 4429// monitoring: 4430// producer_destinations: 4431// - monitored_resource: library.googleapis.com/Branch 4432// metrics: 4433// - library.googleapis.com/book/returned_count 4434// consumer_destinations: 4435// - monitored_resource: library.googleapis.com/Branch 4436// metrics: 4437// - library.googleapis.com/book/returned_count 4438// - library.googleapis.com/book/num_overdue 4439type Monitoring struct { 4440 // ConsumerDestinations: Monitoring configurations for sending metrics 4441 // to the consumer project. 4442 // There can be multiple consumer destinations. A monitored resource 4443 // type may 4444 // appear in multiple monitoring destinations if different aggregations 4445 // are 4446 // needed for different sets of metrics associated with that 4447 // monitored 4448 // resource type. A monitored resource and metric pair may only be used 4449 // once 4450 // in the Monitoring configuration. 4451 ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"` 4452 4453 // ProducerDestinations: Monitoring configurations for sending metrics 4454 // to the producer project. 4455 // There can be multiple producer destinations. A monitored resource 4456 // type may 4457 // appear in multiple monitoring destinations if different aggregations 4458 // are 4459 // needed for different sets of metrics associated with that 4460 // monitored 4461 // resource type. A monitored resource and metric pair may only be used 4462 // once 4463 // in the Monitoring configuration. 4464 ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"` 4465 4466 // ForceSendFields is a list of field names (e.g. 4467 // "ConsumerDestinations") to unconditionally include in API requests. 4468 // By default, fields with empty values are omitted from API requests. 4469 // However, any non-pointer, non-interface field appearing in 4470 // ForceSendFields will be sent to the server regardless of whether the 4471 // field is empty or not. This may be used to include empty fields in 4472 // Patch requests. 4473 ForceSendFields []string `json:"-"` 4474 4475 // NullFields is a list of field names (e.g. "ConsumerDestinations") to 4476 // include in API requests with the JSON null value. By default, fields 4477 // with empty values are omitted from API requests. However, any field 4478 // with an empty value appearing in NullFields will be sent to the 4479 // server as null. It is an error if a field in this list has a 4480 // non-empty value. This may be used to include null fields in Patch 4481 // requests. 4482 NullFields []string `json:"-"` 4483} 4484 4485func (s *Monitoring) MarshalJSON() ([]byte, error) { 4486 type NoMethod Monitoring 4487 raw := NoMethod(*s) 4488 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4489} 4490 4491// MonitoringDestination: Configuration of a specific monitoring 4492// destination (the producer project 4493// or the consumer project). 4494type MonitoringDestination struct { 4495 // Metrics: Types of the metrics to report to this monitoring 4496 // destination. 4497 // Each type must be defined in Service.metrics section. 4498 Metrics []string `json:"metrics,omitempty"` 4499 4500 // MonitoredResource: The monitored resource type. The type must be 4501 // defined in 4502 // Service.monitored_resources section. 4503 MonitoredResource string `json:"monitoredResource,omitempty"` 4504 4505 // ForceSendFields is a list of field names (e.g. "Metrics") to 4506 // unconditionally include in API requests. By default, fields with 4507 // empty values are omitted from API requests. However, any non-pointer, 4508 // non-interface field appearing in ForceSendFields will be sent to the 4509 // server regardless of whether the field is empty or not. This may be 4510 // used to include empty fields in Patch requests. 4511 ForceSendFields []string `json:"-"` 4512 4513 // NullFields is a list of field names (e.g. "Metrics") to include in 4514 // API requests with the JSON null value. By default, fields with empty 4515 // values are omitted from API requests. However, any field with an 4516 // empty value appearing in NullFields will be sent to the server as 4517 // null. It is an error if a field in this list has a non-empty value. 4518 // This may be used to include null fields in Patch requests. 4519 NullFields []string `json:"-"` 4520} 4521 4522func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { 4523 type NoMethod MonitoringDestination 4524 raw := NoMethod(*s) 4525 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4526} 4527 4528// OAuthRequirements: OAuth scopes are a way to define data and 4529// permissions on data. For example, 4530// there are scopes defined for "Read-only access to Google Calendar" 4531// and 4532// "Access to Cloud Platform". Users can consent to a scope for an 4533// application, 4534// giving it permission to access that data on their behalf. 4535// 4536// OAuth scope specifications should be fairly coarse grained; a user 4537// will need 4538// to see and understand the text description of what your scope 4539// means. 4540// 4541// In most cases: use one or at most two OAuth scopes for an entire 4542// family of 4543// products. If your product has multiple APIs, you should probably be 4544// sharing 4545// the OAuth scope across all of those APIs. 4546// 4547// When you need finer grained OAuth consent screens: talk with your 4548// product 4549// management about how developers will use them in practice. 4550// 4551// Please note that even though each of the canonical scopes is enough 4552// for a 4553// request to be accepted and passed to the backend, a request can still 4554// fail 4555// due to the backend requiring additional scopes or permissions. 4556type OAuthRequirements struct { 4557 // CanonicalScopes: The list of publicly documented OAuth scopes that 4558 // are allowed access. An 4559 // OAuth token containing any of these scopes will be 4560 // accepted. 4561 // 4562 // Example: 4563 // 4564 // canonical_scopes: https://www.googleapis.com/auth/calendar, 4565 // https://www.googleapis.com/auth/calendar.read 4566 CanonicalScopes string `json:"canonicalScopes,omitempty"` 4567 4568 // ForceSendFields is a list of field names (e.g. "CanonicalScopes") to 4569 // unconditionally include in API requests. By default, fields with 4570 // empty values are omitted from API requests. However, any non-pointer, 4571 // non-interface field appearing in ForceSendFields will be sent to the 4572 // server regardless of whether the field is empty or not. This may be 4573 // used to include empty fields in Patch requests. 4574 ForceSendFields []string `json:"-"` 4575 4576 // NullFields is a list of field names (e.g. "CanonicalScopes") to 4577 // include in API requests with the JSON null value. By default, fields 4578 // with empty values are omitted from API requests. However, any field 4579 // with an empty value appearing in NullFields will be sent to the 4580 // server as null. It is an error if a field in this list has a 4581 // non-empty value. This may be used to include null fields in Patch 4582 // requests. 4583 NullFields []string `json:"-"` 4584} 4585 4586func (s *OAuthRequirements) MarshalJSON() ([]byte, error) { 4587 type NoMethod OAuthRequirements 4588 raw := NoMethod(*s) 4589 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4590} 4591 4592// Operation: This resource represents a long-running operation that is 4593// the result of a 4594// network API call. 4595type Operation struct { 4596 // Done: If the value is `false`, it means the operation is still in 4597 // progress. 4598 // If `true`, the operation is completed, and either `error` or 4599 // `response` is 4600 // available. 4601 Done bool `json:"done,omitempty"` 4602 4603 // Error: The error result of the operation in case of failure or 4604 // cancellation. 4605 Error *Status `json:"error,omitempty"` 4606 4607 // Metadata: Service-specific metadata associated with the operation. 4608 // It typically 4609 // contains progress information and common metadata such as create 4610 // time. 4611 // Some services might not provide such metadata. Any method that 4612 // returns a 4613 // long-running operation should document the metadata type, if any. 4614 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 4615 4616 // Name: The server-assigned name, which is only unique within the same 4617 // service that 4618 // originally returns it. If you use the default HTTP mapping, 4619 // the 4620 // `name` should be a resource name ending with 4621 // `operations/{unique_id}`. 4622 Name string `json:"name,omitempty"` 4623 4624 // Response: The normal response of the operation in case of success. 4625 // If the original 4626 // method returns no data on success, such as `Delete`, the response 4627 // is 4628 // `google.protobuf.Empty`. If the original method is 4629 // standard 4630 // `Get`/`Create`/`Update`, the response should be the resource. For 4631 // other 4632 // methods, the response should have the type `XxxResponse`, where 4633 // `Xxx` 4634 // is the original method name. For example, if the original method 4635 // name 4636 // is `TakeSnapshot()`, the inferred response type 4637 // is 4638 // `TakeSnapshotResponse`. 4639 Response googleapi.RawMessage `json:"response,omitempty"` 4640 4641 // ServerResponse contains the HTTP response code and headers from the 4642 // server. 4643 googleapi.ServerResponse `json:"-"` 4644 4645 // ForceSendFields is a list of field names (e.g. "Done") to 4646 // unconditionally include in API requests. By default, fields with 4647 // empty values are omitted from API requests. However, any non-pointer, 4648 // non-interface field appearing in ForceSendFields will be sent to the 4649 // server regardless of whether the field is empty or not. This may be 4650 // used to include empty fields in Patch requests. 4651 ForceSendFields []string `json:"-"` 4652 4653 // NullFields is a list of field names (e.g. "Done") to include in API 4654 // requests with the JSON null value. By default, fields with empty 4655 // values are omitted from API requests. However, any field with an 4656 // empty value appearing in NullFields will be sent to the server as 4657 // null. It is an error if a field in this list has a non-empty value. 4658 // This may be used to include null fields in Patch requests. 4659 NullFields []string `json:"-"` 4660} 4661 4662func (s *Operation) MarshalJSON() ([]byte, error) { 4663 type NoMethod Operation 4664 raw := NoMethod(*s) 4665 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4666} 4667 4668// OperationMetadata: The metadata associated with a long running 4669// operation resource. 4670type OperationMetadata struct { 4671 // ProgressPercentage: Percentage of completion of this operation, 4672 // ranging from 0 to 100. 4673 ProgressPercentage int64 `json:"progressPercentage,omitempty"` 4674 4675 // ResourceNames: The full name of the resources that this operation is 4676 // directly 4677 // associated with. 4678 ResourceNames []string `json:"resourceNames,omitempty"` 4679 4680 // StartTime: The start time of the operation. 4681 StartTime string `json:"startTime,omitempty"` 4682 4683 // Steps: Detailed status information for each step. The order is 4684 // undetermined. 4685 Steps []*Step `json:"steps,omitempty"` 4686 4687 // ForceSendFields is a list of field names (e.g. "ProgressPercentage") 4688 // to unconditionally include in API requests. By default, fields with 4689 // empty values are omitted from API requests. However, any non-pointer, 4690 // non-interface field appearing in ForceSendFields will be sent to the 4691 // server regardless of whether the field is empty or not. This may be 4692 // used to include empty fields in Patch requests. 4693 ForceSendFields []string `json:"-"` 4694 4695 // NullFields is a list of field names (e.g. "ProgressPercentage") to 4696 // include in API requests with the JSON null value. By default, fields 4697 // with empty values are omitted from API requests. However, any field 4698 // with an empty value appearing in NullFields will be sent to the 4699 // server as null. It is an error if a field in this list has a 4700 // non-empty value. This may be used to include null fields in Patch 4701 // requests. 4702 NullFields []string `json:"-"` 4703} 4704 4705func (s *OperationMetadata) MarshalJSON() ([]byte, error) { 4706 type NoMethod OperationMetadata 4707 raw := NoMethod(*s) 4708 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4709} 4710 4711// Option: A protocol buffer option, which can be attached to a message, 4712// field, 4713// enumeration, etc. 4714type Option struct { 4715 // Name: The option's name. For protobuf built-in options (options 4716 // defined in 4717 // descriptor.proto), this is the short name. For example, 4718 // "map_entry". 4719 // For custom options, it should be the fully-qualified name. For 4720 // example, 4721 // "google.api.http". 4722 Name string `json:"name,omitempty"` 4723 4724 // Value: The option's value packed in an Any message. If the value is a 4725 // primitive, 4726 // the corresponding wrapper type defined in 4727 // google/protobuf/wrappers.proto 4728 // should be used. If the value is an enum, it should be stored as an 4729 // int32 4730 // value using the google.protobuf.Int32Value type. 4731 Value googleapi.RawMessage `json:"value,omitempty"` 4732 4733 // ForceSendFields is a list of field names (e.g. "Name") to 4734 // unconditionally include in API requests. By default, fields with 4735 // empty values are omitted from API requests. However, any non-pointer, 4736 // non-interface field appearing in ForceSendFields will be sent to the 4737 // server regardless of whether the field is empty or not. This may be 4738 // used to include empty fields in Patch requests. 4739 ForceSendFields []string `json:"-"` 4740 4741 // NullFields is a list of field names (e.g. "Name") to include in API 4742 // requests with the JSON null value. By default, fields with empty 4743 // values are omitted from API requests. However, any field with an 4744 // empty value appearing in NullFields will be sent to the server as 4745 // null. It is an error if a field in this list has a non-empty value. 4746 // This may be used to include null fields in Patch requests. 4747 NullFields []string `json:"-"` 4748} 4749 4750func (s *Option) MarshalJSON() ([]byte, error) { 4751 type NoMethod Option 4752 raw := NoMethod(*s) 4753 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4754} 4755 4756// Page: Represents a documentation page. A page can contain subpages to 4757// represent 4758// nested documentation set structure. 4759type Page struct { 4760 // Content: The Markdown content of the page. You can use <code>(== 4761 // include {path} 4762 // ==)</code> to include content from a Markdown file. 4763 Content string `json:"content,omitempty"` 4764 4765 // Name: The name of the page. It will be used as an identity of the 4766 // page to 4767 // generate URI of the page, text of the link to this page in 4768 // navigation, 4769 // etc. The full page name (start from the root page name to this 4770 // page 4771 // concatenated with `.`) can be used as reference to the page in 4772 // your 4773 // documentation. For example: 4774 // <pre><code>pages: 4775 // - name: Tutorial 4776 // content: (== include tutorial.md ==) 4777 // subpages: 4778 // - name: Java 4779 // content: (== include tutorial_java.md 4780 // ==) 4781 // </code></pre> 4782 // You can reference `Java` page using Markdown reference link 4783 // syntax: 4784 // `Java`. 4785 Name string `json:"name,omitempty"` 4786 4787 // Subpages: Subpages of this page. The order of subpages specified here 4788 // will be 4789 // honored in the generated docset. 4790 Subpages []*Page `json:"subpages,omitempty"` 4791 4792 // ForceSendFields is a list of field names (e.g. "Content") to 4793 // unconditionally include in API requests. By default, fields with 4794 // empty values are omitted from API requests. However, any non-pointer, 4795 // non-interface field appearing in ForceSendFields will be sent to the 4796 // server regardless of whether the field is empty or not. This may be 4797 // used to include empty fields in Patch requests. 4798 ForceSendFields []string `json:"-"` 4799 4800 // NullFields is a list of field names (e.g. "Content") to include in 4801 // API requests with the JSON null value. By default, fields with empty 4802 // values are omitted from API requests. However, any field with an 4803 // empty value appearing in NullFields will be sent to the server as 4804 // null. It is an error if a field in this list has a non-empty value. 4805 // This may be used to include null fields in Patch requests. 4806 NullFields []string `json:"-"` 4807} 4808 4809func (s *Page) MarshalJSON() ([]byte, error) { 4810 type NoMethod Page 4811 raw := NoMethod(*s) 4812 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4813} 4814 4815// Policy: An Identity and Access Management (IAM) policy, which 4816// specifies access 4817// controls for Google Cloud resources. 4818// 4819// 4820// A `Policy` is a collection of `bindings`. A `binding` binds one or 4821// more 4822// `members` to a single `role`. Members can be user accounts, service 4823// accounts, 4824// Google groups, and domains (such as G Suite). A `role` is a named 4825// list of 4826// permissions; each `role` can be an IAM predefined role or a 4827// user-created 4828// custom role. 4829// 4830// For some types of Google Cloud resources, a `binding` can also 4831// specify a 4832// `condition`, which is a logical expression that allows access to a 4833// resource 4834// only if the expression evaluates to `true`. A condition can add 4835// constraints 4836// based on attributes of the request, the resource, or both. To learn 4837// which 4838// resources support conditions in their IAM policies, see the 4839// [IAM 4840// documentation](https://cloud.google.com/iam/help/conditions/resource-p 4841// olicies). 4842// 4843// **JSON example:** 4844// 4845// { 4846// "bindings": [ 4847// { 4848// "role": "roles/resourcemanager.organizationAdmin", 4849// "members": [ 4850// "user:mike@example.com", 4851// "group:admins@example.com", 4852// "domain:google.com", 4853// 4854// "serviceAccount:my-project-id@appspot.gserviceaccount.com" 4855// ] 4856// }, 4857// { 4858// "role": "roles/resourcemanager.organizationViewer", 4859// "members": [ 4860// "user:eve@example.com" 4861// ], 4862// "condition": { 4863// "title": "expirable access", 4864// "description": "Does not grant access after Sep 2020", 4865// "expression": "request.time < 4866// timestamp('2020-10-01T00:00:00.000Z')", 4867// } 4868// } 4869// ], 4870// "etag": "BwWWja0YfJA=", 4871// "version": 3 4872// } 4873// 4874// **YAML example:** 4875// 4876// bindings: 4877// - members: 4878// - user:mike@example.com 4879// - group:admins@example.com 4880// - domain:google.com 4881// - serviceAccount:my-project-id@appspot.gserviceaccount.com 4882// role: roles/resourcemanager.organizationAdmin 4883// - members: 4884// - user:eve@example.com 4885// role: roles/resourcemanager.organizationViewer 4886// condition: 4887// title: expirable access 4888// description: Does not grant access after Sep 2020 4889// expression: request.time < 4890// timestamp('2020-10-01T00:00:00.000Z') 4891// - etag: BwWWja0YfJA= 4892// - version: 3 4893// 4894// For a description of IAM and its features, see the 4895// [IAM documentation](https://cloud.google.com/iam/docs/). 4896type Policy struct { 4897 // AuditConfigs: Specifies cloud audit logging configuration for this 4898 // policy. 4899 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 4900 4901 // Bindings: Associates a list of `members` to a `role`. Optionally, may 4902 // specify a 4903 // `condition` that determines how and when the `bindings` are applied. 4904 // Each 4905 // of the `bindings` must contain at least one member. 4906 Bindings []*Binding `json:"bindings,omitempty"` 4907 4908 // Etag: `etag` is used for optimistic concurrency control as a way to 4909 // help 4910 // prevent simultaneous updates of a policy from overwriting each 4911 // other. 4912 // It is strongly suggested that systems make use of the `etag` in 4913 // the 4914 // read-modify-write cycle to perform policy updates in order to avoid 4915 // race 4916 // conditions: An `etag` is returned in the response to `getIamPolicy`, 4917 // and 4918 // systems are expected to put that etag in the request to 4919 // `setIamPolicy` to 4920 // ensure that their change will be applied to the same version of the 4921 // policy. 4922 // 4923 // **Important:** If you use IAM Conditions, you must include the `etag` 4924 // field 4925 // whenever you call `setIamPolicy`. If you omit this field, then IAM 4926 // allows 4927 // you to overwrite a version `3` policy with a version `1` policy, and 4928 // all of 4929 // the conditions in the version `3` policy are lost. 4930 Etag string `json:"etag,omitempty"` 4931 4932 // Version: Specifies the format of the policy. 4933 // 4934 // Valid values are `0`, `1`, and `3`. Requests that specify an invalid 4935 // value 4936 // are rejected. 4937 // 4938 // Any operation that affects conditional role bindings must specify 4939 // version 4940 // `3`. This requirement applies to the following operations: 4941 // 4942 // * Getting a policy that includes a conditional role binding 4943 // * Adding a conditional role binding to a policy 4944 // * Changing a conditional role binding in a policy 4945 // * Removing any role binding, with or without a condition, from a 4946 // policy 4947 // that includes conditions 4948 // 4949 // **Important:** If you use IAM Conditions, you must include the `etag` 4950 // field 4951 // whenever you call `setIamPolicy`. If you omit this field, then IAM 4952 // allows 4953 // you to overwrite a version `3` policy with a version `1` policy, and 4954 // all of 4955 // the conditions in the version `3` policy are lost. 4956 // 4957 // If a policy does not include any conditions, operations on that 4958 // policy may 4959 // specify any valid version or leave the field unset. 4960 // 4961 // To learn which resources support conditions in their IAM policies, 4962 // see the 4963 // [IAM 4964 // documentation](https://cloud.google.com/iam/help/conditions/resource-p 4965 // olicies). 4966 Version int64 `json:"version,omitempty"` 4967 4968 // ServerResponse contains the HTTP response code and headers from the 4969 // server. 4970 googleapi.ServerResponse `json:"-"` 4971 4972 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 4973 // unconditionally include in API requests. By default, fields with 4974 // empty values are omitted from API requests. However, any non-pointer, 4975 // non-interface field appearing in ForceSendFields will be sent to the 4976 // server regardless of whether the field is empty or not. This may be 4977 // used to include empty fields in Patch requests. 4978 ForceSendFields []string `json:"-"` 4979 4980 // NullFields is a list of field names (e.g. "AuditConfigs") to include 4981 // in API requests with the JSON null value. By default, fields with 4982 // empty values are omitted from API requests. However, any field with 4983 // an empty value appearing in NullFields will be sent to the server as 4984 // null. It is an error if a field in this list has a non-empty value. 4985 // This may be used to include null fields in Patch requests. 4986 NullFields []string `json:"-"` 4987} 4988 4989func (s *Policy) MarshalJSON() ([]byte, error) { 4990 type NoMethod Policy 4991 raw := NoMethod(*s) 4992 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4993} 4994 4995// Quota: Quota configuration helps to achieve fairness and budgeting in 4996// service 4997// usage. 4998// 4999// The metric based quota configuration works this way: 5000// - The service configuration defines a set of metrics. 5001// - For API calls, the quota.metric_rules maps methods to metrics with 5002// corresponding costs. 5003// - The quota.limits defines limits on the metrics, which will be used 5004// for 5005// quota checks at runtime. 5006// 5007// An example quota configuration in yaml format: 5008// 5009// quota: 5010// limits: 5011// 5012// - name: apiWriteQpsPerProject 5013// metric: library.googleapis.com/write_calls 5014// unit: "1/min/{project}" # rate limit for consumer projects 5015// values: 5016// STANDARD: 10000 5017// 5018// 5019// # The metric rules bind all methods to the read_calls metric, 5020// # except for the UpdateBook and DeleteBook methods. These two 5021// methods 5022// # are mapped to the write_calls metric, with the UpdateBook 5023// method 5024// # consuming at twice rate as the DeleteBook method. 5025// metric_rules: 5026// - selector: "*" 5027// metric_costs: 5028// library.googleapis.com/read_calls: 1 5029// - selector: google.example.library.v1.LibraryService.UpdateBook 5030// metric_costs: 5031// library.googleapis.com/write_calls: 2 5032// - selector: google.example.library.v1.LibraryService.DeleteBook 5033// metric_costs: 5034// library.googleapis.com/write_calls: 1 5035// 5036// Corresponding Metric definition: 5037// 5038// metrics: 5039// - name: library.googleapis.com/read_calls 5040// display_name: Read requests 5041// metric_kind: DELTA 5042// value_type: INT64 5043// 5044// - name: library.googleapis.com/write_calls 5045// display_name: Write requests 5046// metric_kind: DELTA 5047// value_type: INT64 5048// 5049// 5050type Quota struct { 5051 // Limits: List of `QuotaLimit` definitions for the service. 5052 Limits []*QuotaLimit `json:"limits,omitempty"` 5053 5054 // MetricRules: List of `MetricRule` definitions, each one mapping a 5055 // selected method to one 5056 // or more metrics. 5057 MetricRules []*MetricRule `json:"metricRules,omitempty"` 5058 5059 // ForceSendFields is a list of field names (e.g. "Limits") to 5060 // unconditionally include in API requests. By default, fields with 5061 // empty values are omitted from API requests. However, any non-pointer, 5062 // non-interface field appearing in ForceSendFields will be sent to the 5063 // server regardless of whether the field is empty or not. This may be 5064 // used to include empty fields in Patch requests. 5065 ForceSendFields []string `json:"-"` 5066 5067 // NullFields is a list of field names (e.g. "Limits") to include in API 5068 // requests with the JSON null value. By default, fields with empty 5069 // values are omitted from API requests. However, any field with an 5070 // empty value appearing in NullFields will be sent to the server as 5071 // null. It is an error if a field in this list has a non-empty value. 5072 // This may be used to include null fields in Patch requests. 5073 NullFields []string `json:"-"` 5074} 5075 5076func (s *Quota) MarshalJSON() ([]byte, error) { 5077 type NoMethod Quota 5078 raw := NoMethod(*s) 5079 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5080} 5081 5082// QuotaLimit: `QuotaLimit` defines a specific limit that applies over a 5083// specified duration 5084// for a limit type. There can be at most one limit for a duration and 5085// limit 5086// type combination defined within a `QuotaGroup`. 5087type QuotaLimit struct { 5088 // DefaultLimit: Default number of tokens that can be consumed during 5089 // the specified 5090 // duration. This is the number of tokens assigned when a 5091 // client 5092 // application developer activates the service for his/her 5093 // project. 5094 // 5095 // Specifying a value of 0 will block all requests. This can be used if 5096 // you 5097 // are provisioning quota to selected consumers and blocking 5098 // others. 5099 // Similarly, a value of -1 will indicate an unlimited quota. No 5100 // other 5101 // negative values are allowed. 5102 // 5103 // Used by group-based quotas only. 5104 DefaultLimit int64 `json:"defaultLimit,omitempty,string"` 5105 5106 // Description: Optional. User-visible, extended description for this 5107 // quota limit. 5108 // Should be used only when more context is needed to understand this 5109 // limit 5110 // than provided by the limit's display name (see: `display_name`). 5111 Description string `json:"description,omitempty"` 5112 5113 // DisplayName: User-visible display name for this limit. 5114 // Optional. If not set, the UI will provide a default display name 5115 // based on 5116 // the quota configuration. This field can be used to override the 5117 // default 5118 // display name generated from the configuration. 5119 DisplayName string `json:"displayName,omitempty"` 5120 5121 // Duration: Duration of this limit in textual notation. Must be "100s" 5122 // or "1d". 5123 // 5124 // Used by group-based quotas only. 5125 Duration string `json:"duration,omitempty"` 5126 5127 // FreeTier: Free tier value displayed in the Developers Console for 5128 // this limit. 5129 // The free tier is the number of tokens that will be subtracted from 5130 // the 5131 // billed amount when billing is enabled. 5132 // This field can only be set on a limit with duration "1d", in a 5133 // billable 5134 // group; it is invalid on any other limit. If this field is not set, 5135 // it 5136 // defaults to 0, indicating that there is no free tier for this 5137 // service. 5138 // 5139 // Used by group-based quotas only. 5140 FreeTier int64 `json:"freeTier,omitempty,string"` 5141 5142 // MaxLimit: Maximum number of tokens that can be consumed during the 5143 // specified 5144 // duration. Client application developers can override the default 5145 // limit up 5146 // to this maximum. If specified, this value cannot be set to a value 5147 // less 5148 // than the default limit. If not specified, it is set to the default 5149 // limit. 5150 // 5151 // To allow clients to apply overrides with no upper bound, set this to 5152 // -1, 5153 // indicating unlimited maximum quota. 5154 // 5155 // Used by group-based quotas only. 5156 MaxLimit int64 `json:"maxLimit,omitempty,string"` 5157 5158 // Metric: The name of the metric this quota limit applies to. The quota 5159 // limits with 5160 // the same metric will be checked together during runtime. The metric 5161 // must be 5162 // defined within the service config. 5163 Metric string `json:"metric,omitempty"` 5164 5165 // Name: Name of the quota limit. 5166 // 5167 // The name must be provided, and it must be unique within the service. 5168 // The 5169 // name can only include alphanumeric characters as well as '-'. 5170 // 5171 // The maximum length of the limit name is 64 characters. 5172 Name string `json:"name,omitempty"` 5173 5174 // Unit: Specify the unit of the quota limit. It uses the same syntax 5175 // as 5176 // Metric.unit. The supported unit kinds are determined by the 5177 // quota 5178 // backend system. 5179 // 5180 // Here are some examples: 5181 // * "1/min/{project}" for quota per minute per project. 5182 // 5183 // Note: the order of unit components is insignificant. 5184 // The "1" at the beginning is required to follow the metric unit 5185 // syntax. 5186 Unit string `json:"unit,omitempty"` 5187 5188 // Values: Tiered limit values. You must specify this as a key:value 5189 // pair, with an 5190 // integer value that is the maximum number of requests allowed for 5191 // the 5192 // specified unit. Currently only STANDARD is supported. 5193 Values map[string]string `json:"values,omitempty"` 5194 5195 // ForceSendFields is a list of field names (e.g. "DefaultLimit") to 5196 // unconditionally include in API requests. By default, fields with 5197 // empty values are omitted from API requests. However, any non-pointer, 5198 // non-interface field appearing in ForceSendFields will be sent to the 5199 // server regardless of whether the field is empty or not. This may be 5200 // used to include empty fields in Patch requests. 5201 ForceSendFields []string `json:"-"` 5202 5203 // NullFields is a list of field names (e.g. "DefaultLimit") to include 5204 // in API requests with the JSON null value. By default, fields with 5205 // empty values are omitted from API requests. However, any field with 5206 // an empty value appearing in NullFields will be sent to the server as 5207 // null. It is an error if a field in this list has a non-empty value. 5208 // This may be used to include null fields in Patch requests. 5209 NullFields []string `json:"-"` 5210} 5211 5212func (s *QuotaLimit) MarshalJSON() ([]byte, error) { 5213 type NoMethod QuotaLimit 5214 raw := NoMethod(*s) 5215 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5216} 5217 5218// Rollout: A rollout resource that defines how service configuration 5219// versions are pushed 5220// to control plane systems. Typically, you create a new version of 5221// the 5222// service config, and then create a Rollout to push the service config. 5223type Rollout struct { 5224 // CreateTime: Creation time of the rollout. Readonly. 5225 CreateTime string `json:"createTime,omitempty"` 5226 5227 // CreatedBy: This field is deprecated and will be deleted. Please 5228 // remove usage of 5229 // this field. 5230 CreatedBy string `json:"createdBy,omitempty"` 5231 5232 // DeleteServiceStrategy: The strategy associated with a rollout to 5233 // delete a `ManagedService`. 5234 // Readonly. 5235 DeleteServiceStrategy *DeleteServiceStrategy `json:"deleteServiceStrategy,omitempty"` 5236 5237 // RolloutId: Optional. Unique identifier of this Rollout. Must be no 5238 // longer than 63 characters 5239 // and only lower case letters, digits, '.', '_' and '-' are 5240 // allowed. 5241 // 5242 // If not specified by client, the server will generate one. The 5243 // generated id 5244 // will have the form of <date><revision number>, where "date" is the 5245 // create 5246 // date in ISO 8601 format. "revision number" is a monotonically 5247 // increasing 5248 // positive number that is reset every day for each service. 5249 // An example of the generated rollout_id is '2016-02-16r1' 5250 RolloutId string `json:"rolloutId,omitempty"` 5251 5252 // ServiceName: The name of the service associated with this Rollout. 5253 ServiceName string `json:"serviceName,omitempty"` 5254 5255 // Status: The status of this rollout. Readonly. In case of a failed 5256 // rollout, 5257 // the system will automatically rollback to the current 5258 // Rollout 5259 // version. Readonly. 5260 // 5261 // Possible values: 5262 // "ROLLOUT_STATUS_UNSPECIFIED" - No status specified. 5263 // "IN_PROGRESS" - The Rollout is in progress. 5264 // "SUCCESS" - The Rollout has completed successfully. 5265 // "CANCELLED" - The Rollout has been cancelled. This can happen if 5266 // you have overlapping 5267 // Rollout pushes, and the previous ones will be cancelled. 5268 // "FAILED" - The Rollout has failed and the rollback attempt has 5269 // failed too. 5270 // "PENDING" - The Rollout has not started yet and is pending for 5271 // execution. 5272 // "FAILED_ROLLED_BACK" - The Rollout has failed and rolled back to 5273 // the previous successful 5274 // Rollout. 5275 Status string `json:"status,omitempty"` 5276 5277 // TrafficPercentStrategy: Google Service Control selects service 5278 // configurations based on 5279 // traffic percentage. 5280 TrafficPercentStrategy *TrafficPercentStrategy `json:"trafficPercentStrategy,omitempty"` 5281 5282 // ServerResponse contains the HTTP response code and headers from the 5283 // server. 5284 googleapi.ServerResponse `json:"-"` 5285 5286 // ForceSendFields is a list of field names (e.g. "CreateTime") to 5287 // unconditionally include in API requests. By default, fields with 5288 // empty values are omitted from API requests. However, any non-pointer, 5289 // non-interface field appearing in ForceSendFields will be sent to the 5290 // server regardless of whether the field is empty or not. This may be 5291 // used to include empty fields in Patch requests. 5292 ForceSendFields []string `json:"-"` 5293 5294 // NullFields is a list of field names (e.g. "CreateTime") to include in 5295 // API requests with the JSON null value. By default, fields with empty 5296 // values are omitted from API requests. However, any field with an 5297 // empty value appearing in NullFields will be sent to the server as 5298 // null. It is an error if a field in this list has a non-empty value. 5299 // This may be used to include null fields in Patch requests. 5300 NullFields []string `json:"-"` 5301} 5302 5303func (s *Rollout) MarshalJSON() ([]byte, error) { 5304 type NoMethod Rollout 5305 raw := NoMethod(*s) 5306 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5307} 5308 5309// Service: `Service` is the root object of Google service configuration 5310// schema. It 5311// describes basic information about a service, such as the name and 5312// the 5313// title, and delegates other aspects to sub-sections. Each sub-section 5314// is 5315// either a proto message or a repeated proto message that configures 5316// a 5317// specific aspect, such as auth. See each proto message definition for 5318// details. 5319// 5320// Example: 5321// 5322// type: google.api.Service 5323// config_version: 3 5324// name: calendar.googleapis.com 5325// title: Google Calendar API 5326// apis: 5327// - name: google.calendar.v3.Calendar 5328// authentication: 5329// providers: 5330// - id: google_calendar_auth 5331// jwks_uri: https://www.googleapis.com/oauth2/v1/certs 5332// issuer: https://securetoken.google.com 5333// rules: 5334// - selector: "*" 5335// requirements: 5336// provider_id: google_calendar_auth 5337type Service struct { 5338 // Apis: A list of API interfaces exported by this service. Only the 5339 // `name` field 5340 // of the google.protobuf.Api needs to be provided by the 5341 // configuration 5342 // author, as the remaining fields will be derived from the IDL during 5343 // the 5344 // normalization process. It is an error to specify an API interface 5345 // here 5346 // which cannot be resolved against the associated IDL files. 5347 Apis []*Api `json:"apis,omitempty"` 5348 5349 // Authentication: Auth configuration. 5350 Authentication *Authentication `json:"authentication,omitempty"` 5351 5352 // Backend: API backend configuration. 5353 Backend *Backend `json:"backend,omitempty"` 5354 5355 // Billing: Billing configuration. 5356 Billing *Billing `json:"billing,omitempty"` 5357 5358 // ConfigVersion: The semantic version of the service configuration. The 5359 // config version 5360 // affects the interpretation of the service configuration. For 5361 // example, 5362 // certain features are enabled by default for certain config 5363 // versions. 5364 // 5365 // The latest config version is `3`. 5366 ConfigVersion int64 `json:"configVersion,omitempty"` 5367 5368 // Context: Context configuration. 5369 Context *Context `json:"context,omitempty"` 5370 5371 // Control: Configuration for the service control plane. 5372 Control *Control `json:"control,omitempty"` 5373 5374 // CustomError: Custom error configuration. 5375 CustomError *CustomError `json:"customError,omitempty"` 5376 5377 // Documentation: Additional API documentation. 5378 Documentation *Documentation `json:"documentation,omitempty"` 5379 5380 // Endpoints: Configuration for network endpoints. If this is empty, 5381 // then an endpoint 5382 // with the same name as the service is automatically generated to 5383 // service all 5384 // defined APIs. 5385 Endpoints []*Endpoint `json:"endpoints,omitempty"` 5386 5387 // Enums: A list of all enum types included in this API service. 5388 // Enums 5389 // referenced directly or indirectly by the `apis` are 5390 // automatically 5391 // included. Enums which are not referenced but shall be 5392 // included 5393 // should be listed here by name. Example: 5394 // 5395 // enums: 5396 // - name: google.someapi.v1.SomeEnum 5397 Enums []*Enum `json:"enums,omitempty"` 5398 5399 // Http: HTTP configuration. 5400 Http *Http `json:"http,omitempty"` 5401 5402 // Id: A unique ID for a specific instance of this message, typically 5403 // assigned 5404 // by the client for tracking purpose. Must be no longer than 63 5405 // characters 5406 // and only lower case letters, digits, '.', '_' and '-' are allowed. 5407 // If 5408 // empty, the server may choose to generate one instead. 5409 Id string `json:"id,omitempty"` 5410 5411 // Logging: Logging configuration. 5412 Logging *Logging `json:"logging,omitempty"` 5413 5414 // Logs: Defines the logs used by this service. 5415 Logs []*LogDescriptor `json:"logs,omitempty"` 5416 5417 // Metrics: Defines the metrics used by this service. 5418 Metrics []*MetricDescriptor `json:"metrics,omitempty"` 5419 5420 // MonitoredResources: Defines the monitored resources used by this 5421 // service. This is required 5422 // by the Service.monitoring and Service.logging configurations. 5423 MonitoredResources []*MonitoredResourceDescriptor `json:"monitoredResources,omitempty"` 5424 5425 // Monitoring: Monitoring configuration. 5426 Monitoring *Monitoring `json:"monitoring,omitempty"` 5427 5428 // Name: The service name, which is a DNS-like logical identifier for 5429 // the 5430 // service, such as `calendar.googleapis.com`. The service 5431 // name 5432 // typically goes through DNS verification to make sure the owner 5433 // of the service also owns the DNS name. 5434 Name string `json:"name,omitempty"` 5435 5436 // ProducerProjectId: The Google project that owns this service. 5437 ProducerProjectId string `json:"producerProjectId,omitempty"` 5438 5439 // Quota: Quota configuration. 5440 Quota *Quota `json:"quota,omitempty"` 5441 5442 // SourceInfo: Output only. The source information for this 5443 // configuration if available. 5444 SourceInfo *SourceInfo `json:"sourceInfo,omitempty"` 5445 5446 // SystemParameters: System parameter configuration. 5447 SystemParameters *SystemParameters `json:"systemParameters,omitempty"` 5448 5449 // SystemTypes: A list of all proto message types included in this API 5450 // service. 5451 // It serves similar purpose as [google.api.Service.types], except 5452 // that 5453 // these types are not needed by user-defined APIs. Therefore, they will 5454 // not 5455 // show up in the generated discovery doc. This field should only be 5456 // used 5457 // to define system APIs in ESF. 5458 SystemTypes []*Type `json:"systemTypes,omitempty"` 5459 5460 // Title: The product title for this service. 5461 Title string `json:"title,omitempty"` 5462 5463 // Types: A list of all proto message types included in this API 5464 // service. 5465 // Types referenced directly or indirectly by the `apis` 5466 // are 5467 // automatically included. Messages which are not referenced but 5468 // shall be included, such as types used by the `google.protobuf.Any` 5469 // type, 5470 // should be listed here by name. Example: 5471 // 5472 // types: 5473 // - name: google.protobuf.Int32 5474 Types []*Type `json:"types,omitempty"` 5475 5476 // Usage: Configuration controlling usage of this service. 5477 Usage *Usage `json:"usage,omitempty"` 5478 5479 // ServerResponse contains the HTTP response code and headers from the 5480 // server. 5481 googleapi.ServerResponse `json:"-"` 5482 5483 // ForceSendFields is a list of field names (e.g. "Apis") to 5484 // unconditionally include in API requests. By default, fields with 5485 // empty values are omitted from API requests. However, any non-pointer, 5486 // non-interface field appearing in ForceSendFields will be sent to the 5487 // server regardless of whether the field is empty or not. This may be 5488 // used to include empty fields in Patch requests. 5489 ForceSendFields []string `json:"-"` 5490 5491 // NullFields is a list of field names (e.g. "Apis") to include in API 5492 // requests with the JSON null value. By default, fields with empty 5493 // values are omitted from API requests. However, any field with an 5494 // empty value appearing in NullFields will be sent to the server as 5495 // null. It is an error if a field in this list has a non-empty value. 5496 // This may be used to include null fields in Patch requests. 5497 NullFields []string `json:"-"` 5498} 5499 5500func (s *Service) MarshalJSON() ([]byte, error) { 5501 type NoMethod Service 5502 raw := NoMethod(*s) 5503 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5504} 5505 5506// ServiceIdentity: The per-product per-project service identity for a 5507// service. 5508// 5509// 5510// Use this field to configure per-product per-project service 5511// identity. 5512// Example of a service identity configuration. 5513// 5514// usage: 5515// service_identity: 5516// - service_account_parent: "projects/123456789" 5517// display_name: "Cloud XXX Service Agent" 5518// description: "Used as the identity of Cloud XXX to access 5519// resources" 5520type ServiceIdentity struct { 5521 // Description: Optional. A user-specified opaque description of the 5522 // service account. 5523 // Must be less than or equal to 256 UTF-8 bytes. 5524 Description string `json:"description,omitempty"` 5525 5526 // DisplayName: Optional. A user-specified name for the service 5527 // account. 5528 // Must be less than or equal to 100 UTF-8 bytes. 5529 DisplayName string `json:"displayName,omitempty"` 5530 5531 // ServiceAccountParent: A service account project that hosts the 5532 // service accounts. 5533 // 5534 // An example name would be: 5535 // `projects/123456789` 5536 ServiceAccountParent string `json:"serviceAccountParent,omitempty"` 5537 5538 // ForceSendFields is a list of field names (e.g. "Description") to 5539 // unconditionally include in API requests. By default, fields with 5540 // empty values are omitted from API requests. However, any non-pointer, 5541 // non-interface field appearing in ForceSendFields will be sent to the 5542 // server regardless of whether the field is empty or not. This may be 5543 // used to include empty fields in Patch requests. 5544 ForceSendFields []string `json:"-"` 5545 5546 // NullFields is a list of field names (e.g. "Description") to include 5547 // in API requests with the JSON null value. By default, fields with 5548 // empty values are omitted from API requests. However, any field with 5549 // an empty value appearing in NullFields will be sent to the server as 5550 // null. It is an error if a field in this list has a non-empty value. 5551 // This may be used to include null fields in Patch requests. 5552 NullFields []string `json:"-"` 5553} 5554 5555func (s *ServiceIdentity) MarshalJSON() ([]byte, error) { 5556 type NoMethod ServiceIdentity 5557 raw := NoMethod(*s) 5558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5559} 5560 5561// SetIamPolicyRequest: Request message for `SetIamPolicy` method. 5562type SetIamPolicyRequest struct { 5563 // Policy: REQUIRED: The complete policy to be applied to the 5564 // `resource`. The size of 5565 // the policy is limited to a few 10s of KB. An empty policy is a 5566 // valid policy but certain Cloud Platform services (such as 5567 // Projects) 5568 // might reject them. 5569 Policy *Policy `json:"policy,omitempty"` 5570 5571 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the 5572 // policy to modify. Only 5573 // the fields in the mask will be modified. If no mask is provided, 5574 // the 5575 // following default mask is used: 5576 // 5577 // `paths: "bindings, etag" 5578 UpdateMask string `json:"updateMask,omitempty"` 5579 5580 // ForceSendFields is a list of field names (e.g. "Policy") to 5581 // unconditionally include in API requests. By default, fields with 5582 // empty values are omitted from API requests. However, any non-pointer, 5583 // non-interface field appearing in ForceSendFields will be sent to the 5584 // server regardless of whether the field is empty or not. This may be 5585 // used to include empty fields in Patch requests. 5586 ForceSendFields []string `json:"-"` 5587 5588 // NullFields is a list of field names (e.g. "Policy") to include in API 5589 // requests with the JSON null value. By default, fields with empty 5590 // values are omitted from API requests. However, any field with an 5591 // empty value appearing in NullFields will be sent to the server as 5592 // null. It is an error if a field in this list has a non-empty value. 5593 // This may be used to include null fields in Patch requests. 5594 NullFields []string `json:"-"` 5595} 5596 5597func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 5598 type NoMethod SetIamPolicyRequest 5599 raw := NoMethod(*s) 5600 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5601} 5602 5603// SourceContext: `SourceContext` represents information about the 5604// source of a 5605// protobuf element, like the file in which it is defined. 5606type SourceContext struct { 5607 // FileName: The path-qualified name of the .proto file that contained 5608 // the associated 5609 // protobuf element. For example: 5610 // "google/protobuf/source_context.proto". 5611 FileName string `json:"fileName,omitempty"` 5612 5613 // ForceSendFields is a list of field names (e.g. "FileName") to 5614 // unconditionally include in API requests. By default, fields with 5615 // empty values are omitted from API requests. However, any non-pointer, 5616 // non-interface field appearing in ForceSendFields will be sent to the 5617 // server regardless of whether the field is empty or not. This may be 5618 // used to include empty fields in Patch requests. 5619 ForceSendFields []string `json:"-"` 5620 5621 // NullFields is a list of field names (e.g. "FileName") to include in 5622 // API requests with the JSON null value. By default, fields with empty 5623 // values are omitted from API requests. However, any field with an 5624 // empty value appearing in NullFields will be sent to the server as 5625 // null. It is an error if a field in this list has a non-empty value. 5626 // This may be used to include null fields in Patch requests. 5627 NullFields []string `json:"-"` 5628} 5629 5630func (s *SourceContext) MarshalJSON() ([]byte, error) { 5631 type NoMethod SourceContext 5632 raw := NoMethod(*s) 5633 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5634} 5635 5636// SourceInfo: Source information used to create a Service Config 5637type SourceInfo struct { 5638 // SourceFiles: All files used during config generation. 5639 SourceFiles []googleapi.RawMessage `json:"sourceFiles,omitempty"` 5640 5641 // ForceSendFields is a list of field names (e.g. "SourceFiles") to 5642 // unconditionally include in API requests. By default, fields with 5643 // empty values are omitted from API requests. However, any non-pointer, 5644 // non-interface field appearing in ForceSendFields will be sent to the 5645 // server regardless of whether the field is empty or not. This may be 5646 // used to include empty fields in Patch requests. 5647 ForceSendFields []string `json:"-"` 5648 5649 // NullFields is a list of field names (e.g. "SourceFiles") to include 5650 // in API requests with the JSON null value. By default, fields with 5651 // empty values are omitted from API requests. However, any field with 5652 // an empty value appearing in NullFields will be sent to the server as 5653 // null. It is an error if a field in this list has a non-empty value. 5654 // This may be used to include null fields in Patch requests. 5655 NullFields []string `json:"-"` 5656} 5657 5658func (s *SourceInfo) MarshalJSON() ([]byte, error) { 5659 type NoMethod SourceInfo 5660 raw := NoMethod(*s) 5661 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5662} 5663 5664// Status: The `Status` type defines a logical error model that is 5665// suitable for 5666// different programming environments, including REST APIs and RPC APIs. 5667// It is 5668// used by [gRPC](https://github.com/grpc). Each `Status` message 5669// contains 5670// three pieces of data: error code, error message, and error 5671// details. 5672// 5673// You can find out more about this error model and how to work with it 5674// in the 5675// [API Design Guide](https://cloud.google.com/apis/design/errors). 5676type Status struct { 5677 // Code: The status code, which should be an enum value of 5678 // google.rpc.Code. 5679 Code int64 `json:"code,omitempty"` 5680 5681 // Details: A list of messages that carry the error details. There is a 5682 // common set of 5683 // message types for APIs to use. 5684 Details []googleapi.RawMessage `json:"details,omitempty"` 5685 5686 // Message: A developer-facing error message, which should be in 5687 // English. Any 5688 // user-facing error message should be localized and sent in 5689 // the 5690 // google.rpc.Status.details field, or localized by the client. 5691 Message string `json:"message,omitempty"` 5692 5693 // ForceSendFields is a list of field names (e.g. "Code") to 5694 // unconditionally include in API requests. By default, fields with 5695 // empty values are omitted from API requests. However, any non-pointer, 5696 // non-interface field appearing in ForceSendFields will be sent to the 5697 // server regardless of whether the field is empty or not. This may be 5698 // used to include empty fields in Patch requests. 5699 ForceSendFields []string `json:"-"` 5700 5701 // NullFields is a list of field names (e.g. "Code") to include in API 5702 // requests with the JSON null value. By default, fields with empty 5703 // values are omitted from API requests. However, any field with an 5704 // empty value appearing in NullFields will be sent to the server as 5705 // null. It is an error if a field in this list has a non-empty value. 5706 // This may be used to include null fields in Patch requests. 5707 NullFields []string `json:"-"` 5708} 5709 5710func (s *Status) MarshalJSON() ([]byte, error) { 5711 type NoMethod Status 5712 raw := NoMethod(*s) 5713 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5714} 5715 5716// Step: Represents the status of one operation step. 5717type Step struct { 5718 // Description: The short description of the step. 5719 Description string `json:"description,omitempty"` 5720 5721 // Status: The status code. 5722 // 5723 // Possible values: 5724 // "STATUS_UNSPECIFIED" - Unspecifed code. 5725 // "DONE" - The operation or step has completed without errors. 5726 // "NOT_STARTED" - The operation or step has not started yet. 5727 // "IN_PROGRESS" - The operation or step is in progress. 5728 // "FAILED" - The operation or step has completed with errors. If the 5729 // operation is 5730 // rollbackable, the rollback completed with errors too. 5731 // "CANCELLED" - The operation or step has completed with 5732 // cancellation. 5733 Status string `json:"status,omitempty"` 5734 5735 // ForceSendFields is a list of field names (e.g. "Description") to 5736 // unconditionally include in API requests. By default, fields with 5737 // empty values are omitted from API requests. However, any non-pointer, 5738 // non-interface field appearing in ForceSendFields will be sent to the 5739 // server regardless of whether the field is empty or not. This may be 5740 // used to include empty fields in Patch requests. 5741 ForceSendFields []string `json:"-"` 5742 5743 // NullFields is a list of field names (e.g. "Description") to include 5744 // in API requests with the JSON null value. By default, fields with 5745 // empty values are omitted from API requests. However, any field with 5746 // an empty value appearing in NullFields will be sent to the server as 5747 // null. It is an error if a field in this list has a non-empty value. 5748 // This may be used to include null fields in Patch requests. 5749 NullFields []string `json:"-"` 5750} 5751 5752func (s *Step) MarshalJSON() ([]byte, error) { 5753 type NoMethod Step 5754 raw := NoMethod(*s) 5755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5756} 5757 5758// SubmitConfigSourceRequest: Request message for SubmitConfigSource 5759// method. 5760type SubmitConfigSourceRequest struct { 5761 // ConfigSource: Required. The source configuration for the service. 5762 ConfigSource *ConfigSource `json:"configSource,omitempty"` 5763 5764 // ValidateOnly: Optional. If set, this will result in the generation of 5765 // a 5766 // `google.api.Service` configuration based on the `ConfigSource` 5767 // provided, 5768 // but the generated config and the sources will NOT be persisted. 5769 ValidateOnly bool `json:"validateOnly,omitempty"` 5770 5771 // ForceSendFields is a list of field names (e.g. "ConfigSource") to 5772 // unconditionally include in API requests. By default, fields with 5773 // empty values are omitted from API requests. However, any non-pointer, 5774 // non-interface field appearing in ForceSendFields will be sent to the 5775 // server regardless of whether the field is empty or not. This may be 5776 // used to include empty fields in Patch requests. 5777 ForceSendFields []string `json:"-"` 5778 5779 // NullFields is a list of field names (e.g. "ConfigSource") to include 5780 // in API requests with the JSON null value. By default, fields with 5781 // empty values are omitted from API requests. However, any field with 5782 // an empty value appearing in NullFields will be sent to the server as 5783 // null. It is an error if a field in this list has a non-empty value. 5784 // This may be used to include null fields in Patch requests. 5785 NullFields []string `json:"-"` 5786} 5787 5788func (s *SubmitConfigSourceRequest) MarshalJSON() ([]byte, error) { 5789 type NoMethod SubmitConfigSourceRequest 5790 raw := NoMethod(*s) 5791 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5792} 5793 5794// SubmitConfigSourceResponse: Response message for SubmitConfigSource 5795// method. 5796type SubmitConfigSourceResponse struct { 5797 // ServiceConfig: The generated service configuration. 5798 ServiceConfig *Service `json:"serviceConfig,omitempty"` 5799 5800 // ForceSendFields is a list of field names (e.g. "ServiceConfig") to 5801 // unconditionally include in API requests. By default, fields with 5802 // empty values are omitted from API requests. However, any non-pointer, 5803 // non-interface field appearing in ForceSendFields will be sent to the 5804 // server regardless of whether the field is empty or not. This may be 5805 // used to include empty fields in Patch requests. 5806 ForceSendFields []string `json:"-"` 5807 5808 // NullFields is a list of field names (e.g. "ServiceConfig") to include 5809 // in API requests with the JSON null value. By default, fields with 5810 // empty values are omitted from API requests. However, any field with 5811 // an empty value appearing in NullFields will be sent to the server as 5812 // null. It is an error if a field in this list has a non-empty value. 5813 // This may be used to include null fields in Patch requests. 5814 NullFields []string `json:"-"` 5815} 5816 5817func (s *SubmitConfigSourceResponse) MarshalJSON() ([]byte, error) { 5818 type NoMethod SubmitConfigSourceResponse 5819 raw := NoMethod(*s) 5820 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5821} 5822 5823// SystemParameter: Define a parameter's name and location. The 5824// parameter may be passed as either 5825// an HTTP header or a URL query parameter, and if both are passed the 5826// behavior 5827// is implementation-dependent. 5828type SystemParameter struct { 5829 // HttpHeader: Define the HTTP header name to use for the parameter. It 5830 // is case 5831 // insensitive. 5832 HttpHeader string `json:"httpHeader,omitempty"` 5833 5834 // Name: Define the name of the parameter, such as "api_key" . It is 5835 // case sensitive. 5836 Name string `json:"name,omitempty"` 5837 5838 // UrlQueryParameter: Define the URL query parameter name to use for the 5839 // parameter. It is case 5840 // sensitive. 5841 UrlQueryParameter string `json:"urlQueryParameter,omitempty"` 5842 5843 // ForceSendFields is a list of field names (e.g. "HttpHeader") to 5844 // unconditionally include in API requests. By default, fields with 5845 // empty values are omitted from API requests. However, any non-pointer, 5846 // non-interface field appearing in ForceSendFields will be sent to the 5847 // server regardless of whether the field is empty or not. This may be 5848 // used to include empty fields in Patch requests. 5849 ForceSendFields []string `json:"-"` 5850 5851 // NullFields is a list of field names (e.g. "HttpHeader") to include in 5852 // API requests with the JSON null value. By default, fields with empty 5853 // values are omitted from API requests. However, any field with an 5854 // empty value appearing in NullFields will be sent to the server as 5855 // null. It is an error if a field in this list has a non-empty value. 5856 // This may be used to include null fields in Patch requests. 5857 NullFields []string `json:"-"` 5858} 5859 5860func (s *SystemParameter) MarshalJSON() ([]byte, error) { 5861 type NoMethod SystemParameter 5862 raw := NoMethod(*s) 5863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5864} 5865 5866// SystemParameterRule: Define a system parameter rule mapping system 5867// parameter definitions to 5868// methods. 5869type SystemParameterRule struct { 5870 // Parameters: Define parameters. Multiple names may be defined for a 5871 // parameter. 5872 // For a given method call, only one of them should be used. If 5873 // multiple 5874 // names are used the behavior is implementation-dependent. 5875 // If none of the specified names are present the behavior 5876 // is 5877 // parameter-dependent. 5878 Parameters []*SystemParameter `json:"parameters,omitempty"` 5879 5880 // Selector: Selects the methods to which this rule applies. Use '*' to 5881 // indicate all 5882 // methods in all APIs. 5883 // 5884 // Refer to selector for syntax details. 5885 Selector string `json:"selector,omitempty"` 5886 5887 // ForceSendFields is a list of field names (e.g. "Parameters") to 5888 // unconditionally include in API requests. By default, fields with 5889 // empty values are omitted from API requests. However, any non-pointer, 5890 // non-interface field appearing in ForceSendFields will be sent to the 5891 // server regardless of whether the field is empty or not. This may be 5892 // used to include empty fields in Patch requests. 5893 ForceSendFields []string `json:"-"` 5894 5895 // NullFields is a list of field names (e.g. "Parameters") to include in 5896 // API requests with the JSON null value. By default, fields with empty 5897 // values are omitted from API requests. However, any field with an 5898 // empty value appearing in NullFields will be sent to the server as 5899 // null. It is an error if a field in this list has a non-empty value. 5900 // This may be used to include null fields in Patch requests. 5901 NullFields []string `json:"-"` 5902} 5903 5904func (s *SystemParameterRule) MarshalJSON() ([]byte, error) { 5905 type NoMethod SystemParameterRule 5906 raw := NoMethod(*s) 5907 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5908} 5909 5910// SystemParameters: ### System parameter configuration 5911// 5912// A system parameter is a special kind of parameter defined by the 5913// API 5914// system, not by an individual API. It is typically mapped to an HTTP 5915// header 5916// and/or a URL query parameter. This configuration specifies which 5917// methods 5918// change the names of the system parameters. 5919type SystemParameters struct { 5920 // Rules: Define system parameters. 5921 // 5922 // The parameters defined here will override the default 5923 // parameters 5924 // implemented by the system. If this field is missing from the 5925 // service 5926 // config, default system parameters will be used. Default system 5927 // parameters 5928 // and names is implementation-dependent. 5929 // 5930 // Example: define api key for all methods 5931 // 5932 // system_parameters 5933 // rules: 5934 // - selector: "*" 5935 // parameters: 5936 // - name: api_key 5937 // url_query_parameter: api_key 5938 // 5939 // 5940 // Example: define 2 api key names for a specific method. 5941 // 5942 // system_parameters 5943 // rules: 5944 // - selector: "/ListShelves" 5945 // parameters: 5946 // - name: api_key 5947 // http_header: Api-Key1 5948 // - name: api_key 5949 // http_header: Api-Key2 5950 // 5951 // **NOTE:** All service configuration rules follow "last one wins" 5952 // order. 5953 Rules []*SystemParameterRule `json:"rules,omitempty"` 5954 5955 // ForceSendFields is a list of field names (e.g. "Rules") to 5956 // unconditionally include in API requests. By default, fields with 5957 // empty values are omitted from API requests. However, any non-pointer, 5958 // non-interface field appearing in ForceSendFields will be sent to the 5959 // server regardless of whether the field is empty or not. This may be 5960 // used to include empty fields in Patch requests. 5961 ForceSendFields []string `json:"-"` 5962 5963 // NullFields is a list of field names (e.g. "Rules") to include in API 5964 // requests with the JSON null value. By default, fields with empty 5965 // values are omitted from API requests. However, any field with an 5966 // empty value appearing in NullFields will be sent to the server as 5967 // null. It is an error if a field in this list has a non-empty value. 5968 // This may be used to include null fields in Patch requests. 5969 NullFields []string `json:"-"` 5970} 5971 5972func (s *SystemParameters) MarshalJSON() ([]byte, error) { 5973 type NoMethod SystemParameters 5974 raw := NoMethod(*s) 5975 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5976} 5977 5978// TestIamPermissionsRequest: Request message for `TestIamPermissions` 5979// method. 5980type TestIamPermissionsRequest struct { 5981 // Permissions: The set of permissions to check for the `resource`. 5982 // Permissions with 5983 // wildcards (such as '*' or 'storage.*') are not allowed. For 5984 // more 5985 // information see 5986 // [IAM 5987 // Overview](https://cloud.google.com/iam/docs/overview#permissions). 5988 Permissions []string `json:"permissions,omitempty"` 5989 5990 // ForceSendFields is a list of field names (e.g. "Permissions") to 5991 // unconditionally include in API requests. By default, fields with 5992 // empty values are omitted from API requests. However, any non-pointer, 5993 // non-interface field appearing in ForceSendFields will be sent to the 5994 // server regardless of whether the field is empty or not. This may be 5995 // used to include empty fields in Patch requests. 5996 ForceSendFields []string `json:"-"` 5997 5998 // NullFields is a list of field names (e.g. "Permissions") to include 5999 // in API requests with the JSON null value. By default, fields with 6000 // empty values are omitted from API requests. However, any field with 6001 // an empty value appearing in NullFields will be sent to the server as 6002 // null. It is an error if a field in this list has a non-empty value. 6003 // This may be used to include null fields in Patch requests. 6004 NullFields []string `json:"-"` 6005} 6006 6007func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 6008 type NoMethod TestIamPermissionsRequest 6009 raw := NoMethod(*s) 6010 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6011} 6012 6013// TestIamPermissionsResponse: Response message for `TestIamPermissions` 6014// method. 6015type TestIamPermissionsResponse struct { 6016 // Permissions: A subset of `TestPermissionsRequest.permissions` that 6017 // the caller is 6018 // allowed. 6019 Permissions []string `json:"permissions,omitempty"` 6020 6021 // ServerResponse contains the HTTP response code and headers from the 6022 // server. 6023 googleapi.ServerResponse `json:"-"` 6024 6025 // ForceSendFields is a list of field names (e.g. "Permissions") to 6026 // unconditionally include in API requests. By default, fields with 6027 // empty values are omitted from API requests. However, any non-pointer, 6028 // non-interface field appearing in ForceSendFields will be sent to the 6029 // server regardless of whether the field is empty or not. This may be 6030 // used to include empty fields in Patch requests. 6031 ForceSendFields []string `json:"-"` 6032 6033 // NullFields is a list of field names (e.g. "Permissions") to include 6034 // in API requests with the JSON null value. By default, fields with 6035 // empty values are omitted from API requests. However, any field with 6036 // an empty value appearing in NullFields will be sent to the server as 6037 // null. It is an error if a field in this list has a non-empty value. 6038 // This may be used to include null fields in Patch requests. 6039 NullFields []string `json:"-"` 6040} 6041 6042func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 6043 type NoMethod TestIamPermissionsResponse 6044 raw := NoMethod(*s) 6045 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6046} 6047 6048// TrafficPercentStrategy: Strategy that specifies how clients of Google 6049// Service Controller want to 6050// send traffic to use different config versions. This is generally 6051// used by API proxy to split traffic based on your configured 6052// percentage for 6053// each config version. 6054// 6055// One example of how to gradually rollout a new service configuration 6056// using 6057// this 6058// strategy: 6059// Day 1 6060// 6061// Rollout { 6062// id: "example.googleapis.com/rollout_20160206" 6063// traffic_percent_strategy { 6064// percentages: { 6065// "example.googleapis.com/20160201": 70.00 6066// "example.googleapis.com/20160206": 30.00 6067// } 6068// } 6069// } 6070// 6071// Day 2 6072// 6073// Rollout { 6074// id: "example.googleapis.com/rollout_20160207" 6075// traffic_percent_strategy: { 6076// percentages: { 6077// "example.googleapis.com/20160206": 100.00 6078// } 6079// } 6080// } 6081type TrafficPercentStrategy struct { 6082 // Percentages: Maps service configuration IDs to their corresponding 6083 // traffic percentage. 6084 // Key is the service configuration ID, Value is the traffic 6085 // percentage 6086 // which must be greater than 0.0 and the sum must equal to 100.0. 6087 Percentages map[string]float64 `json:"percentages,omitempty"` 6088 6089 // ForceSendFields is a list of field names (e.g. "Percentages") to 6090 // unconditionally include in API requests. By default, fields with 6091 // empty values are omitted from API requests. However, any non-pointer, 6092 // non-interface field appearing in ForceSendFields will be sent to the 6093 // server regardless of whether the field is empty or not. This may be 6094 // used to include empty fields in Patch requests. 6095 ForceSendFields []string `json:"-"` 6096 6097 // NullFields is a list of field names (e.g. "Percentages") to include 6098 // in API requests with the JSON null value. By default, fields with 6099 // empty values are omitted from API requests. However, any field with 6100 // an empty value appearing in NullFields will be sent to the server as 6101 // null. It is an error if a field in this list has a non-empty value. 6102 // This may be used to include null fields in Patch requests. 6103 NullFields []string `json:"-"` 6104} 6105 6106func (s *TrafficPercentStrategy) MarshalJSON() ([]byte, error) { 6107 type NoMethod TrafficPercentStrategy 6108 raw := NoMethod(*s) 6109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6110} 6111 6112// Type: A protocol buffer message type. 6113type Type struct { 6114 // Fields: The list of fields. 6115 Fields []*Field `json:"fields,omitempty"` 6116 6117 // Name: The fully qualified message name. 6118 Name string `json:"name,omitempty"` 6119 6120 // Oneofs: The list of types appearing in `oneof` definitions in this 6121 // type. 6122 Oneofs []string `json:"oneofs,omitempty"` 6123 6124 // Options: The protocol buffer options. 6125 Options []*Option `json:"options,omitempty"` 6126 6127 // SourceContext: The source context. 6128 SourceContext *SourceContext `json:"sourceContext,omitempty"` 6129 6130 // Syntax: The source syntax. 6131 // 6132 // Possible values: 6133 // "SYNTAX_PROTO2" - Syntax `proto2`. 6134 // "SYNTAX_PROTO3" - Syntax `proto3`. 6135 Syntax string `json:"syntax,omitempty"` 6136 6137 // ForceSendFields is a list of field names (e.g. "Fields") to 6138 // unconditionally include in API requests. By default, fields with 6139 // empty values are omitted from API requests. However, any non-pointer, 6140 // non-interface field appearing in ForceSendFields will be sent to the 6141 // server regardless of whether the field is empty or not. This may be 6142 // used to include empty fields in Patch requests. 6143 ForceSendFields []string `json:"-"` 6144 6145 // NullFields is a list of field names (e.g. "Fields") to include in API 6146 // requests with the JSON null value. By default, fields with empty 6147 // values are omitted from API requests. However, any field with an 6148 // empty value appearing in NullFields will be sent to the server as 6149 // null. It is an error if a field in this list has a non-empty value. 6150 // This may be used to include null fields in Patch requests. 6151 NullFields []string `json:"-"` 6152} 6153 6154func (s *Type) MarshalJSON() ([]byte, error) { 6155 type NoMethod Type 6156 raw := NoMethod(*s) 6157 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6158} 6159 6160// UndeleteServiceResponse: Response message for UndeleteService method. 6161type UndeleteServiceResponse struct { 6162 // Service: Revived service resource. 6163 Service *ManagedService `json:"service,omitempty"` 6164 6165 // ForceSendFields is a list of field names (e.g. "Service") to 6166 // unconditionally include in API requests. By default, fields with 6167 // empty values are omitted from API requests. However, any non-pointer, 6168 // non-interface field appearing in ForceSendFields will be sent to the 6169 // server regardless of whether the field is empty or not. This may be 6170 // used to include empty fields in Patch requests. 6171 ForceSendFields []string `json:"-"` 6172 6173 // NullFields is a list of field names (e.g. "Service") to include in 6174 // API requests with the JSON null value. By default, fields with empty 6175 // values are omitted from API requests. However, any field with an 6176 // empty value appearing in NullFields will be sent to the server as 6177 // null. It is an error if a field in this list has a non-empty value. 6178 // This may be used to include null fields in Patch requests. 6179 NullFields []string `json:"-"` 6180} 6181 6182func (s *UndeleteServiceResponse) MarshalJSON() ([]byte, error) { 6183 type NoMethod UndeleteServiceResponse 6184 raw := NoMethod(*s) 6185 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6186} 6187 6188// Usage: Configuration controlling usage of a service. 6189type Usage struct { 6190 // ProducerNotificationChannel: The full resource name of a channel used 6191 // for sending notifications to the 6192 // service producer. 6193 // 6194 // Google Service Management currently only supports 6195 // [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a 6196 // notification 6197 // channel. To use Google Cloud Pub/Sub as the channel, this must be the 6198 // name 6199 // of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name 6200 // format 6201 // documented in https://cloud.google.com/pubsub/docs/overview. 6202 ProducerNotificationChannel string `json:"producerNotificationChannel,omitempty"` 6203 6204 // Requirements: Requirements that must be satisfied before a consumer 6205 // project can use the 6206 // service. Each requirement is of the form 6207 // <service.name>/<requirement-id>; 6208 // for example 'serviceusage.googleapis.com/billing-enabled'. 6209 Requirements []string `json:"requirements,omitempty"` 6210 6211 // Rules: A list of usage rules that apply to individual API 6212 // methods. 6213 // 6214 // **NOTE:** All service configuration rules follow "last one wins" 6215 // order. 6216 Rules []*UsageRule `json:"rules,omitempty"` 6217 6218 // ServiceIdentity: The configuration of a per-product per-project 6219 // service identity. 6220 ServiceIdentity *ServiceIdentity `json:"serviceIdentity,omitempty"` 6221 6222 // ForceSendFields is a list of field names (e.g. 6223 // "ProducerNotificationChannel") to unconditionally include in API 6224 // requests. By default, fields with empty values are omitted from API 6225 // requests. However, any non-pointer, non-interface field appearing in 6226 // ForceSendFields will be sent to the server regardless of whether the 6227 // field is empty or not. This may be used to include empty fields in 6228 // Patch requests. 6229 ForceSendFields []string `json:"-"` 6230 6231 // NullFields is a list of field names (e.g. 6232 // "ProducerNotificationChannel") to include in API requests with the 6233 // JSON null value. By default, fields with empty values are omitted 6234 // from API requests. However, any field with an empty value appearing 6235 // in NullFields will be sent to the server as null. It is an error if a 6236 // field in this list has a non-empty value. This may be used to include 6237 // null fields in Patch requests. 6238 NullFields []string `json:"-"` 6239} 6240 6241func (s *Usage) MarshalJSON() ([]byte, error) { 6242 type NoMethod Usage 6243 raw := NoMethod(*s) 6244 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6245} 6246 6247// UsageRule: Usage configuration rules for the service. 6248// 6249// NOTE: Under development. 6250// 6251// 6252// Use this rule to configure unregistered calls for the service. 6253// Unregistered 6254// calls are calls that do not contain consumer project 6255// identity. 6256// (Example: calls that do not contain an API key). 6257// By default, API methods do not allow unregistered calls, and each 6258// method call 6259// must be identified by a consumer project identity. Use this rule 6260// to 6261// allow/disallow unregistered calls. 6262// 6263// Example of an API that wants to allow unregistered calls for entire 6264// service. 6265// 6266// usage: 6267// rules: 6268// - selector: "*" 6269// allow_unregistered_calls: true 6270// 6271// Example of a method that wants to allow unregistered calls. 6272// 6273// usage: 6274// rules: 6275// - selector: 6276// "google.example.library.v1.LibraryService.CreateBook" 6277// allow_unregistered_calls: true 6278type UsageRule struct { 6279 // AllowUnregisteredCalls: If true, the selected method allows 6280 // unregistered calls, e.g. calls 6281 // that don't identify any user or application. 6282 AllowUnregisteredCalls bool `json:"allowUnregisteredCalls,omitempty"` 6283 6284 // Selector: Selects the methods to which this rule applies. Use '*' to 6285 // indicate all 6286 // methods in all APIs. 6287 // 6288 // Refer to selector for syntax details. 6289 Selector string `json:"selector,omitempty"` 6290 6291 // SkipServiceControl: If true, the selected method should skip service 6292 // control and the control 6293 // plane features, such as quota and billing, will not be 6294 // available. 6295 // This flag is used by Google Cloud Endpoints to bypass checks for 6296 // internal 6297 // methods, such as service health check methods. 6298 SkipServiceControl bool `json:"skipServiceControl,omitempty"` 6299 6300 // ForceSendFields is a list of field names (e.g. 6301 // "AllowUnregisteredCalls") to unconditionally include in API requests. 6302 // By default, fields with empty values are omitted from API requests. 6303 // However, any non-pointer, non-interface field appearing in 6304 // ForceSendFields will be sent to the server regardless of whether the 6305 // field is empty or not. This may be used to include empty fields in 6306 // Patch requests. 6307 ForceSendFields []string `json:"-"` 6308 6309 // NullFields is a list of field names (e.g. "AllowUnregisteredCalls") 6310 // to include in API requests with the JSON null value. By default, 6311 // fields with empty values are omitted from API requests. However, any 6312 // field with an empty value appearing in NullFields will be sent to the 6313 // server as null. It is an error if a field in this list has a 6314 // non-empty value. This may be used to include null fields in Patch 6315 // requests. 6316 NullFields []string `json:"-"` 6317} 6318 6319func (s *UsageRule) MarshalJSON() ([]byte, error) { 6320 type NoMethod UsageRule 6321 raw := NoMethod(*s) 6322 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6323} 6324 6325// method id "servicemanagement.operations.get": 6326 6327type OperationsGetCall struct { 6328 s *APIService 6329 name string 6330 urlParams_ gensupport.URLParams 6331 ifNoneMatch_ string 6332 ctx_ context.Context 6333 header_ http.Header 6334} 6335 6336// Get: Gets the latest state of a long-running operation. Clients can 6337// use this 6338// method to poll the operation result at intervals as recommended by 6339// the API 6340// service. 6341func (r *OperationsService) Get(name string) *OperationsGetCall { 6342 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6343 c.name = name 6344 return c 6345} 6346 6347// Fields allows partial responses to be retrieved. See 6348// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6349// for more information. 6350func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { 6351 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6352 return c 6353} 6354 6355// IfNoneMatch sets the optional parameter which makes the operation 6356// fail if the object's ETag matches the given value. This is useful for 6357// getting updates only after the object has changed since the last 6358// request. Use googleapi.IsNotModified to check whether the response 6359// error from Do is the result of In-None-Match. 6360func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { 6361 c.ifNoneMatch_ = entityTag 6362 return c 6363} 6364 6365// Context sets the context to be used in this call's Do method. Any 6366// pending HTTP request will be aborted if the provided context is 6367// canceled. 6368func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { 6369 c.ctx_ = ctx 6370 return c 6371} 6372 6373// Header returns an http.Header that can be modified by the caller to 6374// add HTTP headers to the request. 6375func (c *OperationsGetCall) Header() http.Header { 6376 if c.header_ == nil { 6377 c.header_ = make(http.Header) 6378 } 6379 return c.header_ 6380} 6381 6382func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { 6383 reqHeaders := make(http.Header) 6384 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 6385 for k, v := range c.header_ { 6386 reqHeaders[k] = v 6387 } 6388 reqHeaders.Set("User-Agent", c.s.userAgent()) 6389 if c.ifNoneMatch_ != "" { 6390 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6391 } 6392 var body io.Reader = nil 6393 c.urlParams_.Set("alt", alt) 6394 c.urlParams_.Set("prettyPrint", "false") 6395 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 6396 urls += "?" + c.urlParams_.Encode() 6397 req, err := http.NewRequest("GET", urls, body) 6398 if err != nil { 6399 return nil, err 6400 } 6401 req.Header = reqHeaders 6402 googleapi.Expand(req.URL, map[string]string{ 6403 "name": c.name, 6404 }) 6405 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6406} 6407 6408// Do executes the "servicemanagement.operations.get" call. 6409// Exactly one of *Operation or error will be non-nil. Any non-2xx 6410// status code is an error. Response headers are in either 6411// *Operation.ServerResponse.Header or (if a response was returned at 6412// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6413// to check whether the returned error was because 6414// http.StatusNotModified was returned. 6415func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6416 gensupport.SetOptions(c.urlParams_, opts...) 6417 res, err := c.doRequest("json") 6418 if res != nil && res.StatusCode == http.StatusNotModified { 6419 if res.Body != nil { 6420 res.Body.Close() 6421 } 6422 return nil, &googleapi.Error{ 6423 Code: res.StatusCode, 6424 Header: res.Header, 6425 } 6426 } 6427 if err != nil { 6428 return nil, err 6429 } 6430 defer googleapi.CloseBody(res) 6431 if err := googleapi.CheckResponse(res); err != nil { 6432 return nil, err 6433 } 6434 ret := &Operation{ 6435 ServerResponse: googleapi.ServerResponse{ 6436 Header: res.Header, 6437 HTTPStatusCode: res.StatusCode, 6438 }, 6439 } 6440 target := &ret 6441 if err := gensupport.DecodeResponse(target, res); err != nil { 6442 return nil, err 6443 } 6444 return ret, nil 6445 // { 6446 // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", 6447 // "flatPath": "v1/operations/{operationsId}", 6448 // "httpMethod": "GET", 6449 // "id": "servicemanagement.operations.get", 6450 // "parameterOrder": [ 6451 // "name" 6452 // ], 6453 // "parameters": { 6454 // "name": { 6455 // "description": "The name of the operation resource.", 6456 // "location": "path", 6457 // "pattern": "^operations/.*$", 6458 // "required": true, 6459 // "type": "string" 6460 // } 6461 // }, 6462 // "path": "v1/{+name}", 6463 // "response": { 6464 // "$ref": "Operation" 6465 // }, 6466 // "scopes": [ 6467 // "https://www.googleapis.com/auth/cloud-platform", 6468 // "https://www.googleapis.com/auth/service.management" 6469 // ] 6470 // } 6471 6472} 6473 6474// method id "servicemanagement.operations.list": 6475 6476type OperationsListCall struct { 6477 s *APIService 6478 urlParams_ gensupport.URLParams 6479 ifNoneMatch_ string 6480 ctx_ context.Context 6481 header_ http.Header 6482} 6483 6484// List: Lists service operations that match the specified filter in the 6485// request. 6486func (r *OperationsService) List() *OperationsListCall { 6487 c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6488 return c 6489} 6490 6491// Filter sets the optional parameter "filter": A string for filtering 6492// Operations. 6493// The following filter fields are supported: 6494// 6495// * serviceName: Required. Only `=` operator is allowed. 6496// * startTime: The time this job was started, in ISO 8601 6497// format. 6498// Allowed operators are `>=`, `>`, `<=`, and `<`. 6499// * status: Can be `done`, `in_progress`, or `failed`. Allowed 6500// operators are `=`, and `!=`. 6501// 6502// Filter expression supports conjunction (AND) and disjunction (OR) 6503// logical operators. However, the serviceName restriction must be at 6504// the 6505// top-level and can only be combined with other restrictions via the 6506// AND 6507// logical operator. 6508// 6509// Examples: 6510// 6511// * `serviceName={some-service}.googleapis.com` 6512// * `serviceName={some-service}.googleapis.com AND 6513// startTime>="2017-02-01" 6514// * `serviceName={some-service}.googleapis.com AND status=done` 6515// * `serviceName={some-service}.googleapis.com AND (status=done OR 6516// startTime>="2017-02-01")` 6517func (c *OperationsListCall) Filter(filter string) *OperationsListCall { 6518 c.urlParams_.Set("filter", filter) 6519 return c 6520} 6521 6522// Name sets the optional parameter "name": Not used. 6523func (c *OperationsListCall) Name(name string) *OperationsListCall { 6524 c.urlParams_.Set("name", name) 6525 return c 6526} 6527 6528// PageSize sets the optional parameter "pageSize": The maximum number 6529// of operations to return. If unspecified, defaults to 6530// 50. The maximum value is 100. 6531func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { 6532 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6533 return c 6534} 6535 6536// PageToken sets the optional parameter "pageToken": The standard list 6537// page token. 6538func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { 6539 c.urlParams_.Set("pageToken", pageToken) 6540 return c 6541} 6542 6543// Fields allows partial responses to be retrieved. See 6544// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6545// for more information. 6546func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { 6547 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6548 return c 6549} 6550 6551// IfNoneMatch sets the optional parameter which makes the operation 6552// fail if the object's ETag matches the given value. This is useful for 6553// getting updates only after the object has changed since the last 6554// request. Use googleapi.IsNotModified to check whether the response 6555// error from Do is the result of In-None-Match. 6556func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { 6557 c.ifNoneMatch_ = entityTag 6558 return c 6559} 6560 6561// Context sets the context to be used in this call's Do method. Any 6562// pending HTTP request will be aborted if the provided context is 6563// canceled. 6564func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { 6565 c.ctx_ = ctx 6566 return c 6567} 6568 6569// Header returns an http.Header that can be modified by the caller to 6570// add HTTP headers to the request. 6571func (c *OperationsListCall) Header() http.Header { 6572 if c.header_ == nil { 6573 c.header_ = make(http.Header) 6574 } 6575 return c.header_ 6576} 6577 6578func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { 6579 reqHeaders := make(http.Header) 6580 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 6581 for k, v := range c.header_ { 6582 reqHeaders[k] = v 6583 } 6584 reqHeaders.Set("User-Agent", c.s.userAgent()) 6585 if c.ifNoneMatch_ != "" { 6586 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6587 } 6588 var body io.Reader = nil 6589 c.urlParams_.Set("alt", alt) 6590 c.urlParams_.Set("prettyPrint", "false") 6591 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/operations") 6592 urls += "?" + c.urlParams_.Encode() 6593 req, err := http.NewRequest("GET", urls, body) 6594 if err != nil { 6595 return nil, err 6596 } 6597 req.Header = reqHeaders 6598 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6599} 6600 6601// Do executes the "servicemanagement.operations.list" call. 6602// Exactly one of *ListOperationsResponse or error will be non-nil. Any 6603// non-2xx status code is an error. Response headers are in either 6604// *ListOperationsResponse.ServerResponse.Header or (if a response was 6605// returned at all) in error.(*googleapi.Error).Header. Use 6606// googleapi.IsNotModified to check whether the returned error was 6607// because http.StatusNotModified was returned. 6608func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 6609 gensupport.SetOptions(c.urlParams_, opts...) 6610 res, err := c.doRequest("json") 6611 if res != nil && res.StatusCode == http.StatusNotModified { 6612 if res.Body != nil { 6613 res.Body.Close() 6614 } 6615 return nil, &googleapi.Error{ 6616 Code: res.StatusCode, 6617 Header: res.Header, 6618 } 6619 } 6620 if err != nil { 6621 return nil, err 6622 } 6623 defer googleapi.CloseBody(res) 6624 if err := googleapi.CheckResponse(res); err != nil { 6625 return nil, err 6626 } 6627 ret := &ListOperationsResponse{ 6628 ServerResponse: googleapi.ServerResponse{ 6629 Header: res.Header, 6630 HTTPStatusCode: res.StatusCode, 6631 }, 6632 } 6633 target := &ret 6634 if err := gensupport.DecodeResponse(target, res); err != nil { 6635 return nil, err 6636 } 6637 return ret, nil 6638 // { 6639 // "description": "Lists service operations that match the specified filter in the request.", 6640 // "flatPath": "v1/operations", 6641 // "httpMethod": "GET", 6642 // "id": "servicemanagement.operations.list", 6643 // "parameterOrder": [], 6644 // "parameters": { 6645 // "filter": { 6646 // "description": "A string for filtering Operations.\n The following filter fields are supported\u0026#58;\n\n * serviceName\u0026#58; Required. Only `=` operator is allowed.\n * startTime\u0026#58; The time this job was started, in ISO 8601 format.\n Allowed operators are `\u003e=`, `\u003e`, `\u003c=`, and `\u003c`.\n * status\u0026#58; Can be `done`, `in_progress`, or `failed`. Allowed\n operators are `=`, and `!=`.\n\n Filter expression supports conjunction (AND) and disjunction (OR)\n logical operators. However, the serviceName restriction must be at the\n top-level and can only be combined with other restrictions via the AND\n logical operator.\n\n Examples\u0026#58;\n\n * `serviceName={some-service}.googleapis.com`\n * `serviceName={some-service}.googleapis.com AND startTime\u003e=\"2017-02-01\"`\n * `serviceName={some-service}.googleapis.com AND status=done`\n * `serviceName={some-service}.googleapis.com AND (status=done OR startTime\u003e=\"2017-02-01\")`", 6647 // "location": "query", 6648 // "type": "string" 6649 // }, 6650 // "name": { 6651 // "description": "Not used.", 6652 // "location": "query", 6653 // "type": "string" 6654 // }, 6655 // "pageSize": { 6656 // "description": "The maximum number of operations to return. If unspecified, defaults to\n50. The maximum value is 100.", 6657 // "format": "int32", 6658 // "location": "query", 6659 // "type": "integer" 6660 // }, 6661 // "pageToken": { 6662 // "description": "The standard list page token.", 6663 // "location": "query", 6664 // "type": "string" 6665 // } 6666 // }, 6667 // "path": "v1/operations", 6668 // "response": { 6669 // "$ref": "ListOperationsResponse" 6670 // }, 6671 // "scopes": [ 6672 // "https://www.googleapis.com/auth/cloud-platform", 6673 // "https://www.googleapis.com/auth/service.management" 6674 // ] 6675 // } 6676 6677} 6678 6679// Pages invokes f for each page of results. 6680// A non-nil error returned from f will halt the iteration. 6681// The provided context supersedes any context provided to the Context method. 6682func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 6683 c.ctx_ = ctx 6684 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6685 for { 6686 x, err := c.Do() 6687 if err != nil { 6688 return err 6689 } 6690 if err := f(x); err != nil { 6691 return err 6692 } 6693 if x.NextPageToken == "" { 6694 return nil 6695 } 6696 c.PageToken(x.NextPageToken) 6697 } 6698} 6699 6700// method id "servicemanagement.services.create": 6701 6702type ServicesCreateCall struct { 6703 s *APIService 6704 managedservice *ManagedService 6705 urlParams_ gensupport.URLParams 6706 ctx_ context.Context 6707 header_ http.Header 6708} 6709 6710// Create: Creates a new managed service. 6711// 6712// A managed service is immutable, and is subject to mandatory 6713// 30-day 6714// data retention. You cannot move a service or recreate it within 30 6715// days 6716// after deletion. 6717// 6718// One producer project can own no more than 500 services. For security 6719// and 6720// reliability purposes, a production service should be hosted in 6721// a 6722// dedicated producer project. 6723// 6724// Operation<response: ManagedService> 6725func (r *ServicesService) Create(managedservice *ManagedService) *ServicesCreateCall { 6726 c := &ServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6727 c.managedservice = managedservice 6728 return c 6729} 6730 6731// Fields allows partial responses to be retrieved. See 6732// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6733// for more information. 6734func (c *ServicesCreateCall) Fields(s ...googleapi.Field) *ServicesCreateCall { 6735 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6736 return c 6737} 6738 6739// Context sets the context to be used in this call's Do method. Any 6740// pending HTTP request will be aborted if the provided context is 6741// canceled. 6742func (c *ServicesCreateCall) Context(ctx context.Context) *ServicesCreateCall { 6743 c.ctx_ = ctx 6744 return c 6745} 6746 6747// Header returns an http.Header that can be modified by the caller to 6748// add HTTP headers to the request. 6749func (c *ServicesCreateCall) Header() http.Header { 6750 if c.header_ == nil { 6751 c.header_ = make(http.Header) 6752 } 6753 return c.header_ 6754} 6755 6756func (c *ServicesCreateCall) doRequest(alt string) (*http.Response, error) { 6757 reqHeaders := make(http.Header) 6758 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 6759 for k, v := range c.header_ { 6760 reqHeaders[k] = v 6761 } 6762 reqHeaders.Set("User-Agent", c.s.userAgent()) 6763 var body io.Reader = nil 6764 body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedservice) 6765 if err != nil { 6766 return nil, err 6767 } 6768 reqHeaders.Set("Content-Type", "application/json") 6769 c.urlParams_.Set("alt", alt) 6770 c.urlParams_.Set("prettyPrint", "false") 6771 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services") 6772 urls += "?" + c.urlParams_.Encode() 6773 req, err := http.NewRequest("POST", urls, body) 6774 if err != nil { 6775 return nil, err 6776 } 6777 req.Header = reqHeaders 6778 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6779} 6780 6781// Do executes the "servicemanagement.services.create" call. 6782// Exactly one of *Operation or error will be non-nil. Any non-2xx 6783// status code is an error. Response headers are in either 6784// *Operation.ServerResponse.Header or (if a response was returned at 6785// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6786// to check whether the returned error was because 6787// http.StatusNotModified was returned. 6788func (c *ServicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6789 gensupport.SetOptions(c.urlParams_, opts...) 6790 res, err := c.doRequest("json") 6791 if res != nil && res.StatusCode == http.StatusNotModified { 6792 if res.Body != nil { 6793 res.Body.Close() 6794 } 6795 return nil, &googleapi.Error{ 6796 Code: res.StatusCode, 6797 Header: res.Header, 6798 } 6799 } 6800 if err != nil { 6801 return nil, err 6802 } 6803 defer googleapi.CloseBody(res) 6804 if err := googleapi.CheckResponse(res); err != nil { 6805 return nil, err 6806 } 6807 ret := &Operation{ 6808 ServerResponse: googleapi.ServerResponse{ 6809 Header: res.Header, 6810 HTTPStatusCode: res.StatusCode, 6811 }, 6812 } 6813 target := &ret 6814 if err := gensupport.DecodeResponse(target, res); err != nil { 6815 return nil, err 6816 } 6817 return ret, nil 6818 // { 6819 // "description": "Creates a new managed service.\n\nA managed service is immutable, and is subject to mandatory 30-day\ndata retention. You cannot move a service or recreate it within 30 days\nafter deletion.\n\nOne producer project can own no more than 500 services. For security and\nreliability purposes, a production service should be hosted in a\ndedicated producer project.\n\nOperation\u003cresponse: ManagedService\u003e", 6820 // "flatPath": "v1/services", 6821 // "httpMethod": "POST", 6822 // "id": "servicemanagement.services.create", 6823 // "parameterOrder": [], 6824 // "parameters": {}, 6825 // "path": "v1/services", 6826 // "request": { 6827 // "$ref": "ManagedService" 6828 // }, 6829 // "response": { 6830 // "$ref": "Operation" 6831 // }, 6832 // "scopes": [ 6833 // "https://www.googleapis.com/auth/cloud-platform", 6834 // "https://www.googleapis.com/auth/service.management" 6835 // ] 6836 // } 6837 6838} 6839 6840// method id "servicemanagement.services.delete": 6841 6842type ServicesDeleteCall struct { 6843 s *APIService 6844 serviceName string 6845 urlParams_ gensupport.URLParams 6846 ctx_ context.Context 6847 header_ http.Header 6848} 6849 6850// Delete: Deletes a managed service. This method will change the 6851// service to the 6852// `Soft-Delete` state for 30 days. Within this period, service 6853// producers may 6854// call UndeleteService to restore the service. 6855// After 30 days, the service will be permanently 6856// deleted. 6857// 6858// Operation<response: google.protobuf.Empty> 6859func (r *ServicesService) Delete(serviceName string) *ServicesDeleteCall { 6860 c := &ServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6861 c.serviceName = serviceName 6862 return c 6863} 6864 6865// Fields allows partial responses to be retrieved. See 6866// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6867// for more information. 6868func (c *ServicesDeleteCall) Fields(s ...googleapi.Field) *ServicesDeleteCall { 6869 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6870 return c 6871} 6872 6873// Context sets the context to be used in this call's Do method. Any 6874// pending HTTP request will be aborted if the provided context is 6875// canceled. 6876func (c *ServicesDeleteCall) Context(ctx context.Context) *ServicesDeleteCall { 6877 c.ctx_ = ctx 6878 return c 6879} 6880 6881// Header returns an http.Header that can be modified by the caller to 6882// add HTTP headers to the request. 6883func (c *ServicesDeleteCall) Header() http.Header { 6884 if c.header_ == nil { 6885 c.header_ = make(http.Header) 6886 } 6887 return c.header_ 6888} 6889 6890func (c *ServicesDeleteCall) doRequest(alt string) (*http.Response, error) { 6891 reqHeaders := make(http.Header) 6892 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 6893 for k, v := range c.header_ { 6894 reqHeaders[k] = v 6895 } 6896 reqHeaders.Set("User-Agent", c.s.userAgent()) 6897 var body io.Reader = nil 6898 c.urlParams_.Set("alt", alt) 6899 c.urlParams_.Set("prettyPrint", "false") 6900 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}") 6901 urls += "?" + c.urlParams_.Encode() 6902 req, err := http.NewRequest("DELETE", urls, body) 6903 if err != nil { 6904 return nil, err 6905 } 6906 req.Header = reqHeaders 6907 googleapi.Expand(req.URL, map[string]string{ 6908 "serviceName": c.serviceName, 6909 }) 6910 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6911} 6912 6913// Do executes the "servicemanagement.services.delete" call. 6914// Exactly one of *Operation or error will be non-nil. Any non-2xx 6915// status code is an error. Response headers are in either 6916// *Operation.ServerResponse.Header or (if a response was returned at 6917// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6918// to check whether the returned error was because 6919// http.StatusNotModified was returned. 6920func (c *ServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6921 gensupport.SetOptions(c.urlParams_, opts...) 6922 res, err := c.doRequest("json") 6923 if res != nil && res.StatusCode == http.StatusNotModified { 6924 if res.Body != nil { 6925 res.Body.Close() 6926 } 6927 return nil, &googleapi.Error{ 6928 Code: res.StatusCode, 6929 Header: res.Header, 6930 } 6931 } 6932 if err != nil { 6933 return nil, err 6934 } 6935 defer googleapi.CloseBody(res) 6936 if err := googleapi.CheckResponse(res); err != nil { 6937 return nil, err 6938 } 6939 ret := &Operation{ 6940 ServerResponse: googleapi.ServerResponse{ 6941 Header: res.Header, 6942 HTTPStatusCode: res.StatusCode, 6943 }, 6944 } 6945 target := &ret 6946 if err := gensupport.DecodeResponse(target, res); err != nil { 6947 return nil, err 6948 } 6949 return ret, nil 6950 // { 6951 // "description": "Deletes a managed service. This method will change the service to the\n`Soft-Delete` state for 30 days. Within this period, service producers may\ncall UndeleteService to restore the service.\nAfter 30 days, the service will be permanently deleted.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e", 6952 // "flatPath": "v1/services/{serviceName}", 6953 // "httpMethod": "DELETE", 6954 // "id": "servicemanagement.services.delete", 6955 // "parameterOrder": [ 6956 // "serviceName" 6957 // ], 6958 // "parameters": { 6959 // "serviceName": { 6960 // "description": "Required. The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", 6961 // "location": "path", 6962 // "required": true, 6963 // "type": "string" 6964 // } 6965 // }, 6966 // "path": "v1/services/{serviceName}", 6967 // "response": { 6968 // "$ref": "Operation" 6969 // }, 6970 // "scopes": [ 6971 // "https://www.googleapis.com/auth/cloud-platform", 6972 // "https://www.googleapis.com/auth/service.management" 6973 // ] 6974 // } 6975 6976} 6977 6978// method id "servicemanagement.services.disable": 6979 6980type ServicesDisableCall struct { 6981 s *APIService 6982 serviceName string 6983 disableservicerequest *DisableServiceRequest 6984 urlParams_ gensupport.URLParams 6985 ctx_ context.Context 6986 header_ http.Header 6987} 6988 6989// Disable: Disables a service for a project, so it can no longer be 6990// be used for the project. It prevents accidental usage that may 6991// cause 6992// unexpected billing charges or security leaks. 6993// 6994// Operation<response: DisableServiceResponse> 6995func (r *ServicesService) Disable(serviceName string, disableservicerequest *DisableServiceRequest) *ServicesDisableCall { 6996 c := &ServicesDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6997 c.serviceName = serviceName 6998 c.disableservicerequest = disableservicerequest 6999 return c 7000} 7001 7002// Fields allows partial responses to be retrieved. See 7003// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7004// for more information. 7005func (c *ServicesDisableCall) Fields(s ...googleapi.Field) *ServicesDisableCall { 7006 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7007 return c 7008} 7009 7010// Context sets the context to be used in this call's Do method. Any 7011// pending HTTP request will be aborted if the provided context is 7012// canceled. 7013func (c *ServicesDisableCall) Context(ctx context.Context) *ServicesDisableCall { 7014 c.ctx_ = ctx 7015 return c 7016} 7017 7018// Header returns an http.Header that can be modified by the caller to 7019// add HTTP headers to the request. 7020func (c *ServicesDisableCall) Header() http.Header { 7021 if c.header_ == nil { 7022 c.header_ = make(http.Header) 7023 } 7024 return c.header_ 7025} 7026 7027func (c *ServicesDisableCall) doRequest(alt string) (*http.Response, error) { 7028 reqHeaders := make(http.Header) 7029 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 7030 for k, v := range c.header_ { 7031 reqHeaders[k] = v 7032 } 7033 reqHeaders.Set("User-Agent", c.s.userAgent()) 7034 var body io.Reader = nil 7035 body, err := googleapi.WithoutDataWrapper.JSONReader(c.disableservicerequest) 7036 if err != nil { 7037 return nil, err 7038 } 7039 reqHeaders.Set("Content-Type", "application/json") 7040 c.urlParams_.Set("alt", alt) 7041 c.urlParams_.Set("prettyPrint", "false") 7042 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}:disable") 7043 urls += "?" + c.urlParams_.Encode() 7044 req, err := http.NewRequest("POST", urls, body) 7045 if err != nil { 7046 return nil, err 7047 } 7048 req.Header = reqHeaders 7049 googleapi.Expand(req.URL, map[string]string{ 7050 "serviceName": c.serviceName, 7051 }) 7052 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7053} 7054 7055// Do executes the "servicemanagement.services.disable" call. 7056// Exactly one of *Operation or error will be non-nil. Any non-2xx 7057// status code is an error. Response headers are in either 7058// *Operation.ServerResponse.Header or (if a response was returned at 7059// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7060// to check whether the returned error was because 7061// http.StatusNotModified was returned. 7062func (c *ServicesDisableCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7063 gensupport.SetOptions(c.urlParams_, opts...) 7064 res, err := c.doRequest("json") 7065 if res != nil && res.StatusCode == http.StatusNotModified { 7066 if res.Body != nil { 7067 res.Body.Close() 7068 } 7069 return nil, &googleapi.Error{ 7070 Code: res.StatusCode, 7071 Header: res.Header, 7072 } 7073 } 7074 if err != nil { 7075 return nil, err 7076 } 7077 defer googleapi.CloseBody(res) 7078 if err := googleapi.CheckResponse(res); err != nil { 7079 return nil, err 7080 } 7081 ret := &Operation{ 7082 ServerResponse: googleapi.ServerResponse{ 7083 Header: res.Header, 7084 HTTPStatusCode: res.StatusCode, 7085 }, 7086 } 7087 target := &ret 7088 if err := gensupport.DecodeResponse(target, res); err != nil { 7089 return nil, err 7090 } 7091 return ret, nil 7092 // { 7093 // "description": "Disables a service for a project, so it can no longer be\nbe used for the project. It prevents accidental usage that may cause\nunexpected billing charges or security leaks.\n\nOperation\u003cresponse: DisableServiceResponse\u003e", 7094 // "flatPath": "v1/services/{serviceName}:disable", 7095 // "httpMethod": "POST", 7096 // "id": "servicemanagement.services.disable", 7097 // "parameterOrder": [ 7098 // "serviceName" 7099 // ], 7100 // "parameters": { 7101 // "serviceName": { 7102 // "description": "Required. Name of the service to disable. Specifying an unknown service name\nwill cause the request to fail.", 7103 // "location": "path", 7104 // "required": true, 7105 // "type": "string" 7106 // } 7107 // }, 7108 // "path": "v1/services/{serviceName}:disable", 7109 // "request": { 7110 // "$ref": "DisableServiceRequest" 7111 // }, 7112 // "response": { 7113 // "$ref": "Operation" 7114 // }, 7115 // "scopes": [ 7116 // "https://www.googleapis.com/auth/cloud-platform", 7117 // "https://www.googleapis.com/auth/service.management" 7118 // ] 7119 // } 7120 7121} 7122 7123// method id "servicemanagement.services.enable": 7124 7125type ServicesEnableCall struct { 7126 s *APIService 7127 serviceName string 7128 enableservicerequest *EnableServiceRequest 7129 urlParams_ gensupport.URLParams 7130 ctx_ context.Context 7131 header_ http.Header 7132} 7133 7134// Enable: Enables a service for a project, so it can be used 7135// for the project. See 7136// [Cloud Auth Guide](https://cloud.google.com/docs/authentication) 7137// for 7138// more information. 7139// 7140// Operation<response: EnableServiceResponse> 7141func (r *ServicesService) Enable(serviceName string, enableservicerequest *EnableServiceRequest) *ServicesEnableCall { 7142 c := &ServicesEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7143 c.serviceName = serviceName 7144 c.enableservicerequest = enableservicerequest 7145 return c 7146} 7147 7148// Fields allows partial responses to be retrieved. See 7149// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7150// for more information. 7151func (c *ServicesEnableCall) Fields(s ...googleapi.Field) *ServicesEnableCall { 7152 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7153 return c 7154} 7155 7156// Context sets the context to be used in this call's Do method. Any 7157// pending HTTP request will be aborted if the provided context is 7158// canceled. 7159func (c *ServicesEnableCall) Context(ctx context.Context) *ServicesEnableCall { 7160 c.ctx_ = ctx 7161 return c 7162} 7163 7164// Header returns an http.Header that can be modified by the caller to 7165// add HTTP headers to the request. 7166func (c *ServicesEnableCall) Header() http.Header { 7167 if c.header_ == nil { 7168 c.header_ = make(http.Header) 7169 } 7170 return c.header_ 7171} 7172 7173func (c *ServicesEnableCall) doRequest(alt string) (*http.Response, error) { 7174 reqHeaders := make(http.Header) 7175 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 7176 for k, v := range c.header_ { 7177 reqHeaders[k] = v 7178 } 7179 reqHeaders.Set("User-Agent", c.s.userAgent()) 7180 var body io.Reader = nil 7181 body, err := googleapi.WithoutDataWrapper.JSONReader(c.enableservicerequest) 7182 if err != nil { 7183 return nil, err 7184 } 7185 reqHeaders.Set("Content-Type", "application/json") 7186 c.urlParams_.Set("alt", alt) 7187 c.urlParams_.Set("prettyPrint", "false") 7188 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}:enable") 7189 urls += "?" + c.urlParams_.Encode() 7190 req, err := http.NewRequest("POST", urls, body) 7191 if err != nil { 7192 return nil, err 7193 } 7194 req.Header = reqHeaders 7195 googleapi.Expand(req.URL, map[string]string{ 7196 "serviceName": c.serviceName, 7197 }) 7198 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7199} 7200 7201// Do executes the "servicemanagement.services.enable" call. 7202// Exactly one of *Operation or error will be non-nil. Any non-2xx 7203// status code is an error. Response headers are in either 7204// *Operation.ServerResponse.Header or (if a response was returned at 7205// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7206// to check whether the returned error was because 7207// http.StatusNotModified was returned. 7208func (c *ServicesEnableCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7209 gensupport.SetOptions(c.urlParams_, opts...) 7210 res, err := c.doRequest("json") 7211 if res != nil && res.StatusCode == http.StatusNotModified { 7212 if res.Body != nil { 7213 res.Body.Close() 7214 } 7215 return nil, &googleapi.Error{ 7216 Code: res.StatusCode, 7217 Header: res.Header, 7218 } 7219 } 7220 if err != nil { 7221 return nil, err 7222 } 7223 defer googleapi.CloseBody(res) 7224 if err := googleapi.CheckResponse(res); err != nil { 7225 return nil, err 7226 } 7227 ret := &Operation{ 7228 ServerResponse: googleapi.ServerResponse{ 7229 Header: res.Header, 7230 HTTPStatusCode: res.StatusCode, 7231 }, 7232 } 7233 target := &ret 7234 if err := gensupport.DecodeResponse(target, res); err != nil { 7235 return nil, err 7236 } 7237 return ret, nil 7238 // { 7239 // "description": "Enables a service for a project, so it can be used\nfor the project. See\n[Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation\u003cresponse: EnableServiceResponse\u003e", 7240 // "flatPath": "v1/services/{serviceName}:enable", 7241 // "httpMethod": "POST", 7242 // "id": "servicemanagement.services.enable", 7243 // "parameterOrder": [ 7244 // "serviceName" 7245 // ], 7246 // "parameters": { 7247 // "serviceName": { 7248 // "description": "Required. Name of the service to enable. Specifying an unknown service name will\ncause the request to fail.", 7249 // "location": "path", 7250 // "required": true, 7251 // "type": "string" 7252 // } 7253 // }, 7254 // "path": "v1/services/{serviceName}:enable", 7255 // "request": { 7256 // "$ref": "EnableServiceRequest" 7257 // }, 7258 // "response": { 7259 // "$ref": "Operation" 7260 // }, 7261 // "scopes": [ 7262 // "https://www.googleapis.com/auth/cloud-platform", 7263 // "https://www.googleapis.com/auth/service.management" 7264 // ] 7265 // } 7266 7267} 7268 7269// method id "servicemanagement.services.generateConfigReport": 7270 7271type ServicesGenerateConfigReportCall struct { 7272 s *APIService 7273 generateconfigreportrequest *GenerateConfigReportRequest 7274 urlParams_ gensupport.URLParams 7275 ctx_ context.Context 7276 header_ http.Header 7277} 7278 7279// GenerateConfigReport: Generates and returns a report (errors, 7280// warnings and changes from 7281// existing configurations) associated 7282// with 7283// GenerateConfigReportRequest.new_value 7284// 7285// If GenerateConfigReportRequest.old_value is 7286// specified, 7287// GenerateConfigReportRequest will contain a single ChangeReport based 7288// on the 7289// comparison between GenerateConfigReportRequest.new_value 7290// and 7291// GenerateConfigReportRequest.old_value. 7292// If GenerateConfigReportRequest.old_value is not specified, this 7293// method 7294// will compare GenerateConfigReportRequest.new_value with the last 7295// pushed 7296// service configuration. 7297func (r *ServicesService) GenerateConfigReport(generateconfigreportrequest *GenerateConfigReportRequest) *ServicesGenerateConfigReportCall { 7298 c := &ServicesGenerateConfigReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7299 c.generateconfigreportrequest = generateconfigreportrequest 7300 return c 7301} 7302 7303// Fields allows partial responses to be retrieved. See 7304// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7305// for more information. 7306func (c *ServicesGenerateConfigReportCall) Fields(s ...googleapi.Field) *ServicesGenerateConfigReportCall { 7307 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7308 return c 7309} 7310 7311// Context sets the context to be used in this call's Do method. Any 7312// pending HTTP request will be aborted if the provided context is 7313// canceled. 7314func (c *ServicesGenerateConfigReportCall) Context(ctx context.Context) *ServicesGenerateConfigReportCall { 7315 c.ctx_ = ctx 7316 return c 7317} 7318 7319// Header returns an http.Header that can be modified by the caller to 7320// add HTTP headers to the request. 7321func (c *ServicesGenerateConfigReportCall) Header() http.Header { 7322 if c.header_ == nil { 7323 c.header_ = make(http.Header) 7324 } 7325 return c.header_ 7326} 7327 7328func (c *ServicesGenerateConfigReportCall) doRequest(alt string) (*http.Response, error) { 7329 reqHeaders := make(http.Header) 7330 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 7331 for k, v := range c.header_ { 7332 reqHeaders[k] = v 7333 } 7334 reqHeaders.Set("User-Agent", c.s.userAgent()) 7335 var body io.Reader = nil 7336 body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateconfigreportrequest) 7337 if err != nil { 7338 return nil, err 7339 } 7340 reqHeaders.Set("Content-Type", "application/json") 7341 c.urlParams_.Set("alt", alt) 7342 c.urlParams_.Set("prettyPrint", "false") 7343 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services:generateConfigReport") 7344 urls += "?" + c.urlParams_.Encode() 7345 req, err := http.NewRequest("POST", urls, body) 7346 if err != nil { 7347 return nil, err 7348 } 7349 req.Header = reqHeaders 7350 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7351} 7352 7353// Do executes the "servicemanagement.services.generateConfigReport" call. 7354// Exactly one of *GenerateConfigReportResponse or error will be 7355// non-nil. Any non-2xx status code is an error. Response headers are in 7356// either *GenerateConfigReportResponse.ServerResponse.Header or (if a 7357// response was returned at all) in error.(*googleapi.Error).Header. Use 7358// googleapi.IsNotModified to check whether the returned error was 7359// because http.StatusNotModified was returned. 7360func (c *ServicesGenerateConfigReportCall) Do(opts ...googleapi.CallOption) (*GenerateConfigReportResponse, error) { 7361 gensupport.SetOptions(c.urlParams_, opts...) 7362 res, err := c.doRequest("json") 7363 if res != nil && res.StatusCode == http.StatusNotModified { 7364 if res.Body != nil { 7365 res.Body.Close() 7366 } 7367 return nil, &googleapi.Error{ 7368 Code: res.StatusCode, 7369 Header: res.Header, 7370 } 7371 } 7372 if err != nil { 7373 return nil, err 7374 } 7375 defer googleapi.CloseBody(res) 7376 if err := googleapi.CheckResponse(res); err != nil { 7377 return nil, err 7378 } 7379 ret := &GenerateConfigReportResponse{ 7380 ServerResponse: googleapi.ServerResponse{ 7381 Header: res.Header, 7382 HTTPStatusCode: res.StatusCode, 7383 }, 7384 } 7385 target := &ret 7386 if err := gensupport.DecodeResponse(target, res); err != nil { 7387 return nil, err 7388 } 7389 return ret, nil 7390 // { 7391 // "description": "Generates and returns a report (errors, warnings and changes from\nexisting configurations) associated with\nGenerateConfigReportRequest.new_value\n\nIf GenerateConfigReportRequest.old_value is specified,\nGenerateConfigReportRequest will contain a single ChangeReport based on the\ncomparison between GenerateConfigReportRequest.new_value and\nGenerateConfigReportRequest.old_value.\nIf GenerateConfigReportRequest.old_value is not specified, this method\nwill compare GenerateConfigReportRequest.new_value with the last pushed\nservice configuration.", 7392 // "flatPath": "v1/services:generateConfigReport", 7393 // "httpMethod": "POST", 7394 // "id": "servicemanagement.services.generateConfigReport", 7395 // "parameterOrder": [], 7396 // "parameters": {}, 7397 // "path": "v1/services:generateConfigReport", 7398 // "request": { 7399 // "$ref": "GenerateConfigReportRequest" 7400 // }, 7401 // "response": { 7402 // "$ref": "GenerateConfigReportResponse" 7403 // }, 7404 // "scopes": [ 7405 // "https://www.googleapis.com/auth/cloud-platform", 7406 // "https://www.googleapis.com/auth/service.management" 7407 // ] 7408 // } 7409 7410} 7411 7412// method id "servicemanagement.services.get": 7413 7414type ServicesGetCall struct { 7415 s *APIService 7416 serviceName string 7417 urlParams_ gensupport.URLParams 7418 ifNoneMatch_ string 7419 ctx_ context.Context 7420 header_ http.Header 7421} 7422 7423// Get: Gets a managed service. Authentication is required unless the 7424// service is 7425// public. 7426func (r *ServicesService) Get(serviceName string) *ServicesGetCall { 7427 c := &ServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7428 c.serviceName = serviceName 7429 return c 7430} 7431 7432// Fields allows partial responses to be retrieved. See 7433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7434// for more information. 7435func (c *ServicesGetCall) Fields(s ...googleapi.Field) *ServicesGetCall { 7436 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7437 return c 7438} 7439 7440// IfNoneMatch sets the optional parameter which makes the operation 7441// fail if the object's ETag matches the given value. This is useful for 7442// getting updates only after the object has changed since the last 7443// request. Use googleapi.IsNotModified to check whether the response 7444// error from Do is the result of In-None-Match. 7445func (c *ServicesGetCall) IfNoneMatch(entityTag string) *ServicesGetCall { 7446 c.ifNoneMatch_ = entityTag 7447 return c 7448} 7449 7450// Context sets the context to be used in this call's Do method. Any 7451// pending HTTP request will be aborted if the provided context is 7452// canceled. 7453func (c *ServicesGetCall) Context(ctx context.Context) *ServicesGetCall { 7454 c.ctx_ = ctx 7455 return c 7456} 7457 7458// Header returns an http.Header that can be modified by the caller to 7459// add HTTP headers to the request. 7460func (c *ServicesGetCall) Header() http.Header { 7461 if c.header_ == nil { 7462 c.header_ = make(http.Header) 7463 } 7464 return c.header_ 7465} 7466 7467func (c *ServicesGetCall) doRequest(alt string) (*http.Response, error) { 7468 reqHeaders := make(http.Header) 7469 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 7470 for k, v := range c.header_ { 7471 reqHeaders[k] = v 7472 } 7473 reqHeaders.Set("User-Agent", c.s.userAgent()) 7474 if c.ifNoneMatch_ != "" { 7475 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7476 } 7477 var body io.Reader = nil 7478 c.urlParams_.Set("alt", alt) 7479 c.urlParams_.Set("prettyPrint", "false") 7480 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}") 7481 urls += "?" + c.urlParams_.Encode() 7482 req, err := http.NewRequest("GET", urls, body) 7483 if err != nil { 7484 return nil, err 7485 } 7486 req.Header = reqHeaders 7487 googleapi.Expand(req.URL, map[string]string{ 7488 "serviceName": c.serviceName, 7489 }) 7490 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7491} 7492 7493// Do executes the "servicemanagement.services.get" call. 7494// Exactly one of *ManagedService or error will be non-nil. Any non-2xx 7495// status code is an error. Response headers are in either 7496// *ManagedService.ServerResponse.Header or (if a response was returned 7497// at all) in error.(*googleapi.Error).Header. Use 7498// googleapi.IsNotModified to check whether the returned error was 7499// because http.StatusNotModified was returned. 7500func (c *ServicesGetCall) Do(opts ...googleapi.CallOption) (*ManagedService, error) { 7501 gensupport.SetOptions(c.urlParams_, opts...) 7502 res, err := c.doRequest("json") 7503 if res != nil && res.StatusCode == http.StatusNotModified { 7504 if res.Body != nil { 7505 res.Body.Close() 7506 } 7507 return nil, &googleapi.Error{ 7508 Code: res.StatusCode, 7509 Header: res.Header, 7510 } 7511 } 7512 if err != nil { 7513 return nil, err 7514 } 7515 defer googleapi.CloseBody(res) 7516 if err := googleapi.CheckResponse(res); err != nil { 7517 return nil, err 7518 } 7519 ret := &ManagedService{ 7520 ServerResponse: googleapi.ServerResponse{ 7521 Header: res.Header, 7522 HTTPStatusCode: res.StatusCode, 7523 }, 7524 } 7525 target := &ret 7526 if err := gensupport.DecodeResponse(target, res); err != nil { 7527 return nil, err 7528 } 7529 return ret, nil 7530 // { 7531 // "description": "Gets a managed service. Authentication is required unless the service is\npublic.", 7532 // "flatPath": "v1/services/{serviceName}", 7533 // "httpMethod": "GET", 7534 // "id": "servicemanagement.services.get", 7535 // "parameterOrder": [ 7536 // "serviceName" 7537 // ], 7538 // "parameters": { 7539 // "serviceName": { 7540 // "description": "Required. The name of the service. See the `ServiceManager` overview for naming\nrequirements. For example: `example.googleapis.com`.", 7541 // "location": "path", 7542 // "required": true, 7543 // "type": "string" 7544 // } 7545 // }, 7546 // "path": "v1/services/{serviceName}", 7547 // "response": { 7548 // "$ref": "ManagedService" 7549 // }, 7550 // "scopes": [ 7551 // "https://www.googleapis.com/auth/cloud-platform", 7552 // "https://www.googleapis.com/auth/cloud-platform.read-only", 7553 // "https://www.googleapis.com/auth/service.management", 7554 // "https://www.googleapis.com/auth/service.management.readonly" 7555 // ] 7556 // } 7557 7558} 7559 7560// method id "servicemanagement.services.getConfig": 7561 7562type ServicesGetConfigCall struct { 7563 s *APIService 7564 serviceName string 7565 urlParams_ gensupport.URLParams 7566 ifNoneMatch_ string 7567 ctx_ context.Context 7568 header_ http.Header 7569} 7570 7571// GetConfig: Gets a service configuration (version) for a managed 7572// service. 7573func (r *ServicesService) GetConfig(serviceName string) *ServicesGetConfigCall { 7574 c := &ServicesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7575 c.serviceName = serviceName 7576 return c 7577} 7578 7579// ConfigId sets the optional parameter "configId": Required. The id of 7580// the service configuration resource. 7581// 7582// This field must be specified for the server to return all fields, 7583// including 7584// `SourceInfo`. 7585func (c *ServicesGetConfigCall) ConfigId(configId string) *ServicesGetConfigCall { 7586 c.urlParams_.Set("configId", configId) 7587 return c 7588} 7589 7590// View sets the optional parameter "view": Specifies which parts of the 7591// Service Config should be returned in the 7592// response. 7593// 7594// Possible values: 7595// "BASIC" 7596// "FULL" 7597func (c *ServicesGetConfigCall) View(view string) *ServicesGetConfigCall { 7598 c.urlParams_.Set("view", view) 7599 return c 7600} 7601 7602// Fields allows partial responses to be retrieved. See 7603// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7604// for more information. 7605func (c *ServicesGetConfigCall) Fields(s ...googleapi.Field) *ServicesGetConfigCall { 7606 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7607 return c 7608} 7609 7610// IfNoneMatch sets the optional parameter which makes the operation 7611// fail if the object's ETag matches the given value. This is useful for 7612// getting updates only after the object has changed since the last 7613// request. Use googleapi.IsNotModified to check whether the response 7614// error from Do is the result of In-None-Match. 7615func (c *ServicesGetConfigCall) IfNoneMatch(entityTag string) *ServicesGetConfigCall { 7616 c.ifNoneMatch_ = entityTag 7617 return c 7618} 7619 7620// Context sets the context to be used in this call's Do method. Any 7621// pending HTTP request will be aborted if the provided context is 7622// canceled. 7623func (c *ServicesGetConfigCall) Context(ctx context.Context) *ServicesGetConfigCall { 7624 c.ctx_ = ctx 7625 return c 7626} 7627 7628// Header returns an http.Header that can be modified by the caller to 7629// add HTTP headers to the request. 7630func (c *ServicesGetConfigCall) Header() http.Header { 7631 if c.header_ == nil { 7632 c.header_ = make(http.Header) 7633 } 7634 return c.header_ 7635} 7636 7637func (c *ServicesGetConfigCall) doRequest(alt string) (*http.Response, error) { 7638 reqHeaders := make(http.Header) 7639 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 7640 for k, v := range c.header_ { 7641 reqHeaders[k] = v 7642 } 7643 reqHeaders.Set("User-Agent", c.s.userAgent()) 7644 if c.ifNoneMatch_ != "" { 7645 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7646 } 7647 var body io.Reader = nil 7648 c.urlParams_.Set("alt", alt) 7649 c.urlParams_.Set("prettyPrint", "false") 7650 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}/config") 7651 urls += "?" + c.urlParams_.Encode() 7652 req, err := http.NewRequest("GET", urls, body) 7653 if err != nil { 7654 return nil, err 7655 } 7656 req.Header = reqHeaders 7657 googleapi.Expand(req.URL, map[string]string{ 7658 "serviceName": c.serviceName, 7659 }) 7660 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7661} 7662 7663// Do executes the "servicemanagement.services.getConfig" call. 7664// Exactly one of *Service or error will be non-nil. Any non-2xx status 7665// code is an error. Response headers are in either 7666// *Service.ServerResponse.Header or (if a response was returned at all) 7667// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7668// check whether the returned error was because http.StatusNotModified 7669// was returned. 7670func (c *ServicesGetConfigCall) Do(opts ...googleapi.CallOption) (*Service, error) { 7671 gensupport.SetOptions(c.urlParams_, opts...) 7672 res, err := c.doRequest("json") 7673 if res != nil && res.StatusCode == http.StatusNotModified { 7674 if res.Body != nil { 7675 res.Body.Close() 7676 } 7677 return nil, &googleapi.Error{ 7678 Code: res.StatusCode, 7679 Header: res.Header, 7680 } 7681 } 7682 if err != nil { 7683 return nil, err 7684 } 7685 defer googleapi.CloseBody(res) 7686 if err := googleapi.CheckResponse(res); err != nil { 7687 return nil, err 7688 } 7689 ret := &Service{ 7690 ServerResponse: googleapi.ServerResponse{ 7691 Header: res.Header, 7692 HTTPStatusCode: res.StatusCode, 7693 }, 7694 } 7695 target := &ret 7696 if err := gensupport.DecodeResponse(target, res); err != nil { 7697 return nil, err 7698 } 7699 return ret, nil 7700 // { 7701 // "description": "Gets a service configuration (version) for a managed service.", 7702 // "flatPath": "v1/services/{serviceName}/config", 7703 // "httpMethod": "GET", 7704 // "id": "servicemanagement.services.getConfig", 7705 // "parameterOrder": [ 7706 // "serviceName" 7707 // ], 7708 // "parameters": { 7709 // "configId": { 7710 // "description": "Required. The id of the service configuration resource.\n\nThis field must be specified for the server to return all fields, including\n`SourceInfo`.", 7711 // "location": "query", 7712 // "type": "string" 7713 // }, 7714 // "serviceName": { 7715 // "description": "Required. The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", 7716 // "location": "path", 7717 // "required": true, 7718 // "type": "string" 7719 // }, 7720 // "view": { 7721 // "description": "Specifies which parts of the Service Config should be returned in the\nresponse.", 7722 // "enum": [ 7723 // "BASIC", 7724 // "FULL" 7725 // ], 7726 // "location": "query", 7727 // "type": "string" 7728 // } 7729 // }, 7730 // "path": "v1/services/{serviceName}/config", 7731 // "response": { 7732 // "$ref": "Service" 7733 // }, 7734 // "scopes": [ 7735 // "https://www.googleapis.com/auth/cloud-platform", 7736 // "https://www.googleapis.com/auth/cloud-platform.read-only", 7737 // "https://www.googleapis.com/auth/service.management", 7738 // "https://www.googleapis.com/auth/service.management.readonly" 7739 // ] 7740 // } 7741 7742} 7743 7744// method id "servicemanagement.services.getIamPolicy": 7745 7746type ServicesGetIamPolicyCall struct { 7747 s *APIService 7748 resource string 7749 getiampolicyrequest *GetIamPolicyRequest 7750 urlParams_ gensupport.URLParams 7751 ctx_ context.Context 7752 header_ http.Header 7753} 7754 7755// GetIamPolicy: Gets the access control policy for a resource. 7756// Returns an empty policy if the resource exists and does not have a 7757// policy 7758// set. 7759func (r *ServicesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ServicesGetIamPolicyCall { 7760 c := &ServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7761 c.resource = resource 7762 c.getiampolicyrequest = getiampolicyrequest 7763 return c 7764} 7765 7766// Fields allows partial responses to be retrieved. See 7767// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7768// for more information. 7769func (c *ServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ServicesGetIamPolicyCall { 7770 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7771 return c 7772} 7773 7774// Context sets the context to be used in this call's Do method. Any 7775// pending HTTP request will be aborted if the provided context is 7776// canceled. 7777func (c *ServicesGetIamPolicyCall) Context(ctx context.Context) *ServicesGetIamPolicyCall { 7778 c.ctx_ = ctx 7779 return c 7780} 7781 7782// Header returns an http.Header that can be modified by the caller to 7783// add HTTP headers to the request. 7784func (c *ServicesGetIamPolicyCall) Header() http.Header { 7785 if c.header_ == nil { 7786 c.header_ = make(http.Header) 7787 } 7788 return c.header_ 7789} 7790 7791func (c *ServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 7792 reqHeaders := make(http.Header) 7793 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 7794 for k, v := range c.header_ { 7795 reqHeaders[k] = v 7796 } 7797 reqHeaders.Set("User-Agent", c.s.userAgent()) 7798 var body io.Reader = nil 7799 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 7800 if err != nil { 7801 return nil, err 7802 } 7803 reqHeaders.Set("Content-Type", "application/json") 7804 c.urlParams_.Set("alt", alt) 7805 c.urlParams_.Set("prettyPrint", "false") 7806 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 7807 urls += "?" + c.urlParams_.Encode() 7808 req, err := http.NewRequest("POST", urls, body) 7809 if err != nil { 7810 return nil, err 7811 } 7812 req.Header = reqHeaders 7813 googleapi.Expand(req.URL, map[string]string{ 7814 "resource": c.resource, 7815 }) 7816 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7817} 7818 7819// Do executes the "servicemanagement.services.getIamPolicy" call. 7820// Exactly one of *Policy or error will be non-nil. Any non-2xx status 7821// code is an error. Response headers are in either 7822// *Policy.ServerResponse.Header or (if a response was returned at all) 7823// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7824// check whether the returned error was because http.StatusNotModified 7825// was returned. 7826func (c *ServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 7827 gensupport.SetOptions(c.urlParams_, opts...) 7828 res, err := c.doRequest("json") 7829 if res != nil && res.StatusCode == http.StatusNotModified { 7830 if res.Body != nil { 7831 res.Body.Close() 7832 } 7833 return nil, &googleapi.Error{ 7834 Code: res.StatusCode, 7835 Header: res.Header, 7836 } 7837 } 7838 if err != nil { 7839 return nil, err 7840 } 7841 defer googleapi.CloseBody(res) 7842 if err := googleapi.CheckResponse(res); err != nil { 7843 return nil, err 7844 } 7845 ret := &Policy{ 7846 ServerResponse: googleapi.ServerResponse{ 7847 Header: res.Header, 7848 HTTPStatusCode: res.StatusCode, 7849 }, 7850 } 7851 target := &ret 7852 if err := gensupport.DecodeResponse(target, res); err != nil { 7853 return nil, err 7854 } 7855 return ret, nil 7856 // { 7857 // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", 7858 // "flatPath": "v1/services/{servicesId}:getIamPolicy", 7859 // "httpMethod": "POST", 7860 // "id": "servicemanagement.services.getIamPolicy", 7861 // "parameterOrder": [ 7862 // "resource" 7863 // ], 7864 // "parameters": { 7865 // "resource": { 7866 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 7867 // "location": "path", 7868 // "pattern": "^services/[^/]+$", 7869 // "required": true, 7870 // "type": "string" 7871 // } 7872 // }, 7873 // "path": "v1/{+resource}:getIamPolicy", 7874 // "request": { 7875 // "$ref": "GetIamPolicyRequest" 7876 // }, 7877 // "response": { 7878 // "$ref": "Policy" 7879 // }, 7880 // "scopes": [ 7881 // "https://www.googleapis.com/auth/cloud-platform", 7882 // "https://www.googleapis.com/auth/cloud-platform.read-only", 7883 // "https://www.googleapis.com/auth/service.management", 7884 // "https://www.googleapis.com/auth/service.management.readonly" 7885 // ] 7886 // } 7887 7888} 7889 7890// method id "servicemanagement.services.list": 7891 7892type ServicesListCall struct { 7893 s *APIService 7894 urlParams_ gensupport.URLParams 7895 ifNoneMatch_ string 7896 ctx_ context.Context 7897 header_ http.Header 7898} 7899 7900// List: Lists managed services. 7901// 7902// Returns all public services. For authenticated users, also returns 7903// all 7904// services the calling user has "servicemanagement.services.get" 7905// permission 7906// for. 7907// 7908// **BETA:** If the caller specifies the `consumer_id`, it returns only 7909// the 7910// services enabled on the consumer. The `consumer_id` must have the 7911// format 7912// of "project:{PROJECT-ID}". 7913func (r *ServicesService) List() *ServicesListCall { 7914 c := &ServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7915 return c 7916} 7917 7918// ConsumerId sets the optional parameter "consumerId": Include services 7919// consumed by the specified consumer. 7920// 7921// The Google Service Management implementation accepts the 7922// following 7923// forms: 7924// - project:<project_id> 7925func (c *ServicesListCall) ConsumerId(consumerId string) *ServicesListCall { 7926 c.urlParams_.Set("consumerId", consumerId) 7927 return c 7928} 7929 7930// PageSize sets the optional parameter "pageSize": The max number of 7931// items to include in the response list. Page size is 50 7932// if not specified. Maximum value is 100. 7933func (c *ServicesListCall) PageSize(pageSize int64) *ServicesListCall { 7934 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7935 return c 7936} 7937 7938// PageToken sets the optional parameter "pageToken": Token identifying 7939// which result to start with; returned by a previous list 7940// call. 7941func (c *ServicesListCall) PageToken(pageToken string) *ServicesListCall { 7942 c.urlParams_.Set("pageToken", pageToken) 7943 return c 7944} 7945 7946// ProducerProjectId sets the optional parameter "producerProjectId": 7947// Include services produced by the specified project. 7948func (c *ServicesListCall) ProducerProjectId(producerProjectId string) *ServicesListCall { 7949 c.urlParams_.Set("producerProjectId", producerProjectId) 7950 return c 7951} 7952 7953// Fields allows partial responses to be retrieved. See 7954// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7955// for more information. 7956func (c *ServicesListCall) Fields(s ...googleapi.Field) *ServicesListCall { 7957 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7958 return c 7959} 7960 7961// IfNoneMatch sets the optional parameter which makes the operation 7962// fail if the object's ETag matches the given value. This is useful for 7963// getting updates only after the object has changed since the last 7964// request. Use googleapi.IsNotModified to check whether the response 7965// error from Do is the result of In-None-Match. 7966func (c *ServicesListCall) IfNoneMatch(entityTag string) *ServicesListCall { 7967 c.ifNoneMatch_ = entityTag 7968 return c 7969} 7970 7971// Context sets the context to be used in this call's Do method. Any 7972// pending HTTP request will be aborted if the provided context is 7973// canceled. 7974func (c *ServicesListCall) Context(ctx context.Context) *ServicesListCall { 7975 c.ctx_ = ctx 7976 return c 7977} 7978 7979// Header returns an http.Header that can be modified by the caller to 7980// add HTTP headers to the request. 7981func (c *ServicesListCall) Header() http.Header { 7982 if c.header_ == nil { 7983 c.header_ = make(http.Header) 7984 } 7985 return c.header_ 7986} 7987 7988func (c *ServicesListCall) doRequest(alt string) (*http.Response, error) { 7989 reqHeaders := make(http.Header) 7990 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 7991 for k, v := range c.header_ { 7992 reqHeaders[k] = v 7993 } 7994 reqHeaders.Set("User-Agent", c.s.userAgent()) 7995 if c.ifNoneMatch_ != "" { 7996 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7997 } 7998 var body io.Reader = nil 7999 c.urlParams_.Set("alt", alt) 8000 c.urlParams_.Set("prettyPrint", "false") 8001 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services") 8002 urls += "?" + c.urlParams_.Encode() 8003 req, err := http.NewRequest("GET", urls, body) 8004 if err != nil { 8005 return nil, err 8006 } 8007 req.Header = reqHeaders 8008 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8009} 8010 8011// Do executes the "servicemanagement.services.list" call. 8012// Exactly one of *ListServicesResponse or error will be non-nil. Any 8013// non-2xx status code is an error. Response headers are in either 8014// *ListServicesResponse.ServerResponse.Header or (if a response was 8015// returned at all) in error.(*googleapi.Error).Header. Use 8016// googleapi.IsNotModified to check whether the returned error was 8017// because http.StatusNotModified was returned. 8018func (c *ServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) { 8019 gensupport.SetOptions(c.urlParams_, opts...) 8020 res, err := c.doRequest("json") 8021 if res != nil && res.StatusCode == http.StatusNotModified { 8022 if res.Body != nil { 8023 res.Body.Close() 8024 } 8025 return nil, &googleapi.Error{ 8026 Code: res.StatusCode, 8027 Header: res.Header, 8028 } 8029 } 8030 if err != nil { 8031 return nil, err 8032 } 8033 defer googleapi.CloseBody(res) 8034 if err := googleapi.CheckResponse(res); err != nil { 8035 return nil, err 8036 } 8037 ret := &ListServicesResponse{ 8038 ServerResponse: googleapi.ServerResponse{ 8039 Header: res.Header, 8040 HTTPStatusCode: res.StatusCode, 8041 }, 8042 } 8043 target := &ret 8044 if err := gensupport.DecodeResponse(target, res); err != nil { 8045 return nil, err 8046 } 8047 return ret, nil 8048 // { 8049 // "description": "Lists managed services.\n\nReturns all public services. For authenticated users, also returns all\nservices the calling user has \"servicemanagement.services.get\" permission\nfor.\n\n**BETA:** If the caller specifies the `consumer_id`, it returns only the\nservices enabled on the consumer. The `consumer_id` must have the format\nof \"project:{PROJECT-ID}\".", 8050 // "flatPath": "v1/services", 8051 // "httpMethod": "GET", 8052 // "id": "servicemanagement.services.list", 8053 // "parameterOrder": [], 8054 // "parameters": { 8055 // "consumerId": { 8056 // "description": "Include services consumed by the specified consumer.\n\nThe Google Service Management implementation accepts the following\nforms:\n- project:\u003cproject_id\u003e", 8057 // "location": "query", 8058 // "type": "string" 8059 // }, 8060 // "pageSize": { 8061 // "description": "The max number of items to include in the response list. Page size is 50\nif not specified. Maximum value is 100.", 8062 // "format": "int32", 8063 // "location": "query", 8064 // "type": "integer" 8065 // }, 8066 // "pageToken": { 8067 // "description": "Token identifying which result to start with; returned by a previous list\ncall.", 8068 // "location": "query", 8069 // "type": "string" 8070 // }, 8071 // "producerProjectId": { 8072 // "description": "Include services produced by the specified project.", 8073 // "location": "query", 8074 // "type": "string" 8075 // } 8076 // }, 8077 // "path": "v1/services", 8078 // "response": { 8079 // "$ref": "ListServicesResponse" 8080 // }, 8081 // "scopes": [ 8082 // "https://www.googleapis.com/auth/cloud-platform", 8083 // "https://www.googleapis.com/auth/cloud-platform.read-only", 8084 // "https://www.googleapis.com/auth/service.management", 8085 // "https://www.googleapis.com/auth/service.management.readonly" 8086 // ] 8087 // } 8088 8089} 8090 8091// Pages invokes f for each page of results. 8092// A non-nil error returned from f will halt the iteration. 8093// The provided context supersedes any context provided to the Context method. 8094func (c *ServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error { 8095 c.ctx_ = ctx 8096 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8097 for { 8098 x, err := c.Do() 8099 if err != nil { 8100 return err 8101 } 8102 if err := f(x); err != nil { 8103 return err 8104 } 8105 if x.NextPageToken == "" { 8106 return nil 8107 } 8108 c.PageToken(x.NextPageToken) 8109 } 8110} 8111 8112// method id "servicemanagement.services.setIamPolicy": 8113 8114type ServicesSetIamPolicyCall struct { 8115 s *APIService 8116 resource string 8117 setiampolicyrequest *SetIamPolicyRequest 8118 urlParams_ gensupport.URLParams 8119 ctx_ context.Context 8120 header_ http.Header 8121} 8122 8123// SetIamPolicy: Sets the access control policy on the specified 8124// resource. Replaces any 8125// existing policy. 8126// 8127// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` 8128// errors. 8129func (r *ServicesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ServicesSetIamPolicyCall { 8130 c := &ServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8131 c.resource = resource 8132 c.setiampolicyrequest = setiampolicyrequest 8133 return c 8134} 8135 8136// Fields allows partial responses to be retrieved. See 8137// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8138// for more information. 8139func (c *ServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ServicesSetIamPolicyCall { 8140 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8141 return c 8142} 8143 8144// Context sets the context to be used in this call's Do method. Any 8145// pending HTTP request will be aborted if the provided context is 8146// canceled. 8147func (c *ServicesSetIamPolicyCall) Context(ctx context.Context) *ServicesSetIamPolicyCall { 8148 c.ctx_ = ctx 8149 return c 8150} 8151 8152// Header returns an http.Header that can be modified by the caller to 8153// add HTTP headers to the request. 8154func (c *ServicesSetIamPolicyCall) Header() http.Header { 8155 if c.header_ == nil { 8156 c.header_ = make(http.Header) 8157 } 8158 return c.header_ 8159} 8160 8161func (c *ServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 8162 reqHeaders := make(http.Header) 8163 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 8164 for k, v := range c.header_ { 8165 reqHeaders[k] = v 8166 } 8167 reqHeaders.Set("User-Agent", c.s.userAgent()) 8168 var body io.Reader = nil 8169 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 8170 if err != nil { 8171 return nil, err 8172 } 8173 reqHeaders.Set("Content-Type", "application/json") 8174 c.urlParams_.Set("alt", alt) 8175 c.urlParams_.Set("prettyPrint", "false") 8176 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 8177 urls += "?" + c.urlParams_.Encode() 8178 req, err := http.NewRequest("POST", urls, body) 8179 if err != nil { 8180 return nil, err 8181 } 8182 req.Header = reqHeaders 8183 googleapi.Expand(req.URL, map[string]string{ 8184 "resource": c.resource, 8185 }) 8186 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8187} 8188 8189// Do executes the "servicemanagement.services.setIamPolicy" call. 8190// Exactly one of *Policy or error will be non-nil. Any non-2xx status 8191// code is an error. Response headers are in either 8192// *Policy.ServerResponse.Header or (if a response was returned at all) 8193// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8194// check whether the returned error was because http.StatusNotModified 8195// was returned. 8196func (c *ServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 8197 gensupport.SetOptions(c.urlParams_, opts...) 8198 res, err := c.doRequest("json") 8199 if res != nil && res.StatusCode == http.StatusNotModified { 8200 if res.Body != nil { 8201 res.Body.Close() 8202 } 8203 return nil, &googleapi.Error{ 8204 Code: res.StatusCode, 8205 Header: res.Header, 8206 } 8207 } 8208 if err != nil { 8209 return nil, err 8210 } 8211 defer googleapi.CloseBody(res) 8212 if err := googleapi.CheckResponse(res); err != nil { 8213 return nil, err 8214 } 8215 ret := &Policy{ 8216 ServerResponse: googleapi.ServerResponse{ 8217 Header: res.Header, 8218 HTTPStatusCode: res.StatusCode, 8219 }, 8220 } 8221 target := &ret 8222 if err := gensupport.DecodeResponse(target, res); err != nil { 8223 return nil, err 8224 } 8225 return ret, nil 8226 // { 8227 // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.\n\nCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 8228 // "flatPath": "v1/services/{servicesId}:setIamPolicy", 8229 // "httpMethod": "POST", 8230 // "id": "servicemanagement.services.setIamPolicy", 8231 // "parameterOrder": [ 8232 // "resource" 8233 // ], 8234 // "parameters": { 8235 // "resource": { 8236 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 8237 // "location": "path", 8238 // "pattern": "^services/[^/]+$", 8239 // "required": true, 8240 // "type": "string" 8241 // } 8242 // }, 8243 // "path": "v1/{+resource}:setIamPolicy", 8244 // "request": { 8245 // "$ref": "SetIamPolicyRequest" 8246 // }, 8247 // "response": { 8248 // "$ref": "Policy" 8249 // }, 8250 // "scopes": [ 8251 // "https://www.googleapis.com/auth/cloud-platform", 8252 // "https://www.googleapis.com/auth/service.management" 8253 // ] 8254 // } 8255 8256} 8257 8258// method id "servicemanagement.services.testIamPermissions": 8259 8260type ServicesTestIamPermissionsCall struct { 8261 s *APIService 8262 resource string 8263 testiampermissionsrequest *TestIamPermissionsRequest 8264 urlParams_ gensupport.URLParams 8265 ctx_ context.Context 8266 header_ http.Header 8267} 8268 8269// TestIamPermissions: Returns permissions that a caller has on the 8270// specified resource. 8271// If the resource does not exist, this will return an empty set 8272// of 8273// permissions, not a `NOT_FOUND` error. 8274// 8275// Note: This operation is designed to be used for building 8276// permission-aware 8277// UIs and command-line tools, not for authorization checking. This 8278// operation 8279// may "fail open" without warning. 8280func (r *ServicesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ServicesTestIamPermissionsCall { 8281 c := &ServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8282 c.resource = resource 8283 c.testiampermissionsrequest = testiampermissionsrequest 8284 return c 8285} 8286 8287// Fields allows partial responses to be retrieved. See 8288// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8289// for more information. 8290func (c *ServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ServicesTestIamPermissionsCall { 8291 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8292 return c 8293} 8294 8295// Context sets the context to be used in this call's Do method. Any 8296// pending HTTP request will be aborted if the provided context is 8297// canceled. 8298func (c *ServicesTestIamPermissionsCall) Context(ctx context.Context) *ServicesTestIamPermissionsCall { 8299 c.ctx_ = ctx 8300 return c 8301} 8302 8303// Header returns an http.Header that can be modified by the caller to 8304// add HTTP headers to the request. 8305func (c *ServicesTestIamPermissionsCall) Header() http.Header { 8306 if c.header_ == nil { 8307 c.header_ = make(http.Header) 8308 } 8309 return c.header_ 8310} 8311 8312func (c *ServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 8313 reqHeaders := make(http.Header) 8314 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 8315 for k, v := range c.header_ { 8316 reqHeaders[k] = v 8317 } 8318 reqHeaders.Set("User-Agent", c.s.userAgent()) 8319 var body io.Reader = nil 8320 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 8321 if err != nil { 8322 return nil, err 8323 } 8324 reqHeaders.Set("Content-Type", "application/json") 8325 c.urlParams_.Set("alt", alt) 8326 c.urlParams_.Set("prettyPrint", "false") 8327 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 8328 urls += "?" + c.urlParams_.Encode() 8329 req, err := http.NewRequest("POST", urls, body) 8330 if err != nil { 8331 return nil, err 8332 } 8333 req.Header = reqHeaders 8334 googleapi.Expand(req.URL, map[string]string{ 8335 "resource": c.resource, 8336 }) 8337 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8338} 8339 8340// Do executes the "servicemanagement.services.testIamPermissions" call. 8341// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 8342// Any non-2xx status code is an error. Response headers are in either 8343// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 8344// was returned at all) in error.(*googleapi.Error).Header. Use 8345// googleapi.IsNotModified to check whether the returned error was 8346// because http.StatusNotModified was returned. 8347func (c *ServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 8348 gensupport.SetOptions(c.urlParams_, opts...) 8349 res, err := c.doRequest("json") 8350 if res != nil && res.StatusCode == http.StatusNotModified { 8351 if res.Body != nil { 8352 res.Body.Close() 8353 } 8354 return nil, &googleapi.Error{ 8355 Code: res.StatusCode, 8356 Header: res.Header, 8357 } 8358 } 8359 if err != nil { 8360 return nil, err 8361 } 8362 defer googleapi.CloseBody(res) 8363 if err := googleapi.CheckResponse(res); err != nil { 8364 return nil, err 8365 } 8366 ret := &TestIamPermissionsResponse{ 8367 ServerResponse: googleapi.ServerResponse{ 8368 Header: res.Header, 8369 HTTPStatusCode: res.StatusCode, 8370 }, 8371 } 8372 target := &ret 8373 if err := gensupport.DecodeResponse(target, res); err != nil { 8374 return nil, err 8375 } 8376 return ret, nil 8377 // { 8378 // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a `NOT_FOUND` error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", 8379 // "flatPath": "v1/services/{servicesId}:testIamPermissions", 8380 // "httpMethod": "POST", 8381 // "id": "servicemanagement.services.testIamPermissions", 8382 // "parameterOrder": [ 8383 // "resource" 8384 // ], 8385 // "parameters": { 8386 // "resource": { 8387 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 8388 // "location": "path", 8389 // "pattern": "^services/[^/]+$", 8390 // "required": true, 8391 // "type": "string" 8392 // } 8393 // }, 8394 // "path": "v1/{+resource}:testIamPermissions", 8395 // "request": { 8396 // "$ref": "TestIamPermissionsRequest" 8397 // }, 8398 // "response": { 8399 // "$ref": "TestIamPermissionsResponse" 8400 // }, 8401 // "scopes": [ 8402 // "https://www.googleapis.com/auth/cloud-platform", 8403 // "https://www.googleapis.com/auth/cloud-platform.read-only", 8404 // "https://www.googleapis.com/auth/service.management", 8405 // "https://www.googleapis.com/auth/service.management.readonly" 8406 // ] 8407 // } 8408 8409} 8410 8411// method id "servicemanagement.services.undelete": 8412 8413type ServicesUndeleteCall struct { 8414 s *APIService 8415 serviceName string 8416 urlParams_ gensupport.URLParams 8417 ctx_ context.Context 8418 header_ http.Header 8419} 8420 8421// Undelete: Revives a previously deleted managed service. The method 8422// restores the 8423// service using the configuration at the time the service was 8424// deleted. 8425// The target service must exist and must have been deleted within 8426// the 8427// last 30 days. 8428// 8429// Operation<response: UndeleteServiceResponse> 8430func (r *ServicesService) Undelete(serviceName string) *ServicesUndeleteCall { 8431 c := &ServicesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8432 c.serviceName = serviceName 8433 return c 8434} 8435 8436// Fields allows partial responses to be retrieved. See 8437// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8438// for more information. 8439func (c *ServicesUndeleteCall) Fields(s ...googleapi.Field) *ServicesUndeleteCall { 8440 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8441 return c 8442} 8443 8444// Context sets the context to be used in this call's Do method. Any 8445// pending HTTP request will be aborted if the provided context is 8446// canceled. 8447func (c *ServicesUndeleteCall) Context(ctx context.Context) *ServicesUndeleteCall { 8448 c.ctx_ = ctx 8449 return c 8450} 8451 8452// Header returns an http.Header that can be modified by the caller to 8453// add HTTP headers to the request. 8454func (c *ServicesUndeleteCall) Header() http.Header { 8455 if c.header_ == nil { 8456 c.header_ = make(http.Header) 8457 } 8458 return c.header_ 8459} 8460 8461func (c *ServicesUndeleteCall) doRequest(alt string) (*http.Response, error) { 8462 reqHeaders := make(http.Header) 8463 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 8464 for k, v := range c.header_ { 8465 reqHeaders[k] = v 8466 } 8467 reqHeaders.Set("User-Agent", c.s.userAgent()) 8468 var body io.Reader = nil 8469 c.urlParams_.Set("alt", alt) 8470 c.urlParams_.Set("prettyPrint", "false") 8471 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}:undelete") 8472 urls += "?" + c.urlParams_.Encode() 8473 req, err := http.NewRequest("POST", urls, body) 8474 if err != nil { 8475 return nil, err 8476 } 8477 req.Header = reqHeaders 8478 googleapi.Expand(req.URL, map[string]string{ 8479 "serviceName": c.serviceName, 8480 }) 8481 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8482} 8483 8484// Do executes the "servicemanagement.services.undelete" call. 8485// Exactly one of *Operation or error will be non-nil. Any non-2xx 8486// status code is an error. Response headers are in either 8487// *Operation.ServerResponse.Header or (if a response was returned at 8488// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8489// to check whether the returned error was because 8490// http.StatusNotModified was returned. 8491func (c *ServicesUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8492 gensupport.SetOptions(c.urlParams_, opts...) 8493 res, err := c.doRequest("json") 8494 if res != nil && res.StatusCode == http.StatusNotModified { 8495 if res.Body != nil { 8496 res.Body.Close() 8497 } 8498 return nil, &googleapi.Error{ 8499 Code: res.StatusCode, 8500 Header: res.Header, 8501 } 8502 } 8503 if err != nil { 8504 return nil, err 8505 } 8506 defer googleapi.CloseBody(res) 8507 if err := googleapi.CheckResponse(res); err != nil { 8508 return nil, err 8509 } 8510 ret := &Operation{ 8511 ServerResponse: googleapi.ServerResponse{ 8512 Header: res.Header, 8513 HTTPStatusCode: res.StatusCode, 8514 }, 8515 } 8516 target := &ret 8517 if err := gensupport.DecodeResponse(target, res); err != nil { 8518 return nil, err 8519 } 8520 return ret, nil 8521 // { 8522 // "description": "Revives a previously deleted managed service. The method restores the\nservice using the configuration at the time the service was deleted.\nThe target service must exist and must have been deleted within the\nlast 30 days.\n\nOperation\u003cresponse: UndeleteServiceResponse\u003e", 8523 // "flatPath": "v1/services/{serviceName}:undelete", 8524 // "httpMethod": "POST", 8525 // "id": "servicemanagement.services.undelete", 8526 // "parameterOrder": [ 8527 // "serviceName" 8528 // ], 8529 // "parameters": { 8530 // "serviceName": { 8531 // "description": "Required. The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", 8532 // "location": "path", 8533 // "required": true, 8534 // "type": "string" 8535 // } 8536 // }, 8537 // "path": "v1/services/{serviceName}:undelete", 8538 // "response": { 8539 // "$ref": "Operation" 8540 // }, 8541 // "scopes": [ 8542 // "https://www.googleapis.com/auth/cloud-platform", 8543 // "https://www.googleapis.com/auth/service.management" 8544 // ] 8545 // } 8546 8547} 8548 8549// method id "servicemanagement.services.configs.create": 8550 8551type ServicesConfigsCreateCall struct { 8552 s *APIService 8553 serviceName string 8554 service *Service 8555 urlParams_ gensupport.URLParams 8556 ctx_ context.Context 8557 header_ http.Header 8558} 8559 8560// Create: Creates a new service configuration (version) for a managed 8561// service. 8562// This method only stores the service configuration. To roll out the 8563// service 8564// configuration to backend systems please 8565// call 8566// CreateServiceRollout. 8567// 8568// Only the 100 most recent service configurations and ones referenced 8569// by 8570// existing rollouts are kept for each service. The rest will be 8571// deleted 8572// eventually. 8573func (r *ServicesConfigsService) Create(serviceName string, service *Service) *ServicesConfigsCreateCall { 8574 c := &ServicesConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8575 c.serviceName = serviceName 8576 c.service = service 8577 return c 8578} 8579 8580// Fields allows partial responses to be retrieved. See 8581// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8582// for more information. 8583func (c *ServicesConfigsCreateCall) Fields(s ...googleapi.Field) *ServicesConfigsCreateCall { 8584 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8585 return c 8586} 8587 8588// Context sets the context to be used in this call's Do method. Any 8589// pending HTTP request will be aborted if the provided context is 8590// canceled. 8591func (c *ServicesConfigsCreateCall) Context(ctx context.Context) *ServicesConfigsCreateCall { 8592 c.ctx_ = ctx 8593 return c 8594} 8595 8596// Header returns an http.Header that can be modified by the caller to 8597// add HTTP headers to the request. 8598func (c *ServicesConfigsCreateCall) Header() http.Header { 8599 if c.header_ == nil { 8600 c.header_ = make(http.Header) 8601 } 8602 return c.header_ 8603} 8604 8605func (c *ServicesConfigsCreateCall) doRequest(alt string) (*http.Response, error) { 8606 reqHeaders := make(http.Header) 8607 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 8608 for k, v := range c.header_ { 8609 reqHeaders[k] = v 8610 } 8611 reqHeaders.Set("User-Agent", c.s.userAgent()) 8612 var body io.Reader = nil 8613 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) 8614 if err != nil { 8615 return nil, err 8616 } 8617 reqHeaders.Set("Content-Type", "application/json") 8618 c.urlParams_.Set("alt", alt) 8619 c.urlParams_.Set("prettyPrint", "false") 8620 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}/configs") 8621 urls += "?" + c.urlParams_.Encode() 8622 req, err := http.NewRequest("POST", urls, body) 8623 if err != nil { 8624 return nil, err 8625 } 8626 req.Header = reqHeaders 8627 googleapi.Expand(req.URL, map[string]string{ 8628 "serviceName": c.serviceName, 8629 }) 8630 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8631} 8632 8633// Do executes the "servicemanagement.services.configs.create" call. 8634// Exactly one of *Service or error will be non-nil. Any non-2xx status 8635// code is an error. Response headers are in either 8636// *Service.ServerResponse.Header or (if a response was returned at all) 8637// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8638// check whether the returned error was because http.StatusNotModified 8639// was returned. 8640func (c *ServicesConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Service, error) { 8641 gensupport.SetOptions(c.urlParams_, opts...) 8642 res, err := c.doRequest("json") 8643 if res != nil && res.StatusCode == http.StatusNotModified { 8644 if res.Body != nil { 8645 res.Body.Close() 8646 } 8647 return nil, &googleapi.Error{ 8648 Code: res.StatusCode, 8649 Header: res.Header, 8650 } 8651 } 8652 if err != nil { 8653 return nil, err 8654 } 8655 defer googleapi.CloseBody(res) 8656 if err := googleapi.CheckResponse(res); err != nil { 8657 return nil, err 8658 } 8659 ret := &Service{ 8660 ServerResponse: googleapi.ServerResponse{ 8661 Header: res.Header, 8662 HTTPStatusCode: res.StatusCode, 8663 }, 8664 } 8665 target := &ret 8666 if err := gensupport.DecodeResponse(target, res); err != nil { 8667 return nil, err 8668 } 8669 return ret, nil 8670 // { 8671 // "description": "Creates a new service configuration (version) for a managed service.\nThis method only stores the service configuration. To roll out the service\nconfiguration to backend systems please call\nCreateServiceRollout.\n\nOnly the 100 most recent service configurations and ones referenced by\nexisting rollouts are kept for each service. The rest will be deleted\neventually.", 8672 // "flatPath": "v1/services/{serviceName}/configs", 8673 // "httpMethod": "POST", 8674 // "id": "servicemanagement.services.configs.create", 8675 // "parameterOrder": [ 8676 // "serviceName" 8677 // ], 8678 // "parameters": { 8679 // "serviceName": { 8680 // "description": "Required. The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", 8681 // "location": "path", 8682 // "required": true, 8683 // "type": "string" 8684 // } 8685 // }, 8686 // "path": "v1/services/{serviceName}/configs", 8687 // "request": { 8688 // "$ref": "Service" 8689 // }, 8690 // "response": { 8691 // "$ref": "Service" 8692 // }, 8693 // "scopes": [ 8694 // "https://www.googleapis.com/auth/cloud-platform", 8695 // "https://www.googleapis.com/auth/service.management" 8696 // ] 8697 // } 8698 8699} 8700 8701// method id "servicemanagement.services.configs.get": 8702 8703type ServicesConfigsGetCall struct { 8704 s *APIService 8705 serviceName string 8706 configId string 8707 urlParams_ gensupport.URLParams 8708 ifNoneMatch_ string 8709 ctx_ context.Context 8710 header_ http.Header 8711} 8712 8713// Get: Gets a service configuration (version) for a managed service. 8714func (r *ServicesConfigsService) Get(serviceName string, configId string) *ServicesConfigsGetCall { 8715 c := &ServicesConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8716 c.serviceName = serviceName 8717 c.configId = configId 8718 return c 8719} 8720 8721// View sets the optional parameter "view": Specifies which parts of the 8722// Service Config should be returned in the 8723// response. 8724// 8725// Possible values: 8726// "BASIC" 8727// "FULL" 8728func (c *ServicesConfigsGetCall) View(view string) *ServicesConfigsGetCall { 8729 c.urlParams_.Set("view", view) 8730 return c 8731} 8732 8733// Fields allows partial responses to be retrieved. See 8734// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8735// for more information. 8736func (c *ServicesConfigsGetCall) Fields(s ...googleapi.Field) *ServicesConfigsGetCall { 8737 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8738 return c 8739} 8740 8741// IfNoneMatch sets the optional parameter which makes the operation 8742// fail if the object's ETag matches the given value. This is useful for 8743// getting updates only after the object has changed since the last 8744// request. Use googleapi.IsNotModified to check whether the response 8745// error from Do is the result of In-None-Match. 8746func (c *ServicesConfigsGetCall) IfNoneMatch(entityTag string) *ServicesConfigsGetCall { 8747 c.ifNoneMatch_ = entityTag 8748 return c 8749} 8750 8751// Context sets the context to be used in this call's Do method. Any 8752// pending HTTP request will be aborted if the provided context is 8753// canceled. 8754func (c *ServicesConfigsGetCall) Context(ctx context.Context) *ServicesConfigsGetCall { 8755 c.ctx_ = ctx 8756 return c 8757} 8758 8759// Header returns an http.Header that can be modified by the caller to 8760// add HTTP headers to the request. 8761func (c *ServicesConfigsGetCall) Header() http.Header { 8762 if c.header_ == nil { 8763 c.header_ = make(http.Header) 8764 } 8765 return c.header_ 8766} 8767 8768func (c *ServicesConfigsGetCall) doRequest(alt string) (*http.Response, error) { 8769 reqHeaders := make(http.Header) 8770 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 8771 for k, v := range c.header_ { 8772 reqHeaders[k] = v 8773 } 8774 reqHeaders.Set("User-Agent", c.s.userAgent()) 8775 if c.ifNoneMatch_ != "" { 8776 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8777 } 8778 var body io.Reader = nil 8779 c.urlParams_.Set("alt", alt) 8780 c.urlParams_.Set("prettyPrint", "false") 8781 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}/configs/{configId}") 8782 urls += "?" + c.urlParams_.Encode() 8783 req, err := http.NewRequest("GET", urls, body) 8784 if err != nil { 8785 return nil, err 8786 } 8787 req.Header = reqHeaders 8788 googleapi.Expand(req.URL, map[string]string{ 8789 "serviceName": c.serviceName, 8790 "configId": c.configId, 8791 }) 8792 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8793} 8794 8795// Do executes the "servicemanagement.services.configs.get" call. 8796// Exactly one of *Service or error will be non-nil. Any non-2xx status 8797// code is an error. Response headers are in either 8798// *Service.ServerResponse.Header or (if a response was returned at all) 8799// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8800// check whether the returned error was because http.StatusNotModified 8801// was returned. 8802func (c *ServicesConfigsGetCall) Do(opts ...googleapi.CallOption) (*Service, error) { 8803 gensupport.SetOptions(c.urlParams_, opts...) 8804 res, err := c.doRequest("json") 8805 if res != nil && res.StatusCode == http.StatusNotModified { 8806 if res.Body != nil { 8807 res.Body.Close() 8808 } 8809 return nil, &googleapi.Error{ 8810 Code: res.StatusCode, 8811 Header: res.Header, 8812 } 8813 } 8814 if err != nil { 8815 return nil, err 8816 } 8817 defer googleapi.CloseBody(res) 8818 if err := googleapi.CheckResponse(res); err != nil { 8819 return nil, err 8820 } 8821 ret := &Service{ 8822 ServerResponse: googleapi.ServerResponse{ 8823 Header: res.Header, 8824 HTTPStatusCode: res.StatusCode, 8825 }, 8826 } 8827 target := &ret 8828 if err := gensupport.DecodeResponse(target, res); err != nil { 8829 return nil, err 8830 } 8831 return ret, nil 8832 // { 8833 // "description": "Gets a service configuration (version) for a managed service.", 8834 // "flatPath": "v1/services/{serviceName}/configs/{configId}", 8835 // "httpMethod": "GET", 8836 // "id": "servicemanagement.services.configs.get", 8837 // "parameterOrder": [ 8838 // "serviceName", 8839 // "configId" 8840 // ], 8841 // "parameters": { 8842 // "configId": { 8843 // "description": "Required. The id of the service configuration resource.\n\nThis field must be specified for the server to return all fields, including\n`SourceInfo`.", 8844 // "location": "path", 8845 // "required": true, 8846 // "type": "string" 8847 // }, 8848 // "serviceName": { 8849 // "description": "Required. The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", 8850 // "location": "path", 8851 // "required": true, 8852 // "type": "string" 8853 // }, 8854 // "view": { 8855 // "description": "Specifies which parts of the Service Config should be returned in the\nresponse.", 8856 // "enum": [ 8857 // "BASIC", 8858 // "FULL" 8859 // ], 8860 // "location": "query", 8861 // "type": "string" 8862 // } 8863 // }, 8864 // "path": "v1/services/{serviceName}/configs/{configId}", 8865 // "response": { 8866 // "$ref": "Service" 8867 // }, 8868 // "scopes": [ 8869 // "https://www.googleapis.com/auth/cloud-platform", 8870 // "https://www.googleapis.com/auth/cloud-platform.read-only", 8871 // "https://www.googleapis.com/auth/service.management", 8872 // "https://www.googleapis.com/auth/service.management.readonly" 8873 // ] 8874 // } 8875 8876} 8877 8878// method id "servicemanagement.services.configs.list": 8879 8880type ServicesConfigsListCall struct { 8881 s *APIService 8882 serviceName string 8883 urlParams_ gensupport.URLParams 8884 ifNoneMatch_ string 8885 ctx_ context.Context 8886 header_ http.Header 8887} 8888 8889// List: Lists the history of the service configuration for a managed 8890// service, 8891// from the newest to the oldest. 8892func (r *ServicesConfigsService) List(serviceName string) *ServicesConfigsListCall { 8893 c := &ServicesConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8894 c.serviceName = serviceName 8895 return c 8896} 8897 8898// PageSize sets the optional parameter "pageSize": The max number of 8899// items to include in the response list. Page size is 50 8900// if not specified. Maximum value is 100. 8901func (c *ServicesConfigsListCall) PageSize(pageSize int64) *ServicesConfigsListCall { 8902 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8903 return c 8904} 8905 8906// PageToken sets the optional parameter "pageToken": The token of the 8907// page to retrieve. 8908func (c *ServicesConfigsListCall) PageToken(pageToken string) *ServicesConfigsListCall { 8909 c.urlParams_.Set("pageToken", pageToken) 8910 return c 8911} 8912 8913// Fields allows partial responses to be retrieved. See 8914// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8915// for more information. 8916func (c *ServicesConfigsListCall) Fields(s ...googleapi.Field) *ServicesConfigsListCall { 8917 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8918 return c 8919} 8920 8921// IfNoneMatch sets the optional parameter which makes the operation 8922// fail if the object's ETag matches the given value. This is useful for 8923// getting updates only after the object has changed since the last 8924// request. Use googleapi.IsNotModified to check whether the response 8925// error from Do is the result of In-None-Match. 8926func (c *ServicesConfigsListCall) IfNoneMatch(entityTag string) *ServicesConfigsListCall { 8927 c.ifNoneMatch_ = entityTag 8928 return c 8929} 8930 8931// Context sets the context to be used in this call's Do method. Any 8932// pending HTTP request will be aborted if the provided context is 8933// canceled. 8934func (c *ServicesConfigsListCall) Context(ctx context.Context) *ServicesConfigsListCall { 8935 c.ctx_ = ctx 8936 return c 8937} 8938 8939// Header returns an http.Header that can be modified by the caller to 8940// add HTTP headers to the request. 8941func (c *ServicesConfigsListCall) Header() http.Header { 8942 if c.header_ == nil { 8943 c.header_ = make(http.Header) 8944 } 8945 return c.header_ 8946} 8947 8948func (c *ServicesConfigsListCall) doRequest(alt string) (*http.Response, error) { 8949 reqHeaders := make(http.Header) 8950 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 8951 for k, v := range c.header_ { 8952 reqHeaders[k] = v 8953 } 8954 reqHeaders.Set("User-Agent", c.s.userAgent()) 8955 if c.ifNoneMatch_ != "" { 8956 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8957 } 8958 var body io.Reader = nil 8959 c.urlParams_.Set("alt", alt) 8960 c.urlParams_.Set("prettyPrint", "false") 8961 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}/configs") 8962 urls += "?" + c.urlParams_.Encode() 8963 req, err := http.NewRequest("GET", urls, body) 8964 if err != nil { 8965 return nil, err 8966 } 8967 req.Header = reqHeaders 8968 googleapi.Expand(req.URL, map[string]string{ 8969 "serviceName": c.serviceName, 8970 }) 8971 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8972} 8973 8974// Do executes the "servicemanagement.services.configs.list" call. 8975// Exactly one of *ListServiceConfigsResponse or error will be non-nil. 8976// Any non-2xx status code is an error. Response headers are in either 8977// *ListServiceConfigsResponse.ServerResponse.Header or (if a response 8978// was returned at all) in error.(*googleapi.Error).Header. Use 8979// googleapi.IsNotModified to check whether the returned error was 8980// because http.StatusNotModified was returned. 8981func (c *ServicesConfigsListCall) Do(opts ...googleapi.CallOption) (*ListServiceConfigsResponse, error) { 8982 gensupport.SetOptions(c.urlParams_, opts...) 8983 res, err := c.doRequest("json") 8984 if res != nil && res.StatusCode == http.StatusNotModified { 8985 if res.Body != nil { 8986 res.Body.Close() 8987 } 8988 return nil, &googleapi.Error{ 8989 Code: res.StatusCode, 8990 Header: res.Header, 8991 } 8992 } 8993 if err != nil { 8994 return nil, err 8995 } 8996 defer googleapi.CloseBody(res) 8997 if err := googleapi.CheckResponse(res); err != nil { 8998 return nil, err 8999 } 9000 ret := &ListServiceConfigsResponse{ 9001 ServerResponse: googleapi.ServerResponse{ 9002 Header: res.Header, 9003 HTTPStatusCode: res.StatusCode, 9004 }, 9005 } 9006 target := &ret 9007 if err := gensupport.DecodeResponse(target, res); err != nil { 9008 return nil, err 9009 } 9010 return ret, nil 9011 // { 9012 // "description": "Lists the history of the service configuration for a managed service,\nfrom the newest to the oldest.", 9013 // "flatPath": "v1/services/{serviceName}/configs", 9014 // "httpMethod": "GET", 9015 // "id": "servicemanagement.services.configs.list", 9016 // "parameterOrder": [ 9017 // "serviceName" 9018 // ], 9019 // "parameters": { 9020 // "pageSize": { 9021 // "description": "The max number of items to include in the response list. Page size is 50\nif not specified. Maximum value is 100.", 9022 // "format": "int32", 9023 // "location": "query", 9024 // "type": "integer" 9025 // }, 9026 // "pageToken": { 9027 // "description": "The token of the page to retrieve.", 9028 // "location": "query", 9029 // "type": "string" 9030 // }, 9031 // "serviceName": { 9032 // "description": "Required. The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", 9033 // "location": "path", 9034 // "required": true, 9035 // "type": "string" 9036 // } 9037 // }, 9038 // "path": "v1/services/{serviceName}/configs", 9039 // "response": { 9040 // "$ref": "ListServiceConfigsResponse" 9041 // }, 9042 // "scopes": [ 9043 // "https://www.googleapis.com/auth/cloud-platform", 9044 // "https://www.googleapis.com/auth/cloud-platform.read-only", 9045 // "https://www.googleapis.com/auth/service.management", 9046 // "https://www.googleapis.com/auth/service.management.readonly" 9047 // ] 9048 // } 9049 9050} 9051 9052// Pages invokes f for each page of results. 9053// A non-nil error returned from f will halt the iteration. 9054// The provided context supersedes any context provided to the Context method. 9055func (c *ServicesConfigsListCall) Pages(ctx context.Context, f func(*ListServiceConfigsResponse) error) error { 9056 c.ctx_ = ctx 9057 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9058 for { 9059 x, err := c.Do() 9060 if err != nil { 9061 return err 9062 } 9063 if err := f(x); err != nil { 9064 return err 9065 } 9066 if x.NextPageToken == "" { 9067 return nil 9068 } 9069 c.PageToken(x.NextPageToken) 9070 } 9071} 9072 9073// method id "servicemanagement.services.configs.submit": 9074 9075type ServicesConfigsSubmitCall struct { 9076 s *APIService 9077 serviceName string 9078 submitconfigsourcerequest *SubmitConfigSourceRequest 9079 urlParams_ gensupport.URLParams 9080 ctx_ context.Context 9081 header_ http.Header 9082} 9083 9084// Submit: Creates a new service configuration (version) for a managed 9085// service based 9086// on 9087// user-supplied configuration source files (for example: 9088// OpenAPI 9089// Specification). This method stores the source configurations as well 9090// as the 9091// generated service configuration. To rollout the service configuration 9092// to 9093// other services, 9094// please call CreateServiceRollout. 9095// 9096// Only the 100 most recent configuration sources and ones referenced 9097// by 9098// existing service configurtions are kept for each service. The rest 9099// will be 9100// deleted eventually. 9101// 9102// Operation<response: SubmitConfigSourceResponse> 9103func (r *ServicesConfigsService) Submit(serviceName string, submitconfigsourcerequest *SubmitConfigSourceRequest) *ServicesConfigsSubmitCall { 9104 c := &ServicesConfigsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9105 c.serviceName = serviceName 9106 c.submitconfigsourcerequest = submitconfigsourcerequest 9107 return c 9108} 9109 9110// Fields allows partial responses to be retrieved. See 9111// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9112// for more information. 9113func (c *ServicesConfigsSubmitCall) Fields(s ...googleapi.Field) *ServicesConfigsSubmitCall { 9114 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9115 return c 9116} 9117 9118// Context sets the context to be used in this call's Do method. Any 9119// pending HTTP request will be aborted if the provided context is 9120// canceled. 9121func (c *ServicesConfigsSubmitCall) Context(ctx context.Context) *ServicesConfigsSubmitCall { 9122 c.ctx_ = ctx 9123 return c 9124} 9125 9126// Header returns an http.Header that can be modified by the caller to 9127// add HTTP headers to the request. 9128func (c *ServicesConfigsSubmitCall) Header() http.Header { 9129 if c.header_ == nil { 9130 c.header_ = make(http.Header) 9131 } 9132 return c.header_ 9133} 9134 9135func (c *ServicesConfigsSubmitCall) doRequest(alt string) (*http.Response, error) { 9136 reqHeaders := make(http.Header) 9137 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 9138 for k, v := range c.header_ { 9139 reqHeaders[k] = v 9140 } 9141 reqHeaders.Set("User-Agent", c.s.userAgent()) 9142 var body io.Reader = nil 9143 body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitconfigsourcerequest) 9144 if err != nil { 9145 return nil, err 9146 } 9147 reqHeaders.Set("Content-Type", "application/json") 9148 c.urlParams_.Set("alt", alt) 9149 c.urlParams_.Set("prettyPrint", "false") 9150 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}/configs:submit") 9151 urls += "?" + c.urlParams_.Encode() 9152 req, err := http.NewRequest("POST", urls, body) 9153 if err != nil { 9154 return nil, err 9155 } 9156 req.Header = reqHeaders 9157 googleapi.Expand(req.URL, map[string]string{ 9158 "serviceName": c.serviceName, 9159 }) 9160 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9161} 9162 9163// Do executes the "servicemanagement.services.configs.submit" call. 9164// Exactly one of *Operation or error will be non-nil. Any non-2xx 9165// status code is an error. Response headers are in either 9166// *Operation.ServerResponse.Header or (if a response was returned at 9167// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9168// to check whether the returned error was because 9169// http.StatusNotModified was returned. 9170func (c *ServicesConfigsSubmitCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9171 gensupport.SetOptions(c.urlParams_, opts...) 9172 res, err := c.doRequest("json") 9173 if res != nil && res.StatusCode == http.StatusNotModified { 9174 if res.Body != nil { 9175 res.Body.Close() 9176 } 9177 return nil, &googleapi.Error{ 9178 Code: res.StatusCode, 9179 Header: res.Header, 9180 } 9181 } 9182 if err != nil { 9183 return nil, err 9184 } 9185 defer googleapi.CloseBody(res) 9186 if err := googleapi.CheckResponse(res); err != nil { 9187 return nil, err 9188 } 9189 ret := &Operation{ 9190 ServerResponse: googleapi.ServerResponse{ 9191 Header: res.Header, 9192 HTTPStatusCode: res.StatusCode, 9193 }, 9194 } 9195 target := &ret 9196 if err := gensupport.DecodeResponse(target, res); err != nil { 9197 return nil, err 9198 } 9199 return ret, nil 9200 // { 9201 // "description": "Creates a new service configuration (version) for a managed service based\non\nuser-supplied configuration source files (for example: OpenAPI\nSpecification). This method stores the source configurations as well as the\ngenerated service configuration. To rollout the service configuration to\nother services,\nplease call CreateServiceRollout.\n\nOnly the 100 most recent configuration sources and ones referenced by\nexisting service configurtions are kept for each service. The rest will be\ndeleted eventually.\n\nOperation\u003cresponse: SubmitConfigSourceResponse\u003e", 9202 // "flatPath": "v1/services/{serviceName}/configs:submit", 9203 // "httpMethod": "POST", 9204 // "id": "servicemanagement.services.configs.submit", 9205 // "parameterOrder": [ 9206 // "serviceName" 9207 // ], 9208 // "parameters": { 9209 // "serviceName": { 9210 // "description": "Required. The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", 9211 // "location": "path", 9212 // "required": true, 9213 // "type": "string" 9214 // } 9215 // }, 9216 // "path": "v1/services/{serviceName}/configs:submit", 9217 // "request": { 9218 // "$ref": "SubmitConfigSourceRequest" 9219 // }, 9220 // "response": { 9221 // "$ref": "Operation" 9222 // }, 9223 // "scopes": [ 9224 // "https://www.googleapis.com/auth/cloud-platform", 9225 // "https://www.googleapis.com/auth/service.management" 9226 // ] 9227 // } 9228 9229} 9230 9231// method id "servicemanagement.services.consumers.getIamPolicy": 9232 9233type ServicesConsumersGetIamPolicyCall struct { 9234 s *APIService 9235 resource string 9236 getiampolicyrequest *GetIamPolicyRequest 9237 urlParams_ gensupport.URLParams 9238 ctx_ context.Context 9239 header_ http.Header 9240} 9241 9242// GetIamPolicy: Gets the access control policy for a resource. 9243// Returns an empty policy if the resource exists and does not have a 9244// policy 9245// set. 9246func (r *ServicesConsumersService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ServicesConsumersGetIamPolicyCall { 9247 c := &ServicesConsumersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9248 c.resource = resource 9249 c.getiampolicyrequest = getiampolicyrequest 9250 return c 9251} 9252 9253// Fields allows partial responses to be retrieved. See 9254// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9255// for more information. 9256func (c *ServicesConsumersGetIamPolicyCall) Fields(s ...googleapi.Field) *ServicesConsumersGetIamPolicyCall { 9257 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9258 return c 9259} 9260 9261// Context sets the context to be used in this call's Do method. Any 9262// pending HTTP request will be aborted if the provided context is 9263// canceled. 9264func (c *ServicesConsumersGetIamPolicyCall) Context(ctx context.Context) *ServicesConsumersGetIamPolicyCall { 9265 c.ctx_ = ctx 9266 return c 9267} 9268 9269// Header returns an http.Header that can be modified by the caller to 9270// add HTTP headers to the request. 9271func (c *ServicesConsumersGetIamPolicyCall) Header() http.Header { 9272 if c.header_ == nil { 9273 c.header_ = make(http.Header) 9274 } 9275 return c.header_ 9276} 9277 9278func (c *ServicesConsumersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 9279 reqHeaders := make(http.Header) 9280 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 9281 for k, v := range c.header_ { 9282 reqHeaders[k] = v 9283 } 9284 reqHeaders.Set("User-Agent", c.s.userAgent()) 9285 var body io.Reader = nil 9286 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 9287 if err != nil { 9288 return nil, err 9289 } 9290 reqHeaders.Set("Content-Type", "application/json") 9291 c.urlParams_.Set("alt", alt) 9292 c.urlParams_.Set("prettyPrint", "false") 9293 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 9294 urls += "?" + c.urlParams_.Encode() 9295 req, err := http.NewRequest("POST", urls, body) 9296 if err != nil { 9297 return nil, err 9298 } 9299 req.Header = reqHeaders 9300 googleapi.Expand(req.URL, map[string]string{ 9301 "resource": c.resource, 9302 }) 9303 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9304} 9305 9306// Do executes the "servicemanagement.services.consumers.getIamPolicy" call. 9307// Exactly one of *Policy or error will be non-nil. Any non-2xx status 9308// code is an error. Response headers are in either 9309// *Policy.ServerResponse.Header or (if a response was returned at all) 9310// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9311// check whether the returned error was because http.StatusNotModified 9312// was returned. 9313func (c *ServicesConsumersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 9314 gensupport.SetOptions(c.urlParams_, opts...) 9315 res, err := c.doRequest("json") 9316 if res != nil && res.StatusCode == http.StatusNotModified { 9317 if res.Body != nil { 9318 res.Body.Close() 9319 } 9320 return nil, &googleapi.Error{ 9321 Code: res.StatusCode, 9322 Header: res.Header, 9323 } 9324 } 9325 if err != nil { 9326 return nil, err 9327 } 9328 defer googleapi.CloseBody(res) 9329 if err := googleapi.CheckResponse(res); err != nil { 9330 return nil, err 9331 } 9332 ret := &Policy{ 9333 ServerResponse: googleapi.ServerResponse{ 9334 Header: res.Header, 9335 HTTPStatusCode: res.StatusCode, 9336 }, 9337 } 9338 target := &ret 9339 if err := gensupport.DecodeResponse(target, res); err != nil { 9340 return nil, err 9341 } 9342 return ret, nil 9343 // { 9344 // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", 9345 // "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:getIamPolicy", 9346 // "httpMethod": "POST", 9347 // "id": "servicemanagement.services.consumers.getIamPolicy", 9348 // "parameterOrder": [ 9349 // "resource" 9350 // ], 9351 // "parameters": { 9352 // "resource": { 9353 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 9354 // "location": "path", 9355 // "pattern": "^services/[^/]+/consumers/[^/]+$", 9356 // "required": true, 9357 // "type": "string" 9358 // } 9359 // }, 9360 // "path": "v1/{+resource}:getIamPolicy", 9361 // "request": { 9362 // "$ref": "GetIamPolicyRequest" 9363 // }, 9364 // "response": { 9365 // "$ref": "Policy" 9366 // }, 9367 // "scopes": [ 9368 // "https://www.googleapis.com/auth/cloud-platform", 9369 // "https://www.googleapis.com/auth/cloud-platform.read-only", 9370 // "https://www.googleapis.com/auth/service.management", 9371 // "https://www.googleapis.com/auth/service.management.readonly" 9372 // ] 9373 // } 9374 9375} 9376 9377// method id "servicemanagement.services.consumers.setIamPolicy": 9378 9379type ServicesConsumersSetIamPolicyCall struct { 9380 s *APIService 9381 resource string 9382 setiampolicyrequest *SetIamPolicyRequest 9383 urlParams_ gensupport.URLParams 9384 ctx_ context.Context 9385 header_ http.Header 9386} 9387 9388// SetIamPolicy: Sets the access control policy on the specified 9389// resource. Replaces any 9390// existing policy. 9391// 9392// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` 9393// errors. 9394func (r *ServicesConsumersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ServicesConsumersSetIamPolicyCall { 9395 c := &ServicesConsumersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9396 c.resource = resource 9397 c.setiampolicyrequest = setiampolicyrequest 9398 return c 9399} 9400 9401// Fields allows partial responses to be retrieved. See 9402// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9403// for more information. 9404func (c *ServicesConsumersSetIamPolicyCall) Fields(s ...googleapi.Field) *ServicesConsumersSetIamPolicyCall { 9405 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9406 return c 9407} 9408 9409// Context sets the context to be used in this call's Do method. Any 9410// pending HTTP request will be aborted if the provided context is 9411// canceled. 9412func (c *ServicesConsumersSetIamPolicyCall) Context(ctx context.Context) *ServicesConsumersSetIamPolicyCall { 9413 c.ctx_ = ctx 9414 return c 9415} 9416 9417// Header returns an http.Header that can be modified by the caller to 9418// add HTTP headers to the request. 9419func (c *ServicesConsumersSetIamPolicyCall) Header() http.Header { 9420 if c.header_ == nil { 9421 c.header_ = make(http.Header) 9422 } 9423 return c.header_ 9424} 9425 9426func (c *ServicesConsumersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 9427 reqHeaders := make(http.Header) 9428 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 9429 for k, v := range c.header_ { 9430 reqHeaders[k] = v 9431 } 9432 reqHeaders.Set("User-Agent", c.s.userAgent()) 9433 var body io.Reader = nil 9434 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 9435 if err != nil { 9436 return nil, err 9437 } 9438 reqHeaders.Set("Content-Type", "application/json") 9439 c.urlParams_.Set("alt", alt) 9440 c.urlParams_.Set("prettyPrint", "false") 9441 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 9442 urls += "?" + c.urlParams_.Encode() 9443 req, err := http.NewRequest("POST", urls, body) 9444 if err != nil { 9445 return nil, err 9446 } 9447 req.Header = reqHeaders 9448 googleapi.Expand(req.URL, map[string]string{ 9449 "resource": c.resource, 9450 }) 9451 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9452} 9453 9454// Do executes the "servicemanagement.services.consumers.setIamPolicy" call. 9455// Exactly one of *Policy or error will be non-nil. Any non-2xx status 9456// code is an error. Response headers are in either 9457// *Policy.ServerResponse.Header or (if a response was returned at all) 9458// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9459// check whether the returned error was because http.StatusNotModified 9460// was returned. 9461func (c *ServicesConsumersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 9462 gensupport.SetOptions(c.urlParams_, opts...) 9463 res, err := c.doRequest("json") 9464 if res != nil && res.StatusCode == http.StatusNotModified { 9465 if res.Body != nil { 9466 res.Body.Close() 9467 } 9468 return nil, &googleapi.Error{ 9469 Code: res.StatusCode, 9470 Header: res.Header, 9471 } 9472 } 9473 if err != nil { 9474 return nil, err 9475 } 9476 defer googleapi.CloseBody(res) 9477 if err := googleapi.CheckResponse(res); err != nil { 9478 return nil, err 9479 } 9480 ret := &Policy{ 9481 ServerResponse: googleapi.ServerResponse{ 9482 Header: res.Header, 9483 HTTPStatusCode: res.StatusCode, 9484 }, 9485 } 9486 target := &ret 9487 if err := gensupport.DecodeResponse(target, res); err != nil { 9488 return nil, err 9489 } 9490 return ret, nil 9491 // { 9492 // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.\n\nCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 9493 // "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:setIamPolicy", 9494 // "httpMethod": "POST", 9495 // "id": "servicemanagement.services.consumers.setIamPolicy", 9496 // "parameterOrder": [ 9497 // "resource" 9498 // ], 9499 // "parameters": { 9500 // "resource": { 9501 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 9502 // "location": "path", 9503 // "pattern": "^services/[^/]+/consumers/[^/]+$", 9504 // "required": true, 9505 // "type": "string" 9506 // } 9507 // }, 9508 // "path": "v1/{+resource}:setIamPolicy", 9509 // "request": { 9510 // "$ref": "SetIamPolicyRequest" 9511 // }, 9512 // "response": { 9513 // "$ref": "Policy" 9514 // }, 9515 // "scopes": [ 9516 // "https://www.googleapis.com/auth/cloud-platform", 9517 // "https://www.googleapis.com/auth/service.management" 9518 // ] 9519 // } 9520 9521} 9522 9523// method id "servicemanagement.services.consumers.testIamPermissions": 9524 9525type ServicesConsumersTestIamPermissionsCall struct { 9526 s *APIService 9527 resource string 9528 testiampermissionsrequest *TestIamPermissionsRequest 9529 urlParams_ gensupport.URLParams 9530 ctx_ context.Context 9531 header_ http.Header 9532} 9533 9534// TestIamPermissions: Returns permissions that a caller has on the 9535// specified resource. 9536// If the resource does not exist, this will return an empty set 9537// of 9538// permissions, not a `NOT_FOUND` error. 9539// 9540// Note: This operation is designed to be used for building 9541// permission-aware 9542// UIs and command-line tools, not for authorization checking. This 9543// operation 9544// may "fail open" without warning. 9545func (r *ServicesConsumersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ServicesConsumersTestIamPermissionsCall { 9546 c := &ServicesConsumersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9547 c.resource = resource 9548 c.testiampermissionsrequest = testiampermissionsrequest 9549 return c 9550} 9551 9552// Fields allows partial responses to be retrieved. See 9553// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9554// for more information. 9555func (c *ServicesConsumersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ServicesConsumersTestIamPermissionsCall { 9556 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9557 return c 9558} 9559 9560// Context sets the context to be used in this call's Do method. Any 9561// pending HTTP request will be aborted if the provided context is 9562// canceled. 9563func (c *ServicesConsumersTestIamPermissionsCall) Context(ctx context.Context) *ServicesConsumersTestIamPermissionsCall { 9564 c.ctx_ = ctx 9565 return c 9566} 9567 9568// Header returns an http.Header that can be modified by the caller to 9569// add HTTP headers to the request. 9570func (c *ServicesConsumersTestIamPermissionsCall) Header() http.Header { 9571 if c.header_ == nil { 9572 c.header_ = make(http.Header) 9573 } 9574 return c.header_ 9575} 9576 9577func (c *ServicesConsumersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 9578 reqHeaders := make(http.Header) 9579 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 9580 for k, v := range c.header_ { 9581 reqHeaders[k] = v 9582 } 9583 reqHeaders.Set("User-Agent", c.s.userAgent()) 9584 var body io.Reader = nil 9585 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 9586 if err != nil { 9587 return nil, err 9588 } 9589 reqHeaders.Set("Content-Type", "application/json") 9590 c.urlParams_.Set("alt", alt) 9591 c.urlParams_.Set("prettyPrint", "false") 9592 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 9593 urls += "?" + c.urlParams_.Encode() 9594 req, err := http.NewRequest("POST", urls, body) 9595 if err != nil { 9596 return nil, err 9597 } 9598 req.Header = reqHeaders 9599 googleapi.Expand(req.URL, map[string]string{ 9600 "resource": c.resource, 9601 }) 9602 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9603} 9604 9605// Do executes the "servicemanagement.services.consumers.testIamPermissions" call. 9606// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 9607// Any non-2xx status code is an error. Response headers are in either 9608// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 9609// was returned at all) in error.(*googleapi.Error).Header. Use 9610// googleapi.IsNotModified to check whether the returned error was 9611// because http.StatusNotModified was returned. 9612func (c *ServicesConsumersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 9613 gensupport.SetOptions(c.urlParams_, opts...) 9614 res, err := c.doRequest("json") 9615 if res != nil && res.StatusCode == http.StatusNotModified { 9616 if res.Body != nil { 9617 res.Body.Close() 9618 } 9619 return nil, &googleapi.Error{ 9620 Code: res.StatusCode, 9621 Header: res.Header, 9622 } 9623 } 9624 if err != nil { 9625 return nil, err 9626 } 9627 defer googleapi.CloseBody(res) 9628 if err := googleapi.CheckResponse(res); err != nil { 9629 return nil, err 9630 } 9631 ret := &TestIamPermissionsResponse{ 9632 ServerResponse: googleapi.ServerResponse{ 9633 Header: res.Header, 9634 HTTPStatusCode: res.StatusCode, 9635 }, 9636 } 9637 target := &ret 9638 if err := gensupport.DecodeResponse(target, res); err != nil { 9639 return nil, err 9640 } 9641 return ret, nil 9642 // { 9643 // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a `NOT_FOUND` error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", 9644 // "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:testIamPermissions", 9645 // "httpMethod": "POST", 9646 // "id": "servicemanagement.services.consumers.testIamPermissions", 9647 // "parameterOrder": [ 9648 // "resource" 9649 // ], 9650 // "parameters": { 9651 // "resource": { 9652 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 9653 // "location": "path", 9654 // "pattern": "^services/[^/]+/consumers/[^/]+$", 9655 // "required": true, 9656 // "type": "string" 9657 // } 9658 // }, 9659 // "path": "v1/{+resource}:testIamPermissions", 9660 // "request": { 9661 // "$ref": "TestIamPermissionsRequest" 9662 // }, 9663 // "response": { 9664 // "$ref": "TestIamPermissionsResponse" 9665 // }, 9666 // "scopes": [ 9667 // "https://www.googleapis.com/auth/cloud-platform", 9668 // "https://www.googleapis.com/auth/cloud-platform.read-only", 9669 // "https://www.googleapis.com/auth/service.management", 9670 // "https://www.googleapis.com/auth/service.management.readonly" 9671 // ] 9672 // } 9673 9674} 9675 9676// method id "servicemanagement.services.rollouts.create": 9677 9678type ServicesRolloutsCreateCall struct { 9679 s *APIService 9680 serviceName string 9681 rollout *Rollout 9682 urlParams_ gensupport.URLParams 9683 ctx_ context.Context 9684 header_ http.Header 9685} 9686 9687// Create: Creates a new service configuration rollout. Based on 9688// rollout, the 9689// Google Service Management will roll out the service configurations 9690// to 9691// different backend services. For example, the logging configuration 9692// will be 9693// pushed to Google Cloud Logging. 9694// 9695// Please note that any previous pending and running Rollouts and 9696// associated 9697// Operations will be automatically cancelled so that the latest Rollout 9698// will 9699// not be blocked by previous Rollouts. 9700// 9701// Only the 100 most recent (in any state) and the last 10 successful 9702// (if not 9703// already part of the set of 100 most recent) rollouts are kept for 9704// each 9705// service. The rest will be deleted eventually. 9706// 9707// Operation<response: Rollout> 9708func (r *ServicesRolloutsService) Create(serviceName string, rollout *Rollout) *ServicesRolloutsCreateCall { 9709 c := &ServicesRolloutsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9710 c.serviceName = serviceName 9711 c.rollout = rollout 9712 return c 9713} 9714 9715// Fields allows partial responses to be retrieved. See 9716// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9717// for more information. 9718func (c *ServicesRolloutsCreateCall) Fields(s ...googleapi.Field) *ServicesRolloutsCreateCall { 9719 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9720 return c 9721} 9722 9723// Context sets the context to be used in this call's Do method. Any 9724// pending HTTP request will be aborted if the provided context is 9725// canceled. 9726func (c *ServicesRolloutsCreateCall) Context(ctx context.Context) *ServicesRolloutsCreateCall { 9727 c.ctx_ = ctx 9728 return c 9729} 9730 9731// Header returns an http.Header that can be modified by the caller to 9732// add HTTP headers to the request. 9733func (c *ServicesRolloutsCreateCall) Header() http.Header { 9734 if c.header_ == nil { 9735 c.header_ = make(http.Header) 9736 } 9737 return c.header_ 9738} 9739 9740func (c *ServicesRolloutsCreateCall) doRequest(alt string) (*http.Response, error) { 9741 reqHeaders := make(http.Header) 9742 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 9743 for k, v := range c.header_ { 9744 reqHeaders[k] = v 9745 } 9746 reqHeaders.Set("User-Agent", c.s.userAgent()) 9747 var body io.Reader = nil 9748 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollout) 9749 if err != nil { 9750 return nil, err 9751 } 9752 reqHeaders.Set("Content-Type", "application/json") 9753 c.urlParams_.Set("alt", alt) 9754 c.urlParams_.Set("prettyPrint", "false") 9755 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}/rollouts") 9756 urls += "?" + c.urlParams_.Encode() 9757 req, err := http.NewRequest("POST", urls, body) 9758 if err != nil { 9759 return nil, err 9760 } 9761 req.Header = reqHeaders 9762 googleapi.Expand(req.URL, map[string]string{ 9763 "serviceName": c.serviceName, 9764 }) 9765 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9766} 9767 9768// Do executes the "servicemanagement.services.rollouts.create" call. 9769// Exactly one of *Operation or error will be non-nil. Any non-2xx 9770// status code is an error. Response headers are in either 9771// *Operation.ServerResponse.Header or (if a response was returned at 9772// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9773// to check whether the returned error was because 9774// http.StatusNotModified was returned. 9775func (c *ServicesRolloutsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9776 gensupport.SetOptions(c.urlParams_, opts...) 9777 res, err := c.doRequest("json") 9778 if res != nil && res.StatusCode == http.StatusNotModified { 9779 if res.Body != nil { 9780 res.Body.Close() 9781 } 9782 return nil, &googleapi.Error{ 9783 Code: res.StatusCode, 9784 Header: res.Header, 9785 } 9786 } 9787 if err != nil { 9788 return nil, err 9789 } 9790 defer googleapi.CloseBody(res) 9791 if err := googleapi.CheckResponse(res); err != nil { 9792 return nil, err 9793 } 9794 ret := &Operation{ 9795 ServerResponse: googleapi.ServerResponse{ 9796 Header: res.Header, 9797 HTTPStatusCode: res.StatusCode, 9798 }, 9799 } 9800 target := &ret 9801 if err := gensupport.DecodeResponse(target, res); err != nil { 9802 return nil, err 9803 } 9804 return ret, nil 9805 // { 9806 // "description": "Creates a new service configuration rollout. Based on rollout, the\nGoogle Service Management will roll out the service configurations to\ndifferent backend services. For example, the logging configuration will be\npushed to Google Cloud Logging.\n\nPlease note that any previous pending and running Rollouts and associated\nOperations will be automatically cancelled so that the latest Rollout will\nnot be blocked by previous Rollouts.\n\nOnly the 100 most recent (in any state) and the last 10 successful (if not\nalready part of the set of 100 most recent) rollouts are kept for each\nservice. The rest will be deleted eventually.\n\nOperation\u003cresponse: Rollout\u003e", 9807 // "flatPath": "v1/services/{serviceName}/rollouts", 9808 // "httpMethod": "POST", 9809 // "id": "servicemanagement.services.rollouts.create", 9810 // "parameterOrder": [ 9811 // "serviceName" 9812 // ], 9813 // "parameters": { 9814 // "serviceName": { 9815 // "description": "Required. The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", 9816 // "location": "path", 9817 // "required": true, 9818 // "type": "string" 9819 // } 9820 // }, 9821 // "path": "v1/services/{serviceName}/rollouts", 9822 // "request": { 9823 // "$ref": "Rollout" 9824 // }, 9825 // "response": { 9826 // "$ref": "Operation" 9827 // }, 9828 // "scopes": [ 9829 // "https://www.googleapis.com/auth/cloud-platform", 9830 // "https://www.googleapis.com/auth/service.management" 9831 // ] 9832 // } 9833 9834} 9835 9836// method id "servicemanagement.services.rollouts.get": 9837 9838type ServicesRolloutsGetCall struct { 9839 s *APIService 9840 serviceName string 9841 rolloutId string 9842 urlParams_ gensupport.URLParams 9843 ifNoneMatch_ string 9844 ctx_ context.Context 9845 header_ http.Header 9846} 9847 9848// Get: Gets a service configuration rollout. 9849func (r *ServicesRolloutsService) Get(serviceName string, rolloutId string) *ServicesRolloutsGetCall { 9850 c := &ServicesRolloutsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9851 c.serviceName = serviceName 9852 c.rolloutId = rolloutId 9853 return c 9854} 9855 9856// Fields allows partial responses to be retrieved. See 9857// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9858// for more information. 9859func (c *ServicesRolloutsGetCall) Fields(s ...googleapi.Field) *ServicesRolloutsGetCall { 9860 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9861 return c 9862} 9863 9864// IfNoneMatch sets the optional parameter which makes the operation 9865// fail if the object's ETag matches the given value. This is useful for 9866// getting updates only after the object has changed since the last 9867// request. Use googleapi.IsNotModified to check whether the response 9868// error from Do is the result of In-None-Match. 9869func (c *ServicesRolloutsGetCall) IfNoneMatch(entityTag string) *ServicesRolloutsGetCall { 9870 c.ifNoneMatch_ = entityTag 9871 return c 9872} 9873 9874// Context sets the context to be used in this call's Do method. Any 9875// pending HTTP request will be aborted if the provided context is 9876// canceled. 9877func (c *ServicesRolloutsGetCall) Context(ctx context.Context) *ServicesRolloutsGetCall { 9878 c.ctx_ = ctx 9879 return c 9880} 9881 9882// Header returns an http.Header that can be modified by the caller to 9883// add HTTP headers to the request. 9884func (c *ServicesRolloutsGetCall) Header() http.Header { 9885 if c.header_ == nil { 9886 c.header_ = make(http.Header) 9887 } 9888 return c.header_ 9889} 9890 9891func (c *ServicesRolloutsGetCall) doRequest(alt string) (*http.Response, error) { 9892 reqHeaders := make(http.Header) 9893 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 9894 for k, v := range c.header_ { 9895 reqHeaders[k] = v 9896 } 9897 reqHeaders.Set("User-Agent", c.s.userAgent()) 9898 if c.ifNoneMatch_ != "" { 9899 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9900 } 9901 var body io.Reader = nil 9902 c.urlParams_.Set("alt", alt) 9903 c.urlParams_.Set("prettyPrint", "false") 9904 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}/rollouts/{rolloutId}") 9905 urls += "?" + c.urlParams_.Encode() 9906 req, err := http.NewRequest("GET", urls, body) 9907 if err != nil { 9908 return nil, err 9909 } 9910 req.Header = reqHeaders 9911 googleapi.Expand(req.URL, map[string]string{ 9912 "serviceName": c.serviceName, 9913 "rolloutId": c.rolloutId, 9914 }) 9915 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9916} 9917 9918// Do executes the "servicemanagement.services.rollouts.get" call. 9919// Exactly one of *Rollout or error will be non-nil. Any non-2xx status 9920// code is an error. Response headers are in either 9921// *Rollout.ServerResponse.Header or (if a response was returned at all) 9922// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9923// check whether the returned error was because http.StatusNotModified 9924// was returned. 9925func (c *ServicesRolloutsGetCall) Do(opts ...googleapi.CallOption) (*Rollout, error) { 9926 gensupport.SetOptions(c.urlParams_, opts...) 9927 res, err := c.doRequest("json") 9928 if res != nil && res.StatusCode == http.StatusNotModified { 9929 if res.Body != nil { 9930 res.Body.Close() 9931 } 9932 return nil, &googleapi.Error{ 9933 Code: res.StatusCode, 9934 Header: res.Header, 9935 } 9936 } 9937 if err != nil { 9938 return nil, err 9939 } 9940 defer googleapi.CloseBody(res) 9941 if err := googleapi.CheckResponse(res); err != nil { 9942 return nil, err 9943 } 9944 ret := &Rollout{ 9945 ServerResponse: googleapi.ServerResponse{ 9946 Header: res.Header, 9947 HTTPStatusCode: res.StatusCode, 9948 }, 9949 } 9950 target := &ret 9951 if err := gensupport.DecodeResponse(target, res); err != nil { 9952 return nil, err 9953 } 9954 return ret, nil 9955 // { 9956 // "description": "Gets a service configuration rollout.", 9957 // "flatPath": "v1/services/{serviceName}/rollouts/{rolloutId}", 9958 // "httpMethod": "GET", 9959 // "id": "servicemanagement.services.rollouts.get", 9960 // "parameterOrder": [ 9961 // "serviceName", 9962 // "rolloutId" 9963 // ], 9964 // "parameters": { 9965 // "rolloutId": { 9966 // "description": "Required. The id of the rollout resource.", 9967 // "location": "path", 9968 // "required": true, 9969 // "type": "string" 9970 // }, 9971 // "serviceName": { 9972 // "description": "Required. The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", 9973 // "location": "path", 9974 // "required": true, 9975 // "type": "string" 9976 // } 9977 // }, 9978 // "path": "v1/services/{serviceName}/rollouts/{rolloutId}", 9979 // "response": { 9980 // "$ref": "Rollout" 9981 // }, 9982 // "scopes": [ 9983 // "https://www.googleapis.com/auth/cloud-platform", 9984 // "https://www.googleapis.com/auth/cloud-platform.read-only", 9985 // "https://www.googleapis.com/auth/service.management", 9986 // "https://www.googleapis.com/auth/service.management.readonly" 9987 // ] 9988 // } 9989 9990} 9991 9992// method id "servicemanagement.services.rollouts.list": 9993 9994type ServicesRolloutsListCall struct { 9995 s *APIService 9996 serviceName string 9997 urlParams_ gensupport.URLParams 9998 ifNoneMatch_ string 9999 ctx_ context.Context 10000 header_ http.Header 10001} 10002 10003// List: Lists the history of the service configuration rollouts for a 10004// managed 10005// service, from the newest to the oldest. 10006func (r *ServicesRolloutsService) List(serviceName string) *ServicesRolloutsListCall { 10007 c := &ServicesRolloutsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10008 c.serviceName = serviceName 10009 return c 10010} 10011 10012// Filter sets the optional parameter "filter": Required. Use `filter` 10013// to return subset of rollouts. 10014// The following filters are supported: 10015// -- To limit the results to only those in 10016// [status](google.api.servicemanagement.v1.RolloutStatus) 10017// 'SUCCESS', 10018// use filter='status=SUCCESS' 10019// -- To limit the results to those in 10020// [status](google.api.servicemanagement.v1.RolloutStatus) 10021// 'CANCELLED' 10022// or 'FAILED', use filter='status=CANCELLED OR status=FAILED' 10023func (c *ServicesRolloutsListCall) Filter(filter string) *ServicesRolloutsListCall { 10024 c.urlParams_.Set("filter", filter) 10025 return c 10026} 10027 10028// PageSize sets the optional parameter "pageSize": The max number of 10029// items to include in the response list. Page size is 50 10030// if not specified. Maximum value is 100. 10031func (c *ServicesRolloutsListCall) PageSize(pageSize int64) *ServicesRolloutsListCall { 10032 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10033 return c 10034} 10035 10036// PageToken sets the optional parameter "pageToken": The token of the 10037// page to retrieve. 10038func (c *ServicesRolloutsListCall) PageToken(pageToken string) *ServicesRolloutsListCall { 10039 c.urlParams_.Set("pageToken", pageToken) 10040 return c 10041} 10042 10043// Fields allows partial responses to be retrieved. See 10044// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10045// for more information. 10046func (c *ServicesRolloutsListCall) Fields(s ...googleapi.Field) *ServicesRolloutsListCall { 10047 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10048 return c 10049} 10050 10051// IfNoneMatch sets the optional parameter which makes the operation 10052// fail if the object's ETag matches the given value. This is useful for 10053// getting updates only after the object has changed since the last 10054// request. Use googleapi.IsNotModified to check whether the response 10055// error from Do is the result of In-None-Match. 10056func (c *ServicesRolloutsListCall) IfNoneMatch(entityTag string) *ServicesRolloutsListCall { 10057 c.ifNoneMatch_ = entityTag 10058 return c 10059} 10060 10061// Context sets the context to be used in this call's Do method. Any 10062// pending HTTP request will be aborted if the provided context is 10063// canceled. 10064func (c *ServicesRolloutsListCall) Context(ctx context.Context) *ServicesRolloutsListCall { 10065 c.ctx_ = ctx 10066 return c 10067} 10068 10069// Header returns an http.Header that can be modified by the caller to 10070// add HTTP headers to the request. 10071func (c *ServicesRolloutsListCall) Header() http.Header { 10072 if c.header_ == nil { 10073 c.header_ = make(http.Header) 10074 } 10075 return c.header_ 10076} 10077 10078func (c *ServicesRolloutsListCall) doRequest(alt string) (*http.Response, error) { 10079 reqHeaders := make(http.Header) 10080 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707") 10081 for k, v := range c.header_ { 10082 reqHeaders[k] = v 10083 } 10084 reqHeaders.Set("User-Agent", c.s.userAgent()) 10085 if c.ifNoneMatch_ != "" { 10086 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10087 } 10088 var body io.Reader = nil 10089 c.urlParams_.Set("alt", alt) 10090 c.urlParams_.Set("prettyPrint", "false") 10091 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}/rollouts") 10092 urls += "?" + c.urlParams_.Encode() 10093 req, err := http.NewRequest("GET", urls, body) 10094 if err != nil { 10095 return nil, err 10096 } 10097 req.Header = reqHeaders 10098 googleapi.Expand(req.URL, map[string]string{ 10099 "serviceName": c.serviceName, 10100 }) 10101 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10102} 10103 10104// Do executes the "servicemanagement.services.rollouts.list" call. 10105// Exactly one of *ListServiceRolloutsResponse or error will be non-nil. 10106// Any non-2xx status code is an error. Response headers are in either 10107// *ListServiceRolloutsResponse.ServerResponse.Header or (if a response 10108// was returned at all) in error.(*googleapi.Error).Header. Use 10109// googleapi.IsNotModified to check whether the returned error was 10110// because http.StatusNotModified was returned. 10111func (c *ServicesRolloutsListCall) Do(opts ...googleapi.CallOption) (*ListServiceRolloutsResponse, error) { 10112 gensupport.SetOptions(c.urlParams_, opts...) 10113 res, err := c.doRequest("json") 10114 if res != nil && res.StatusCode == http.StatusNotModified { 10115 if res.Body != nil { 10116 res.Body.Close() 10117 } 10118 return nil, &googleapi.Error{ 10119 Code: res.StatusCode, 10120 Header: res.Header, 10121 } 10122 } 10123 if err != nil { 10124 return nil, err 10125 } 10126 defer googleapi.CloseBody(res) 10127 if err := googleapi.CheckResponse(res); err != nil { 10128 return nil, err 10129 } 10130 ret := &ListServiceRolloutsResponse{ 10131 ServerResponse: googleapi.ServerResponse{ 10132 Header: res.Header, 10133 HTTPStatusCode: res.StatusCode, 10134 }, 10135 } 10136 target := &ret 10137 if err := gensupport.DecodeResponse(target, res); err != nil { 10138 return nil, err 10139 } 10140 return ret, nil 10141 // { 10142 // "description": "Lists the history of the service configuration rollouts for a managed\nservice, from the newest to the oldest.", 10143 // "flatPath": "v1/services/{serviceName}/rollouts", 10144 // "httpMethod": "GET", 10145 // "id": "servicemanagement.services.rollouts.list", 10146 // "parameterOrder": [ 10147 // "serviceName" 10148 // ], 10149 // "parameters": { 10150 // "filter": { 10151 // "description": "Required. Use `filter` to return subset of rollouts.\nThe following filters are supported:\n -- To limit the results to only those in\n [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',\n use filter='status=SUCCESS'\n -- To limit the results to those in\n [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'\n or 'FAILED', use filter='status=CANCELLED OR status=FAILED'", 10152 // "location": "query", 10153 // "type": "string" 10154 // }, 10155 // "pageSize": { 10156 // "description": "The max number of items to include in the response list. Page size is 50\nif not specified. Maximum value is 100.", 10157 // "format": "int32", 10158 // "location": "query", 10159 // "type": "integer" 10160 // }, 10161 // "pageToken": { 10162 // "description": "The token of the page to retrieve.", 10163 // "location": "query", 10164 // "type": "string" 10165 // }, 10166 // "serviceName": { 10167 // "description": "Required. The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", 10168 // "location": "path", 10169 // "required": true, 10170 // "type": "string" 10171 // } 10172 // }, 10173 // "path": "v1/services/{serviceName}/rollouts", 10174 // "response": { 10175 // "$ref": "ListServiceRolloutsResponse" 10176 // }, 10177 // "scopes": [ 10178 // "https://www.googleapis.com/auth/cloud-platform", 10179 // "https://www.googleapis.com/auth/cloud-platform.read-only", 10180 // "https://www.googleapis.com/auth/service.management", 10181 // "https://www.googleapis.com/auth/service.management.readonly" 10182 // ] 10183 // } 10184 10185} 10186 10187// Pages invokes f for each page of results. 10188// A non-nil error returned from f will halt the iteration. 10189// The provided context supersedes any context provided to the Context method. 10190func (c *ServicesRolloutsListCall) Pages(ctx context.Context, f func(*ListServiceRolloutsResponse) error) error { 10191 c.ctx_ = ctx 10192 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10193 for { 10194 x, err := c.Do() 10195 if err != nil { 10196 return err 10197 } 10198 if err := f(x); err != nil { 10199 return err 10200 } 10201 if x.NextPageToken == "" { 10202 return nil 10203 } 10204 c.PageToken(x.NextPageToken) 10205 } 10206} 10207