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 data and see the 87 // email address for your Google Account. 88 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 89 90 // Manage your Google API service configuration 91 ServiceManagementScope = "https://www.googleapis.com/auth/service.management" 92) 93 94// NewService creates a new APIService. 95func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 96 scopesOption := option.WithScopes( 97 "https://www.googleapis.com/auth/cloud-platform", 98 "https://www.googleapis.com/auth/service.management", 99 ) 100 // NOTE: prepend, so we don't override user-specified scopes. 101 opts = append([]option.ClientOption{scopesOption}, opts...) 102 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 103 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 104 client, endpoint, err := htransport.NewClient(ctx, opts...) 105 if err != nil { 106 return nil, err 107 } 108 s, err := New(client) 109 if err != nil { 110 return nil, err 111 } 112 if endpoint != "" { 113 s.BasePath = endpoint 114 } 115 return s, nil 116} 117 118// New creates a new APIService. It uses the provided http.Client for requests. 119// 120// Deprecated: please use NewService instead. 121// To provide a custom HTTP client, use option.WithHTTPClient. 122// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 123func New(client *http.Client) (*APIService, error) { 124 if client == nil { 125 return nil, errors.New("client is nil") 126 } 127 s := &APIService{client: client, BasePath: basePath} 128 s.Operations = NewOperationsService(s) 129 s.Services = NewServicesService(s) 130 return s, nil 131} 132 133type APIService struct { 134 client *http.Client 135 BasePath string // API endpoint base URL 136 UserAgent string // optional additional User-Agent fragment 137 138 Operations *OperationsService 139 140 Services *ServicesService 141} 142 143func (s *APIService) userAgent() string { 144 if s.UserAgent == "" { 145 return googleapi.UserAgent 146 } 147 return googleapi.UserAgent + " " + s.UserAgent 148} 149 150func NewOperationsService(s *APIService) *OperationsService { 151 rs := &OperationsService{s: s} 152 return rs 153} 154 155type OperationsService struct { 156 s *APIService 157} 158 159func NewServicesService(s *APIService) *ServicesService { 160 rs := &ServicesService{s: s} 161 rs.Connections = NewServicesConnectionsService(s) 162 return rs 163} 164 165type ServicesService struct { 166 s *APIService 167 168 Connections *ServicesConnectionsService 169} 170 171func NewServicesConnectionsService(s *APIService) *ServicesConnectionsService { 172 rs := &ServicesConnectionsService{s: s} 173 return rs 174} 175 176type ServicesConnectionsService struct { 177 s *APIService 178} 179 180// AddDnsRecordSetMetadata: Metadata provided through GetOperation 181// request for the LRO generated by AddDnsRecordSet API 182type AddDnsRecordSetMetadata struct { 183} 184 185// AddDnsZoneMetadata: Metadata provided through GetOperation request 186// for the LRO generated by AddDnsZone API 187type AddDnsZoneMetadata struct { 188} 189 190// AddDnsZoneResponse: Represents managed DNS zones created in the 191// shared producer host and consumer projects. 192type AddDnsZoneResponse struct { 193 // ConsumerPeeringZone: The DNS peering zone created in the consumer 194 // project. 195 ConsumerPeeringZone *DnsZone `json:"consumerPeeringZone,omitempty"` 196 197 // ProducerPrivateZone: The private DNS zone created in the shared 198 // producer host project. 199 ProducerPrivateZone *DnsZone `json:"producerPrivateZone,omitempty"` 200 201 // ForceSendFields is a list of field names (e.g. "ConsumerPeeringZone") 202 // to unconditionally include in API requests. By default, fields with 203 // empty or default values are omitted from API requests. However, any 204 // non-pointer, non-interface field appearing in ForceSendFields will be 205 // sent to the server regardless of whether the field is empty or not. 206 // This may be used to include empty fields in Patch requests. 207 ForceSendFields []string `json:"-"` 208 209 // NullFields is a list of field names (e.g. "ConsumerPeeringZone") to 210 // include in API requests with the JSON null value. By default, fields 211 // with empty values are omitted from API requests. However, any field 212 // with an empty value appearing in NullFields will be sent to the 213 // server as null. It is an error if a field in this list has a 214 // non-empty value. This may be used to include null fields in Patch 215 // requests. 216 NullFields []string `json:"-"` 217} 218 219func (s *AddDnsZoneResponse) MarshalJSON() ([]byte, error) { 220 type NoMethod AddDnsZoneResponse 221 raw := NoMethod(*s) 222 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 223} 224 225// AddRolesMetadata: Metadata provided through GetOperation request for 226// the LRO generated by AddRoles API 227type AddRolesMetadata struct { 228} 229 230// AddRolesResponse: Represents IAM roles added to the shared VPC host 231// project. 232type AddRolesResponse struct { 233 // PolicyBinding: Required. List of policy bindings that were added to 234 // the shared VPC host project. 235 PolicyBinding []*PolicyBinding `json:"policyBinding,omitempty"` 236 237 // ForceSendFields is a list of field names (e.g. "PolicyBinding") to 238 // unconditionally include in API requests. By default, fields with 239 // empty or default values are omitted from API requests. However, any 240 // non-pointer, non-interface field appearing in ForceSendFields will be 241 // sent to the server regardless of whether the field is empty or not. 242 // This may be used to include empty fields in Patch requests. 243 ForceSendFields []string `json:"-"` 244 245 // NullFields is a list of field names (e.g. "PolicyBinding") to include 246 // in API requests with the JSON null value. By default, fields with 247 // empty values are omitted from API requests. However, any field with 248 // an empty value appearing in NullFields will be sent to the server as 249 // null. It is an error if a field in this list has a non-empty value. 250 // This may be used to include null fields in Patch requests. 251 NullFields []string `json:"-"` 252} 253 254func (s *AddRolesResponse) MarshalJSON() ([]byte, error) { 255 type NoMethod AddRolesResponse 256 raw := NoMethod(*s) 257 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 258} 259 260// AddSubnetworkRequest: Request to create a subnetwork in a previously 261// peered service network. 262type AddSubnetworkRequest struct { 263 // Consumer: Required. A resource that represents the service consumer, 264 // such as `projects/123456`. The project number can be different from 265 // the value in the consumer network parameter. For example, the network 266 // might be part of a Shared VPC network. In those cases, Service 267 // Networking validates that this resource belongs to that Shared VPC. 268 Consumer string `json:"consumer,omitempty"` 269 270 // ConsumerNetwork: Required. The name of the service consumer's VPC 271 // network. The network must have an existing private connection that 272 // was provisioned through the connections.create method. The name must 273 // be in the following format: 274 // `projects/{project}/global/networks/{network}`, where {project} is a 275 // project number, such as `12345`. {network} is the name of a VPC 276 // network in the project. 277 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 278 279 // Description: An optional description of the subnet. 280 Description string `json:"description,omitempty"` 281 282 // IpPrefixLength: Required. The prefix length of the subnet's IP 283 // address range. Use CIDR range notation, such as `30` to provision a 284 // subnet with an `x.x.x.x/30` CIDR range. The IP address range is drawn 285 // from a pool of available ranges in the service consumer's allocated 286 // range. 287 IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` 288 289 // Region: Required. The name of a region (/compute/docs/regions-zones) 290 // for the subnet, such `europe-west1`. 291 Region string `json:"region,omitempty"` 292 293 // RequestedAddress: Optional. The starting address of a range. The 294 // address must be a valid IPv4 address in the x.x.x.x format. This 295 // value combined with the IP prefix range is the CIDR range for the 296 // subnet. The range must be within the allocated range that is assigned 297 // to the private connection. If the CIDR range isn't available, the 298 // call fails. 299 RequestedAddress string `json:"requestedAddress,omitempty"` 300 301 // Subnetwork: Required. A name for the new subnet. For information 302 // about the naming requirements, see subnetwork 303 // (/compute/docs/reference/rest/v1/subnetworks) in the Compute API 304 // documentation. 305 Subnetwork string `json:"subnetwork,omitempty"` 306 307 // SubnetworkUsers: A list of members that are granted the 308 // `compute.networkUser` role on the subnet. 309 SubnetworkUsers []string `json:"subnetworkUsers,omitempty"` 310 311 // ForceSendFields is a list of field names (e.g. "Consumer") to 312 // unconditionally include in API requests. By default, fields with 313 // empty or default values are omitted from API requests. However, any 314 // non-pointer, non-interface field appearing in ForceSendFields will be 315 // sent to the server regardless of whether the field is empty or not. 316 // This may be used to include empty fields in Patch requests. 317 ForceSendFields []string `json:"-"` 318 319 // NullFields is a list of field names (e.g. "Consumer") to include in 320 // API requests with the JSON null value. By default, fields with empty 321 // values are omitted from API requests. However, any field with an 322 // empty value appearing in NullFields will be sent to the server as 323 // null. It is an error if a field in this list has a non-empty value. 324 // This may be used to include null fields in Patch requests. 325 NullFields []string `json:"-"` 326} 327 328func (s *AddSubnetworkRequest) MarshalJSON() ([]byte, error) { 329 type NoMethod AddSubnetworkRequest 330 raw := NoMethod(*s) 331 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 332} 333 334// Api: Api is a light-weight descriptor for an API Interface. 335// Interfaces are also described as "protocol buffer services" in some 336// contexts, such as by the "service" keyword in a .proto file, but they 337// are different from API Services, which represent a concrete 338// implementation of an interface as opposed to simply a description of 339// methods and bindings. They are also sometimes simply referred to as 340// "APIs" in other contexts, such as the name of this message itself. 341// See https://cloud.google.com/apis/design/glossary for detailed 342// terminology. 343type Api struct { 344 // Methods: The methods of this interface, in unspecified order. 345 Methods []*Method `json:"methods,omitempty"` 346 347 // Mixins: Included interfaces. See Mixin. 348 Mixins []*Mixin `json:"mixins,omitempty"` 349 350 // Name: The fully qualified name of this interface, including package 351 // name followed by the interface's simple name. 352 Name string `json:"name,omitempty"` 353 354 // Options: Any metadata attached to the interface. 355 Options []*Option `json:"options,omitempty"` 356 357 // SourceContext: Source context for the protocol buffer service 358 // represented by this message. 359 SourceContext *SourceContext `json:"sourceContext,omitempty"` 360 361 // Syntax: The source syntax of the service. 362 // 363 // Possible values: 364 // "SYNTAX_PROTO2" - Syntax `proto2`. 365 // "SYNTAX_PROTO3" - Syntax `proto3`. 366 Syntax string `json:"syntax,omitempty"` 367 368 // Version: A version string for this interface. If specified, must have 369 // the form `major-version.minor-version`, as in `1.10`. If the minor 370 // version is omitted, it defaults to zero. If the entire version field 371 // is empty, the major version is derived from the package name, as 372 // outlined below. If the field is not empty, the version in the package 373 // name will be verified to be consistent with what is provided here. 374 // The versioning schema uses semantic versioning (http://semver.org) 375 // where the major version number indicates a breaking change and the 376 // minor version an additive, non-breaking change. Both version numbers 377 // are signals to users what to expect from different versions, and 378 // should be carefully chosen based on the product plan. The major 379 // version is also reflected in the package name of the interface, which 380 // must end in `v`, as in `google.feature.v1`. For major versions 0 and 381 // 1, the suffix can be omitted. Zero major versions must only be used 382 // for experimental, non-GA interfaces. 383 Version string `json:"version,omitempty"` 384 385 // ForceSendFields is a list of field names (e.g. "Methods") to 386 // unconditionally include in API requests. By default, fields with 387 // empty or default values are omitted from API requests. However, any 388 // non-pointer, non-interface field appearing in ForceSendFields will be 389 // sent to the server regardless of whether the field is empty or not. 390 // This may be used to include empty fields in Patch requests. 391 ForceSendFields []string `json:"-"` 392 393 // NullFields is a list of field names (e.g. "Methods") to include in 394 // API requests with the JSON null value. By default, fields with empty 395 // values are omitted from API requests. However, any field with an 396 // empty value appearing in NullFields will be sent to the server as 397 // null. It is an error if a field in this list has a non-empty value. 398 // This may be used to include null fields in Patch requests. 399 NullFields []string `json:"-"` 400} 401 402func (s *Api) MarshalJSON() ([]byte, error) { 403 type NoMethod Api 404 raw := NoMethod(*s) 405 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 406} 407 408// AuthProvider: Configuration for an authentication provider, including 409// support for JSON Web Token (JWT) 410// (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). 411type AuthProvider struct { 412 // Audiences: The list of JWT audiences 413 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). 414 // that are allowed to access. A JWT containing any of these audiences 415 // will be accepted. When this setting is absent, JWTs with audiences: - 416 // "https://[service.name]/[google.protobuf.Api.name]" - 417 // "https://[service.name]/" will be accepted. For example, if no 418 // audiences are in the setting, LibraryService API will accept JWTs 419 // with the following audiences: - 420 // https://library-example.googleapis.com/google.example.library.v1.LibraryService 421 // - https://library-example.googleapis.com/ Example: audiences: 422 // bookstore_android.apps.googleusercontent.com, 423 // bookstore_web.apps.googleusercontent.com 424 Audiences string `json:"audiences,omitempty"` 425 426 // AuthorizationUrl: Redirect URL if JWT token is required but not 427 // present or is expired. Implement authorizationUrl of 428 // securityDefinitions in OpenAPI spec. 429 AuthorizationUrl string `json:"authorizationUrl,omitempty"` 430 431 // Id: The unique identifier of the auth provider. It will be referred 432 // to by `AuthRequirement.provider_id`. Example: "bookstore_auth". 433 Id string `json:"id,omitempty"` 434 435 // Issuer: Identifies the principal that issued the JWT. See 436 // https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 437 // Usually a URL or an email address. Example: 438 // https://securetoken.google.com Example: 439 // 1234567-compute@developer.gserviceaccount.com 440 Issuer string `json:"issuer,omitempty"` 441 442 // JwksUri: URL of the provider's public key set to validate signature 443 // of the JWT. See OpenID Discovery 444 // (https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). 445 // Optional if the key set document: - can be retrieved from OpenID 446 // Discovery 447 // (https://openid.net/specs/openid-connect-discovery-1_0.html) of the 448 // issuer. - can be inferred from the email domain of the issuer (e.g. a 449 // Google service account). Example: 450 // https://www.googleapis.com/oauth2/v1/certs 451 JwksUri string `json:"jwksUri,omitempty"` 452 453 // JwtLocations: Defines the locations to extract the JWT. JWT locations 454 // can be either from HTTP headers or URL query parameters. The rule is 455 // that the first match wins. The checking order is: checking all 456 // headers first, then URL query parameters. If not specified, default 457 // to use following 3 locations: 1) Authorization: Bearer 2) 458 // x-goog-iap-jwt-assertion 3) access_token query parameter Default 459 // locations can be specified as followings: jwt_locations: - header: 460 // Authorization value_prefix: "Bearer " - header: 461 // x-goog-iap-jwt-assertion - query: access_token 462 JwtLocations []*JwtLocation `json:"jwtLocations,omitempty"` 463 464 // ForceSendFields is a list of field names (e.g. "Audiences") to 465 // unconditionally include in API requests. By default, fields with 466 // empty or default values are omitted from API requests. However, any 467 // non-pointer, non-interface field appearing in ForceSendFields will be 468 // sent to the server regardless of whether the field is empty or not. 469 // This may be used to include empty fields in Patch requests. 470 ForceSendFields []string `json:"-"` 471 472 // NullFields is a list of field names (e.g. "Audiences") to include in 473 // API requests with the JSON null value. By default, fields with empty 474 // values are omitted from API requests. However, any field with an 475 // empty value appearing in NullFields will be sent to the server as 476 // null. It is an error if a field in this list has a non-empty value. 477 // This may be used to include null fields in Patch requests. 478 NullFields []string `json:"-"` 479} 480 481func (s *AuthProvider) MarshalJSON() ([]byte, error) { 482 type NoMethod AuthProvider 483 raw := NoMethod(*s) 484 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 485} 486 487// AuthRequirement: User-defined authentication requirements, including 488// support for JSON Web Token (JWT) 489// (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). 490type AuthRequirement struct { 491 // Audiences: NOTE: This will be deprecated soon, once 492 // AuthProvider.audiences is implemented and accepted in all the runtime 493 // components. The list of JWT audiences 494 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). 495 // that are allowed to access. A JWT containing any of these audiences 496 // will be accepted. When this setting is absent, only JWTs with 497 // audience "https://Service_name/API_name" will be accepted. For 498 // example, if no audiences are in the setting, LibraryService API will 499 // only accept JWTs with the following audience 500 // "https://library-example.googleapis.com/google.example.library.v1.Libr 501 // aryService". Example: audiences: 502 // bookstore_android.apps.googleusercontent.com, 503 // bookstore_web.apps.googleusercontent.com 504 Audiences string `json:"audiences,omitempty"` 505 506 // ProviderId: id from authentication provider. Example: provider_id: 507 // bookstore_auth 508 ProviderId string `json:"providerId,omitempty"` 509 510 // ForceSendFields is a list of field names (e.g. "Audiences") to 511 // unconditionally include in API requests. By default, fields with 512 // empty or default values are omitted from API requests. However, any 513 // non-pointer, non-interface field appearing in ForceSendFields will be 514 // sent to the server regardless of whether the field is empty or not. 515 // This may be used to include empty fields in Patch requests. 516 ForceSendFields []string `json:"-"` 517 518 // NullFields is a list of field names (e.g. "Audiences") to include in 519 // API requests with the JSON null value. By default, fields with empty 520 // values are omitted from API requests. However, any field with an 521 // empty value appearing in NullFields will be sent to the server as 522 // null. It is an error if a field in this list has a non-empty value. 523 // This may be used to include null fields in Patch requests. 524 NullFields []string `json:"-"` 525} 526 527func (s *AuthRequirement) MarshalJSON() ([]byte, error) { 528 type NoMethod AuthRequirement 529 raw := NoMethod(*s) 530 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 531} 532 533// Authentication: `Authentication` defines the authentication 534// configuration for API methods provided by an API service. Example: 535// name: calendar.googleapis.com authentication: providers: - id: 536// google_calendar_auth jwks_uri: 537// https://www.googleapis.com/oauth2/v1/certs issuer: 538// https://securetoken.google.com rules: - selector: "*" requirements: 539// provider_id: google_calendar_auth - selector: 540// google.calendar.Delegate oauth: canonical_scopes: 541// https://www.googleapis.com/auth/calendar.read 542type Authentication struct { 543 // Providers: Defines a set of authentication providers that a service 544 // supports. 545 Providers []*AuthProvider `json:"providers,omitempty"` 546 547 // Rules: A list of authentication rules that apply to individual API 548 // methods. **NOTE:** All service configuration rules follow "last one 549 // wins" order. 550 Rules []*AuthenticationRule `json:"rules,omitempty"` 551 552 // ForceSendFields is a list of field names (e.g. "Providers") to 553 // unconditionally include in API requests. By default, fields with 554 // empty or default values are omitted from API requests. However, any 555 // non-pointer, non-interface field appearing in ForceSendFields will be 556 // sent to the server regardless of whether the field is empty or not. 557 // This may be used to include empty fields in Patch requests. 558 ForceSendFields []string `json:"-"` 559 560 // NullFields is a list of field names (e.g. "Providers") to include in 561 // API requests with the JSON null value. By default, fields with empty 562 // values are omitted from API requests. However, any field with an 563 // empty value appearing in NullFields will be sent to the server as 564 // null. It is an error if a field in this list has a non-empty value. 565 // This may be used to include null fields in Patch requests. 566 NullFields []string `json:"-"` 567} 568 569func (s *Authentication) MarshalJSON() ([]byte, error) { 570 type NoMethod Authentication 571 raw := NoMethod(*s) 572 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 573} 574 575// AuthenticationRule: Authentication rules for the service. By default, 576// if a method has any authentication requirements, every request must 577// include a valid credential matching one of the requirements. It's an 578// error to include more than one kind of credential in a single 579// request. If a method doesn't have any auth requirements, request 580// credentials will be ignored. 581type AuthenticationRule struct { 582 // AllowWithoutCredential: If true, the service accepts API keys without 583 // any other credential. This flag only applies to HTTP and gRPC 584 // requests. 585 AllowWithoutCredential bool `json:"allowWithoutCredential,omitempty"` 586 587 // Oauth: The requirements for OAuth credentials. 588 Oauth *OAuthRequirements `json:"oauth,omitempty"` 589 590 // Requirements: Requirements for additional authentication providers. 591 Requirements []*AuthRequirement `json:"requirements,omitempty"` 592 593 // Selector: Selects the methods to which this rule applies. Refer to 594 // selector for syntax details. 595 Selector string `json:"selector,omitempty"` 596 597 // ForceSendFields is a list of field names (e.g. 598 // "AllowWithoutCredential") to unconditionally include in API requests. 599 // By default, fields with empty or default values are omitted from API 600 // requests. However, any non-pointer, non-interface field appearing in 601 // ForceSendFields will be sent to the server regardless of whether the 602 // field is empty or not. This may be used to include empty fields in 603 // Patch requests. 604 ForceSendFields []string `json:"-"` 605 606 // NullFields is a list of field names (e.g. "AllowWithoutCredential") 607 // to include in API requests with the JSON null value. By default, 608 // fields with empty values are omitted from API requests. However, any 609 // field with an empty value appearing in NullFields will be sent to the 610 // server as null. It is an error if a field in this list has a 611 // non-empty value. This may be used to include null fields in Patch 612 // requests. 613 NullFields []string `json:"-"` 614} 615 616func (s *AuthenticationRule) MarshalJSON() ([]byte, error) { 617 type NoMethod AuthenticationRule 618 raw := NoMethod(*s) 619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 620} 621 622// Backend: `Backend` defines the backend configuration for a service. 623type Backend struct { 624 // Rules: A list of API backend rules that apply to individual API 625 // methods. **NOTE:** All service configuration rules follow "last one 626 // wins" order. 627 Rules []*BackendRule `json:"rules,omitempty"` 628 629 // ForceSendFields is a list of field names (e.g. "Rules") to 630 // unconditionally include in API requests. By default, fields with 631 // empty or default values are omitted from API requests. However, any 632 // non-pointer, non-interface field appearing in ForceSendFields will be 633 // sent to the server regardless of whether the field is empty or not. 634 // This may be used to include empty fields in Patch requests. 635 ForceSendFields []string `json:"-"` 636 637 // NullFields is a list of field names (e.g. "Rules") to include in API 638 // requests with the JSON null value. By default, fields with empty 639 // values are omitted from API requests. However, any field with an 640 // empty value appearing in NullFields will be sent to the server as 641 // null. It is an error if a field in this list has a non-empty value. 642 // This may be used to include null fields in Patch requests. 643 NullFields []string `json:"-"` 644} 645 646func (s *Backend) MarshalJSON() ([]byte, error) { 647 type NoMethod Backend 648 raw := NoMethod(*s) 649 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 650} 651 652// BackendRule: A backend rule provides configuration for an individual 653// API element. 654type BackendRule struct { 655 // Address: The address of the API backend. The scheme is used to 656 // determine the backend protocol and security. The following schemes 657 // are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// 658 // HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to 659 // explicitly include a scheme. Leaving out the scheme may cause 660 // constrasting behaviors across platforms. If the port is unspecified, 661 // the default is: - 80 for schemes without TLS - 443 for schemes with 662 // TLS For HTTP backends, use protocol to specify the protocol version. 663 Address string `json:"address,omitempty"` 664 665 // Deadline: The number of seconds to wait for a response from a 666 // request. The default varies based on the request protocol and 667 // deployment environment. 668 Deadline float64 `json:"deadline,omitempty"` 669 670 // DisableAuth: When disable_auth is true, a JWT ID token won't be 671 // generated and the original "Authorization" HTTP header will be 672 // preserved. If the header is used to carry the original token and is 673 // expected by the backend, this field must be set to true to preserve 674 // the header. 675 DisableAuth bool `json:"disableAuth,omitempty"` 676 677 // JwtAudience: The JWT audience is used when generating a JWT ID token 678 // for the backend. This ID token will be added in the HTTP 679 // "authorization" header, and sent to the backend. 680 JwtAudience string `json:"jwtAudience,omitempty"` 681 682 // OperationDeadline: The number of seconds to wait for the completion 683 // of a long running operation. The default is no deadline. 684 OperationDeadline float64 `json:"operationDeadline,omitempty"` 685 686 // Possible values: 687 // "PATH_TRANSLATION_UNSPECIFIED" 688 // "CONSTANT_ADDRESS" - Use the backend address as-is, with no 689 // modification to the path. If the URL pattern contains variables, the 690 // variable names and values will be appended to the query string. If a 691 // query string parameter and a URL pattern variable have the same name, 692 // this may result in duplicate keys in the query string. # Examples 693 // Given the following operation config: Method path: 694 // /api/company/{cid}/user/{uid} Backend address: 695 // https://example.cloudfunctions.net/getUser Requests to the following 696 // request paths will call the backend at the translated path: Request 697 // path: /api/company/widgetworks/user/johndoe Translated: 698 // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe 699 // Request path: /api/company/widgetworks/user/johndoe?timezone=EST 700 // Translated: 701 // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe 702 // "APPEND_PATH_TO_ADDRESS" - The request path will be appended to the 703 // backend address. # Examples Given the following operation config: 704 // Method path: /api/company/{cid}/user/{uid} Backend address: 705 // https://example.appspot.com Requests to the following request paths 706 // will call the backend at the translated path: Request path: 707 // /api/company/widgetworks/user/johndoe Translated: 708 // https://example.appspot.com/api/company/widgetworks/user/johndoe 709 // Request path: /api/company/widgetworks/user/johndoe?timezone=EST 710 // Translated: 711 // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST 712 PathTranslation string `json:"pathTranslation,omitempty"` 713 714 // Protocol: The protocol used for sending a request to the backend. The 715 // supported values are "http/1.1" and "h2". The default value is 716 // inferred from the scheme in the address field: SCHEME PROTOCOL 717 // http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure 718 // HTTP backends (https://) that support HTTP/2, set this field to "h2" 719 // for improved performance. Configuring this field to non-default 720 // values is only supported for secure HTTP backends. This field will be 721 // ignored for all other backends. See 722 // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids 723 // for more details on the supported values. 724 Protocol string `json:"protocol,omitempty"` 725 726 // Selector: Selects the methods to which this rule applies. Refer to 727 // selector for syntax details. 728 Selector string `json:"selector,omitempty"` 729 730 // ForceSendFields is a list of field names (e.g. "Address") to 731 // unconditionally include in API requests. By default, fields with 732 // empty or default values are omitted from API requests. However, any 733 // non-pointer, non-interface field appearing in ForceSendFields will be 734 // sent to the server regardless of whether the field is empty or not. 735 // This may be used to include empty fields in Patch requests. 736 ForceSendFields []string `json:"-"` 737 738 // NullFields is a list of field names (e.g. "Address") to include in 739 // API requests with the JSON null value. By default, fields with empty 740 // values are omitted from API requests. However, any field with an 741 // empty value appearing in NullFields will be sent to the server as 742 // null. It is an error if a field in this list has a non-empty value. 743 // This may be used to include null fields in Patch requests. 744 NullFields []string `json:"-"` 745} 746 747func (s *BackendRule) MarshalJSON() ([]byte, error) { 748 type NoMethod BackendRule 749 raw := NoMethod(*s) 750 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 751} 752 753func (s *BackendRule) UnmarshalJSON(data []byte) error { 754 type NoMethod BackendRule 755 var s1 struct { 756 Deadline gensupport.JSONFloat64 `json:"deadline"` 757 OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` 758 *NoMethod 759 } 760 s1.NoMethod = (*NoMethod)(s) 761 if err := json.Unmarshal(data, &s1); err != nil { 762 return err 763 } 764 s.Deadline = float64(s1.Deadline) 765 s.OperationDeadline = float64(s1.OperationDeadline) 766 return nil 767} 768 769// Billing: Billing related configuration of the service. The following 770// example shows how to configure monitored resources and metrics for 771// billing, `consumer_destinations` is the only supported destination 772// and the monitored resources need at least one label key 773// `cloud.googleapis.com/location` to indicate the location of the 774// billing usage, using different monitored resources between monitoring 775// and billing is recommended so they can be evolved independently: 776// monitored_resources: - type: library.googleapis.com/billing_branch 777// labels: - key: cloud.googleapis.com/location description: | 778// Predefined label to support billing location restriction. - key: city 779// description: | Custom label to define the city where the library 780// branch is located in. - key: name description: Custom label to define 781// the name of the library branch. metrics: - name: 782// library.googleapis.com/book/borrowed_count metric_kind: DELTA 783// value_type: INT64 unit: "1" billing: consumer_destinations: - 784// monitored_resource: library.googleapis.com/billing_branch metrics: - 785// library.googleapis.com/book/borrowed_count 786type Billing struct { 787 // ConsumerDestinations: Billing configurations for sending metrics to 788 // the consumer project. There can be multiple consumer destinations per 789 // service, each one must have a different monitored resource type. A 790 // metric can be used in at most one consumer destination. 791 ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"` 792 793 // ForceSendFields is a list of field names (e.g. 794 // "ConsumerDestinations") to unconditionally include in API requests. 795 // By default, fields with empty or default values are omitted from API 796 // requests. However, any non-pointer, non-interface field appearing in 797 // ForceSendFields will be sent to the server regardless of whether the 798 // field is empty or not. This may be used to include empty fields in 799 // Patch requests. 800 ForceSendFields []string `json:"-"` 801 802 // NullFields is a list of field names (e.g. "ConsumerDestinations") to 803 // include in API requests with the JSON null value. By default, fields 804 // with empty values are omitted from API requests. However, any field 805 // with an empty value appearing in NullFields will be sent to the 806 // server as null. It is an error if a field in this list has a 807 // non-empty value. This may be used to include null fields in Patch 808 // requests. 809 NullFields []string `json:"-"` 810} 811 812func (s *Billing) MarshalJSON() ([]byte, error) { 813 type NoMethod Billing 814 raw := NoMethod(*s) 815 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 816} 817 818// BillingDestination: Configuration of a specific billing destination 819// (Currently only support bill against consumer project). 820type BillingDestination struct { 821 // Metrics: Names of the metrics to report to this billing destination. 822 // Each name must be defined in Service.metrics section. 823 Metrics []string `json:"metrics,omitempty"` 824 825 // MonitoredResource: The monitored resource type. The type must be 826 // defined in Service.monitored_resources section. 827 MonitoredResource string `json:"monitoredResource,omitempty"` 828 829 // ForceSendFields is a list of field names (e.g. "Metrics") to 830 // unconditionally include in API requests. By default, fields with 831 // empty or default values are omitted from API requests. However, any 832 // non-pointer, non-interface field appearing in ForceSendFields will be 833 // sent to the server regardless of whether the field is empty or not. 834 // This may be used to include empty fields in Patch requests. 835 ForceSendFields []string `json:"-"` 836 837 // NullFields is a list of field names (e.g. "Metrics") to include in 838 // API requests with the JSON null value. By default, fields with empty 839 // values are omitted from API requests. However, any field with an 840 // empty value appearing in NullFields will be sent to the server as 841 // null. It is an error if a field in this list has a non-empty value. 842 // This may be used to include null fields in Patch requests. 843 NullFields []string `json:"-"` 844} 845 846func (s *BillingDestination) MarshalJSON() ([]byte, error) { 847 type NoMethod BillingDestination 848 raw := NoMethod(*s) 849 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 850} 851 852// Connection: Represents a private connection resource. A private 853// connection is implemented as a VPC Network Peering connection between 854// a service producer's VPC network and a service consumer's VPC 855// network. 856type Connection struct { 857 // Network: The name of service consumer's VPC network that's connected 858 // with service producer network, in the following format: 859 // `projects/{project}/global/networks/{network}`. `{project}` is a 860 // project number, such as in `12345` that includes the VPC service 861 // consumer's VPC network. `{network}` is the name of the service 862 // consumer's VPC network. 863 Network string `json:"network,omitempty"` 864 865 // Peering: Output only. The name of the VPC Network Peering connection 866 // that was created by the service producer. 867 Peering string `json:"peering,omitempty"` 868 869 // ReservedPeeringRanges: The name of one or more allocated IP address 870 // ranges for this service producer of type `PEERING`. Note that 871 // invoking CreateConnection method with a different range when 872 // connection is already established will not modify already provisioned 873 // service producer subnetworks. If CreateConnection method is invoked 874 // repeatedly to reconnect when peering connection had been disconnected 875 // on the consumer side, leaving this field empty will restore 876 // previously allocated IP ranges. 877 ReservedPeeringRanges []string `json:"reservedPeeringRanges,omitempty"` 878 879 // Service: Output only. The name of the peering service that's 880 // associated with this connection, in the following format: 881 // `services/{service name}`. 882 Service string `json:"service,omitempty"` 883 884 // ForceSendFields is a list of field names (e.g. "Network") to 885 // unconditionally include in API requests. By default, fields with 886 // empty or default values are omitted from API requests. However, any 887 // non-pointer, non-interface field appearing in ForceSendFields will be 888 // sent to the server regardless of whether the field is empty or not. 889 // This may be used to include empty fields in Patch requests. 890 ForceSendFields []string `json:"-"` 891 892 // NullFields is a list of field names (e.g. "Network") to include in 893 // API requests with the JSON null value. By default, fields with empty 894 // values are omitted from API requests. However, any field with an 895 // empty value appearing in NullFields will be sent to the server as 896 // null. It is an error if a field in this list has a non-empty value. 897 // This may be used to include null fields in Patch requests. 898 NullFields []string `json:"-"` 899} 900 901func (s *Connection) MarshalJSON() ([]byte, error) { 902 type NoMethod Connection 903 raw := NoMethod(*s) 904 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 905} 906 907// ConsumerConfig: Configuration information for a private service 908// access connection. 909type ConsumerConfig struct { 910 // ConsumerExportCustomRoutes: Export custom routes flag value for 911 // peering from consumer to producer. 912 ConsumerExportCustomRoutes bool `json:"consumerExportCustomRoutes,omitempty"` 913 914 // ConsumerExportSubnetRoutesWithPublicIp: Export subnet routes with 915 // public ip flag value for peering from consumer to producer. 916 ConsumerExportSubnetRoutesWithPublicIp bool `json:"consumerExportSubnetRoutesWithPublicIp,omitempty"` 917 918 // ConsumerImportCustomRoutes: Import custom routes flag value for 919 // peering from consumer to producer. 920 ConsumerImportCustomRoutes bool `json:"consumerImportCustomRoutes,omitempty"` 921 922 // ConsumerImportSubnetRoutesWithPublicIp: Import subnet routes with 923 // public ip flag value for peering from consumer to producer. 924 ConsumerImportSubnetRoutesWithPublicIp bool `json:"consumerImportSubnetRoutesWithPublicIp,omitempty"` 925 926 // ProducerExportCustomRoutes: Export custom routes flag value for 927 // peering from producer to consumer. 928 ProducerExportCustomRoutes bool `json:"producerExportCustomRoutes,omitempty"` 929 930 // ProducerExportSubnetRoutesWithPublicIp: Export subnet routes with 931 // public ip flag value for peering from producer to consumer. 932 ProducerExportSubnetRoutesWithPublicIp bool `json:"producerExportSubnetRoutesWithPublicIp,omitempty"` 933 934 // ProducerImportCustomRoutes: Import custom routes flag value for 935 // peering from producer to consumer. 936 ProducerImportCustomRoutes bool `json:"producerImportCustomRoutes,omitempty"` 937 938 // ProducerImportSubnetRoutesWithPublicIp: Import subnet routes with 939 // public ip flag value for peering from producer to consumer. 940 ProducerImportSubnetRoutesWithPublicIp bool `json:"producerImportSubnetRoutesWithPublicIp,omitempty"` 941 942 // ProducerNetwork: Output only. The VPC host network that is used to 943 // host managed service instances. In the format, 944 // projects/{project}/global/networks/{network} where {project} is the 945 // project number e.g. '12345' and {network} is the network name. 946 ProducerNetwork string `json:"producerNetwork,omitempty"` 947 948 // ReservedRanges: Output only. The reserved ranges associated with this 949 // private service access connection. 950 ReservedRanges []*GoogleCloudServicenetworkingV1ConsumerConfigReservedRange `json:"reservedRanges,omitempty"` 951 952 // VpcScReferenceArchitectureEnabled: Output only. Indicates whether the 953 // VPC Service Controls reference architecture is configured for the 954 // producer VPC host network. 955 VpcScReferenceArchitectureEnabled bool `json:"vpcScReferenceArchitectureEnabled,omitempty"` 956 957 // ForceSendFields is a list of field names (e.g. 958 // "ConsumerExportCustomRoutes") to unconditionally include in API 959 // requests. By default, fields with empty or default values are omitted 960 // from API requests. However, any non-pointer, non-interface field 961 // appearing in ForceSendFields will be sent to the server regardless of 962 // whether the field is empty or not. This may be used to include empty 963 // fields in Patch requests. 964 ForceSendFields []string `json:"-"` 965 966 // NullFields is a list of field names (e.g. 967 // "ConsumerExportCustomRoutes") to include in API requests with the 968 // JSON null value. By default, fields with empty values are omitted 969 // from API requests. However, any field with an empty value appearing 970 // in NullFields will be sent to the server as null. It is an error if a 971 // field in this list has a non-empty value. This may be used to include 972 // null fields in Patch requests. 973 NullFields []string `json:"-"` 974} 975 976func (s *ConsumerConfig) MarshalJSON() ([]byte, error) { 977 type NoMethod ConsumerConfig 978 raw := NoMethod(*s) 979 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 980} 981 982// ConsumerConfigMetadata: Metadata provided through GetOperation 983// request for the LRO generated by UpdateConsumerConfig API. 984type ConsumerConfigMetadata struct { 985} 986 987// Context: `Context` defines which contexts an API requests. Example: 988// context: rules: - selector: "*" requested: - 989// google.rpc.context.ProjectContext - google.rpc.context.OriginContext 990// The above specifies that all methods in the API request 991// `google.rpc.context.ProjectContext` and 992// `google.rpc.context.OriginContext`. Available context types are 993// defined in package `google.rpc.context`. This also provides mechanism 994// to allowlist any protobuf message extension that can be sent in grpc 995// metadata using “x-goog-ext--bin” and “x-goog-ext--jspb” 996// format. For example, list any service specific protobuf types that 997// can appear in grpc metadata as follows in your yaml file: Example: 998// context: rules: - selector: 999// "google.example.library.v1.LibraryService.CreateBook" 1000// allowed_request_extensions: - google.foo.v1.NewExtension 1001// allowed_response_extensions: - google.foo.v1.NewExtension You can 1002// also specify extension ID instead of fully qualified extension name 1003// here. 1004type Context struct { 1005 // Rules: A list of RPC context rules that apply to individual API 1006 // methods. **NOTE:** All service configuration rules follow "last one 1007 // wins" order. 1008 Rules []*ContextRule `json:"rules,omitempty"` 1009 1010 // ForceSendFields is a list of field names (e.g. "Rules") to 1011 // unconditionally include in API requests. By default, fields with 1012 // empty or default values are omitted from API requests. However, any 1013 // non-pointer, non-interface field appearing in ForceSendFields will be 1014 // sent to the server regardless of whether the field is empty or not. 1015 // This may be used to include empty fields in Patch requests. 1016 ForceSendFields []string `json:"-"` 1017 1018 // NullFields is a list of field names (e.g. "Rules") to include in API 1019 // requests with the JSON null value. By default, fields with empty 1020 // values are omitted from API requests. However, any field with an 1021 // empty value appearing in NullFields will be sent to the server as 1022 // null. It is an error if a field in this list has a non-empty value. 1023 // This may be used to include null fields in Patch requests. 1024 NullFields []string `json:"-"` 1025} 1026 1027func (s *Context) MarshalJSON() ([]byte, error) { 1028 type NoMethod Context 1029 raw := NoMethod(*s) 1030 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1031} 1032 1033// ContextRule: A context rule provides information about the context 1034// for an individual API element. 1035type ContextRule struct { 1036 // AllowedRequestExtensions: A list of full type names or extension IDs 1037 // of extensions allowed in grpc side channel from client to backend. 1038 AllowedRequestExtensions []string `json:"allowedRequestExtensions,omitempty"` 1039 1040 // AllowedResponseExtensions: A list of full type names or extension IDs 1041 // of extensions allowed in grpc side channel from backend to client. 1042 AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` 1043 1044 // Provided: A list of full type names of provided contexts. 1045 Provided []string `json:"provided,omitempty"` 1046 1047 // Requested: A list of full type names of requested contexts. 1048 Requested []string `json:"requested,omitempty"` 1049 1050 // Selector: Selects the methods to which this rule applies. Refer to 1051 // selector for syntax details. 1052 Selector string `json:"selector,omitempty"` 1053 1054 // ForceSendFields is a list of field names (e.g. 1055 // "AllowedRequestExtensions") to unconditionally include in API 1056 // requests. By default, fields with empty or default values are omitted 1057 // from API requests. However, any non-pointer, non-interface field 1058 // appearing in ForceSendFields will be sent to the server regardless of 1059 // whether the field is empty or not. This may be used to include empty 1060 // fields in Patch requests. 1061 ForceSendFields []string `json:"-"` 1062 1063 // NullFields is a list of field names (e.g. "AllowedRequestExtensions") 1064 // to include in API requests with the JSON null value. By default, 1065 // fields with empty values are omitted from API requests. However, any 1066 // field with an empty value appearing in NullFields will be sent to the 1067 // server as null. It is an error if a field in this list has a 1068 // non-empty value. This may be used to include null fields in Patch 1069 // requests. 1070 NullFields []string `json:"-"` 1071} 1072 1073func (s *ContextRule) MarshalJSON() ([]byte, error) { 1074 type NoMethod ContextRule 1075 raw := NoMethod(*s) 1076 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1077} 1078 1079// Control: Selects and configures the service controller used by the 1080// service. The service controller handles features like abuse, quota, 1081// billing, logging, monitoring, etc. 1082type Control struct { 1083 // Environment: The service control environment to use. If empty, no 1084 // control plane feature (like quota and billing) will be enabled. 1085 Environment string `json:"environment,omitempty"` 1086 1087 // ForceSendFields is a list of field names (e.g. "Environment") to 1088 // unconditionally include in API requests. By default, fields with 1089 // empty or default values are omitted from API requests. However, any 1090 // non-pointer, non-interface field appearing in ForceSendFields will be 1091 // sent to the server regardless of whether the field is empty or not. 1092 // This may be used to include empty fields in Patch requests. 1093 ForceSendFields []string `json:"-"` 1094 1095 // NullFields is a list of field names (e.g. "Environment") to include 1096 // in API requests with the JSON null value. By default, fields with 1097 // empty values are omitted from API requests. However, any field with 1098 // an empty value appearing in NullFields will be sent to the server as 1099 // null. It is an error if a field in this list has a non-empty value. 1100 // This may be used to include null fields in Patch requests. 1101 NullFields []string `json:"-"` 1102} 1103 1104func (s *Control) MarshalJSON() ([]byte, error) { 1105 type NoMethod Control 1106 raw := NoMethod(*s) 1107 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1108} 1109 1110// CustomError: Customize service error responses. For example, list any 1111// service specific protobuf types that can appear in error detail lists 1112// of error responses. Example: custom_error: types: - 1113// google.foo.v1.CustomError - google.foo.v1.AnotherError 1114type CustomError struct { 1115 // Rules: The list of custom error rules that apply to individual API 1116 // messages. **NOTE:** All service configuration rules follow "last one 1117 // wins" order. 1118 Rules []*CustomErrorRule `json:"rules,omitempty"` 1119 1120 // Types: The list of custom error detail types, e.g. 1121 // 'google.foo.v1.CustomError'. 1122 Types []string `json:"types,omitempty"` 1123 1124 // ForceSendFields is a list of field names (e.g. "Rules") to 1125 // unconditionally include in API requests. By default, fields with 1126 // empty or default values are omitted from API requests. However, any 1127 // non-pointer, non-interface field appearing in ForceSendFields will be 1128 // sent to the server regardless of whether the field is empty or not. 1129 // This may be used to include empty fields in Patch requests. 1130 ForceSendFields []string `json:"-"` 1131 1132 // NullFields is a list of field names (e.g. "Rules") to include in API 1133 // requests with the JSON null value. By default, fields with empty 1134 // values are omitted from API requests. However, any field with an 1135 // empty value appearing in NullFields will be sent to the server as 1136 // null. It is an error if a field in this list has a non-empty value. 1137 // This may be used to include null fields in Patch requests. 1138 NullFields []string `json:"-"` 1139} 1140 1141func (s *CustomError) MarshalJSON() ([]byte, error) { 1142 type NoMethod CustomError 1143 raw := NoMethod(*s) 1144 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1145} 1146 1147// CustomErrorRule: A custom error rule. 1148type CustomErrorRule struct { 1149 // IsErrorType: Mark this message as possible payload in error response. 1150 // Otherwise, objects of this type will be filtered when they appear in 1151 // error payload. 1152 IsErrorType bool `json:"isErrorType,omitempty"` 1153 1154 // Selector: Selects messages to which this rule applies. Refer to 1155 // selector for syntax details. 1156 Selector string `json:"selector,omitempty"` 1157 1158 // ForceSendFields is a list of field names (e.g. "IsErrorType") to 1159 // unconditionally include in API requests. By default, fields with 1160 // empty or default values are omitted from API requests. However, any 1161 // non-pointer, non-interface field appearing in ForceSendFields will be 1162 // sent to the server regardless of whether the field is empty or not. 1163 // This may be used to include empty fields in Patch requests. 1164 ForceSendFields []string `json:"-"` 1165 1166 // NullFields is a list of field names (e.g. "IsErrorType") to include 1167 // in API requests with the JSON null value. By default, fields with 1168 // empty values are omitted from API requests. However, any field with 1169 // an empty value appearing in NullFields will be sent to the server as 1170 // null. It is an error if a field in this list has a non-empty value. 1171 // This may be used to include null fields in Patch requests. 1172 NullFields []string `json:"-"` 1173} 1174 1175func (s *CustomErrorRule) MarshalJSON() ([]byte, error) { 1176 type NoMethod CustomErrorRule 1177 raw := NoMethod(*s) 1178 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1179} 1180 1181// CustomHttpPattern: A custom pattern is used for defining custom HTTP 1182// verb. 1183type CustomHttpPattern struct { 1184 // Kind: The name of this custom HTTP verb. 1185 Kind string `json:"kind,omitempty"` 1186 1187 // Path: The path matched by this custom verb. 1188 Path string `json:"path,omitempty"` 1189 1190 // ForceSendFields is a list of field names (e.g. "Kind") to 1191 // unconditionally include in API requests. By default, fields with 1192 // empty or default values are omitted from API requests. However, any 1193 // non-pointer, non-interface field appearing in ForceSendFields will be 1194 // sent to the server regardless of whether the field is empty or not. 1195 // This may be used to include empty fields in Patch requests. 1196 ForceSendFields []string `json:"-"` 1197 1198 // NullFields is a list of field names (e.g. "Kind") to include in API 1199 // requests with the JSON null value. By default, fields with empty 1200 // values are omitted from API requests. However, any field with an 1201 // empty value appearing in NullFields will be sent to the server as 1202 // null. It is an error if a field in this list has a non-empty value. 1203 // This may be used to include null fields in Patch requests. 1204 NullFields []string `json:"-"` 1205} 1206 1207func (s *CustomHttpPattern) MarshalJSON() ([]byte, error) { 1208 type NoMethod CustomHttpPattern 1209 raw := NoMethod(*s) 1210 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1211} 1212 1213// DeleteConnectionMetadata: Metadata provided through GetOperation 1214// request for the LRO generated by Delete Connection API 1215type DeleteConnectionMetadata struct { 1216} 1217 1218// DeletePeeredDnsDomainMetadata: Metadata provided through GetOperation 1219// request for the LRO generated by DeletePeeredDnsDomain API. 1220type DeletePeeredDnsDomainMetadata struct { 1221} 1222 1223// DnsRecordSet: Represents a DNS record set resource. 1224type DnsRecordSet struct { 1225 // Data: Required. As defined in RFC 1035 (section 5) and RFC 1034 1226 // (section 3.6.1) for examples see 1227 // https://cloud.google.com/dns/records/json-record. 1228 Data []string `json:"data,omitempty"` 1229 1230 // Domain: Required. The DNS or domain name of the record set, e.g. 1231 // `test.example.com`. 1232 Domain string `json:"domain,omitempty"` 1233 1234 // Ttl: Required. The period of time for which this RecordSet can be 1235 // cached by resolvers. 1236 Ttl string `json:"ttl,omitempty"` 1237 1238 // Type: Required. The identifier of a supported record type. 1239 Type string `json:"type,omitempty"` 1240 1241 // ForceSendFields is a list of field names (e.g. "Data") to 1242 // unconditionally include in API requests. By default, fields with 1243 // empty or default values are omitted from API requests. However, any 1244 // non-pointer, non-interface field appearing in ForceSendFields will be 1245 // sent to the server regardless of whether the field is empty or not. 1246 // This may be used to include empty fields in Patch requests. 1247 ForceSendFields []string `json:"-"` 1248 1249 // NullFields is a list of field names (e.g. "Data") to include in API 1250 // requests with the JSON null value. By default, fields with empty 1251 // values are omitted from API requests. However, any field with an 1252 // empty value appearing in NullFields will be sent to the server as 1253 // null. It is an error if a field in this list has a non-empty value. 1254 // This may be used to include null fields in Patch requests. 1255 NullFields []string `json:"-"` 1256} 1257 1258func (s *DnsRecordSet) MarshalJSON() ([]byte, error) { 1259 type NoMethod DnsRecordSet 1260 raw := NoMethod(*s) 1261 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1262} 1263 1264// DnsZone: Represents a DNS zone resource. 1265type DnsZone struct { 1266 // DnsSuffix: The DNS name suffix of this zone e.g. `example.com.`. 1267 DnsSuffix string `json:"dnsSuffix,omitempty"` 1268 1269 // Name: User assigned name for this resource. Must be unique within the 1270 // project. The name must be 1-63 characters long, must begin with a 1271 // letter, end with a letter or digit, and only contain lowercase 1272 // letters, digits or dashes. 1273 Name string `json:"name,omitempty"` 1274 1275 // ForceSendFields is a list of field names (e.g. "DnsSuffix") to 1276 // unconditionally include in API requests. By default, fields with 1277 // empty or default values are omitted from API requests. However, any 1278 // non-pointer, non-interface field appearing in ForceSendFields will be 1279 // sent to the server regardless of whether the field is empty or not. 1280 // This may be used to include empty fields in Patch requests. 1281 ForceSendFields []string `json:"-"` 1282 1283 // NullFields is a list of field names (e.g. "DnsSuffix") to include in 1284 // API requests with the JSON null value. By default, fields with empty 1285 // values are omitted from API requests. However, any field with an 1286 // empty value appearing in NullFields will be sent to the server as 1287 // null. It is an error if a field in this list has a non-empty value. 1288 // This may be used to include null fields in Patch requests. 1289 NullFields []string `json:"-"` 1290} 1291 1292func (s *DnsZone) MarshalJSON() ([]byte, error) { 1293 type NoMethod DnsZone 1294 raw := NoMethod(*s) 1295 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1296} 1297 1298// Documentation: `Documentation` provides the information for 1299// describing a service. Example: documentation: summary: > The Google 1300// Calendar API gives access to most calendar features. pages: - name: 1301// Overview content: (== include google/foo/overview.md ==) - name: 1302// Tutorial content: (== include google/foo/tutorial.md ==) subpages; - 1303// name: Java content: (== include google/foo/tutorial_java.md ==) 1304// rules: - selector: google.calendar.Calendar.Get description: > ... - 1305// selector: google.calendar.Calendar.Put description: > ... 1306// Documentation is provided in markdown syntax. In addition to standard 1307// markdown features, definition lists, tables and fenced code blocks 1308// are supported. Section headers can be provided and are interpreted 1309// relative to the section nesting of the context where a documentation 1310// fragment is embedded. Documentation from the IDL is merged with 1311// documentation defined via the config at normalization time, where 1312// documentation provided by config rules overrides IDL provided. A 1313// number of constructs specific to the API platform are supported in 1314// documentation text. In order to reference a proto element, the 1315// following notation can be used: [fully.qualified.proto.name][] To 1316// override the display text used for the link, this can be used: 1317// [display text][fully.qualified.proto.name] Text can be excluded from 1318// doc using the following notation: (-- internal comment --) A few 1319// directives are available in documentation. Note that directives must 1320// appear on a single line to be properly identified. The `include` 1321// directive includes a markdown file from an external source: (== 1322// include path/to/file ==) The `resource_for` directive marks a message 1323// to be the resource of a collection in REST view. If it is not 1324// specified, tools attempt to infer the resource from the operations in 1325// a collection: (== resource_for v1.shelves.books ==) The directive 1326// `suppress_warning` does not directly affect documentation and is 1327// documented together with service config validation. 1328type Documentation struct { 1329 // DocumentationRootUrl: The URL to the root of documentation. 1330 DocumentationRootUrl string `json:"documentationRootUrl,omitempty"` 1331 1332 // Overview: Declares a single overview page. For example: 1333 // documentation: summary: ... overview: (== include overview.md ==) 1334 // This is a shortcut for the following declaration (using pages style): 1335 // documentation: summary: ... pages: - name: Overview content: (== 1336 // include overview.md ==) Note: you cannot specify both `overview` 1337 // field and `pages` field. 1338 Overview string `json:"overview,omitempty"` 1339 1340 // Pages: The top level pages for the documentation set. 1341 Pages []*Page `json:"pages,omitempty"` 1342 1343 // Rules: A list of documentation rules that apply to individual API 1344 // elements. **NOTE:** All service configuration rules follow "last one 1345 // wins" order. 1346 Rules []*DocumentationRule `json:"rules,omitempty"` 1347 1348 // ServiceRootUrl: Specifies the service root url if the default one 1349 // (the service name from the yaml file) is not suitable. This can be 1350 // seen in any fully specified service urls as well as sections that 1351 // show a base that other urls are relative to. 1352 ServiceRootUrl string `json:"serviceRootUrl,omitempty"` 1353 1354 // Summary: A short description of what the service does. The summary 1355 // must be plain text. It becomes the overview of the service displayed 1356 // in Google Cloud Console. NOTE: This field is equivalent to the 1357 // standard field `description`. 1358 Summary string `json:"summary,omitempty"` 1359 1360 // ForceSendFields is a list of field names (e.g. 1361 // "DocumentationRootUrl") to unconditionally include in API requests. 1362 // By default, fields with empty or default values are omitted from API 1363 // requests. However, any non-pointer, non-interface field appearing in 1364 // ForceSendFields will be sent to the server regardless of whether the 1365 // field is empty or not. This may be used to include empty fields in 1366 // Patch requests. 1367 ForceSendFields []string `json:"-"` 1368 1369 // NullFields is a list of field names (e.g. "DocumentationRootUrl") to 1370 // include in API requests with the JSON null value. By default, fields 1371 // with empty values are omitted from API requests. However, any field 1372 // with an empty value appearing in NullFields will be sent to the 1373 // server as null. It is an error if a field in this list has a 1374 // non-empty value. This may be used to include null fields in Patch 1375 // requests. 1376 NullFields []string `json:"-"` 1377} 1378 1379func (s *Documentation) MarshalJSON() ([]byte, error) { 1380 type NoMethod Documentation 1381 raw := NoMethod(*s) 1382 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1383} 1384 1385// DocumentationRule: A documentation rule provides information about 1386// individual API elements. 1387type DocumentationRule struct { 1388 // DeprecationDescription: Deprecation description of the selected 1389 // element(s). It can be provided if an element is marked as 1390 // `deprecated`. 1391 DeprecationDescription string `json:"deprecationDescription,omitempty"` 1392 1393 // Description: Description of the selected proto element (e.g. a 1394 // message, a method, a 'service' definition, or a field). Defaults to 1395 // leading & trailing comments taken from the proto source definition of 1396 // the proto element. 1397 Description string `json:"description,omitempty"` 1398 1399 // Selector: The selector is a comma-separated list of patterns for any 1400 // element such as a method, a field, an enum value. Each pattern is a 1401 // qualified name of the element which may end in "*", indicating a 1402 // wildcard. Wildcards are only allowed at the end and for a whole 1403 // component of the qualified name, i.e. "foo.*" is ok, but not "foo.b*" 1404 // or "foo.*.bar". A wildcard will match one or more components. To 1405 // specify a default for all applicable elements, the whole pattern "*" 1406 // is used. 1407 Selector string `json:"selector,omitempty"` 1408 1409 // ForceSendFields is a list of field names (e.g. 1410 // "DeprecationDescription") to unconditionally include in API requests. 1411 // By default, fields with empty or default values are omitted from API 1412 // requests. However, any non-pointer, non-interface field appearing in 1413 // ForceSendFields will be sent to the server regardless of whether the 1414 // field is empty or not. This may be used to include empty fields in 1415 // Patch requests. 1416 ForceSendFields []string `json:"-"` 1417 1418 // NullFields is a list of field names (e.g. "DeprecationDescription") 1419 // to include in API requests with the JSON null value. By default, 1420 // fields with empty values are omitted from API requests. However, any 1421 // field with an empty value appearing in NullFields will be sent to the 1422 // server as null. It is an error if a field in this list has a 1423 // non-empty value. This may be used to include null fields in Patch 1424 // requests. 1425 NullFields []string `json:"-"` 1426} 1427 1428func (s *DocumentationRule) MarshalJSON() ([]byte, error) { 1429 type NoMethod DocumentationRule 1430 raw := NoMethod(*s) 1431 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1432} 1433 1434// Endpoint: `Endpoint` describes a network address of a service that 1435// serves a set of APIs. It is commonly known as a service endpoint. A 1436// service may expose any number of service endpoints, and all service 1437// endpoints share the same service definition, such as quota limits and 1438// monitoring metrics. Example: type: google.api.Service name: 1439// library-example.googleapis.com endpoints: # Declares network address 1440// `https://library-example.googleapis.com` # for service 1441// `library-example.googleapis.com`. The `https` scheme # is implicit 1442// for all service endpoints. Other schemes may be # supported in the 1443// future. - name: library-example.googleapis.com allow_cors: false - 1444// name: content-staging-library-example.googleapis.com # Allows HTTP 1445// OPTIONS calls to be passed to the API frontend, for it # to decide 1446// whether the subsequent cross-origin request is allowed # to proceed. 1447// allow_cors: true 1448type Endpoint struct { 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. "AllowCors") to 1468 // unconditionally include in API requests. By default, fields with 1469 // empty or default values are omitted from API requests. However, any 1470 // non-pointer, non-interface field appearing in ForceSendFields will be 1471 // sent to the server regardless of whether the field is empty or not. 1472 // This may be used to include empty fields in Patch requests. 1473 ForceSendFields []string `json:"-"` 1474 1475 // NullFields is a list of field names (e.g. "AllowCors") 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 or default values are omitted from API requests. However, any 1514 // non-pointer, non-interface field appearing in ForceSendFields will be 1515 // sent to the server regardless of whether the field is empty or not. 1516 // This may be 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 or default values are omitted from API requests. However, any 1548 // non-pointer, non-interface field appearing in ForceSendFields will be 1549 // sent to the server regardless of whether the field is empty or not. 1550 // This may be 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 or default values are omitted from API requests. However, any 1636 // non-pointer, non-interface field appearing in ForceSendFields will be 1637 // sent to the server regardless of whether the field is empty or not. 1638 // This may be 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 or default values are omitted from API requests. However, any 1673 // non-pointer, non-interface field appearing in ForceSendFields will be 1674 // sent to the server regardless of whether the field is empty or not. 1675 // This may be 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 or default values are omitted from API requests. However, any 1725 // non-pointer, non-interface field appearing in ForceSendFields will be 1726 // sent to the server regardless of whether the field is empty or not. 1727 // This may be 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 or default values are omitted from API requests. However, any 1767 // non-pointer, non-interface field appearing in ForceSendFields will be 1768 // sent to the server regardless of whether the field is empty or not. 1769 // This may be 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 or default values are omitted 1806 // from API requests. However, any non-pointer, non-interface field 1807 // appearing in ForceSendFields will be sent to the server regardless of 1808 // whether the field is empty or not. This may be used to include empty 1809 // fields in 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 or default values are omitted from API requests. However, any 2030 // non-pointer, non-interface field appearing in ForceSendFields will be 2031 // sent to the server regardless of whether the field is empty or not. 2032 // This may be 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 or default values are omitted from API requests. However, any 2071 // non-pointer, non-interface field appearing in ForceSendFields will be 2072 // sent to the server regardless of whether the field is empty or not. 2073 // This may be 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 or default values are omitted from API requests. However, any 2110 // non-pointer, non-interface field appearing in ForceSendFields will be 2111 // sent to the server regardless of whether the field is empty or not. 2112 // This may be 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 or default values are omitted from API requests. However, any 2143 // non-pointer, non-interface field appearing in ForceSendFields will be 2144 // sent to the server regardless of whether the field is empty or not. 2145 // This may be 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 or default values are omitted from API requests. However, any 2191 // non-pointer, non-interface field appearing in ForceSendFields will be 2192 // sent to the server regardless of whether the field is empty or not. 2193 // This may be 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 or default values are omitted from API 2240 // requests. 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 or default values are omitted from API requests. However, any 2278 // non-pointer, non-interface field appearing in ForceSendFields will be 2279 // sent to the server regardless of whether the field is empty or not. 2280 // This may be 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 or default values are omitted from API requests. However, any 2328 // non-pointer, non-interface field appearing in ForceSendFields will be 2329 // sent to the server regardless of whether the field is empty or not. 2330 // This may be 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 or default values are omitted from API requests. However, any 2520 // non-pointer, non-interface field appearing in ForceSendFields will be 2521 // sent to the server regardless of whether the field is empty or not. 2522 // This may be 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 or default values are omitted from API requests. However, any 2595 // non-pointer, non-interface field appearing in ForceSendFields will be 2596 // sent to the server regardless of whether the field is empty or not. 2597 // This may be 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 or default values are omitted from API requests. However, any 2633 // non-pointer, non-interface field appearing in ForceSendFields will be 2634 // sent to the server regardless of whether the field is empty or not. 2635 // This may be 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 or default values are omitted from API requests. However, any 2698 // non-pointer, non-interface field appearing in ForceSendFields will be 2699 // sent to the server regardless of whether the field is empty or not. 2700 // This may be 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. For a 2792 // list of types, see Monitoring resource types 2793 // (https://cloud.google.com/monitoring/api/resources) and Logging 2794 // resource types 2795 // (https://cloud.google.com/logging/docs/api/v2/resource-list). 2796 Type string `json:"type,omitempty"` 2797 2798 // ForceSendFields is a list of field names (e.g. "Description") to 2799 // unconditionally include in API requests. By default, fields with 2800 // empty or default values are omitted from API requests. However, any 2801 // non-pointer, non-interface field appearing in ForceSendFields will be 2802 // sent to the server regardless of whether the field is empty or not. 2803 // This may be used to include empty fields in Patch requests. 2804 ForceSendFields []string `json:"-"` 2805 2806 // NullFields is a list of field names (e.g. "Description") to include 2807 // in API requests with the JSON null value. By default, fields with 2808 // empty values are omitted from API requests. However, any field with 2809 // an empty value appearing in NullFields will be sent to the server as 2810 // null. It is an error if a field in this list has a non-empty value. 2811 // This may be used to include null fields in Patch requests. 2812 NullFields []string `json:"-"` 2813} 2814 2815func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) { 2816 type NoMethod MonitoredResourceDescriptor 2817 raw := NoMethod(*s) 2818 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2819} 2820 2821// Monitoring: Monitoring configuration of the service. The example 2822// below shows how to configure monitored resources and metrics for 2823// monitoring. In the example, a monitored resource and two metrics are 2824// defined. The `library.googleapis.com/book/returned_count` metric is 2825// sent to both producer and consumer projects, whereas the 2826// `library.googleapis.com/book/num_overdue` metric is only sent to the 2827// consumer project. monitored_resources: - type: 2828// library.googleapis.com/Branch display_name: "Library Branch" 2829// description: "A branch of a library." launch_stage: GA labels: - key: 2830// resource_container description: "The Cloud container (ie. project id) 2831// for the Branch." - key: location description: "The location of the 2832// library branch." - key: branch_id description: "The id of the 2833// branch." metrics: - name: library.googleapis.com/book/returned_count 2834// display_name: "Books Returned" description: "The count of books that 2835// have been returned." launch_stage: GA metric_kind: DELTA value_type: 2836// INT64 unit: "1" labels: - key: customer_id description: "The id of 2837// the customer." - name: library.googleapis.com/book/num_overdue 2838// display_name: "Books Overdue" description: "The current number of 2839// overdue books." launch_stage: GA metric_kind: GAUGE value_type: INT64 2840// unit: "1" labels: - key: customer_id description: "The id of the 2841// customer." monitoring: producer_destinations: - monitored_resource: 2842// library.googleapis.com/Branch metrics: - 2843// library.googleapis.com/book/returned_count consumer_destinations: - 2844// monitored_resource: library.googleapis.com/Branch metrics: - 2845// library.googleapis.com/book/returned_count - 2846// library.googleapis.com/book/num_overdue 2847type Monitoring struct { 2848 // ConsumerDestinations: Monitoring configurations for sending metrics 2849 // to the consumer project. There can be multiple consumer destinations. 2850 // A monitored resource type may appear in multiple monitoring 2851 // destinations if different aggregations are needed for different sets 2852 // of metrics associated with that monitored resource type. A monitored 2853 // resource and metric pair may only be used once in the Monitoring 2854 // configuration. 2855 ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"` 2856 2857 // ProducerDestinations: Monitoring configurations for sending metrics 2858 // to the producer project. There can be multiple producer destinations. 2859 // A monitored resource type may appear in multiple monitoring 2860 // destinations if different aggregations are needed for different sets 2861 // of metrics associated with that monitored resource type. A monitored 2862 // resource and metric pair may only be used once in the Monitoring 2863 // configuration. 2864 ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"` 2865 2866 // ForceSendFields is a list of field names (e.g. 2867 // "ConsumerDestinations") to unconditionally include in API requests. 2868 // By default, fields with empty or default values are omitted from API 2869 // requests. However, any non-pointer, non-interface field appearing in 2870 // ForceSendFields will be sent to the server regardless of whether the 2871 // field is empty or not. This may be used to include empty fields in 2872 // Patch requests. 2873 ForceSendFields []string `json:"-"` 2874 2875 // NullFields is a list of field names (e.g. "ConsumerDestinations") to 2876 // include in API requests with the JSON null value. By default, fields 2877 // with empty values are omitted from API requests. However, any field 2878 // with an empty value appearing in NullFields will be sent to the 2879 // server as null. It is an error if a field in this list has a 2880 // non-empty value. This may be used to include null fields in Patch 2881 // requests. 2882 NullFields []string `json:"-"` 2883} 2884 2885func (s *Monitoring) MarshalJSON() ([]byte, error) { 2886 type NoMethod Monitoring 2887 raw := NoMethod(*s) 2888 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2889} 2890 2891// MonitoringDestination: Configuration of a specific monitoring 2892// destination (the producer project or the consumer project). 2893type MonitoringDestination struct { 2894 // Metrics: Types of the metrics to report to this monitoring 2895 // destination. Each type must be defined in Service.metrics section. 2896 Metrics []string `json:"metrics,omitempty"` 2897 2898 // MonitoredResource: The monitored resource type. The type must be 2899 // defined in Service.monitored_resources section. 2900 MonitoredResource string `json:"monitoredResource,omitempty"` 2901 2902 // ForceSendFields is a list of field names (e.g. "Metrics") to 2903 // unconditionally include in API requests. By default, fields with 2904 // empty or default values are omitted from API requests. However, any 2905 // non-pointer, non-interface field appearing in ForceSendFields will be 2906 // sent to the server regardless of whether the field is empty or not. 2907 // This may be used to include empty fields in Patch requests. 2908 ForceSendFields []string `json:"-"` 2909 2910 // NullFields is a list of field names (e.g. "Metrics") to include in 2911 // API requests with the JSON null value. By default, fields with empty 2912 // values are omitted from API requests. However, any field with an 2913 // empty value appearing in NullFields will be sent to the server as 2914 // null. It is an error if a field in this list has a non-empty value. 2915 // This may be used to include null fields in Patch requests. 2916 NullFields []string `json:"-"` 2917} 2918 2919func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { 2920 type NoMethod MonitoringDestination 2921 raw := NoMethod(*s) 2922 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2923} 2924 2925// OAuthRequirements: OAuth scopes are a way to define data and 2926// permissions on data. For example, there are scopes defined for 2927// "Read-only access to Google Calendar" and "Access to Cloud Platform". 2928// Users can consent to a scope for an application, giving it permission 2929// to access that data on their behalf. OAuth scope specifications 2930// should be fairly coarse grained; a user will need to see and 2931// understand the text description of what your scope means. In most 2932// cases: use one or at most two OAuth scopes for an entire family of 2933// products. If your product has multiple APIs, you should probably be 2934// sharing the OAuth scope across all of those APIs. When you need finer 2935// grained OAuth consent screens: talk with your product management 2936// about how developers will use them in practice. Please note that even 2937// though each of the canonical scopes is enough for a request to be 2938// accepted and passed to the backend, a request can still fail due to 2939// the backend requiring additional scopes or permissions. 2940type OAuthRequirements struct { 2941 // CanonicalScopes: The list of publicly documented OAuth scopes that 2942 // are allowed access. An OAuth token containing any of these scopes 2943 // will be accepted. Example: canonical_scopes: 2944 // https://www.googleapis.com/auth/calendar, 2945 // https://www.googleapis.com/auth/calendar.read 2946 CanonicalScopes string `json:"canonicalScopes,omitempty"` 2947 2948 // ForceSendFields is a list of field names (e.g. "CanonicalScopes") to 2949 // unconditionally include in API requests. By default, fields with 2950 // empty or default values are omitted from API requests. However, any 2951 // non-pointer, non-interface field appearing in ForceSendFields will be 2952 // sent to the server regardless of whether the field is empty or not. 2953 // This may be used to include empty fields in Patch requests. 2954 ForceSendFields []string `json:"-"` 2955 2956 // NullFields is a list of field names (e.g. "CanonicalScopes") to 2957 // include in API requests with the JSON null value. By default, fields 2958 // with empty values are omitted from API requests. However, any field 2959 // with an empty value appearing in NullFields will be sent to the 2960 // server as null. It is an error if a field in this list has a 2961 // non-empty value. This may be used to include null fields in Patch 2962 // requests. 2963 NullFields []string `json:"-"` 2964} 2965 2966func (s *OAuthRequirements) MarshalJSON() ([]byte, error) { 2967 type NoMethod OAuthRequirements 2968 raw := NoMethod(*s) 2969 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2970} 2971 2972// Operation: This resource represents a long-running operation that is 2973// the result of a network API call. 2974type Operation struct { 2975 // Done: If the value is `false`, it means the operation is still in 2976 // progress. If `true`, the operation is completed, and either `error` 2977 // or `response` is available. 2978 Done bool `json:"done,omitempty"` 2979 2980 // Error: The error result of the operation in case of failure or 2981 // cancellation. 2982 Error *Status `json:"error,omitempty"` 2983 2984 // Metadata: Service-specific metadata associated with the operation. It 2985 // typically contains progress information and common metadata such as 2986 // create time. Some services might not provide such metadata. Any 2987 // method that returns a long-running operation should document the 2988 // metadata type, if any. 2989 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 2990 2991 // Name: The server-assigned name, which is only unique within the same 2992 // service that originally returns it. If you use the default HTTP 2993 // mapping, the `name` should be a resource name ending with 2994 // `operations/{unique_id}`. 2995 Name string `json:"name,omitempty"` 2996 2997 // Response: The normal response of the operation in case of success. If 2998 // the original method returns no data on success, such as `Delete`, the 2999 // response is `google.protobuf.Empty`. If the original method is 3000 // standard `Get`/`Create`/`Update`, the response should be the 3001 // resource. For other methods, the response should have the type 3002 // `XxxResponse`, where `Xxx` is the original method name. For example, 3003 // if the original method name is `TakeSnapshot()`, the inferred 3004 // response type is `TakeSnapshotResponse`. 3005 Response googleapi.RawMessage `json:"response,omitempty"` 3006 3007 // ServerResponse contains the HTTP response code and headers from the 3008 // server. 3009 googleapi.ServerResponse `json:"-"` 3010 3011 // ForceSendFields is a list of field names (e.g. "Done") to 3012 // unconditionally include in API requests. By default, fields with 3013 // empty or default values are omitted from API requests. However, any 3014 // non-pointer, non-interface field appearing in ForceSendFields will be 3015 // sent to the server regardless of whether the field is empty or not. 3016 // This may be used to include empty fields in Patch requests. 3017 ForceSendFields []string `json:"-"` 3018 3019 // NullFields is a list of field names (e.g. "Done") to include in API 3020 // requests with the JSON null value. By default, fields with empty 3021 // values are omitted from API requests. However, any field with an 3022 // empty value appearing in NullFields will be sent to the server as 3023 // null. It is an error if a field in this list has a non-empty value. 3024 // This may be used to include null fields in Patch requests. 3025 NullFields []string `json:"-"` 3026} 3027 3028func (s *Operation) MarshalJSON() ([]byte, error) { 3029 type NoMethod Operation 3030 raw := NoMethod(*s) 3031 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3032} 3033 3034// Option: A protocol buffer option, which can be attached to a message, 3035// field, enumeration, etc. 3036type Option struct { 3037 // Name: The option's name. For protobuf built-in options (options 3038 // defined in descriptor.proto), this is the short name. For example, 3039 // "map_entry". For custom options, it should be the fully-qualified 3040 // name. For example, "google.api.http". 3041 Name string `json:"name,omitempty"` 3042 3043 // Value: The option's value packed in an Any message. If the value is a 3044 // primitive, the corresponding wrapper type defined in 3045 // google/protobuf/wrappers.proto should be used. If the value is an 3046 // enum, it should be stored as an int32 value using the 3047 // google.protobuf.Int32Value type. 3048 Value googleapi.RawMessage `json:"value,omitempty"` 3049 3050 // ForceSendFields is a list of field names (e.g. "Name") to 3051 // unconditionally include in API requests. By default, fields with 3052 // empty or default values are omitted from API requests. However, any 3053 // non-pointer, non-interface field appearing in ForceSendFields will be 3054 // sent to the server regardless of whether the field is empty or not. 3055 // This may be used to include empty fields in Patch requests. 3056 ForceSendFields []string `json:"-"` 3057 3058 // NullFields is a list of field names (e.g. "Name") to include in API 3059 // requests with the JSON null value. By default, fields with empty 3060 // values are omitted from API requests. However, any field with an 3061 // empty value appearing in NullFields will be sent to the server as 3062 // null. It is an error if a field in this list has a non-empty value. 3063 // This may be used to include null fields in Patch requests. 3064 NullFields []string `json:"-"` 3065} 3066 3067func (s *Option) MarshalJSON() ([]byte, error) { 3068 type NoMethod Option 3069 raw := NoMethod(*s) 3070 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3071} 3072 3073// Page: Represents a documentation page. A page can contain subpages to 3074// represent nested documentation set structure. 3075type Page struct { 3076 // Content: The Markdown content of the page. You can use (== include 3077 // {path} ==) to include content from a Markdown file. The content can 3078 // be used to produce the documentation page such as HTML format page. 3079 Content string `json:"content,omitempty"` 3080 3081 // Name: The name of the page. It will be used as an identity of the 3082 // page to generate URI of the page, text of the link to this page in 3083 // navigation, etc. The full page name (start from the root page name to 3084 // this page concatenated with `.`) can be used as reference to the page 3085 // in your documentation. For example: pages: - name: Tutorial content: 3086 // (== include tutorial.md ==) subpages: - name: Java content: (== 3087 // include tutorial_java.md ==) You can reference `Java` page using 3088 // Markdown reference link syntax: `Java`. 3089 Name string `json:"name,omitempty"` 3090 3091 // Subpages: Subpages of this page. The order of subpages specified here 3092 // will be honored in the generated docset. 3093 Subpages []*Page `json:"subpages,omitempty"` 3094 3095 // ForceSendFields is a list of field names (e.g. "Content") to 3096 // unconditionally include in API requests. By default, fields with 3097 // empty or default values are omitted from API requests. However, any 3098 // non-pointer, non-interface field appearing in ForceSendFields will be 3099 // sent to the server regardless of whether the field is empty or not. 3100 // This may be used to include empty fields in Patch requests. 3101 ForceSendFields []string `json:"-"` 3102 3103 // NullFields is a list of field names (e.g. "Content") to include in 3104 // API requests with the JSON null value. By default, fields with empty 3105 // values are omitted from API requests. However, any field with an 3106 // empty value appearing in NullFields will be sent to the server as 3107 // null. It is an error if a field in this list has a non-empty value. 3108 // This may be used to include null fields in Patch requests. 3109 NullFields []string `json:"-"` 3110} 3111 3112func (s *Page) MarshalJSON() ([]byte, error) { 3113 type NoMethod Page 3114 raw := NoMethod(*s) 3115 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3116} 3117 3118// PartialDeleteConnectionMetadata: Metadata provided through 3119// GetOperation request for the LRO generated by Partial Delete 3120// Connection API 3121type PartialDeleteConnectionMetadata struct { 3122} 3123 3124// PeeredDnsDomain: DNS domain suffix for which requests originating in 3125// the producer VPC network are resolved in the associated consumer VPC 3126// network. 3127type PeeredDnsDomain struct { 3128 // DnsSuffix: The DNS domain name suffix e.g. `example.com.`. Cloud DNS 3129 // requires that a DNS suffix ends with a trailing dot. 3130 DnsSuffix string `json:"dnsSuffix,omitempty"` 3131 3132 // Name: User assigned name for this resource. Must be unique within the 3133 // consumer network. The name must be 1-63 characters long, must begin 3134 // with a letter, end with a letter or digit, and only contain lowercase 3135 // letters, digits or dashes. 3136 Name string `json:"name,omitempty"` 3137 3138 // ForceSendFields is a list of field names (e.g. "DnsSuffix") to 3139 // unconditionally include in API requests. By default, fields with 3140 // empty or default values are omitted from API requests. However, any 3141 // non-pointer, non-interface field appearing in ForceSendFields will be 3142 // sent to the server regardless of whether the field is empty or not. 3143 // This may be used to include empty fields in Patch requests. 3144 ForceSendFields []string `json:"-"` 3145 3146 // NullFields is a list of field names (e.g. "DnsSuffix") to include in 3147 // API requests with the JSON null value. By default, fields with empty 3148 // values are omitted from API requests. However, any field with an 3149 // empty value appearing in NullFields will be sent to the server as 3150 // null. It is an error if a field in this list has a non-empty value. 3151 // This may be used to include null fields in Patch requests. 3152 NullFields []string `json:"-"` 3153} 3154 3155func (s *PeeredDnsDomain) MarshalJSON() ([]byte, error) { 3156 type NoMethod PeeredDnsDomain 3157 raw := NoMethod(*s) 3158 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3159} 3160 3161// PeeredDnsDomainMetadata: Metadata provided through GetOperation 3162// request for the LRO generated by CreatePeeredDnsDomain API. 3163type PeeredDnsDomainMetadata struct { 3164} 3165 3166// PolicyBinding: Grouping of IAM role and IAM member. 3167type PolicyBinding struct { 3168 // Member: Required. Member to bind the role with. See 3169 // /iam/docs/reference/rest/v1/Policy#Binding for how to format each 3170 // member. Eg. - user:myuser@mydomain.com - 3171 // serviceAccount:my-service-account@app.gserviceaccount.com 3172 Member string `json:"member,omitempty"` 3173 3174 // Role: Required. Role to apply. Only allowlisted roles can be used at 3175 // the specified granularity. The role must be one of the following: - 3176 // 'roles/container.hostServiceAgentUser' applied on the shared VPC host 3177 // project - 'roles/compute.securityAdmin' applied on the shared VPC 3178 // host project 3179 Role string `json:"role,omitempty"` 3180 3181 // ForceSendFields is a list of field names (e.g. "Member") to 3182 // unconditionally include in API requests. By default, fields with 3183 // empty or default values are omitted from API requests. However, any 3184 // non-pointer, non-interface field appearing in ForceSendFields will be 3185 // sent to the server regardless of whether the field is empty or not. 3186 // This may be used to include empty fields in Patch requests. 3187 ForceSendFields []string `json:"-"` 3188 3189 // NullFields is a list of field names (e.g. "Member") to include in API 3190 // requests with the JSON null value. By default, fields with empty 3191 // values are omitted from API requests. However, any field with an 3192 // empty value appearing in NullFields will be sent to the server as 3193 // null. It is an error if a field in this list has a non-empty value. 3194 // This may be used to include null fields in Patch requests. 3195 NullFields []string `json:"-"` 3196} 3197 3198func (s *PolicyBinding) MarshalJSON() ([]byte, error) { 3199 type NoMethod PolicyBinding 3200 raw := NoMethod(*s) 3201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3202} 3203 3204// Quota: Quota configuration helps to achieve fairness and budgeting in 3205// service usage. The metric based quota configuration works this way: - 3206// The service configuration defines a set of metrics. - For API calls, 3207// the quota.metric_rules maps methods to metrics with corresponding 3208// costs. - The quota.limits defines limits on the metrics, which will 3209// be used for quota checks at runtime. An example quota configuration 3210// in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: 3211// library.googleapis.com/write_calls unit: "1/min/{project}" # rate 3212// limit for consumer projects values: STANDARD: 10000 # The metric 3213// rules bind all methods to the read_calls metric, # except for the 3214// UpdateBook and DeleteBook methods. These two methods # are mapped to 3215// the write_calls metric, with the UpdateBook method # consuming at 3216// twice rate as the DeleteBook method. metric_rules: - selector: "*" 3217// metric_costs: library.googleapis.com/read_calls: 1 - selector: 3218// google.example.library.v1.LibraryService.UpdateBook metric_costs: 3219// library.googleapis.com/write_calls: 2 - selector: 3220// google.example.library.v1.LibraryService.DeleteBook metric_costs: 3221// library.googleapis.com/write_calls: 1 Corresponding Metric 3222// definition: metrics: - name: library.googleapis.com/read_calls 3223// display_name: Read requests metric_kind: DELTA value_type: INT64 - 3224// name: library.googleapis.com/write_calls display_name: Write requests 3225// metric_kind: DELTA value_type: INT64 3226type Quota struct { 3227 // Limits: List of `QuotaLimit` definitions for the service. 3228 Limits []*QuotaLimit `json:"limits,omitempty"` 3229 3230 // MetricRules: List of `MetricRule` definitions, each one mapping a 3231 // selected method to one or more metrics. 3232 MetricRules []*MetricRule `json:"metricRules,omitempty"` 3233 3234 // ForceSendFields is a list of field names (e.g. "Limits") to 3235 // unconditionally include in API requests. By default, fields with 3236 // empty or default values are omitted from API requests. However, any 3237 // non-pointer, non-interface field appearing in ForceSendFields will be 3238 // sent to the server regardless of whether the field is empty or not. 3239 // This may be used to include empty fields in Patch requests. 3240 ForceSendFields []string `json:"-"` 3241 3242 // NullFields is a list of field names (e.g. "Limits") to include in API 3243 // requests with the JSON null value. By default, fields with empty 3244 // values are omitted from API requests. However, any field with an 3245 // empty value appearing in NullFields will be sent to the server as 3246 // null. It is an error if a field in this list has a non-empty value. 3247 // This may be used to include null fields in Patch requests. 3248 NullFields []string `json:"-"` 3249} 3250 3251func (s *Quota) MarshalJSON() ([]byte, error) { 3252 type NoMethod Quota 3253 raw := NoMethod(*s) 3254 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3255} 3256 3257// QuotaLimit: `QuotaLimit` defines a specific limit that applies over a 3258// specified duration for a limit type. There can be at most one limit 3259// for a duration and limit type combination defined within a 3260// `QuotaGroup`. 3261type QuotaLimit struct { 3262 // DefaultLimit: Default number of tokens that can be consumed during 3263 // the specified duration. This is the number of tokens assigned when a 3264 // client application developer activates the service for his/her 3265 // project. Specifying a value of 0 will block all requests. This can be 3266 // used if you are provisioning quota to selected consumers and blocking 3267 // others. Similarly, a value of -1 will indicate an unlimited quota. No 3268 // other negative values are allowed. Used by group-based quotas only. 3269 DefaultLimit int64 `json:"defaultLimit,omitempty,string"` 3270 3271 // Description: Optional. User-visible, extended description for this 3272 // quota limit. Should be used only when more context is needed to 3273 // understand this limit than provided by the limit's display name (see: 3274 // `display_name`). 3275 Description string `json:"description,omitempty"` 3276 3277 // DisplayName: User-visible display name for this limit. Optional. If 3278 // not set, the UI will provide a default display name based on the 3279 // quota configuration. This field can be used to override the default 3280 // display name generated from the configuration. 3281 DisplayName string `json:"displayName,omitempty"` 3282 3283 // Duration: Duration of this limit in textual notation. Must be "100s" 3284 // or "1d". Used by group-based quotas only. 3285 Duration string `json:"duration,omitempty"` 3286 3287 // FreeTier: Free tier value displayed in the Developers Console for 3288 // this limit. The free tier is the number of tokens that will be 3289 // subtracted from the billed amount when billing is enabled. This field 3290 // can only be set on a limit with duration "1d", in a billable group; 3291 // it is invalid on any other limit. If this field is not set, it 3292 // defaults to 0, indicating that there is no free tier for this 3293 // service. Used by group-based quotas only. 3294 FreeTier int64 `json:"freeTier,omitempty,string"` 3295 3296 // MaxLimit: Maximum number of tokens that can be consumed during the 3297 // specified duration. Client application developers can override the 3298 // default limit up to this maximum. If specified, this value cannot be 3299 // set to a value less than the default limit. If not specified, it is 3300 // set to the default limit. To allow clients to apply overrides with no 3301 // upper bound, set this to -1, indicating unlimited maximum quota. Used 3302 // by group-based quotas only. 3303 MaxLimit int64 `json:"maxLimit,omitempty,string"` 3304 3305 // Metric: The name of the metric this quota limit applies to. The quota 3306 // limits with the same metric will be checked together during runtime. 3307 // The metric must be defined within the service config. 3308 Metric string `json:"metric,omitempty"` 3309 3310 // Name: Name of the quota limit. The name must be provided, and it must 3311 // be unique within the service. The name can only include alphanumeric 3312 // characters as well as '-'. The maximum length of the limit name is 64 3313 // characters. 3314 Name string `json:"name,omitempty"` 3315 3316 // Unit: Specify the unit of the quota limit. It uses the same syntax as 3317 // Metric.unit. The supported unit kinds are determined by the quota 3318 // backend system. Here are some examples: * "1/min/{project}" for quota 3319 // per minute per project. Note: the order of unit components is 3320 // insignificant. The "1" at the beginning is required to follow the 3321 // metric unit syntax. 3322 Unit string `json:"unit,omitempty"` 3323 3324 // Values: Tiered limit values. You must specify this as a key:value 3325 // pair, with an integer value that is the maximum number of requests 3326 // allowed for the specified unit. Currently only STANDARD is supported. 3327 Values map[string]string `json:"values,omitempty"` 3328 3329 // ForceSendFields is a list of field names (e.g. "DefaultLimit") to 3330 // unconditionally include in API requests. By default, fields with 3331 // empty or default values are omitted from API requests. However, any 3332 // non-pointer, non-interface field appearing in ForceSendFields will be 3333 // sent to the server regardless of whether the field is empty or not. 3334 // This may be used to include empty fields in Patch requests. 3335 ForceSendFields []string `json:"-"` 3336 3337 // NullFields is a list of field names (e.g. "DefaultLimit") to include 3338 // in API requests with the JSON null value. By default, fields with 3339 // empty values are omitted from API requests. However, any field with 3340 // an empty value appearing in NullFields will be sent to the server as 3341 // null. It is an error if a field in this list has a non-empty value. 3342 // This may be used to include null fields in Patch requests. 3343 NullFields []string `json:"-"` 3344} 3345 3346func (s *QuotaLimit) MarshalJSON() ([]byte, error) { 3347 type NoMethod QuotaLimit 3348 raw := NoMethod(*s) 3349 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3350} 3351 3352// Range: Represents a found unused range. 3353type Range struct { 3354 // IpCidrRange: CIDR range in "10.x.x.x/y" format that is within the 3355 // allocated ranges and currently unused. 3356 IpCidrRange string `json:"ipCidrRange,omitempty"` 3357 3358 // Network: In the Shared VPC host project, the VPC network that's 3359 // peered with the consumer network. For example: 3360 // `projects/1234321/global/networks/host-network` 3361 Network string `json:"network,omitempty"` 3362 3363 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 3364 // unconditionally include in API requests. By default, fields with 3365 // empty or default values are omitted from API requests. However, any 3366 // non-pointer, non-interface field appearing in ForceSendFields will be 3367 // sent to the server regardless of whether the field is empty or not. 3368 // This may be used to include empty fields in Patch requests. 3369 ForceSendFields []string `json:"-"` 3370 3371 // NullFields is a list of field names (e.g. "IpCidrRange") to include 3372 // in API requests with the JSON null value. By default, fields with 3373 // empty values are omitted from API requests. However, any field with 3374 // an empty value appearing in NullFields will be sent to the server as 3375 // null. It is an error if a field in this list has a non-empty value. 3376 // This may be used to include null fields in Patch requests. 3377 NullFields []string `json:"-"` 3378} 3379 3380func (s *Range) MarshalJSON() ([]byte, error) { 3381 type NoMethod Range 3382 raw := NoMethod(*s) 3383 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3384} 3385 3386// RemoveDnsRecordSetMetadata: Metadata provided through GetOperation 3387// request for the LRO generated by RemoveDnsRecordSet API 3388type RemoveDnsRecordSetMetadata struct { 3389} 3390 3391// RemoveDnsRecordSetResponse: Blank message response type for 3392// RemoveDnsRecordSet API 3393type RemoveDnsRecordSetResponse struct { 3394} 3395 3396// RemoveDnsZoneMetadata: Metadata provided through GetOperation request 3397// for the LRO generated by RemoveDnsZone API 3398type RemoveDnsZoneMetadata struct { 3399} 3400 3401// RemoveDnsZoneResponse: Blank message response type for RemoveDnsZone 3402// API 3403type RemoveDnsZoneResponse struct { 3404} 3405 3406// Route: Represents a route that was created or discovered by a private 3407// access management service. 3408type Route struct { 3409 // DestRange: Destination CIDR range that this route applies to. 3410 DestRange string `json:"destRange,omitempty"` 3411 3412 // Name: Route name. See https://cloud.google.com/vpc/docs/routes 3413 Name string `json:"name,omitempty"` 3414 3415 // Network: Fully-qualified URL of the VPC network in the producer host 3416 // tenant project that this route applies to. For example: 3417 // `projects/123456/global/networks/host-network` 3418 Network string `json:"network,omitempty"` 3419 3420 // NextHopGateway: Fully-qualified URL of the gateway that should handle 3421 // matching packets that this route applies to. For example: 3422 // `projects/123456/global/gateways/default-internet-gateway` 3423 NextHopGateway string `json:"nextHopGateway,omitempty"` 3424 3425 // ForceSendFields is a list of field names (e.g. "DestRange") to 3426 // unconditionally include in API requests. By default, fields with 3427 // empty or default values are omitted from API requests. However, any 3428 // non-pointer, non-interface field appearing in ForceSendFields will be 3429 // sent to the server regardless of whether the field is empty or not. 3430 // This may be used to include empty fields in Patch requests. 3431 ForceSendFields []string `json:"-"` 3432 3433 // NullFields is a list of field names (e.g. "DestRange") to include in 3434 // API requests with the JSON null value. By default, fields with empty 3435 // values are omitted from API requests. However, any field with an 3436 // empty value appearing in NullFields will be sent to the server as 3437 // null. It is an error if a field in this list has a non-empty value. 3438 // This may be used to include null fields in Patch requests. 3439 NullFields []string `json:"-"` 3440} 3441 3442func (s *Route) MarshalJSON() ([]byte, error) { 3443 type NoMethod Route 3444 raw := NoMethod(*s) 3445 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3446} 3447 3448// SearchRangeRequest: Request to search for an unused range within 3449// allocated ranges. 3450type SearchRangeRequest struct { 3451 // IpPrefixLength: Required. The prefix length of the IP range. Use 3452 // usual CIDR range notation. For example, '30' to find unused 3453 // x.x.x.x/30 CIDR range. Actual range will be determined using 3454 // allocated range for the consumer peered network and returned in the 3455 // result. 3456 IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` 3457 3458 // Network: Network name in the consumer project. This network must have 3459 // been already peered with a shared VPC network using CreateConnection 3460 // method. Must be in a form 3461 // 'projects/{project}/global/networks/{network}'. {project} is a 3462 // project number, as in '12345' {network} is network name. 3463 Network string `json:"network,omitempty"` 3464 3465 // ForceSendFields is a list of field names (e.g. "IpPrefixLength") to 3466 // unconditionally include in API requests. By default, fields with 3467 // empty or default values are omitted from API requests. However, any 3468 // non-pointer, non-interface field appearing in ForceSendFields will be 3469 // sent to the server regardless of whether the field is empty or not. 3470 // This may be used to include empty fields in Patch requests. 3471 ForceSendFields []string `json:"-"` 3472 3473 // NullFields is a list of field names (e.g. "IpPrefixLength") to 3474 // include in API requests with the JSON null value. By default, fields 3475 // with empty values are omitted from API requests. However, any field 3476 // with an empty value appearing in NullFields will be sent to the 3477 // server as null. It is an error if a field in this list has a 3478 // non-empty value. This may be used to include null fields in Patch 3479 // requests. 3480 NullFields []string `json:"-"` 3481} 3482 3483func (s *SearchRangeRequest) MarshalJSON() ([]byte, error) { 3484 type NoMethod SearchRangeRequest 3485 raw := NoMethod(*s) 3486 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3487} 3488 3489type SecondaryIpRange struct { 3490 // IpCidrRange: Secondary IP CIDR range in `x.x.x.x/y` format. 3491 IpCidrRange string `json:"ipCidrRange,omitempty"` 3492 3493 // RangeName: Name of the secondary IP range. 3494 RangeName string `json:"rangeName,omitempty"` 3495 3496 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 3497 // unconditionally include in API requests. By default, fields with 3498 // empty or default values are omitted from API requests. However, any 3499 // non-pointer, non-interface field appearing in ForceSendFields will be 3500 // sent to the server regardless of whether the field is empty or not. 3501 // This may be used to include empty fields in Patch requests. 3502 ForceSendFields []string `json:"-"` 3503 3504 // NullFields is a list of field names (e.g. "IpCidrRange") to include 3505 // in API requests with the JSON null value. By default, fields with 3506 // empty values are omitted from API requests. However, any field with 3507 // an empty value appearing in NullFields will be sent to the server as 3508 // null. It is an error if a field in this list has a non-empty value. 3509 // This may be used to include null fields in Patch requests. 3510 NullFields []string `json:"-"` 3511} 3512 3513func (s *SecondaryIpRange) MarshalJSON() ([]byte, error) { 3514 type NoMethod SecondaryIpRange 3515 raw := NoMethod(*s) 3516 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3517} 3518 3519// Service: `Service` is the root object of Google API service 3520// configuration (service config). It describes the basic information 3521// about a logical service, such as the service name and the user-facing 3522// title, and delegates other aspects to sub-sections. Each sub-section 3523// is either a proto message or a repeated proto message that configures 3524// a specific aspect, such as auth. For more information, see each proto 3525// message definition. Example: type: google.api.Service name: 3526// calendar.googleapis.com title: Google Calendar API apis: - name: 3527// google.calendar.v3.Calendar visibility: rules: - selector: 3528// "google.calendar.v3.*" restriction: PREVIEW backend: rules: - 3529// selector: "google.calendar.v3.*" address: calendar.example.com 3530// authentication: providers: - id: google_calendar_auth jwks_uri: 3531// https://www.googleapis.com/oauth2/v1/certs issuer: 3532// https://securetoken.google.com rules: - selector: "*" requirements: 3533// provider_id: google_calendar_auth 3534type Service struct { 3535 // Apis: A list of API interfaces exported by this service. Only the 3536 // `name` field of the google.protobuf.Api needs to be provided by the 3537 // configuration author, as the remaining fields will be derived from 3538 // the IDL during the normalization process. It is an error to specify 3539 // an API interface here which cannot be resolved against the associated 3540 // IDL files. 3541 Apis []*Api `json:"apis,omitempty"` 3542 3543 // Authentication: Auth configuration. 3544 Authentication *Authentication `json:"authentication,omitempty"` 3545 3546 // Backend: API backend configuration. 3547 Backend *Backend `json:"backend,omitempty"` 3548 3549 // Billing: Billing configuration. 3550 Billing *Billing `json:"billing,omitempty"` 3551 3552 // ConfigVersion: Obsolete. Do not use. This field has no semantic 3553 // meaning. The service config compiler always sets this field to `3`. 3554 ConfigVersion int64 `json:"configVersion,omitempty"` 3555 3556 // Context: Context configuration. 3557 Context *Context `json:"context,omitempty"` 3558 3559 // Control: Configuration for the service control plane. 3560 Control *Control `json:"control,omitempty"` 3561 3562 // CustomError: Custom error configuration. 3563 CustomError *CustomError `json:"customError,omitempty"` 3564 3565 // Documentation: Additional API documentation. 3566 Documentation *Documentation `json:"documentation,omitempty"` 3567 3568 // Endpoints: Configuration for network endpoints. If this is empty, 3569 // then an endpoint with the same name as the service is automatically 3570 // generated to service all defined APIs. 3571 Endpoints []*Endpoint `json:"endpoints,omitempty"` 3572 3573 // Enums: A list of all enum types included in this API service. Enums 3574 // referenced directly or indirectly by the `apis` are automatically 3575 // included. Enums which are not referenced but shall be included should 3576 // be listed here by name by the configuration author. Example: enums: - 3577 // name: google.someapi.v1.SomeEnum 3578 Enums []*Enum `json:"enums,omitempty"` 3579 3580 // Http: HTTP configuration. 3581 Http *Http `json:"http,omitempty"` 3582 3583 // Id: A unique ID for a specific instance of this message, typically 3584 // assigned by the client for tracking purpose. Must be no longer than 3585 // 63 characters and only lower case letters, digits, '.', '_' and '-' 3586 // are allowed. If empty, the server may choose to generate one instead. 3587 Id string `json:"id,omitempty"` 3588 3589 // Logging: Logging configuration. 3590 Logging *Logging `json:"logging,omitempty"` 3591 3592 // Logs: Defines the logs used by this service. 3593 Logs []*LogDescriptor `json:"logs,omitempty"` 3594 3595 // Metrics: Defines the metrics used by this service. 3596 Metrics []*MetricDescriptor `json:"metrics,omitempty"` 3597 3598 // MonitoredResources: Defines the monitored resources used by this 3599 // service. This is required by the Service.monitoring and 3600 // Service.logging configurations. 3601 MonitoredResources []*MonitoredResourceDescriptor `json:"monitoredResources,omitempty"` 3602 3603 // Monitoring: Monitoring configuration. 3604 Monitoring *Monitoring `json:"monitoring,omitempty"` 3605 3606 // Name: The service name, which is a DNS-like logical identifier for 3607 // the service, such as `calendar.googleapis.com`. The service name 3608 // typically goes through DNS verification to make sure the owner of the 3609 // service also owns the DNS name. 3610 Name string `json:"name,omitempty"` 3611 3612 // ProducerProjectId: The Google project that owns this service. 3613 ProducerProjectId string `json:"producerProjectId,omitempty"` 3614 3615 // Quota: Quota configuration. 3616 Quota *Quota `json:"quota,omitempty"` 3617 3618 // SourceInfo: Output only. The source information for this 3619 // configuration if available. 3620 SourceInfo *SourceInfo `json:"sourceInfo,omitempty"` 3621 3622 // SystemParameters: System parameter configuration. 3623 SystemParameters *SystemParameters `json:"systemParameters,omitempty"` 3624 3625 // SystemTypes: A list of all proto message types included in this API 3626 // service. It serves similar purpose as [google.api.Service.types], 3627 // except that these types are not needed by user-defined APIs. 3628 // Therefore, they will not show up in the generated discovery doc. This 3629 // field should only be used to define system APIs in ESF. 3630 SystemTypes []*Type `json:"systemTypes,omitempty"` 3631 3632 // Title: The product title for this service, it is the name displayed 3633 // in Google Cloud Console. 3634 Title string `json:"title,omitempty"` 3635 3636 // Types: A list of all proto message types included in this API 3637 // service. Types referenced directly or indirectly by the `apis` are 3638 // automatically included. Messages which are not referenced but shall 3639 // be included, such as types used by the `google.protobuf.Any` type, 3640 // should be listed here by name by the configuration author. Example: 3641 // types: - name: google.protobuf.Int32 3642 Types []*Type `json:"types,omitempty"` 3643 3644 // Usage: Configuration controlling usage of this service. 3645 Usage *Usage `json:"usage,omitempty"` 3646 3647 // ForceSendFields is a list of field names (e.g. "Apis") to 3648 // unconditionally include in API requests. By default, fields with 3649 // empty or default values are omitted from API requests. However, any 3650 // non-pointer, non-interface field appearing in ForceSendFields will be 3651 // sent to the server regardless of whether the field is empty or not. 3652 // This may be used to include empty fields in Patch requests. 3653 ForceSendFields []string `json:"-"` 3654 3655 // NullFields is a list of field names (e.g. "Apis") to include in API 3656 // requests with the JSON null value. By default, fields with empty 3657 // values are omitted from API requests. However, any field with an 3658 // empty value appearing in NullFields will be sent to the server as 3659 // null. It is an error if a field in this list has a non-empty value. 3660 // This may be used to include null fields in Patch requests. 3661 NullFields []string `json:"-"` 3662} 3663 3664func (s *Service) MarshalJSON() ([]byte, error) { 3665 type NoMethod Service 3666 raw := NoMethod(*s) 3667 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3668} 3669 3670// SourceContext: `SourceContext` represents information about the 3671// source of a protobuf element, like the file in which it is defined. 3672type SourceContext struct { 3673 // FileName: The path-qualified name of the .proto file that contained 3674 // the associated protobuf element. For example: 3675 // "google/protobuf/source_context.proto". 3676 FileName string `json:"fileName,omitempty"` 3677 3678 // ForceSendFields is a list of field names (e.g. "FileName") to 3679 // unconditionally include in API requests. By default, fields with 3680 // empty or default values are omitted from API requests. However, any 3681 // non-pointer, non-interface field appearing in ForceSendFields will be 3682 // sent to the server regardless of whether the field is empty or not. 3683 // This may be used to include empty fields in Patch requests. 3684 ForceSendFields []string `json:"-"` 3685 3686 // NullFields is a list of field names (e.g. "FileName") to include in 3687 // API requests with the JSON null value. By default, fields with empty 3688 // values are omitted from API requests. However, any field with an 3689 // empty value appearing in NullFields will be sent to the server as 3690 // null. It is an error if a field in this list has a non-empty value. 3691 // This may be used to include null fields in Patch requests. 3692 NullFields []string `json:"-"` 3693} 3694 3695func (s *SourceContext) MarshalJSON() ([]byte, error) { 3696 type NoMethod SourceContext 3697 raw := NoMethod(*s) 3698 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3699} 3700 3701// SourceInfo: Source information used to create a Service Config 3702type SourceInfo struct { 3703 // SourceFiles: All files used during config generation. 3704 SourceFiles []googleapi.RawMessage `json:"sourceFiles,omitempty"` 3705 3706 // ForceSendFields is a list of field names (e.g. "SourceFiles") to 3707 // unconditionally include in API requests. By default, fields with 3708 // empty or default values are omitted from API requests. However, any 3709 // non-pointer, non-interface field appearing in ForceSendFields will be 3710 // sent to the server regardless of whether the field is empty or not. 3711 // This may be used to include empty fields in Patch requests. 3712 ForceSendFields []string `json:"-"` 3713 3714 // NullFields is a list of field names (e.g. "SourceFiles") to include 3715 // in API requests with the JSON null value. By default, fields with 3716 // empty values are omitted from API requests. However, any field with 3717 // an empty value appearing in NullFields will be sent to the server as 3718 // null. It is an error if a field in this list has a non-empty value. 3719 // This may be used to include null fields in Patch requests. 3720 NullFields []string `json:"-"` 3721} 3722 3723func (s *SourceInfo) MarshalJSON() ([]byte, error) { 3724 type NoMethod SourceInfo 3725 raw := NoMethod(*s) 3726 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3727} 3728 3729// Status: The `Status` type defines a logical error model that is 3730// suitable for different programming environments, including REST APIs 3731// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 3732// `Status` message contains three pieces of data: error code, error 3733// message, and error details. You can find out more about this error 3734// model and how to work with it in the API Design Guide 3735// (https://cloud.google.com/apis/design/errors). 3736type Status struct { 3737 // Code: The status code, which should be an enum value of 3738 // google.rpc.Code. 3739 Code int64 `json:"code,omitempty"` 3740 3741 // Details: A list of messages that carry the error details. There is a 3742 // common set of message types for APIs to use. 3743 Details []googleapi.RawMessage `json:"details,omitempty"` 3744 3745 // Message: A developer-facing error message, which should be in 3746 // English. Any user-facing error message should be localized and sent 3747 // in the google.rpc.Status.details field, or localized by the client. 3748 Message string `json:"message,omitempty"` 3749 3750 // ForceSendFields is a list of field names (e.g. "Code") to 3751 // unconditionally include in API requests. By default, fields with 3752 // empty or default values are omitted from API requests. However, any 3753 // non-pointer, non-interface field appearing in ForceSendFields will be 3754 // sent to the server regardless of whether the field is empty or not. 3755 // This may be used to include empty fields in Patch requests. 3756 ForceSendFields []string `json:"-"` 3757 3758 // NullFields is a list of field names (e.g. "Code") to include in API 3759 // requests with the JSON null value. By default, fields with empty 3760 // values are omitted from API requests. However, any field with an 3761 // empty value appearing in NullFields will be sent to the server as 3762 // null. It is an error if a field in this list has a non-empty value. 3763 // This may be used to include null fields in Patch requests. 3764 NullFields []string `json:"-"` 3765} 3766 3767func (s *Status) MarshalJSON() ([]byte, error) { 3768 type NoMethod Status 3769 raw := NoMethod(*s) 3770 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3771} 3772 3773// Subnetwork: Represents a subnet that was created or discovered by a 3774// private access management service. 3775type Subnetwork struct { 3776 // IpCidrRange: Subnetwork CIDR range in `10.x.x.x/y` format. 3777 IpCidrRange string `json:"ipCidrRange,omitempty"` 3778 3779 // Name: Subnetwork name. See https://cloud.google.com/compute/docs/vpc/ 3780 Name string `json:"name,omitempty"` 3781 3782 // Network: In the Shared VPC host project, the VPC network that's 3783 // peered with the consumer network. For example: 3784 // `projects/1234321/global/networks/host-network` 3785 Network string `json:"network,omitempty"` 3786 3787 // OutsideAllocation: This is a discovered subnet that is not within the 3788 // current consumer allocated ranges. 3789 OutsideAllocation bool `json:"outsideAllocation,omitempty"` 3790 3791 // Region: GCP region where the subnetwork is located. 3792 Region string `json:"region,omitempty"` 3793 3794 // SecondaryIpRanges: List of secondary IP ranges in this subnetwork. 3795 SecondaryIpRanges []*SecondaryIpRange `json:"secondaryIpRanges,omitempty"` 3796 3797 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 3798 // unconditionally include in API requests. By default, fields with 3799 // empty or default values are omitted from API requests. However, any 3800 // non-pointer, non-interface field appearing in ForceSendFields will be 3801 // sent to the server regardless of whether the field is empty or not. 3802 // This may be used to include empty fields in Patch requests. 3803 ForceSendFields []string `json:"-"` 3804 3805 // NullFields is a list of field names (e.g. "IpCidrRange") to include 3806 // in API requests with the JSON null value. By default, fields with 3807 // empty values are omitted from API requests. However, any field with 3808 // an empty value appearing in NullFields will be sent to the server as 3809 // null. It is an error if a field in this list has a non-empty value. 3810 // This may be used to include null fields in Patch requests. 3811 NullFields []string `json:"-"` 3812} 3813 3814func (s *Subnetwork) MarshalJSON() ([]byte, error) { 3815 type NoMethod Subnetwork 3816 raw := NoMethod(*s) 3817 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3818} 3819 3820// SystemParameter: Define a parameter's name and location. The 3821// parameter may be passed as either an HTTP header or a URL query 3822// parameter, and if both are passed the behavior is 3823// implementation-dependent. 3824type SystemParameter struct { 3825 // HttpHeader: Define the HTTP header name to use for the parameter. It 3826 // is case insensitive. 3827 HttpHeader string `json:"httpHeader,omitempty"` 3828 3829 // Name: Define the name of the parameter, such as "api_key" . It is 3830 // case sensitive. 3831 Name string `json:"name,omitempty"` 3832 3833 // UrlQueryParameter: Define the URL query parameter name to use for the 3834 // parameter. It is case sensitive. 3835 UrlQueryParameter string `json:"urlQueryParameter,omitempty"` 3836 3837 // ForceSendFields is a list of field names (e.g. "HttpHeader") to 3838 // unconditionally include in API requests. By default, fields with 3839 // empty or default values are omitted from API requests. However, any 3840 // non-pointer, non-interface field appearing in ForceSendFields will be 3841 // sent to the server regardless of whether the field is empty or not. 3842 // This may be used to include empty fields in Patch requests. 3843 ForceSendFields []string `json:"-"` 3844 3845 // NullFields is a list of field names (e.g. "HttpHeader") to include in 3846 // API requests with the JSON null value. By default, fields with empty 3847 // values are omitted from API requests. However, any field with an 3848 // empty value appearing in NullFields will be sent to the server as 3849 // null. It is an error if a field in this list has a non-empty value. 3850 // This may be used to include null fields in Patch requests. 3851 NullFields []string `json:"-"` 3852} 3853 3854func (s *SystemParameter) MarshalJSON() ([]byte, error) { 3855 type NoMethod SystemParameter 3856 raw := NoMethod(*s) 3857 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3858} 3859 3860// SystemParameterRule: Define a system parameter rule mapping system 3861// parameter definitions to methods. 3862type SystemParameterRule struct { 3863 // Parameters: Define parameters. Multiple names may be defined for a 3864 // parameter. For a given method call, only one of them should be used. 3865 // If multiple names are used the behavior is implementation-dependent. 3866 // If none of the specified names are present the behavior is 3867 // parameter-dependent. 3868 Parameters []*SystemParameter `json:"parameters,omitempty"` 3869 3870 // Selector: Selects the methods to which this rule applies. Use '*' to 3871 // indicate all methods in all APIs. Refer to selector for syntax 3872 // details. 3873 Selector string `json:"selector,omitempty"` 3874 3875 // ForceSendFields is a list of field names (e.g. "Parameters") to 3876 // unconditionally include in API requests. By default, fields with 3877 // empty or default values are omitted from API requests. However, any 3878 // non-pointer, non-interface field appearing in ForceSendFields will be 3879 // sent to the server regardless of whether the field is empty or not. 3880 // This may be used to include empty fields in Patch requests. 3881 ForceSendFields []string `json:"-"` 3882 3883 // NullFields is a list of field names (e.g. "Parameters") to include in 3884 // API requests with the JSON null value. By default, fields with empty 3885 // values are omitted from API requests. However, any field with an 3886 // empty value appearing in NullFields will be sent to the server as 3887 // null. It is an error if a field in this list has a non-empty value. 3888 // This may be used to include null fields in Patch requests. 3889 NullFields []string `json:"-"` 3890} 3891 3892func (s *SystemParameterRule) MarshalJSON() ([]byte, error) { 3893 type NoMethod SystemParameterRule 3894 raw := NoMethod(*s) 3895 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3896} 3897 3898// SystemParameters: ### System parameter configuration A system 3899// parameter is a special kind of parameter defined by the API system, 3900// not by an individual API. It is typically mapped to an HTTP header 3901// and/or a URL query parameter. This configuration specifies which 3902// methods change the names of the system parameters. 3903type SystemParameters struct { 3904 // Rules: Define system parameters. The parameters defined here will 3905 // override the default parameters implemented by the system. If this 3906 // field is missing from the service config, default system parameters 3907 // will be used. Default system parameters and names is 3908 // implementation-dependent. Example: define api key for all methods 3909 // system_parameters rules: - selector: "*" parameters: - name: api_key 3910 // url_query_parameter: api_key Example: define 2 api key names for a 3911 // specific method. system_parameters rules: - selector: "/ListShelves" 3912 // parameters: - name: api_key http_header: Api-Key1 - name: api_key 3913 // http_header: Api-Key2 **NOTE:** All service configuration rules 3914 // follow "last one wins" order. 3915 Rules []*SystemParameterRule `json:"rules,omitempty"` 3916 3917 // ForceSendFields is a list of field names (e.g. "Rules") to 3918 // unconditionally include in API requests. By default, fields with 3919 // empty or default values are omitted from API requests. However, any 3920 // non-pointer, non-interface field appearing in ForceSendFields will be 3921 // sent to the server regardless of whether the field is empty or not. 3922 // This may be used to include empty fields in Patch requests. 3923 ForceSendFields []string `json:"-"` 3924 3925 // NullFields is a list of field names (e.g. "Rules") to include in API 3926 // requests with the JSON null value. By default, fields with empty 3927 // values are omitted from API requests. However, any field with an 3928 // empty value appearing in NullFields will be sent to the server as 3929 // null. It is an error if a field in this list has a non-empty value. 3930 // This may be used to include null fields in Patch requests. 3931 NullFields []string `json:"-"` 3932} 3933 3934func (s *SystemParameters) MarshalJSON() ([]byte, error) { 3935 type NoMethod SystemParameters 3936 raw := NoMethod(*s) 3937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3938} 3939 3940// Type: A protocol buffer message type. 3941type Type struct { 3942 // Fields: The list of fields. 3943 Fields []*Field `json:"fields,omitempty"` 3944 3945 // Name: The fully qualified message name. 3946 Name string `json:"name,omitempty"` 3947 3948 // Oneofs: The list of types appearing in `oneof` definitions in this 3949 // type. 3950 Oneofs []string `json:"oneofs,omitempty"` 3951 3952 // Options: The protocol buffer options. 3953 Options []*Option `json:"options,omitempty"` 3954 3955 // SourceContext: The source context. 3956 SourceContext *SourceContext `json:"sourceContext,omitempty"` 3957 3958 // Syntax: The source syntax. 3959 // 3960 // Possible values: 3961 // "SYNTAX_PROTO2" - Syntax `proto2`. 3962 // "SYNTAX_PROTO3" - Syntax `proto3`. 3963 Syntax string `json:"syntax,omitempty"` 3964 3965 // ForceSendFields is a list of field names (e.g. "Fields") to 3966 // unconditionally include in API requests. By default, fields with 3967 // empty or default values are omitted from API requests. However, any 3968 // non-pointer, non-interface field appearing in ForceSendFields will be 3969 // sent to the server regardless of whether the field is empty or not. 3970 // This may be used to include empty fields in Patch requests. 3971 ForceSendFields []string `json:"-"` 3972 3973 // NullFields is a list of field names (e.g. "Fields") to include in API 3974 // requests with the JSON null value. By default, fields with empty 3975 // values are omitted from API requests. However, any field with an 3976 // empty value appearing in NullFields will be sent to the server as 3977 // null. It is an error if a field in this list has a non-empty value. 3978 // This may be used to include null fields in Patch requests. 3979 NullFields []string `json:"-"` 3980} 3981 3982func (s *Type) MarshalJSON() ([]byte, error) { 3983 type NoMethod Type 3984 raw := NoMethod(*s) 3985 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3986} 3987 3988// UpdateDnsRecordSetMetadata: Metadata provided through GetOperation 3989// request for the LRO generated by UpdateDnsRecordSet API 3990type UpdateDnsRecordSetMetadata struct { 3991} 3992 3993// Usage: Configuration controlling usage of a service. 3994type Usage struct { 3995 // ProducerNotificationChannel: The full resource name of a channel used 3996 // for sending notifications to the service producer. Google Service 3997 // Management currently only supports Google Cloud Pub/Sub 3998 // (https://cloud.google.com/pubsub) as a notification channel. To use 3999 // Google Cloud Pub/Sub as the channel, this must be the name of a Cloud 4000 // Pub/Sub topic that uses the Cloud Pub/Sub topic name format 4001 // documented in https://cloud.google.com/pubsub/docs/overview. 4002 ProducerNotificationChannel string `json:"producerNotificationChannel,omitempty"` 4003 4004 // Requirements: Requirements that must be satisfied before a consumer 4005 // project can use the service. Each requirement is of the form /; for 4006 // example 'serviceusage.googleapis.com/billing-enabled'. For Google 4007 // APIs, a Terms of Service requirement must be included here. Google 4008 // Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". 4009 // Other Google APIs should include 4010 // "serviceusage.googleapis.com/tos/universal". Additional ToS can be 4011 // included based on the business needs. 4012 Requirements []string `json:"requirements,omitempty"` 4013 4014 // Rules: A list of usage rules that apply to individual API methods. 4015 // **NOTE:** All service configuration rules follow "last one wins" 4016 // order. 4017 Rules []*UsageRule `json:"rules,omitempty"` 4018 4019 // ForceSendFields is a list of field names (e.g. 4020 // "ProducerNotificationChannel") to unconditionally include in API 4021 // requests. By default, fields with empty or default values are omitted 4022 // from API requests. However, any non-pointer, non-interface field 4023 // appearing in ForceSendFields will be sent to the server regardless of 4024 // whether the field is empty or not. This may be used to include empty 4025 // fields in Patch requests. 4026 ForceSendFields []string `json:"-"` 4027 4028 // NullFields is a list of field names (e.g. 4029 // "ProducerNotificationChannel") to include in API requests with the 4030 // JSON null value. By default, fields with empty values are omitted 4031 // from API requests. However, any field with an empty value appearing 4032 // in NullFields will be sent to the server as null. It is an error if a 4033 // field in this list has a non-empty value. This may be used to include 4034 // null fields in Patch requests. 4035 NullFields []string `json:"-"` 4036} 4037 4038func (s *Usage) MarshalJSON() ([]byte, error) { 4039 type NoMethod Usage 4040 raw := NoMethod(*s) 4041 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4042} 4043 4044// UsageRule: Usage configuration rules for the service. NOTE: Under 4045// development. Use this rule to configure unregistered calls for the 4046// service. Unregistered calls are calls that do not contain consumer 4047// project identity. (Example: calls that do not contain an API key). By 4048// default, API methods do not allow unregistered calls, and each method 4049// call must be identified by a consumer project identity. Use this rule 4050// to allow/disallow unregistered calls. Example of an API that wants to 4051// allow unregistered calls for entire service. usage: rules: - 4052// selector: "*" allow_unregistered_calls: true Example of a method that 4053// wants to allow unregistered calls. usage: rules: - selector: 4054// "google.example.library.v1.LibraryService.CreateBook" 4055// allow_unregistered_calls: true 4056type UsageRule struct { 4057 // AllowUnregisteredCalls: If true, the selected method allows 4058 // unregistered calls, e.g. calls that don't identify any user or 4059 // application. 4060 AllowUnregisteredCalls bool `json:"allowUnregisteredCalls,omitempty"` 4061 4062 // Selector: Selects the methods to which this rule applies. Use '*' to 4063 // indicate all methods in all APIs. Refer to selector for syntax 4064 // details. 4065 Selector string `json:"selector,omitempty"` 4066 4067 // SkipServiceControl: If true, the selected method should skip service 4068 // control and the control plane features, such as quota and billing, 4069 // will not be available. This flag is used by Google Cloud Endpoints to 4070 // bypass checks for internal methods, such as service health check 4071 // methods. 4072 SkipServiceControl bool `json:"skipServiceControl,omitempty"` 4073 4074 // ForceSendFields is a list of field names (e.g. 4075 // "AllowUnregisteredCalls") to unconditionally include in API requests. 4076 // By default, fields with empty or default values are omitted from API 4077 // requests. However, any non-pointer, non-interface field appearing in 4078 // ForceSendFields will be sent to the server regardless of whether the 4079 // field is empty or not. This may be used to include empty fields in 4080 // Patch requests. 4081 ForceSendFields []string `json:"-"` 4082 4083 // NullFields is a list of field names (e.g. "AllowUnregisteredCalls") 4084 // to include in API requests with the JSON null value. By default, 4085 // fields with empty values are omitted from API requests. However, any 4086 // field with an empty value appearing in NullFields will be sent to the 4087 // server as null. It is an error if a field in this list has a 4088 // non-empty value. This may be used to include null fields in Patch 4089 // requests. 4090 NullFields []string `json:"-"` 4091} 4092 4093func (s *UsageRule) MarshalJSON() ([]byte, error) { 4094 type NoMethod UsageRule 4095 raw := NoMethod(*s) 4096 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4097} 4098 4099// method id "servicenetworking.operations.get": 4100 4101type OperationsGetCall struct { 4102 s *APIService 4103 name string 4104 urlParams_ gensupport.URLParams 4105 ifNoneMatch_ string 4106 ctx_ context.Context 4107 header_ http.Header 4108} 4109 4110// Get: Gets the latest state of a long-running operation. Clients can 4111// use this method to poll the operation result at intervals as 4112// recommended by the API service. 4113// 4114// - name: The name of the operation resource. 4115func (r *OperationsService) Get(name string) *OperationsGetCall { 4116 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4117 c.name = name 4118 return c 4119} 4120 4121// Fields allows partial responses to be retrieved. See 4122// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4123// for more information. 4124func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { 4125 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4126 return c 4127} 4128 4129// IfNoneMatch sets the optional parameter which makes the operation 4130// fail if the object's ETag matches the given value. This is useful for 4131// getting updates only after the object has changed since the last 4132// request. Use googleapi.IsNotModified to check whether the response 4133// error from Do is the result of In-None-Match. 4134func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { 4135 c.ifNoneMatch_ = entityTag 4136 return c 4137} 4138 4139// Context sets the context to be used in this call's Do method. Any 4140// pending HTTP request will be aborted if the provided context is 4141// canceled. 4142func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { 4143 c.ctx_ = ctx 4144 return c 4145} 4146 4147// Header returns an http.Header that can be modified by the caller to 4148// add HTTP headers to the request. 4149func (c *OperationsGetCall) Header() http.Header { 4150 if c.header_ == nil { 4151 c.header_ = make(http.Header) 4152 } 4153 return c.header_ 4154} 4155 4156func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { 4157 reqHeaders := make(http.Header) 4158 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812") 4159 for k, v := range c.header_ { 4160 reqHeaders[k] = v 4161 } 4162 reqHeaders.Set("User-Agent", c.s.userAgent()) 4163 if c.ifNoneMatch_ != "" { 4164 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4165 } 4166 var body io.Reader = nil 4167 c.urlParams_.Set("alt", alt) 4168 c.urlParams_.Set("prettyPrint", "false") 4169 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") 4170 urls += "?" + c.urlParams_.Encode() 4171 req, err := http.NewRequest("GET", urls, body) 4172 if err != nil { 4173 return nil, err 4174 } 4175 req.Header = reqHeaders 4176 googleapi.Expand(req.URL, map[string]string{ 4177 "name": c.name, 4178 }) 4179 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4180} 4181 4182// Do executes the "servicenetworking.operations.get" call. 4183// Exactly one of *Operation or error will be non-nil. Any non-2xx 4184// status code is an error. Response headers are in either 4185// *Operation.ServerResponse.Header or (if a response was returned at 4186// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4187// to check whether the returned error was because 4188// http.StatusNotModified was returned. 4189func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4190 gensupport.SetOptions(c.urlParams_, opts...) 4191 res, err := c.doRequest("json") 4192 if res != nil && res.StatusCode == http.StatusNotModified { 4193 if res.Body != nil { 4194 res.Body.Close() 4195 } 4196 return nil, &googleapi.Error{ 4197 Code: res.StatusCode, 4198 Header: res.Header, 4199 } 4200 } 4201 if err != nil { 4202 return nil, err 4203 } 4204 defer googleapi.CloseBody(res) 4205 if err := googleapi.CheckResponse(res); err != nil { 4206 return nil, err 4207 } 4208 ret := &Operation{ 4209 ServerResponse: googleapi.ServerResponse{ 4210 Header: res.Header, 4211 HTTPStatusCode: res.StatusCode, 4212 }, 4213 } 4214 target := &ret 4215 if err := gensupport.DecodeResponse(target, res); err != nil { 4216 return nil, err 4217 } 4218 return ret, nil 4219 // { 4220 // "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.", 4221 // "flatPath": "v1beta/operations/{operationsId}", 4222 // "httpMethod": "GET", 4223 // "id": "servicenetworking.operations.get", 4224 // "parameterOrder": [ 4225 // "name" 4226 // ], 4227 // "parameters": { 4228 // "name": { 4229 // "description": "The name of the operation resource.", 4230 // "location": "path", 4231 // "pattern": "^operations/[^/]+$", 4232 // "required": true, 4233 // "type": "string" 4234 // } 4235 // }, 4236 // "path": "v1beta/{+name}", 4237 // "response": { 4238 // "$ref": "Operation" 4239 // }, 4240 // "scopes": [ 4241 // "https://www.googleapis.com/auth/cloud-platform", 4242 // "https://www.googleapis.com/auth/service.management" 4243 // ] 4244 // } 4245 4246} 4247 4248// method id "servicenetworking.services.addSubnetwork": 4249 4250type ServicesAddSubnetworkCall struct { 4251 s *APIService 4252 parent string 4253 addsubnetworkrequest *AddSubnetworkRequest 4254 urlParams_ gensupport.URLParams 4255 ctx_ context.Context 4256 header_ http.Header 4257} 4258 4259// AddSubnetwork: For service producers, provisions a new subnet in a 4260// peered service's shared VPC network in the requested region and with 4261// the requested size that's expressed as a CIDR range (number of 4262// leading bits of ipV4 network mask). The method checks against the 4263// assigned allocated ranges to find a non-conflicting IP address range. 4264// The method will reuse a subnet if subsequent calls contain the same 4265// subnet name, region, and prefix length. This method will make 4266// producer's tenant project to be a shared VPC service project as 4267// needed. The response from the `get` operation will be of type 4268// `Subnetwork` if the operation successfully completes. 4269// 4270// - parent: A tenant project in the service producer organization, in 4271// the following format: 4272// services/{service}/{collection-id}/{resource-id}. {collection-id} 4273// is the cloud resource collection type that represents the tenant 4274// project. Only `projects` are supported. {resource-id} is the tenant 4275// project numeric id, such as `123456`. {service} the name of the 4276// peering service, such as `service-peering.example.com`. This 4277// service must already be enabled in the service consumer's project. 4278func (r *ServicesService) AddSubnetwork(parent string, addsubnetworkrequest *AddSubnetworkRequest) *ServicesAddSubnetworkCall { 4279 c := &ServicesAddSubnetworkCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4280 c.parent = parent 4281 c.addsubnetworkrequest = addsubnetworkrequest 4282 return c 4283} 4284 4285// Fields allows partial responses to be retrieved. See 4286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4287// for more information. 4288func (c *ServicesAddSubnetworkCall) Fields(s ...googleapi.Field) *ServicesAddSubnetworkCall { 4289 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4290 return c 4291} 4292 4293// Context sets the context to be used in this call's Do method. Any 4294// pending HTTP request will be aborted if the provided context is 4295// canceled. 4296func (c *ServicesAddSubnetworkCall) Context(ctx context.Context) *ServicesAddSubnetworkCall { 4297 c.ctx_ = ctx 4298 return c 4299} 4300 4301// Header returns an http.Header that can be modified by the caller to 4302// add HTTP headers to the request. 4303func (c *ServicesAddSubnetworkCall) Header() http.Header { 4304 if c.header_ == nil { 4305 c.header_ = make(http.Header) 4306 } 4307 return c.header_ 4308} 4309 4310func (c *ServicesAddSubnetworkCall) doRequest(alt string) (*http.Response, error) { 4311 reqHeaders := make(http.Header) 4312 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812") 4313 for k, v := range c.header_ { 4314 reqHeaders[k] = v 4315 } 4316 reqHeaders.Set("User-Agent", c.s.userAgent()) 4317 var body io.Reader = nil 4318 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addsubnetworkrequest) 4319 if err != nil { 4320 return nil, err 4321 } 4322 reqHeaders.Set("Content-Type", "application/json") 4323 c.urlParams_.Set("alt", alt) 4324 c.urlParams_.Set("prettyPrint", "false") 4325 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:addSubnetwork") 4326 urls += "?" + c.urlParams_.Encode() 4327 req, err := http.NewRequest("POST", urls, body) 4328 if err != nil { 4329 return nil, err 4330 } 4331 req.Header = reqHeaders 4332 googleapi.Expand(req.URL, map[string]string{ 4333 "parent": c.parent, 4334 }) 4335 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4336} 4337 4338// Do executes the "servicenetworking.services.addSubnetwork" call. 4339// Exactly one of *Operation or error will be non-nil. Any non-2xx 4340// status code is an error. Response headers are in either 4341// *Operation.ServerResponse.Header or (if a response was returned at 4342// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4343// to check whether the returned error was because 4344// http.StatusNotModified was returned. 4345func (c *ServicesAddSubnetworkCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4346 gensupport.SetOptions(c.urlParams_, opts...) 4347 res, err := c.doRequest("json") 4348 if res != nil && res.StatusCode == http.StatusNotModified { 4349 if res.Body != nil { 4350 res.Body.Close() 4351 } 4352 return nil, &googleapi.Error{ 4353 Code: res.StatusCode, 4354 Header: res.Header, 4355 } 4356 } 4357 if err != nil { 4358 return nil, err 4359 } 4360 defer googleapi.CloseBody(res) 4361 if err := googleapi.CheckResponse(res); err != nil { 4362 return nil, err 4363 } 4364 ret := &Operation{ 4365 ServerResponse: googleapi.ServerResponse{ 4366 Header: res.Header, 4367 HTTPStatusCode: res.StatusCode, 4368 }, 4369 } 4370 target := &ret 4371 if err := gensupport.DecodeResponse(target, res); err != nil { 4372 return nil, err 4373 } 4374 return ret, nil 4375 // { 4376 // "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.", 4377 // "flatPath": "v1beta/services/{servicesId}/{servicesId1}/{servicesId2}:addSubnetwork", 4378 // "httpMethod": "POST", 4379 // "id": "servicenetworking.services.addSubnetwork", 4380 // "parameterOrder": [ 4381 // "parent" 4382 // ], 4383 // "parameters": { 4384 // "parent": { 4385 // "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.", 4386 // "location": "path", 4387 // "pattern": "^services/[^/]+/[^/]+/[^/]+$", 4388 // "required": true, 4389 // "type": "string" 4390 // } 4391 // }, 4392 // "path": "v1beta/{+parent}:addSubnetwork", 4393 // "request": { 4394 // "$ref": "AddSubnetworkRequest" 4395 // }, 4396 // "response": { 4397 // "$ref": "Operation" 4398 // }, 4399 // "scopes": [ 4400 // "https://www.googleapis.com/auth/cloud-platform", 4401 // "https://www.googleapis.com/auth/service.management" 4402 // ] 4403 // } 4404 4405} 4406 4407// method id "servicenetworking.services.searchRange": 4408 4409type ServicesSearchRangeCall struct { 4410 s *APIService 4411 parent string 4412 searchrangerequest *SearchRangeRequest 4413 urlParams_ gensupport.URLParams 4414 ctx_ context.Context 4415 header_ http.Header 4416} 4417 4418// SearchRange: Service producers can use this method to find a 4419// currently unused range within consumer allocated ranges. This 4420// returned range is not reserved, and not guaranteed to remain unused. 4421// It will validate previously provided allocated ranges, find 4422// non-conflicting sub-range of requested size (expressed in number of 4423// leading bits of ipv4 network mask, as in CIDR range notation). 4424// Operation 4425// 4426// - parent: This is in a form services/{service}. {service} the name of 4427// the private access management service, for example 4428// 'service-peering.example.com'. 4429func (r *ServicesService) SearchRange(parent string, searchrangerequest *SearchRangeRequest) *ServicesSearchRangeCall { 4430 c := &ServicesSearchRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4431 c.parent = parent 4432 c.searchrangerequest = searchrangerequest 4433 return c 4434} 4435 4436// Fields allows partial responses to be retrieved. See 4437// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4438// for more information. 4439func (c *ServicesSearchRangeCall) Fields(s ...googleapi.Field) *ServicesSearchRangeCall { 4440 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4441 return c 4442} 4443 4444// Context sets the context to be used in this call's Do method. Any 4445// pending HTTP request will be aborted if the provided context is 4446// canceled. 4447func (c *ServicesSearchRangeCall) Context(ctx context.Context) *ServicesSearchRangeCall { 4448 c.ctx_ = ctx 4449 return c 4450} 4451 4452// Header returns an http.Header that can be modified by the caller to 4453// add HTTP headers to the request. 4454func (c *ServicesSearchRangeCall) Header() http.Header { 4455 if c.header_ == nil { 4456 c.header_ = make(http.Header) 4457 } 4458 return c.header_ 4459} 4460 4461func (c *ServicesSearchRangeCall) doRequest(alt string) (*http.Response, error) { 4462 reqHeaders := make(http.Header) 4463 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812") 4464 for k, v := range c.header_ { 4465 reqHeaders[k] = v 4466 } 4467 reqHeaders.Set("User-Agent", c.s.userAgent()) 4468 var body io.Reader = nil 4469 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchrangerequest) 4470 if err != nil { 4471 return nil, err 4472 } 4473 reqHeaders.Set("Content-Type", "application/json") 4474 c.urlParams_.Set("alt", alt) 4475 c.urlParams_.Set("prettyPrint", "false") 4476 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:searchRange") 4477 urls += "?" + c.urlParams_.Encode() 4478 req, err := http.NewRequest("POST", urls, body) 4479 if err != nil { 4480 return nil, err 4481 } 4482 req.Header = reqHeaders 4483 googleapi.Expand(req.URL, map[string]string{ 4484 "parent": c.parent, 4485 }) 4486 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4487} 4488 4489// Do executes the "servicenetworking.services.searchRange" call. 4490// Exactly one of *Operation or error will be non-nil. Any non-2xx 4491// status code is an error. Response headers are in either 4492// *Operation.ServerResponse.Header or (if a response was returned at 4493// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4494// to check whether the returned error was because 4495// http.StatusNotModified was returned. 4496func (c *ServicesSearchRangeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4497 gensupport.SetOptions(c.urlParams_, opts...) 4498 res, err := c.doRequest("json") 4499 if res != nil && res.StatusCode == http.StatusNotModified { 4500 if res.Body != nil { 4501 res.Body.Close() 4502 } 4503 return nil, &googleapi.Error{ 4504 Code: res.StatusCode, 4505 Header: res.Header, 4506 } 4507 } 4508 if err != nil { 4509 return nil, err 4510 } 4511 defer googleapi.CloseBody(res) 4512 if err := googleapi.CheckResponse(res); err != nil { 4513 return nil, err 4514 } 4515 ret := &Operation{ 4516 ServerResponse: googleapi.ServerResponse{ 4517 Header: res.Header, 4518 HTTPStatusCode: res.StatusCode, 4519 }, 4520 } 4521 target := &ret 4522 if err := gensupport.DecodeResponse(target, res); err != nil { 4523 return nil, err 4524 } 4525 return ret, nil 4526 // { 4527 // "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", 4528 // "flatPath": "v1beta/services/{servicesId}:searchRange", 4529 // "httpMethod": "POST", 4530 // "id": "servicenetworking.services.searchRange", 4531 // "parameterOrder": [ 4532 // "parent" 4533 // ], 4534 // "parameters": { 4535 // "parent": { 4536 // "description": "Required. This is in a form services/{service}. {service} the name of the private access management service, for example 'service-peering.example.com'.", 4537 // "location": "path", 4538 // "pattern": "^services/[^/]+$", 4539 // "required": true, 4540 // "type": "string" 4541 // } 4542 // }, 4543 // "path": "v1beta/{+parent}:searchRange", 4544 // "request": { 4545 // "$ref": "SearchRangeRequest" 4546 // }, 4547 // "response": { 4548 // "$ref": "Operation" 4549 // }, 4550 // "scopes": [ 4551 // "https://www.googleapis.com/auth/cloud-platform", 4552 // "https://www.googleapis.com/auth/service.management" 4553 // ] 4554 // } 4555 4556} 4557 4558// method id "servicenetworking.services.updateConnections": 4559 4560type ServicesUpdateConnectionsCall struct { 4561 s *APIService 4562 name string 4563 googlecloudservicenetworkingv1betaconnection *GoogleCloudServicenetworkingV1betaConnection 4564 urlParams_ gensupport.URLParams 4565 ctx_ context.Context 4566 header_ http.Header 4567} 4568 4569// UpdateConnections: Updates the allocated ranges that are assigned to 4570// a connection. The response from the `get` operation will be of type 4571// `Connection` if the operation successfully completes. 4572// 4573// - name: The service producer peering service that is managing peering 4574// connectivity for a service producer organization. For Google 4575// services that support this functionality, this is 4576// `services/servicenetworking.googleapis.com`. 4577func (r *ServicesService) UpdateConnections(name string, googlecloudservicenetworkingv1betaconnection *GoogleCloudServicenetworkingV1betaConnection) *ServicesUpdateConnectionsCall { 4578 c := &ServicesUpdateConnectionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4579 c.name = name 4580 c.googlecloudservicenetworkingv1betaconnection = googlecloudservicenetworkingv1betaconnection 4581 return c 4582} 4583 4584// Force sets the optional parameter "force": If a previously defined 4585// allocated range is removed, force flag must be set to true. 4586func (c *ServicesUpdateConnectionsCall) Force(force bool) *ServicesUpdateConnectionsCall { 4587 c.urlParams_.Set("force", fmt.Sprint(force)) 4588 return c 4589} 4590 4591// UpdateMask sets the optional parameter "updateMask": The update mask. 4592// If this is omitted, it defaults to "*". You can only update the 4593// listed peering ranges. 4594func (c *ServicesUpdateConnectionsCall) UpdateMask(updateMask string) *ServicesUpdateConnectionsCall { 4595 c.urlParams_.Set("updateMask", updateMask) 4596 return c 4597} 4598 4599// Fields allows partial responses to be retrieved. See 4600// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4601// for more information. 4602func (c *ServicesUpdateConnectionsCall) Fields(s ...googleapi.Field) *ServicesUpdateConnectionsCall { 4603 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4604 return c 4605} 4606 4607// Context sets the context to be used in this call's Do method. Any 4608// pending HTTP request will be aborted if the provided context is 4609// canceled. 4610func (c *ServicesUpdateConnectionsCall) Context(ctx context.Context) *ServicesUpdateConnectionsCall { 4611 c.ctx_ = ctx 4612 return c 4613} 4614 4615// Header returns an http.Header that can be modified by the caller to 4616// add HTTP headers to the request. 4617func (c *ServicesUpdateConnectionsCall) Header() http.Header { 4618 if c.header_ == nil { 4619 c.header_ = make(http.Header) 4620 } 4621 return c.header_ 4622} 4623 4624func (c *ServicesUpdateConnectionsCall) doRequest(alt string) (*http.Response, error) { 4625 reqHeaders := make(http.Header) 4626 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812") 4627 for k, v := range c.header_ { 4628 reqHeaders[k] = v 4629 } 4630 reqHeaders.Set("User-Agent", c.s.userAgent()) 4631 var body io.Reader = nil 4632 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicenetworkingv1betaconnection) 4633 if err != nil { 4634 return nil, err 4635 } 4636 reqHeaders.Set("Content-Type", "application/json") 4637 c.urlParams_.Set("alt", alt) 4638 c.urlParams_.Set("prettyPrint", "false") 4639 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/connections") 4640 urls += "?" + c.urlParams_.Encode() 4641 req, err := http.NewRequest("PATCH", urls, body) 4642 if err != nil { 4643 return nil, err 4644 } 4645 req.Header = reqHeaders 4646 googleapi.Expand(req.URL, map[string]string{ 4647 "name": c.name, 4648 }) 4649 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4650} 4651 4652// Do executes the "servicenetworking.services.updateConnections" call. 4653// Exactly one of *Operation or error will be non-nil. Any non-2xx 4654// status code is an error. Response headers are in either 4655// *Operation.ServerResponse.Header or (if a response was returned at 4656// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4657// to check whether the returned error was because 4658// http.StatusNotModified was returned. 4659func (c *ServicesUpdateConnectionsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4660 gensupport.SetOptions(c.urlParams_, opts...) 4661 res, err := c.doRequest("json") 4662 if res != nil && res.StatusCode == http.StatusNotModified { 4663 if res.Body != nil { 4664 res.Body.Close() 4665 } 4666 return nil, &googleapi.Error{ 4667 Code: res.StatusCode, 4668 Header: res.Header, 4669 } 4670 } 4671 if err != nil { 4672 return nil, err 4673 } 4674 defer googleapi.CloseBody(res) 4675 if err := googleapi.CheckResponse(res); err != nil { 4676 return nil, err 4677 } 4678 ret := &Operation{ 4679 ServerResponse: googleapi.ServerResponse{ 4680 Header: res.Header, 4681 HTTPStatusCode: res.StatusCode, 4682 }, 4683 } 4684 target := &ret 4685 if err := gensupport.DecodeResponse(target, res); err != nil { 4686 return nil, err 4687 } 4688 return ret, nil 4689 // { 4690 // "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.", 4691 // "flatPath": "v1beta/services/{servicesId}/connections", 4692 // "httpMethod": "PATCH", 4693 // "id": "servicenetworking.services.updateConnections", 4694 // "parameterOrder": [ 4695 // "name" 4696 // ], 4697 // "parameters": { 4698 // "force": { 4699 // "description": "If a previously defined allocated range is removed, force flag must be set to true.", 4700 // "location": "query", 4701 // "type": "boolean" 4702 // }, 4703 // "name": { 4704 // "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`.", 4705 // "location": "path", 4706 // "pattern": "^services/[^/]+$", 4707 // "required": true, 4708 // "type": "string" 4709 // }, 4710 // "updateMask": { 4711 // "description": "The update mask. If this is omitted, it defaults to \"*\". You can only update the listed peering ranges.", 4712 // "format": "google-fieldmask", 4713 // "location": "query", 4714 // "type": "string" 4715 // } 4716 // }, 4717 // "path": "v1beta/{+name}/connections", 4718 // "request": { 4719 // "$ref": "GoogleCloudServicenetworkingV1betaConnection" 4720 // }, 4721 // "response": { 4722 // "$ref": "Operation" 4723 // }, 4724 // "scopes": [ 4725 // "https://www.googleapis.com/auth/cloud-platform", 4726 // "https://www.googleapis.com/auth/service.management" 4727 // ] 4728 // } 4729 4730} 4731 4732// method id "servicenetworking.services.connections.create": 4733 4734type ServicesConnectionsCreateCall struct { 4735 s *APIService 4736 parent string 4737 googlecloudservicenetworkingv1betaconnection *GoogleCloudServicenetworkingV1betaConnection 4738 urlParams_ gensupport.URLParams 4739 ctx_ context.Context 4740 header_ http.Header 4741} 4742 4743// Create: Creates a private connection that establishes a VPC Network 4744// Peering connection to a VPC network in the service producer's 4745// organization. The administrator of the service consumer's VPC network 4746// invokes this method. The administrator must assign one or more 4747// allocated IP ranges for provisioning subnetworks in the service 4748// producer's VPC network. This connection is used for all supported 4749// services in the service producer's organization, so it only needs to 4750// be invoked once. The response from the `get` operation will be of 4751// type `Connection` if the operation successfully completes. 4752// 4753// - parent: The service that is managing peering connectivity for a 4754// service producer's organization. For Google services that support 4755// this functionality, this value is 4756// `services/servicenetworking.googleapis.com`. 4757func (r *ServicesConnectionsService) Create(parent string, googlecloudservicenetworkingv1betaconnection *GoogleCloudServicenetworkingV1betaConnection) *ServicesConnectionsCreateCall { 4758 c := &ServicesConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4759 c.parent = parent 4760 c.googlecloudservicenetworkingv1betaconnection = googlecloudservicenetworkingv1betaconnection 4761 return c 4762} 4763 4764// Fields allows partial responses to be retrieved. See 4765// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4766// for more information. 4767func (c *ServicesConnectionsCreateCall) Fields(s ...googleapi.Field) *ServicesConnectionsCreateCall { 4768 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4769 return c 4770} 4771 4772// Context sets the context to be used in this call's Do method. Any 4773// pending HTTP request will be aborted if the provided context is 4774// canceled. 4775func (c *ServicesConnectionsCreateCall) Context(ctx context.Context) *ServicesConnectionsCreateCall { 4776 c.ctx_ = ctx 4777 return c 4778} 4779 4780// Header returns an http.Header that can be modified by the caller to 4781// add HTTP headers to the request. 4782func (c *ServicesConnectionsCreateCall) Header() http.Header { 4783 if c.header_ == nil { 4784 c.header_ = make(http.Header) 4785 } 4786 return c.header_ 4787} 4788 4789func (c *ServicesConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { 4790 reqHeaders := make(http.Header) 4791 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812") 4792 for k, v := range c.header_ { 4793 reqHeaders[k] = v 4794 } 4795 reqHeaders.Set("User-Agent", c.s.userAgent()) 4796 var body io.Reader = nil 4797 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicenetworkingv1betaconnection) 4798 if err != nil { 4799 return nil, err 4800 } 4801 reqHeaders.Set("Content-Type", "application/json") 4802 c.urlParams_.Set("alt", alt) 4803 c.urlParams_.Set("prettyPrint", "false") 4804 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/connections") 4805 urls += "?" + c.urlParams_.Encode() 4806 req, err := http.NewRequest("POST", urls, body) 4807 if err != nil { 4808 return nil, err 4809 } 4810 req.Header = reqHeaders 4811 googleapi.Expand(req.URL, map[string]string{ 4812 "parent": c.parent, 4813 }) 4814 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4815} 4816 4817// Do executes the "servicenetworking.services.connections.create" call. 4818// Exactly one of *Operation or error will be non-nil. Any non-2xx 4819// status code is an error. Response headers are in either 4820// *Operation.ServerResponse.Header or (if a response was returned at 4821// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4822// to check whether the returned error was because 4823// http.StatusNotModified was returned. 4824func (c *ServicesConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4825 gensupport.SetOptions(c.urlParams_, opts...) 4826 res, err := c.doRequest("json") 4827 if res != nil && res.StatusCode == http.StatusNotModified { 4828 if res.Body != nil { 4829 res.Body.Close() 4830 } 4831 return nil, &googleapi.Error{ 4832 Code: res.StatusCode, 4833 Header: res.Header, 4834 } 4835 } 4836 if err != nil { 4837 return nil, err 4838 } 4839 defer googleapi.CloseBody(res) 4840 if err := googleapi.CheckResponse(res); err != nil { 4841 return nil, err 4842 } 4843 ret := &Operation{ 4844 ServerResponse: googleapi.ServerResponse{ 4845 Header: res.Header, 4846 HTTPStatusCode: res.StatusCode, 4847 }, 4848 } 4849 target := &ret 4850 if err := gensupport.DecodeResponse(target, res); err != nil { 4851 return nil, err 4852 } 4853 return ret, nil 4854 // { 4855 // "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.", 4856 // "flatPath": "v1beta/services/{servicesId}/connections", 4857 // "httpMethod": "POST", 4858 // "id": "servicenetworking.services.connections.create", 4859 // "parameterOrder": [ 4860 // "parent" 4861 // ], 4862 // "parameters": { 4863 // "parent": { 4864 // "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`.", 4865 // "location": "path", 4866 // "pattern": "^services/[^/]+$", 4867 // "required": true, 4868 // "type": "string" 4869 // } 4870 // }, 4871 // "path": "v1beta/{+parent}/connections", 4872 // "request": { 4873 // "$ref": "GoogleCloudServicenetworkingV1betaConnection" 4874 // }, 4875 // "response": { 4876 // "$ref": "Operation" 4877 // }, 4878 // "scopes": [ 4879 // "https://www.googleapis.com/auth/cloud-platform", 4880 // "https://www.googleapis.com/auth/service.management" 4881 // ] 4882 // } 4883 4884} 4885 4886// method id "servicenetworking.services.connections.list": 4887 4888type ServicesConnectionsListCall struct { 4889 s *APIService 4890 parent string 4891 urlParams_ gensupport.URLParams 4892 ifNoneMatch_ string 4893 ctx_ context.Context 4894 header_ http.Header 4895} 4896 4897// List: List the private connections that are configured in a service 4898// consumer's VPC network. 4899// 4900// - parent: The service that is managing peering connectivity for a 4901// service producer's organization. For Google services that support 4902// this functionality, this value is 4903// `services/servicenetworking.googleapis.com`. If you specify `-` as 4904// the parameter value, all configured public peering services are 4905// listed. 4906func (r *ServicesConnectionsService) List(parent string) *ServicesConnectionsListCall { 4907 c := &ServicesConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4908 c.parent = parent 4909 return c 4910} 4911 4912// Network sets the optional parameter "network": The name of service 4913// consumer's VPC network that's connected with service producer network 4914// through a private connection. The network name must be in the 4915// following format: `projects/{project}/global/networks/{network}`. 4916// {project} is a project number, such as in `12345` that includes the 4917// VPC service consumer's VPC network. {network} is the name of the 4918// service consumer's VPC network. 4919func (c *ServicesConnectionsListCall) Network(network string) *ServicesConnectionsListCall { 4920 c.urlParams_.Set("network", network) 4921 return c 4922} 4923 4924// Fields allows partial responses to be retrieved. See 4925// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4926// for more information. 4927func (c *ServicesConnectionsListCall) Fields(s ...googleapi.Field) *ServicesConnectionsListCall { 4928 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4929 return c 4930} 4931 4932// IfNoneMatch sets the optional parameter which makes the operation 4933// fail if the object's ETag matches the given value. This is useful for 4934// getting updates only after the object has changed since the last 4935// request. Use googleapi.IsNotModified to check whether the response 4936// error from Do is the result of In-None-Match. 4937func (c *ServicesConnectionsListCall) IfNoneMatch(entityTag string) *ServicesConnectionsListCall { 4938 c.ifNoneMatch_ = entityTag 4939 return c 4940} 4941 4942// Context sets the context to be used in this call's Do method. Any 4943// pending HTTP request will be aborted if the provided context is 4944// canceled. 4945func (c *ServicesConnectionsListCall) Context(ctx context.Context) *ServicesConnectionsListCall { 4946 c.ctx_ = ctx 4947 return c 4948} 4949 4950// Header returns an http.Header that can be modified by the caller to 4951// add HTTP headers to the request. 4952func (c *ServicesConnectionsListCall) Header() http.Header { 4953 if c.header_ == nil { 4954 c.header_ = make(http.Header) 4955 } 4956 return c.header_ 4957} 4958 4959func (c *ServicesConnectionsListCall) doRequest(alt string) (*http.Response, error) { 4960 reqHeaders := make(http.Header) 4961 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812") 4962 for k, v := range c.header_ { 4963 reqHeaders[k] = v 4964 } 4965 reqHeaders.Set("User-Agent", c.s.userAgent()) 4966 if c.ifNoneMatch_ != "" { 4967 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4968 } 4969 var body io.Reader = nil 4970 c.urlParams_.Set("alt", alt) 4971 c.urlParams_.Set("prettyPrint", "false") 4972 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/connections") 4973 urls += "?" + c.urlParams_.Encode() 4974 req, err := http.NewRequest("GET", urls, body) 4975 if err != nil { 4976 return nil, err 4977 } 4978 req.Header = reqHeaders 4979 googleapi.Expand(req.URL, map[string]string{ 4980 "parent": c.parent, 4981 }) 4982 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4983} 4984 4985// Do executes the "servicenetworking.services.connections.list" call. 4986// Exactly one of *ListConnectionsResponse or error will be non-nil. Any 4987// non-2xx status code is an error. Response headers are in either 4988// *ListConnectionsResponse.ServerResponse.Header or (if a response was 4989// returned at all) in error.(*googleapi.Error).Header. Use 4990// googleapi.IsNotModified to check whether the returned error was 4991// because http.StatusNotModified was returned. 4992func (c *ServicesConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) { 4993 gensupport.SetOptions(c.urlParams_, opts...) 4994 res, err := c.doRequest("json") 4995 if res != nil && res.StatusCode == http.StatusNotModified { 4996 if res.Body != nil { 4997 res.Body.Close() 4998 } 4999 return nil, &googleapi.Error{ 5000 Code: res.StatusCode, 5001 Header: res.Header, 5002 } 5003 } 5004 if err != nil { 5005 return nil, err 5006 } 5007 defer googleapi.CloseBody(res) 5008 if err := googleapi.CheckResponse(res); err != nil { 5009 return nil, err 5010 } 5011 ret := &ListConnectionsResponse{ 5012 ServerResponse: googleapi.ServerResponse{ 5013 Header: res.Header, 5014 HTTPStatusCode: res.StatusCode, 5015 }, 5016 } 5017 target := &ret 5018 if err := gensupport.DecodeResponse(target, res); err != nil { 5019 return nil, err 5020 } 5021 return ret, nil 5022 // { 5023 // "description": "List the private connections that are configured in a service consumer's VPC network.", 5024 // "flatPath": "v1beta/services/{servicesId}/connections", 5025 // "httpMethod": "GET", 5026 // "id": "servicenetworking.services.connections.list", 5027 // "parameterOrder": [ 5028 // "parent" 5029 // ], 5030 // "parameters": { 5031 // "network": { 5032 // "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.", 5033 // "location": "query", 5034 // "type": "string" 5035 // }, 5036 // "parent": { 5037 // "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.", 5038 // "location": "path", 5039 // "pattern": "^services/[^/]+$", 5040 // "required": true, 5041 // "type": "string" 5042 // } 5043 // }, 5044 // "path": "v1beta/{+parent}/connections", 5045 // "response": { 5046 // "$ref": "ListConnectionsResponse" 5047 // }, 5048 // "scopes": [ 5049 // "https://www.googleapis.com/auth/cloud-platform", 5050 // "https://www.googleapis.com/auth/service.management" 5051 // ] 5052 // } 5053 5054} 5055