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