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