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/v1" 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/v1" 43 44import ( 45 "bytes" 46 "context" 47 "encoding/json" 48 "errors" 49 "fmt" 50 "io" 51 "net/http" 52 "net/url" 53 "strconv" 54 "strings" 55 56 googleapi "google.golang.org/api/googleapi" 57 gensupport "google.golang.org/api/internal/gensupport" 58 option "google.golang.org/api/option" 59 internaloption "google.golang.org/api/option/internaloption" 60 htransport "google.golang.org/api/transport/http" 61) 62 63// Always reference these packages, just in case the auto-generated code 64// below doesn't. 65var _ = bytes.NewBuffer 66var _ = strconv.Itoa 67var _ = fmt.Sprintf 68var _ = json.NewDecoder 69var _ = io.Copy 70var _ = url.Parse 71var _ = gensupport.MarshalJSON 72var _ = googleapi.Version 73var _ = errors.New 74var _ = strings.Replace 75var _ = context.Canceled 76var _ = internaloption.WithDefaultEndpoint 77 78const apiId = "servicenetworking:v1" 79const apiName = "servicenetworking" 80const apiVersion = "v1" 81const basePath = "https://servicenetworking.googleapis.com/" 82const mtlsBasePath = "https://servicenetworking.mtls.googleapis.com/" 83 84// OAuth2 scopes used by this API. 85const ( 86 // See, edit, configure, and delete your Google Cloud Platform data 87 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 88 89 // Manage your Google API service configuration 90 ServiceManagementScope = "https://www.googleapis.com/auth/service.management" 91) 92 93// NewService creates a new APIService. 94func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 95 scopesOption := option.WithScopes( 96 "https://www.googleapis.com/auth/cloud-platform", 97 "https://www.googleapis.com/auth/service.management", 98 ) 99 // NOTE: prepend, so we don't override user-specified scopes. 100 opts = append([]option.ClientOption{scopesOption}, opts...) 101 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 102 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 103 client, endpoint, err := htransport.NewClient(ctx, opts...) 104 if err != nil { 105 return nil, err 106 } 107 s, err := New(client) 108 if err != nil { 109 return nil, err 110 } 111 if endpoint != "" { 112 s.BasePath = endpoint 113 } 114 return s, nil 115} 116 117// New creates a new APIService. It uses the provided http.Client for requests. 118// 119// Deprecated: please use NewService instead. 120// To provide a custom HTTP client, use option.WithHTTPClient. 121// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 122func New(client *http.Client) (*APIService, error) { 123 if client == nil { 124 return nil, errors.New("client is nil") 125 } 126 s := &APIService{client: client, BasePath: basePath} 127 s.Operations = NewOperationsService(s) 128 s.Services = NewServicesService(s) 129 return s, nil 130} 131 132type APIService struct { 133 client *http.Client 134 BasePath string // API endpoint base URL 135 UserAgent string // optional additional User-Agent fragment 136 137 Operations *OperationsService 138 139 Services *ServicesService 140} 141 142func (s *APIService) userAgent() string { 143 if s.UserAgent == "" { 144 return googleapi.UserAgent 145 } 146 return googleapi.UserAgent + " " + s.UserAgent 147} 148 149func NewOperationsService(s *APIService) *OperationsService { 150 rs := &OperationsService{s: s} 151 return rs 152} 153 154type OperationsService struct { 155 s *APIService 156} 157 158func NewServicesService(s *APIService) *ServicesService { 159 rs := &ServicesService{s: s} 160 rs.Connections = NewServicesConnectionsService(s) 161 rs.DnsRecordSets = NewServicesDnsRecordSetsService(s) 162 rs.DnsZones = NewServicesDnsZonesService(s) 163 rs.Projects = NewServicesProjectsService(s) 164 rs.Roles = NewServicesRolesService(s) 165 return rs 166} 167 168type ServicesService struct { 169 s *APIService 170 171 Connections *ServicesConnectionsService 172 173 DnsRecordSets *ServicesDnsRecordSetsService 174 175 DnsZones *ServicesDnsZonesService 176 177 Projects *ServicesProjectsService 178 179 Roles *ServicesRolesService 180} 181 182func NewServicesConnectionsService(s *APIService) *ServicesConnectionsService { 183 rs := &ServicesConnectionsService{s: s} 184 return rs 185} 186 187type ServicesConnectionsService struct { 188 s *APIService 189} 190 191func NewServicesDnsRecordSetsService(s *APIService) *ServicesDnsRecordSetsService { 192 rs := &ServicesDnsRecordSetsService{s: s} 193 return rs 194} 195 196type ServicesDnsRecordSetsService struct { 197 s *APIService 198} 199 200func NewServicesDnsZonesService(s *APIService) *ServicesDnsZonesService { 201 rs := &ServicesDnsZonesService{s: s} 202 return rs 203} 204 205type ServicesDnsZonesService struct { 206 s *APIService 207} 208 209func NewServicesProjectsService(s *APIService) *ServicesProjectsService { 210 rs := &ServicesProjectsService{s: s} 211 rs.Global = NewServicesProjectsGlobalService(s) 212 return rs 213} 214 215type ServicesProjectsService struct { 216 s *APIService 217 218 Global *ServicesProjectsGlobalService 219} 220 221func NewServicesProjectsGlobalService(s *APIService) *ServicesProjectsGlobalService { 222 rs := &ServicesProjectsGlobalService{s: s} 223 rs.Networks = NewServicesProjectsGlobalNetworksService(s) 224 return rs 225} 226 227type ServicesProjectsGlobalService struct { 228 s *APIService 229 230 Networks *ServicesProjectsGlobalNetworksService 231} 232 233func NewServicesProjectsGlobalNetworksService(s *APIService) *ServicesProjectsGlobalNetworksService { 234 rs := &ServicesProjectsGlobalNetworksService{s: s} 235 rs.PeeredDnsDomains = NewServicesProjectsGlobalNetworksPeeredDnsDomainsService(s) 236 return rs 237} 238 239type ServicesProjectsGlobalNetworksService struct { 240 s *APIService 241 242 PeeredDnsDomains *ServicesProjectsGlobalNetworksPeeredDnsDomainsService 243} 244 245func NewServicesProjectsGlobalNetworksPeeredDnsDomainsService(s *APIService) *ServicesProjectsGlobalNetworksPeeredDnsDomainsService { 246 rs := &ServicesProjectsGlobalNetworksPeeredDnsDomainsService{s: s} 247 return rs 248} 249 250type ServicesProjectsGlobalNetworksPeeredDnsDomainsService struct { 251 s *APIService 252} 253 254func NewServicesRolesService(s *APIService) *ServicesRolesService { 255 rs := &ServicesRolesService{s: s} 256 return rs 257} 258 259type ServicesRolesService struct { 260 s *APIService 261} 262 263// AddDnsRecordSetMetadata: Metadata provided through GetOperation 264// request for the LRO generated by AddDnsRecordSet API 265type AddDnsRecordSetMetadata struct { 266} 267 268// AddDnsRecordSetRequest: Request to add a record set to a private 269// managed DNS zone in the shared producer host project. 270type AddDnsRecordSetRequest struct { 271 // ConsumerNetwork: Required. The network that the consumer is using to 272 // connect with services. Must be in the form of 273 // projects/{project}/global/networks/{network} {project} is the project 274 // number, as in '12345' {network} is the network name. 275 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 276 277 // DnsRecordSet: Required. The DNS record set to add. 278 DnsRecordSet *DnsRecordSet `json:"dnsRecordSet,omitempty"` 279 280 // Zone: Required. The name of the private DNS zone in the shared 281 // producer host project to which the record set will be added. 282 Zone string `json:"zone,omitempty"` 283 284 // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to 285 // unconditionally include in API requests. By default, fields with 286 // empty values are omitted from API requests. However, any non-pointer, 287 // non-interface field appearing in ForceSendFields will be sent to the 288 // server regardless of whether the field is empty or not. This may be 289 // used to include empty fields in Patch requests. 290 ForceSendFields []string `json:"-"` 291 292 // NullFields is a list of field names (e.g. "ConsumerNetwork") to 293 // include in API requests with the JSON null value. By default, fields 294 // with empty values are omitted from API requests. However, any field 295 // with an empty value appearing in NullFields will be sent to the 296 // server as null. It is an error if a field in this list has a 297 // non-empty value. This may be used to include null fields in Patch 298 // requests. 299 NullFields []string `json:"-"` 300} 301 302func (s *AddDnsRecordSetRequest) MarshalJSON() ([]byte, error) { 303 type NoMethod AddDnsRecordSetRequest 304 raw := NoMethod(*s) 305 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 306} 307 308// AddDnsZoneMetadata: Metadata provided through GetOperation request 309// for the LRO generated by AddDnsZone API 310type AddDnsZoneMetadata struct { 311} 312 313// AddDnsZoneRequest: Request to add a private managed DNS zone in the 314// shared producer host project and a matching DNS peering zone in the 315// consumer project. 316type AddDnsZoneRequest struct { 317 // ConsumerNetwork: Required. The network that the consumer is using to 318 // connect with services. Must be in the form of 319 // projects/{project}/global/networks/{network} {project} is the project 320 // number, as in '12345' {network} is the network name. 321 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 322 323 // DnsSuffix: Required. The DNS name suffix for the zones e.g. 324 // `example.com`. 325 DnsSuffix string `json:"dnsSuffix,omitempty"` 326 327 // Name: Required. The name for both the private zone in the shared 328 // producer host project and the peering zone in the consumer project. 329 // Must be unique within both projects. The name must be 1-63 characters 330 // long, must begin with a letter, end with a letter or digit, and only 331 // contain lowercase letters, digits or dashes. 332 Name string `json:"name,omitempty"` 333 334 // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to 335 // unconditionally include in API requests. By default, fields with 336 // empty values are omitted from API requests. However, any non-pointer, 337 // non-interface field appearing in ForceSendFields will be sent to the 338 // server regardless of whether the field is empty or not. This may be 339 // used to include empty fields in Patch requests. 340 ForceSendFields []string `json:"-"` 341 342 // NullFields is a list of field names (e.g. "ConsumerNetwork") to 343 // include in API requests with the JSON null value. By default, fields 344 // with empty values are omitted from API requests. However, any field 345 // with an empty value appearing in NullFields will be sent to the 346 // server as null. It is an error if a field in this list has a 347 // non-empty value. This may be used to include null fields in Patch 348 // requests. 349 NullFields []string `json:"-"` 350} 351 352func (s *AddDnsZoneRequest) MarshalJSON() ([]byte, error) { 353 type NoMethod AddDnsZoneRequest 354 raw := NoMethod(*s) 355 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 356} 357 358// AddDnsZoneResponse: Represents managed DNS zones created in the 359// shared producer host and consumer projects. 360type AddDnsZoneResponse struct { 361 // ConsumerPeeringZone: The DNS peering zone created in the consumer 362 // project. 363 ConsumerPeeringZone *DnsZone `json:"consumerPeeringZone,omitempty"` 364 365 // ProducerPrivateZone: The private DNS zone created in the shared 366 // producer host project. 367 ProducerPrivateZone *DnsZone `json:"producerPrivateZone,omitempty"` 368 369 // ForceSendFields is a list of field names (e.g. "ConsumerPeeringZone") 370 // to unconditionally include in API requests. By default, fields with 371 // empty values are omitted from API requests. However, any non-pointer, 372 // non-interface field appearing in ForceSendFields will be sent to the 373 // server regardless of whether the field is empty or not. This may be 374 // used to include empty fields in Patch requests. 375 ForceSendFields []string `json:"-"` 376 377 // NullFields is a list of field names (e.g. "ConsumerPeeringZone") to 378 // include in API requests with the JSON null value. By default, fields 379 // with empty values are omitted from API requests. However, any field 380 // with an empty value appearing in NullFields will be sent to the 381 // server as null. It is an error if a field in this list has a 382 // non-empty value. This may be used to include null fields in Patch 383 // requests. 384 NullFields []string `json:"-"` 385} 386 387func (s *AddDnsZoneResponse) MarshalJSON() ([]byte, error) { 388 type NoMethod AddDnsZoneResponse 389 raw := NoMethod(*s) 390 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 391} 392 393// AddRolesMetadata: Metadata provided through GetOperation request for 394// the LRO generated by AddRoles API 395type AddRolesMetadata struct { 396} 397 398// AddRolesRequest: Request for AddRoles to allow Service Producers to 399// add roles in the shared VPC host project for them to use. 400type AddRolesRequest struct { 401 // ConsumerNetwork: Required. The network that the consumer is using to 402 // connect with services. Must be in the form of 403 // projects/{project}/global/networks/{network} {project} is a project 404 // number, as in '12345' {network} is a network name. 405 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 406 407 // PolicyBinding: Required. List of policy bindings to add to shared VPC 408 // host project. 409 PolicyBinding []*PolicyBinding `json:"policyBinding,omitempty"` 410 411 // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to 412 // unconditionally include in API requests. By default, fields with 413 // empty values are omitted from API requests. However, any non-pointer, 414 // non-interface field appearing in ForceSendFields will be sent to the 415 // server regardless of whether the field is empty or not. This may be 416 // used to include empty fields in Patch requests. 417 ForceSendFields []string `json:"-"` 418 419 // NullFields is a list of field names (e.g. "ConsumerNetwork") to 420 // include in API requests with the JSON null value. By default, fields 421 // with empty values are omitted from API requests. However, any field 422 // with an empty value appearing in NullFields will be sent to the 423 // server as null. It is an error if a field in this list has a 424 // non-empty value. This may be used to include null fields in Patch 425 // requests. 426 NullFields []string `json:"-"` 427} 428 429func (s *AddRolesRequest) MarshalJSON() ([]byte, error) { 430 type NoMethod AddRolesRequest 431 raw := NoMethod(*s) 432 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 433} 434 435// AddRolesResponse: Represents IAM roles added to the shared VPC host 436// project. 437type AddRolesResponse struct { 438 // PolicyBinding: Required. List of policy bindings that were added to 439 // the shared VPC host project. 440 PolicyBinding []*PolicyBinding `json:"policyBinding,omitempty"` 441 442 // ForceSendFields is a list of field names (e.g. "PolicyBinding") to 443 // unconditionally include in API requests. By default, fields with 444 // empty values are omitted from API requests. However, any non-pointer, 445 // non-interface field appearing in ForceSendFields will be sent to the 446 // server regardless of whether the field is empty or not. This may be 447 // used to include empty fields in Patch requests. 448 ForceSendFields []string `json:"-"` 449 450 // NullFields is a list of field names (e.g. "PolicyBinding") to include 451 // in API requests with the JSON null value. By default, fields with 452 // empty values are omitted from API requests. However, any field with 453 // an empty value appearing in NullFields will be sent to the server as 454 // null. It is an error if a field in this list has a non-empty value. 455 // This may be used to include null fields in Patch requests. 456 NullFields []string `json:"-"` 457} 458 459func (s *AddRolesResponse) MarshalJSON() ([]byte, error) { 460 type NoMethod AddRolesResponse 461 raw := NoMethod(*s) 462 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 463} 464 465// AddSubnetworkRequest: Request to create a subnetwork in a previously 466// peered service network. 467type AddSubnetworkRequest struct { 468 // Consumer: Required. A resource that represents the service consumer, 469 // such as `projects/123456`. The project number can be different from 470 // the value in the consumer network parameter. For example, the network 471 // might be part of a Shared VPC network. In those cases, Service 472 // Networking validates that this resource belongs to that Shared VPC. 473 Consumer string `json:"consumer,omitempty"` 474 475 // ConsumerNetwork: Required. The name of the service consumer's VPC 476 // network. The network must have an existing private connection that 477 // was provisioned through the connections.create method. The name must 478 // be in the following format: 479 // `projects/{project}/global/networks/{network}`, where {project} is a 480 // project number, such as `12345`. {network} is the name of a VPC 481 // network in the project. 482 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 483 484 // Description: Optional. Description of the subnet. 485 Description string `json:"description,omitempty"` 486 487 // IpPrefixLength: Required. The prefix length of the subnet's IP 488 // address range. Use CIDR range notation, such as `30` to provision a 489 // subnet with an `x.x.x.x/30` CIDR range. The IP address range is drawn 490 // from a pool of available ranges in the service consumer's allocated 491 // range. 492 IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` 493 494 // Region: Required. The name of a region (/compute/docs/regions-zones) 495 // for the subnet, such `europe-west1`. 496 Region string `json:"region,omitempty"` 497 498 // RequestedAddress: Optional. The starting address of a range. The 499 // address must be a valid IPv4 address in the x.x.x.x format. This 500 // value combined with the IP prefix range is the CIDR range for the 501 // subnet. The range must be within the allocated range that is assigned 502 // to the private connection. If the CIDR range isn't available, the 503 // call fails. 504 RequestedAddress string `json:"requestedAddress,omitempty"` 505 506 // RequestedRanges: Optional. The name of one or more allocated IP 507 // address ranges associated with this private service access 508 // connection. If no range names are provided all ranges associated with 509 // this connection will be considered. If a CIDR range with the 510 // specified IP prefix length is not available within these ranges, the 511 // call fails. 512 RequestedRanges []string `json:"requestedRanges,omitempty"` 513 514 // SecondaryIpRangeSpecs: Optional. A list of secondary IP ranges to be 515 // created within the new subnetwork. 516 SecondaryIpRangeSpecs []*SecondaryIpRangeSpec `json:"secondaryIpRangeSpecs,omitempty"` 517 518 // Subnetwork: Required. A name for the new subnet. For information 519 // about the naming requirements, see subnetwork 520 // (/compute/docs/reference/rest/v1/subnetworks) in the Compute API 521 // documentation. 522 Subnetwork string `json:"subnetwork,omitempty"` 523 524 // SubnetworkUsers: A list of members that are granted the 525 // `compute.networkUser` role on the subnet. 526 SubnetworkUsers []string `json:"subnetworkUsers,omitempty"` 527 528 // ForceSendFields is a list of field names (e.g. "Consumer") to 529 // unconditionally include in API requests. By default, fields with 530 // empty values are omitted from API requests. However, any non-pointer, 531 // non-interface field appearing in ForceSendFields will be sent to the 532 // server regardless of whether the field is empty or not. This may be 533 // used to include empty fields in Patch requests. 534 ForceSendFields []string `json:"-"` 535 536 // NullFields is a list of field names (e.g. "Consumer") to include in 537 // API requests with the JSON null value. By default, fields with empty 538 // values are omitted from API requests. However, any field with an 539 // empty value appearing in NullFields will be sent to the server as 540 // null. It is an error if a field in this list has a non-empty value. 541 // This may be used to include null fields in Patch requests. 542 NullFields []string `json:"-"` 543} 544 545func (s *AddSubnetworkRequest) MarshalJSON() ([]byte, error) { 546 type NoMethod AddSubnetworkRequest 547 raw := NoMethod(*s) 548 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 549} 550 551// Api: Api is a light-weight descriptor for an API Interface. 552// Interfaces are also described as "protocol buffer services" in some 553// contexts, such as by the "service" keyword in a .proto file, but they 554// are different from API Services, which represent a concrete 555// implementation of an interface as opposed to simply a description of 556// methods and bindings. They are also sometimes simply referred to as 557// "APIs" in other contexts, such as the name of this message itself. 558// See https://cloud.google.com/apis/design/glossary for detailed 559// terminology. 560type Api struct { 561 // Methods: The methods of this interface, in unspecified order. 562 Methods []*Method `json:"methods,omitempty"` 563 564 // Mixins: Included interfaces. See Mixin. 565 Mixins []*Mixin `json:"mixins,omitempty"` 566 567 // Name: The fully qualified name of this interface, including package 568 // name followed by the interface's simple name. 569 Name string `json:"name,omitempty"` 570 571 // Options: Any metadata attached to the interface. 572 Options []*Option `json:"options,omitempty"` 573 574 // SourceContext: Source context for the protocol buffer service 575 // represented by this message. 576 SourceContext *SourceContext `json:"sourceContext,omitempty"` 577 578 // Syntax: The source syntax of the service. 579 // 580 // Possible values: 581 // "SYNTAX_PROTO2" - Syntax `proto2`. 582 // "SYNTAX_PROTO3" - Syntax `proto3`. 583 Syntax string `json:"syntax,omitempty"` 584 585 // Version: A version string for this interface. If specified, must have 586 // the form `major-version.minor-version`, as in `1.10`. If the minor 587 // version is omitted, it defaults to zero. If the entire version field 588 // is empty, the major version is derived from the package name, as 589 // outlined below. If the field is not empty, the version in the package 590 // name will be verified to be consistent with what is provided here. 591 // The versioning schema uses semantic versioning (http://semver.org) 592 // where the major version number indicates a breaking change and the 593 // minor version an additive, non-breaking change. Both version numbers 594 // are signals to users what to expect from different versions, and 595 // should be carefully chosen based on the product plan. The major 596 // version is also reflected in the package name of the interface, which 597 // must end in `v`, as in `google.feature.v1`. For major versions 0 and 598 // 1, the suffix can be omitted. Zero major versions must only be used 599 // for experimental, non-GA interfaces. 600 Version string `json:"version,omitempty"` 601 602 // ForceSendFields is a list of field names (e.g. "Methods") to 603 // unconditionally include in API requests. By default, fields with 604 // empty values are omitted from API requests. However, any non-pointer, 605 // non-interface field appearing in ForceSendFields will be sent to the 606 // server regardless of whether the field is empty or not. This may be 607 // used to include empty fields in Patch requests. 608 ForceSendFields []string `json:"-"` 609 610 // NullFields is a list of field names (e.g. "Methods") to include in 611 // API requests with the JSON null value. By default, fields with empty 612 // values are omitted from API requests. However, any field with an 613 // empty value appearing in NullFields will be sent to the server as 614 // null. It is an error if a field in this list has a non-empty value. 615 // This may be used to include null fields in Patch requests. 616 NullFields []string `json:"-"` 617} 618 619func (s *Api) MarshalJSON() ([]byte, error) { 620 type NoMethod Api 621 raw := NoMethod(*s) 622 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 623} 624 625// AuthProvider: Configuration for an authentication provider, including 626// support for JSON Web Token (JWT) 627// (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). 628type AuthProvider struct { 629 // Audiences: The list of JWT audiences 630 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). 631 // that are allowed to access. A JWT containing any of these audiences 632 // will be accepted. When this setting is absent, JWTs with audiences: - 633 // "https://[service.name]/[google.protobuf.Api.name]" - 634 // "https://[service.name]/" will be accepted. For example, if no 635 // audiences are in the setting, LibraryService API will accept JWTs 636 // with the following audiences: - 637 // https://library-example.googleapis.com/google.example.library.v1.LibraryService 638 // - https://library-example.googleapis.com/ Example: audiences: 639 // bookstore_android.apps.googleusercontent.com, 640 // bookstore_web.apps.googleusercontent.com 641 Audiences string `json:"audiences,omitempty"` 642 643 // AuthorizationUrl: Redirect URL if JWT token is required but not 644 // present or is expired. Implement authorizationUrl of 645 // securityDefinitions in OpenAPI spec. 646 AuthorizationUrl string `json:"authorizationUrl,omitempty"` 647 648 // Id: The unique identifier of the auth provider. It will be referred 649 // to by `AuthRequirement.provider_id`. Example: "bookstore_auth". 650 Id string `json:"id,omitempty"` 651 652 // Issuer: Identifies the principal that issued the JWT. See 653 // https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 654 // Usually a URL or an email address. Example: 655 // https://securetoken.google.com Example: 656 // 1234567-compute@developer.gserviceaccount.com 657 Issuer string `json:"issuer,omitempty"` 658 659 // JwksUri: URL of the provider's public key set to validate signature 660 // of the JWT. See OpenID Discovery 661 // (https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). 662 // Optional if the key set document: - can be retrieved from OpenID 663 // Discovery 664 // (https://openid.net/specs/openid-connect-discovery-1_0.html) of the 665 // issuer. - can be inferred from the email domain of the issuer (e.g. a 666 // Google service account). Example: 667 // https://www.googleapis.com/oauth2/v1/certs 668 JwksUri string `json:"jwksUri,omitempty"` 669 670 // JwtLocations: Defines the locations to extract the JWT. JWT locations 671 // can be either from HTTP headers or URL query parameters. The rule is 672 // that the first match wins. The checking order is: checking all 673 // headers first, then URL query parameters. If not specified, default 674 // to use following 3 locations: 1) Authorization: Bearer 2) 675 // x-goog-iap-jwt-assertion 3) access_token query parameter Default 676 // locations can be specified as followings: jwt_locations: - header: 677 // Authorization value_prefix: "Bearer " - header: 678 // x-goog-iap-jwt-assertion - query: access_token 679 JwtLocations []*JwtLocation `json:"jwtLocations,omitempty"` 680 681 // ForceSendFields is a list of field names (e.g. "Audiences") to 682 // unconditionally include in API requests. By default, fields with 683 // empty values are omitted from API requests. However, any non-pointer, 684 // non-interface field appearing in ForceSendFields will be sent to the 685 // server regardless of whether the field is empty or not. This may be 686 // used to include empty fields in Patch requests. 687 ForceSendFields []string `json:"-"` 688 689 // NullFields is a list of field names (e.g. "Audiences") to include in 690 // API requests with the JSON null value. By default, fields with empty 691 // values are omitted from API requests. However, any field with an 692 // empty value appearing in NullFields will be sent to the server as 693 // null. It is an error if a field in this list has a non-empty value. 694 // This may be used to include null fields in Patch requests. 695 NullFields []string `json:"-"` 696} 697 698func (s *AuthProvider) MarshalJSON() ([]byte, error) { 699 type NoMethod AuthProvider 700 raw := NoMethod(*s) 701 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 702} 703 704// AuthRequirement: User-defined authentication requirements, including 705// support for JSON Web Token (JWT) 706// (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). 707type AuthRequirement struct { 708 // Audiences: NOTE: This will be deprecated soon, once 709 // AuthProvider.audiences is implemented and accepted in all the runtime 710 // components. The list of JWT audiences 711 // (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). 712 // that are allowed to access. A JWT containing any of these audiences 713 // will be accepted. When this setting is absent, only JWTs with 714 // audience "https://Service_name/API_name" will be accepted. For 715 // example, if no audiences are in the setting, LibraryService API will 716 // only accept JWTs with the following audience 717 // "https://library-example.googleapis.com/google.example.library.v1.Libr 718 // aryService". Example: audiences: 719 // bookstore_android.apps.googleusercontent.com, 720 // bookstore_web.apps.googleusercontent.com 721 Audiences string `json:"audiences,omitempty"` 722 723 // ProviderId: id from authentication provider. Example: provider_id: 724 // bookstore_auth 725 ProviderId string `json:"providerId,omitempty"` 726 727 // ForceSendFields is a list of field names (e.g. "Audiences") to 728 // unconditionally include in API requests. By default, fields with 729 // empty values are omitted from API requests. However, any non-pointer, 730 // non-interface field appearing in ForceSendFields will be sent to the 731 // server regardless of whether the field is empty or not. This may be 732 // used to include empty fields in Patch requests. 733 ForceSendFields []string `json:"-"` 734 735 // NullFields is a list of field names (e.g. "Audiences") to include in 736 // API requests with the JSON null value. By default, fields with empty 737 // values are omitted from API requests. However, any field with an 738 // empty value appearing in NullFields will be sent to the server as 739 // null. It is an error if a field in this list has a non-empty value. 740 // This may be used to include null fields in Patch requests. 741 NullFields []string `json:"-"` 742} 743 744func (s *AuthRequirement) MarshalJSON() ([]byte, error) { 745 type NoMethod AuthRequirement 746 raw := NoMethod(*s) 747 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 748} 749 750// Authentication: `Authentication` defines the authentication 751// configuration for API methods provided by an API service. Example: 752// name: calendar.googleapis.com authentication: providers: - id: 753// google_calendar_auth jwks_uri: 754// https://www.googleapis.com/oauth2/v1/certs issuer: 755// https://securetoken.google.com rules: - selector: "*" requirements: 756// provider_id: google_calendar_auth - selector: 757// google.calendar.Delegate oauth: canonical_scopes: 758// https://www.googleapis.com/auth/calendar.read 759type Authentication struct { 760 // Providers: Defines a set of authentication providers that a service 761 // supports. 762 Providers []*AuthProvider `json:"providers,omitempty"` 763 764 // Rules: A list of authentication rules that apply to individual API 765 // methods. **NOTE:** All service configuration rules follow "last one 766 // wins" order. 767 Rules []*AuthenticationRule `json:"rules,omitempty"` 768 769 // ForceSendFields is a list of field names (e.g. "Providers") to 770 // unconditionally include in API requests. By default, fields with 771 // empty values are omitted from API requests. However, any non-pointer, 772 // non-interface field appearing in ForceSendFields will be sent to the 773 // server regardless of whether the field is empty or not. This may be 774 // used to include empty fields in Patch requests. 775 ForceSendFields []string `json:"-"` 776 777 // NullFields is a list of field names (e.g. "Providers") to include in 778 // API requests with the JSON null value. By default, fields with empty 779 // values are omitted from API requests. However, any field with an 780 // empty value appearing in NullFields will be sent to the server as 781 // null. It is an error if a field in this list has a non-empty value. 782 // This may be used to include null fields in Patch requests. 783 NullFields []string `json:"-"` 784} 785 786func (s *Authentication) MarshalJSON() ([]byte, error) { 787 type NoMethod Authentication 788 raw := NoMethod(*s) 789 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 790} 791 792// AuthenticationRule: Authentication rules for the service. By default, 793// if a method has any authentication requirements, every request must 794// include a valid credential matching one of the requirements. It's an 795// error to include more than one kind of credential in a single 796// request. If a method doesn't have any auth requirements, request 797// credentials will be ignored. 798type AuthenticationRule struct { 799 // AllowWithoutCredential: If true, the service accepts API keys without 800 // any other credential. This flag only applies to HTTP and gRPC 801 // requests. 802 AllowWithoutCredential bool `json:"allowWithoutCredential,omitempty"` 803 804 // Oauth: The requirements for OAuth credentials. 805 Oauth *OAuthRequirements `json:"oauth,omitempty"` 806 807 // Requirements: Requirements for additional authentication providers. 808 Requirements []*AuthRequirement `json:"requirements,omitempty"` 809 810 // Selector: Selects the methods to which this rule applies. Refer to 811 // selector for syntax details. 812 Selector string `json:"selector,omitempty"` 813 814 // ForceSendFields is a list of field names (e.g. 815 // "AllowWithoutCredential") to unconditionally include in API requests. 816 // By default, fields with empty values are omitted from API requests. 817 // However, any non-pointer, non-interface field appearing in 818 // ForceSendFields will be sent to the server regardless of whether the 819 // field is empty or not. This may be used to include empty fields in 820 // Patch requests. 821 ForceSendFields []string `json:"-"` 822 823 // NullFields is a list of field names (e.g. "AllowWithoutCredential") 824 // to include in API requests with the JSON null value. By default, 825 // fields with empty values are omitted from API requests. However, any 826 // field with an empty value appearing in NullFields will be sent to the 827 // server as null. It is an error if a field in this list has a 828 // non-empty value. This may be used to include null fields in Patch 829 // requests. 830 NullFields []string `json:"-"` 831} 832 833func (s *AuthenticationRule) MarshalJSON() ([]byte, error) { 834 type NoMethod AuthenticationRule 835 raw := NoMethod(*s) 836 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 837} 838 839// Backend: `Backend` defines the backend configuration for a service. 840type Backend struct { 841 // Rules: A list of API backend rules that apply to individual API 842 // methods. **NOTE:** All service configuration rules follow "last one 843 // wins" order. 844 Rules []*BackendRule `json:"rules,omitempty"` 845 846 // ForceSendFields is a list of field names (e.g. "Rules") to 847 // unconditionally include in API requests. By default, fields with 848 // empty values are omitted from API requests. However, any non-pointer, 849 // non-interface field appearing in ForceSendFields will be sent to the 850 // server regardless of whether the field is empty or not. This may be 851 // used to include empty fields in Patch requests. 852 ForceSendFields []string `json:"-"` 853 854 // NullFields is a list of field names (e.g. "Rules") to include in API 855 // requests with the JSON null value. By default, fields with empty 856 // values are omitted from API requests. However, any field with an 857 // empty value appearing in NullFields will be sent to the server as 858 // null. It is an error if a field in this list has a non-empty value. 859 // This may be used to include null fields in Patch requests. 860 NullFields []string `json:"-"` 861} 862 863func (s *Backend) MarshalJSON() ([]byte, error) { 864 type NoMethod Backend 865 raw := NoMethod(*s) 866 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 867} 868 869// BackendRule: A backend rule provides configuration for an individual 870// API element. 871type BackendRule struct { 872 // Address: The address of the API backend. The scheme is used to 873 // determine the backend protocol and security. The following schemes 874 // are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// 875 // HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to 876 // explicitly include a scheme. Leaving out the scheme may cause 877 // constrasting behaviors across platforms. If the port is unspecified, 878 // the default is: - 80 for schemes without TLS - 443 for schemes with 879 // TLS For HTTP backends, use protocol to specify the protocol version. 880 Address string `json:"address,omitempty"` 881 882 // Deadline: The number of seconds to wait for a response from a 883 // request. The default varies based on the request protocol and 884 // deployment environment. 885 Deadline float64 `json:"deadline,omitempty"` 886 887 // DisableAuth: When disable_auth is true, a JWT ID token won't be 888 // generated and the original "Authorization" HTTP header will be 889 // preserved. If the header is used to carry the original token and is 890 // expected by the backend, this field must be set to true to preserve 891 // the header. 892 DisableAuth bool `json:"disableAuth,omitempty"` 893 894 // JwtAudience: The JWT audience is used when generating a JWT ID token 895 // for the backend. This ID token will be added in the HTTP 896 // "authorization" header, and sent to the backend. 897 JwtAudience string `json:"jwtAudience,omitempty"` 898 899 // MinDeadline: Minimum deadline in seconds needed for this method. 900 // Calls having deadline value lower than this will be rejected. 901 MinDeadline float64 `json:"minDeadline,omitempty"` 902 903 // OperationDeadline: The number of seconds to wait for the completion 904 // of a long running operation. The default is no deadline. 905 OperationDeadline float64 `json:"operationDeadline,omitempty"` 906 907 // Possible values: 908 // "PATH_TRANSLATION_UNSPECIFIED" 909 // "CONSTANT_ADDRESS" - Use the backend address as-is, with no 910 // modification to the path. If the URL pattern contains variables, the 911 // variable names and values will be appended to the query string. If a 912 // query string parameter and a URL pattern variable have the same name, 913 // this may result in duplicate keys in the query string. # Examples 914 // Given the following operation config: Method path: 915 // /api/company/{cid}/user/{uid} Backend address: 916 // https://example.cloudfunctions.net/getUser Requests to the following 917 // request paths will call the backend at the translated path: Request 918 // path: /api/company/widgetworks/user/johndoe Translated: 919 // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe 920 // Request path: /api/company/widgetworks/user/johndoe?timezone=EST 921 // Translated: 922 // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe 923 // "APPEND_PATH_TO_ADDRESS" - The request path will be appended to the 924 // backend address. # Examples Given the following operation config: 925 // Method path: /api/company/{cid}/user/{uid} Backend address: 926 // https://example.appspot.com Requests to the following request paths 927 // will call the backend at the translated path: Request path: 928 // /api/company/widgetworks/user/johndoe Translated: 929 // https://example.appspot.com/api/company/widgetworks/user/johndoe 930 // Request path: /api/company/widgetworks/user/johndoe?timezone=EST 931 // Translated: 932 // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST 933 PathTranslation string `json:"pathTranslation,omitempty"` 934 935 // Protocol: The protocol used for sending a request to the backend. The 936 // supported values are "http/1.1" and "h2". The default value is 937 // inferred from the scheme in the address field: SCHEME PROTOCOL 938 // http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure 939 // HTTP backends (https://) that support HTTP/2, set this field to "h2" 940 // for improved performance. Configuring this field to non-default 941 // values is only supported for secure HTTP backends. This field will be 942 // ignored for all other backends. See 943 // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids 944 // for more details on the supported values. 945 Protocol string `json:"protocol,omitempty"` 946 947 // Selector: Selects the methods to which this rule applies. Refer to 948 // selector for syntax details. 949 Selector string `json:"selector,omitempty"` 950 951 // ForceSendFields is a list of field names (e.g. "Address") to 952 // unconditionally include in API requests. By default, fields with 953 // empty values are omitted from API requests. However, any non-pointer, 954 // non-interface field appearing in ForceSendFields will be sent to the 955 // server regardless of whether the field is empty or not. This may be 956 // used to include empty fields in Patch requests. 957 ForceSendFields []string `json:"-"` 958 959 // NullFields is a list of field names (e.g. "Address") to include in 960 // API requests with the JSON null value. By default, fields with empty 961 // values are omitted from API requests. However, any field with an 962 // empty value appearing in NullFields will be sent to the server as 963 // null. It is an error if a field in this list has a non-empty value. 964 // This may be used to include null fields in Patch requests. 965 NullFields []string `json:"-"` 966} 967 968func (s *BackendRule) MarshalJSON() ([]byte, error) { 969 type NoMethod BackendRule 970 raw := NoMethod(*s) 971 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 972} 973 974func (s *BackendRule) UnmarshalJSON(data []byte) error { 975 type NoMethod BackendRule 976 var s1 struct { 977 Deadline gensupport.JSONFloat64 `json:"deadline"` 978 MinDeadline gensupport.JSONFloat64 `json:"minDeadline"` 979 OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` 980 *NoMethod 981 } 982 s1.NoMethod = (*NoMethod)(s) 983 if err := json.Unmarshal(data, &s1); err != nil { 984 return err 985 } 986 s.Deadline = float64(s1.Deadline) 987 s.MinDeadline = float64(s1.MinDeadline) 988 s.OperationDeadline = float64(s1.OperationDeadline) 989 return nil 990} 991 992// Billing: Billing related configuration of the service. The following 993// example shows how to configure monitored resources and metrics for 994// billing, `consumer_destinations` is the only supported destination 995// and the monitored resources need at least one label key 996// `cloud.googleapis.com/location` to indicate the location of the 997// billing usage, using different monitored resources between monitoring 998// and billing is recommended so they can be evolved independently: 999// monitored_resources: - type: library.googleapis.com/billing_branch 1000// labels: - key: cloud.googleapis.com/location description: | 1001// Predefined label to support billing location restriction. - key: city 1002// description: | Custom label to define the city where the library 1003// branch is located in. - key: name description: Custom label to define 1004// the name of the library branch. metrics: - name: 1005// library.googleapis.com/book/borrowed_count metric_kind: DELTA 1006// value_type: INT64 unit: "1" billing: consumer_destinations: - 1007// monitored_resource: library.googleapis.com/billing_branch metrics: - 1008// library.googleapis.com/book/borrowed_count 1009type Billing struct { 1010 // ConsumerDestinations: Billing configurations for sending metrics to 1011 // the consumer project. There can be multiple consumer destinations per 1012 // service, each one must have a different monitored resource type. A 1013 // metric can be used in at most one consumer destination. 1014 ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"` 1015 1016 // ForceSendFields is a list of field names (e.g. 1017 // "ConsumerDestinations") to unconditionally include in API requests. 1018 // By default, fields with empty values are omitted from API requests. 1019 // However, any non-pointer, non-interface field appearing in 1020 // ForceSendFields will be sent to the server regardless of whether the 1021 // field is empty or not. This may be used to include empty fields in 1022 // Patch requests. 1023 ForceSendFields []string `json:"-"` 1024 1025 // NullFields is a list of field names (e.g. "ConsumerDestinations") to 1026 // include in API requests with the JSON null value. By default, fields 1027 // with empty values are omitted from API requests. However, any field 1028 // with an empty value appearing in NullFields will be sent to the 1029 // server as null. It is an error if a field in this list has a 1030 // non-empty value. This may be used to include null fields in Patch 1031 // requests. 1032 NullFields []string `json:"-"` 1033} 1034 1035func (s *Billing) MarshalJSON() ([]byte, error) { 1036 type NoMethod Billing 1037 raw := NoMethod(*s) 1038 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1039} 1040 1041// BillingDestination: Configuration of a specific billing destination 1042// (Currently only support bill against consumer project). 1043type BillingDestination struct { 1044 // Metrics: Names of the metrics to report to this billing destination. 1045 // Each name must be defined in Service.metrics section. 1046 Metrics []string `json:"metrics,omitempty"` 1047 1048 // MonitoredResource: The monitored resource type. The type must be 1049 // defined in Service.monitored_resources section. 1050 MonitoredResource string `json:"monitoredResource,omitempty"` 1051 1052 // ForceSendFields is a list of field names (e.g. "Metrics") to 1053 // unconditionally include in API requests. By default, fields with 1054 // empty values are omitted from API requests. However, any non-pointer, 1055 // non-interface field appearing in ForceSendFields will be sent to the 1056 // server regardless of whether the field is empty or not. This may be 1057 // used to include empty fields in Patch requests. 1058 ForceSendFields []string `json:"-"` 1059 1060 // NullFields is a list of field names (e.g. "Metrics") to include in 1061 // API requests with the JSON null value. By default, fields with empty 1062 // values are omitted from API requests. However, any field with an 1063 // empty value appearing in NullFields will be sent to the server as 1064 // null. It is an error if a field in this list has a non-empty value. 1065 // This may be used to include null fields in Patch requests. 1066 NullFields []string `json:"-"` 1067} 1068 1069func (s *BillingDestination) MarshalJSON() ([]byte, error) { 1070 type NoMethod BillingDestination 1071 raw := NoMethod(*s) 1072 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1073} 1074 1075// CancelOperationRequest: The request message for 1076// Operations.CancelOperation. 1077type CancelOperationRequest struct { 1078} 1079 1080// Connection: Represents a private connection resource. A private 1081// connection is implemented as a VPC Network Peering connection between 1082// a service producer's VPC network and a service consumer's VPC 1083// network. 1084type Connection struct { 1085 // Network: The name of service consumer's VPC network that's connected 1086 // with service producer network, in the following format: 1087 // `projects/{project}/global/networks/{network}`. `{project}` is a 1088 // project number, such as in `12345` that includes the VPC service 1089 // consumer's VPC network. `{network}` is the name of the service 1090 // consumer's VPC network. 1091 Network string `json:"network,omitempty"` 1092 1093 // Peering: Output only. The name of the VPC Network Peering connection 1094 // that was created by the service producer. 1095 Peering string `json:"peering,omitempty"` 1096 1097 // ReservedPeeringRanges: The name of one or more allocated IP address 1098 // ranges for this service producer of type `PEERING`. Note that 1099 // invoking CreateConnection method with a different range when 1100 // connection is already established will not modify already provisioned 1101 // service producer subnetworks. If CreateConnection method is invoked 1102 // repeatedly to reconnect when peering connection had been disconnected 1103 // on the consumer side, leaving this field empty will restore 1104 // previously allocated IP ranges. 1105 ReservedPeeringRanges []string `json:"reservedPeeringRanges,omitempty"` 1106 1107 // Service: Output only. The name of the peering service that's 1108 // associated with this connection, in the following format: 1109 // `services/{service name}`. 1110 Service string `json:"service,omitempty"` 1111 1112 // ForceSendFields is a list of field names (e.g. "Network") to 1113 // unconditionally include in API requests. By default, fields with 1114 // empty values are omitted from API requests. However, any non-pointer, 1115 // non-interface field appearing in ForceSendFields will be sent to the 1116 // server regardless of whether the field is empty or not. This may be 1117 // used to include empty fields in Patch requests. 1118 ForceSendFields []string `json:"-"` 1119 1120 // NullFields is a list of field names (e.g. "Network") to include in 1121 // API requests with the JSON null value. By default, fields with empty 1122 // values are omitted from API requests. However, any field with an 1123 // empty value appearing in NullFields will be sent to the server as 1124 // null. It is an error if a field in this list has a non-empty value. 1125 // This may be used to include null fields in Patch requests. 1126 NullFields []string `json:"-"` 1127} 1128 1129func (s *Connection) MarshalJSON() ([]byte, error) { 1130 type NoMethod Connection 1131 raw := NoMethod(*s) 1132 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1133} 1134 1135// ConsumerConfig: Configuration information for a private service 1136// access connection. 1137type ConsumerConfig struct { 1138 // ConsumerExportCustomRoutes: Export custom routes flag value for 1139 // peering from consumer to producer. 1140 ConsumerExportCustomRoutes bool `json:"consumerExportCustomRoutes,omitempty"` 1141 1142 // ConsumerExportSubnetRoutesWithPublicIp: Export subnet routes with 1143 // public ip flag value for peering from consumer to producer. 1144 ConsumerExportSubnetRoutesWithPublicIp bool `json:"consumerExportSubnetRoutesWithPublicIp,omitempty"` 1145 1146 // ConsumerImportCustomRoutes: Import custom routes flag value for 1147 // peering from consumer to producer. 1148 ConsumerImportCustomRoutes bool `json:"consumerImportCustomRoutes,omitempty"` 1149 1150 // ConsumerImportSubnetRoutesWithPublicIp: Import subnet routes with 1151 // public ip flag value for peering from consumer to producer. 1152 ConsumerImportSubnetRoutesWithPublicIp bool `json:"consumerImportSubnetRoutesWithPublicIp,omitempty"` 1153 1154 // ProducerExportCustomRoutes: Export custom routes flag value for 1155 // peering from producer to consumer. 1156 ProducerExportCustomRoutes bool `json:"producerExportCustomRoutes,omitempty"` 1157 1158 // ProducerExportSubnetRoutesWithPublicIp: Export subnet routes with 1159 // public ip flag value for peering from producer to consumer. 1160 ProducerExportSubnetRoutesWithPublicIp bool `json:"producerExportSubnetRoutesWithPublicIp,omitempty"` 1161 1162 // ProducerImportCustomRoutes: Import custom routes flag value for 1163 // peering from producer to consumer. 1164 ProducerImportCustomRoutes bool `json:"producerImportCustomRoutes,omitempty"` 1165 1166 // ProducerImportSubnetRoutesWithPublicIp: Import subnet routes with 1167 // public ip flag value for peering from producer to consumer. 1168 ProducerImportSubnetRoutesWithPublicIp bool `json:"producerImportSubnetRoutesWithPublicIp,omitempty"` 1169 1170 // ProducerNetwork: Output only. The VPC host network that is used to 1171 // host managed service instances. In the format, 1172 // projects/{project}/global/networks/{network} where {project} is the 1173 // project number e.g. '12345' and {network} is the network name. 1174 ProducerNetwork string `json:"producerNetwork,omitempty"` 1175 1176 // ReservedRanges: Output only. The reserved ranges associated with this 1177 // private service access connection. 1178 ReservedRanges []*GoogleCloudServicenetworkingV1ConsumerConfigReservedRange `json:"reservedRanges,omitempty"` 1179 1180 // VpcScReferenceArchitectureEnabled: Output only. Indicates whether the 1181 // VPC Service Controls reference architecture is configured for the 1182 // producer VPC host network. 1183 VpcScReferenceArchitectureEnabled bool `json:"vpcScReferenceArchitectureEnabled,omitempty"` 1184 1185 // ServerResponse contains the HTTP response code and headers from the 1186 // server. 1187 googleapi.ServerResponse `json:"-"` 1188 1189 // ForceSendFields is a list of field names (e.g. 1190 // "ConsumerExportCustomRoutes") to unconditionally include in API 1191 // requests. By default, fields with empty values are omitted from API 1192 // requests. However, any non-pointer, non-interface field appearing in 1193 // ForceSendFields will be sent to the server regardless of whether the 1194 // field is empty or not. This may be used to include empty fields in 1195 // Patch requests. 1196 ForceSendFields []string `json:"-"` 1197 1198 // NullFields is a list of field names (e.g. 1199 // "ConsumerExportCustomRoutes") to include in API requests with the 1200 // JSON null value. By default, fields with empty values are omitted 1201 // from API requests. However, any field with an empty value appearing 1202 // in NullFields will be sent to the server as null. It is an error if a 1203 // field in this list has a non-empty value. This may be used to include 1204 // null fields in Patch requests. 1205 NullFields []string `json:"-"` 1206} 1207 1208func (s *ConsumerConfig) MarshalJSON() ([]byte, error) { 1209 type NoMethod ConsumerConfig 1210 raw := NoMethod(*s) 1211 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1212} 1213 1214// ConsumerConfigMetadata: Metadata provided through GetOperation 1215// request for the LRO generated by UpdateConsumerConfig API. 1216type ConsumerConfigMetadata struct { 1217} 1218 1219// ConsumerProject: Represents a consumer project. 1220type ConsumerProject struct { 1221 // ProjectNum: Required. Project number of the consumer that is 1222 // launching the service instance. It can own the network that is peered 1223 // with Google or, be a service project in an XPN where the host project 1224 // has the network. 1225 ProjectNum int64 `json:"projectNum,omitempty,string"` 1226 1227 // ForceSendFields is a list of field names (e.g. "ProjectNum") to 1228 // unconditionally include in API requests. By default, fields with 1229 // empty values are omitted from API requests. However, any non-pointer, 1230 // non-interface field appearing in ForceSendFields will be sent to the 1231 // server regardless of whether the field is empty or not. This may be 1232 // used to include empty fields in Patch requests. 1233 ForceSendFields []string `json:"-"` 1234 1235 // NullFields is a list of field names (e.g. "ProjectNum") to include in 1236 // API requests with the JSON null value. By default, fields with empty 1237 // values are omitted from API requests. However, any field with an 1238 // empty value appearing in NullFields will be sent to the server as 1239 // null. It is an error if a field in this list has a non-empty value. 1240 // This may be used to include null fields in Patch requests. 1241 NullFields []string `json:"-"` 1242} 1243 1244func (s *ConsumerProject) MarshalJSON() ([]byte, error) { 1245 type NoMethod ConsumerProject 1246 raw := NoMethod(*s) 1247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1248} 1249 1250// Context: `Context` defines which contexts an API requests. Example: 1251// context: rules: - selector: "*" requested: - 1252// google.rpc.context.ProjectContext - google.rpc.context.OriginContext 1253// The above specifies that all methods in the API request 1254// `google.rpc.context.ProjectContext` and 1255// `google.rpc.context.OriginContext`. Available context types are 1256// defined in package `google.rpc.context`. This also provides mechanism 1257// to allowlist any protobuf message extension that can be sent in grpc 1258// metadata using “x-goog-ext--bin” and “x-goog-ext--jspb” 1259// format. For example, list any service specific protobuf types that 1260// can appear in grpc metadata as follows in your yaml file: Example: 1261// context: rules: - selector: 1262// "google.example.library.v1.LibraryService.CreateBook" 1263// allowed_request_extensions: - google.foo.v1.NewExtension 1264// allowed_response_extensions: - google.foo.v1.NewExtension You can 1265// also specify extension ID instead of fully qualified extension name 1266// here. 1267type Context struct { 1268 // Rules: A list of RPC context rules that apply to individual API 1269 // methods. **NOTE:** All service configuration rules follow "last one 1270 // wins" order. 1271 Rules []*ContextRule `json:"rules,omitempty"` 1272 1273 // ForceSendFields is a list of field names (e.g. "Rules") to 1274 // unconditionally include in API requests. By default, fields with 1275 // empty values are omitted from API requests. However, any non-pointer, 1276 // non-interface field appearing in ForceSendFields will be sent to the 1277 // server regardless of whether the field is empty or not. This may be 1278 // used to include empty fields in Patch requests. 1279 ForceSendFields []string `json:"-"` 1280 1281 // NullFields is a list of field names (e.g. "Rules") to include in API 1282 // requests with the JSON null value. By default, fields with empty 1283 // values are omitted from API requests. However, any field with an 1284 // empty value appearing in NullFields will be sent to the server as 1285 // null. It is an error if a field in this list has a non-empty value. 1286 // This may be used to include null fields in Patch requests. 1287 NullFields []string `json:"-"` 1288} 1289 1290func (s *Context) MarshalJSON() ([]byte, error) { 1291 type NoMethod Context 1292 raw := NoMethod(*s) 1293 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1294} 1295 1296// ContextRule: A context rule provides information about the context 1297// for an individual API element. 1298type ContextRule struct { 1299 // AllowedRequestExtensions: A list of full type names or extension IDs 1300 // of extensions allowed in grpc side channel from client to backend. 1301 AllowedRequestExtensions []string `json:"allowedRequestExtensions,omitempty"` 1302 1303 // AllowedResponseExtensions: A list of full type names or extension IDs 1304 // of extensions allowed in grpc side channel from backend to client. 1305 AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` 1306 1307 // Provided: A list of full type names of provided contexts. 1308 Provided []string `json:"provided,omitempty"` 1309 1310 // Requested: A list of full type names of requested contexts. 1311 Requested []string `json:"requested,omitempty"` 1312 1313 // Selector: Selects the methods to which this rule applies. Refer to 1314 // selector for syntax details. 1315 Selector string `json:"selector,omitempty"` 1316 1317 // ForceSendFields is a list of field names (e.g. 1318 // "AllowedRequestExtensions") to unconditionally include in API 1319 // requests. By default, fields with empty values are omitted from API 1320 // requests. However, any non-pointer, non-interface field appearing in 1321 // ForceSendFields will be sent to the server regardless of whether the 1322 // field is empty or not. This may be used to include empty fields in 1323 // Patch requests. 1324 ForceSendFields []string `json:"-"` 1325 1326 // NullFields is a list of field names (e.g. "AllowedRequestExtensions") 1327 // to include in API requests with the JSON null value. By default, 1328 // fields with empty values are omitted from API requests. However, any 1329 // field with an empty value appearing in NullFields will be sent to the 1330 // server as null. It is an error if a field in this list has a 1331 // non-empty value. This may be used to include null fields in Patch 1332 // requests. 1333 NullFields []string `json:"-"` 1334} 1335 1336func (s *ContextRule) MarshalJSON() ([]byte, error) { 1337 type NoMethod ContextRule 1338 raw := NoMethod(*s) 1339 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1340} 1341 1342// Control: Selects and configures the service controller used by the 1343// service. The service controller handles features like abuse, quota, 1344// billing, logging, monitoring, etc. 1345type Control struct { 1346 // Environment: The service control environment to use. If empty, no 1347 // control plane feature (like quota and billing) will be enabled. 1348 Environment string `json:"environment,omitempty"` 1349 1350 // ForceSendFields is a list of field names (e.g. "Environment") to 1351 // unconditionally include in API requests. By default, fields with 1352 // empty values are omitted from API requests. However, any non-pointer, 1353 // non-interface field appearing in ForceSendFields will be sent to the 1354 // server regardless of whether the field is empty or not. This may be 1355 // used to include empty fields in Patch requests. 1356 ForceSendFields []string `json:"-"` 1357 1358 // NullFields is a list of field names (e.g. "Environment") to include 1359 // in API requests with the JSON null value. By default, fields with 1360 // empty values are omitted from API requests. However, any field with 1361 // an empty value appearing in NullFields will be sent to the server as 1362 // null. It is an error if a field in this list has a non-empty value. 1363 // This may be used to include null fields in Patch requests. 1364 NullFields []string `json:"-"` 1365} 1366 1367func (s *Control) MarshalJSON() ([]byte, error) { 1368 type NoMethod Control 1369 raw := NoMethod(*s) 1370 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1371} 1372 1373// CustomError: Customize service error responses. For example, list any 1374// service specific protobuf types that can appear in error detail lists 1375// of error responses. Example: custom_error: types: - 1376// google.foo.v1.CustomError - google.foo.v1.AnotherError 1377type CustomError struct { 1378 // Rules: The list of custom error rules that apply to individual API 1379 // messages. **NOTE:** All service configuration rules follow "last one 1380 // wins" order. 1381 Rules []*CustomErrorRule `json:"rules,omitempty"` 1382 1383 // Types: The list of custom error detail types, e.g. 1384 // 'google.foo.v1.CustomError'. 1385 Types []string `json:"types,omitempty"` 1386 1387 // ForceSendFields is a list of field names (e.g. "Rules") to 1388 // unconditionally include in API requests. By default, fields with 1389 // empty values are omitted from API requests. However, any non-pointer, 1390 // non-interface field appearing in ForceSendFields will be sent to the 1391 // server regardless of whether the field is empty or not. This may be 1392 // used to include empty fields in Patch requests. 1393 ForceSendFields []string `json:"-"` 1394 1395 // NullFields is a list of field names (e.g. "Rules") to include in API 1396 // requests with the JSON null value. By default, fields with empty 1397 // values are omitted from API requests. However, any field with an 1398 // empty value appearing in NullFields will be sent to the server as 1399 // null. It is an error if a field in this list has a non-empty value. 1400 // This may be used to include null fields in Patch requests. 1401 NullFields []string `json:"-"` 1402} 1403 1404func (s *CustomError) MarshalJSON() ([]byte, error) { 1405 type NoMethod CustomError 1406 raw := NoMethod(*s) 1407 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1408} 1409 1410// CustomErrorRule: A custom error rule. 1411type CustomErrorRule struct { 1412 // IsErrorType: Mark this message as possible payload in error response. 1413 // Otherwise, objects of this type will be filtered when they appear in 1414 // error payload. 1415 IsErrorType bool `json:"isErrorType,omitempty"` 1416 1417 // Selector: Selects messages to which this rule applies. Refer to 1418 // selector for syntax details. 1419 Selector string `json:"selector,omitempty"` 1420 1421 // ForceSendFields is a list of field names (e.g. "IsErrorType") to 1422 // unconditionally include in API requests. By default, fields with 1423 // empty values are omitted from API requests. However, any non-pointer, 1424 // non-interface field appearing in ForceSendFields will be sent to the 1425 // server regardless of whether the field is empty or not. This may be 1426 // used to include empty fields in Patch requests. 1427 ForceSendFields []string `json:"-"` 1428 1429 // NullFields is a list of field names (e.g. "IsErrorType") to include 1430 // in API requests with the JSON null value. By default, fields with 1431 // empty values are omitted from API requests. However, any field with 1432 // an empty value appearing in NullFields will be sent to the server as 1433 // null. It is an error if a field in this list has a non-empty value. 1434 // This may be used to include null fields in Patch requests. 1435 NullFields []string `json:"-"` 1436} 1437 1438func (s *CustomErrorRule) MarshalJSON() ([]byte, error) { 1439 type NoMethod CustomErrorRule 1440 raw := NoMethod(*s) 1441 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1442} 1443 1444// CustomHttpPattern: A custom pattern is used for defining custom HTTP 1445// verb. 1446type CustomHttpPattern struct { 1447 // Kind: The name of this custom HTTP verb. 1448 Kind string `json:"kind,omitempty"` 1449 1450 // Path: The path matched by this custom verb. 1451 Path string `json:"path,omitempty"` 1452 1453 // ForceSendFields is a list of field names (e.g. "Kind") to 1454 // unconditionally include in API requests. By default, fields with 1455 // empty values are omitted from API requests. However, any non-pointer, 1456 // non-interface field appearing in ForceSendFields will be sent to the 1457 // server regardless of whether the field is empty or not. This may be 1458 // used to include empty fields in Patch requests. 1459 ForceSendFields []string `json:"-"` 1460 1461 // NullFields is a list of field names (e.g. "Kind") to include in API 1462 // requests with the JSON null value. By default, fields with empty 1463 // values are omitted from API requests. However, any field with an 1464 // empty value appearing in NullFields will be sent to the server as 1465 // null. It is an error if a field in this list has a non-empty value. 1466 // This may be used to include null fields in Patch requests. 1467 NullFields []string `json:"-"` 1468} 1469 1470func (s *CustomHttpPattern) MarshalJSON() ([]byte, error) { 1471 type NoMethod CustomHttpPattern 1472 raw := NoMethod(*s) 1473 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1474} 1475 1476// DeleteConnectionMetadata: Metadata provided through GetOperation 1477// request for the LRO generated by Delete Connection API 1478type DeleteConnectionMetadata struct { 1479} 1480 1481// DeleteConnectionRequest: Request to delete a private service access 1482// connection. The call will fail if there are any managed service 1483// instances using this connection. 1484type DeleteConnectionRequest struct { 1485 // ConsumerNetwork: Required. The network that the consumer is using to 1486 // connect with services. Must be in the form of 1487 // projects/{project}/global/networks/{network} {project} is a project 1488 // number, as in '12345' {network} is a network name. 1489 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 1490 1491 // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to 1492 // unconditionally include in API requests. By default, fields with 1493 // empty values are omitted from API requests. However, any non-pointer, 1494 // non-interface field appearing in ForceSendFields will be sent to the 1495 // server regardless of whether the field is empty or not. This may be 1496 // used to include empty fields in Patch requests. 1497 ForceSendFields []string `json:"-"` 1498 1499 // NullFields is a list of field names (e.g. "ConsumerNetwork") to 1500 // include in API requests with the JSON null value. By default, fields 1501 // with empty values are omitted from API requests. However, any field 1502 // with an empty value appearing in NullFields will be sent to the 1503 // server as null. It is an error if a field in this list has a 1504 // non-empty value. This may be used to include null fields in Patch 1505 // requests. 1506 NullFields []string `json:"-"` 1507} 1508 1509func (s *DeleteConnectionRequest) MarshalJSON() ([]byte, error) { 1510 type NoMethod DeleteConnectionRequest 1511 raw := NoMethod(*s) 1512 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1513} 1514 1515// DeletePeeredDnsDomainMetadata: Metadata provided through GetOperation 1516// request for the LRO generated by DeletePeeredDnsDomain API. 1517type DeletePeeredDnsDomainMetadata struct { 1518} 1519 1520// DisableVpcServiceControlsRequest: Request to disable VPC service 1521// controls. 1522type DisableVpcServiceControlsRequest struct { 1523 // ConsumerNetwork: Required. The network that the consumer is using to 1524 // connect with services. Must be in the form of 1525 // projects/{project}/global/networks/{network} {project} is a project 1526 // number, as in '12345' {network} is network name. 1527 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 1528 1529 // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to 1530 // unconditionally include in API requests. By default, fields with 1531 // empty values are omitted from API requests. However, any non-pointer, 1532 // non-interface field appearing in ForceSendFields will be sent to the 1533 // server regardless of whether the field is empty or not. This may be 1534 // used to include empty fields in Patch requests. 1535 ForceSendFields []string `json:"-"` 1536 1537 // NullFields is a list of field names (e.g. "ConsumerNetwork") to 1538 // include in API requests with the JSON null value. By default, fields 1539 // with empty values are omitted from API requests. However, any field 1540 // with an empty value appearing in NullFields will be sent to the 1541 // server as null. It is an error if a field in this list has a 1542 // non-empty value. This may be used to include null fields in Patch 1543 // requests. 1544 NullFields []string `json:"-"` 1545} 1546 1547func (s *DisableVpcServiceControlsRequest) MarshalJSON() ([]byte, error) { 1548 type NoMethod DisableVpcServiceControlsRequest 1549 raw := NoMethod(*s) 1550 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1551} 1552 1553// DnsRecordSet: Represents a DNS record set resource. 1554type DnsRecordSet struct { 1555 // Data: Required. As defined in RFC 1035 (section 5) and RFC 1034 1556 // (section 3.6.1) for examples see 1557 // https://cloud.google.com/dns/records/json-record. 1558 Data []string `json:"data,omitempty"` 1559 1560 // Domain: Required. The DNS or domain name of the record set, e.g. 1561 // `test.example.com`. 1562 Domain string `json:"domain,omitempty"` 1563 1564 // Ttl: Required. The period of time for which this RecordSet can be 1565 // cached by resolvers. 1566 Ttl string `json:"ttl,omitempty"` 1567 1568 // Type: Required. The identifier of a supported record type. 1569 Type string `json:"type,omitempty"` 1570 1571 // ForceSendFields is a list of field names (e.g. "Data") to 1572 // unconditionally include in API requests. By default, fields with 1573 // empty values are omitted from API requests. However, any non-pointer, 1574 // non-interface field appearing in ForceSendFields will be sent to the 1575 // server regardless of whether the field is empty or not. This may be 1576 // used to include empty fields in Patch requests. 1577 ForceSendFields []string `json:"-"` 1578 1579 // NullFields is a list of field names (e.g. "Data") to include in API 1580 // requests with the JSON null value. By default, fields with empty 1581 // values are omitted from API requests. However, any field with an 1582 // empty value appearing in NullFields will be sent to the server as 1583 // null. It is an error if a field in this list has a non-empty value. 1584 // This may be used to include null fields in Patch requests. 1585 NullFields []string `json:"-"` 1586} 1587 1588func (s *DnsRecordSet) MarshalJSON() ([]byte, error) { 1589 type NoMethod DnsRecordSet 1590 raw := NoMethod(*s) 1591 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1592} 1593 1594// DnsZone: Represents a DNS zone resource. 1595type DnsZone struct { 1596 // DnsSuffix: The DNS name suffix of this zone e.g. `example.com.`. 1597 DnsSuffix string `json:"dnsSuffix,omitempty"` 1598 1599 // Name: User assigned name for this resource. Must be unique within the 1600 // project. The name must be 1-63 characters long, must begin with a 1601 // letter, end with a letter or digit, and only contain lowercase 1602 // letters, digits or dashes. 1603 Name string `json:"name,omitempty"` 1604 1605 // ForceSendFields is a list of field names (e.g. "DnsSuffix") to 1606 // unconditionally include in API requests. By default, fields with 1607 // empty values are omitted from API requests. However, any non-pointer, 1608 // non-interface field appearing in ForceSendFields will be sent to the 1609 // server regardless of whether the field is empty or not. This may be 1610 // used to include empty fields in Patch requests. 1611 ForceSendFields []string `json:"-"` 1612 1613 // NullFields is a list of field names (e.g. "DnsSuffix") to include in 1614 // API requests with the JSON null value. By default, fields with empty 1615 // values are omitted from API requests. However, any field with an 1616 // empty value appearing in NullFields will be sent to the server as 1617 // null. It is an error if a field in this list has a non-empty value. 1618 // This may be used to include null fields in Patch requests. 1619 NullFields []string `json:"-"` 1620} 1621 1622func (s *DnsZone) MarshalJSON() ([]byte, error) { 1623 type NoMethod DnsZone 1624 raw := NoMethod(*s) 1625 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1626} 1627 1628// Documentation: `Documentation` provides the information for 1629// describing a service. Example: documentation: summary: > The Google 1630// Calendar API gives access to most calendar features. pages: - name: 1631// Overview content: (== include google/foo/overview.md ==) - name: 1632// Tutorial content: (== include google/foo/tutorial.md ==) subpages; - 1633// name: Java content: (== include google/foo/tutorial_java.md ==) 1634// rules: - selector: google.calendar.Calendar.Get description: > ... - 1635// selector: google.calendar.Calendar.Put description: > ... 1636// Documentation is provided in markdown syntax. In addition to standard 1637// markdown features, definition lists, tables and fenced code blocks 1638// are supported. Section headers can be provided and are interpreted 1639// relative to the section nesting of the context where a documentation 1640// fragment is embedded. Documentation from the IDL is merged with 1641// documentation defined via the config at normalization time, where 1642// documentation provided by config rules overrides IDL provided. A 1643// number of constructs specific to the API platform are supported in 1644// documentation text. In order to reference a proto element, the 1645// following notation can be used: [fully.qualified.proto.name][] To 1646// override the display text used for the link, this can be used: 1647// [display text][fully.qualified.proto.name] Text can be excluded from 1648// doc using the following notation: (-- internal comment --) A few 1649// directives are available in documentation. Note that directives must 1650// appear on a single line to be properly identified. The `include` 1651// directive includes a markdown file from an external source: (== 1652// include path/to/file ==) The `resource_for` directive marks a message 1653// to be the resource of a collection in REST view. If it is not 1654// specified, tools attempt to infer the resource from the operations in 1655// a collection: (== resource_for v1.shelves.books ==) The directive 1656// `suppress_warning` does not directly affect documentation and is 1657// documented together with service config validation. 1658type Documentation struct { 1659 // DocumentationRootUrl: The URL to the root of documentation. 1660 DocumentationRootUrl string `json:"documentationRootUrl,omitempty"` 1661 1662 // Overview: Declares a single overview page. For example: 1663 // documentation: summary: ... overview: (== include overview.md ==) 1664 // This is a shortcut for the following declaration (using pages style): 1665 // documentation: summary: ... pages: - name: Overview content: (== 1666 // include overview.md ==) Note: you cannot specify both `overview` 1667 // field and `pages` field. 1668 Overview string `json:"overview,omitempty"` 1669 1670 // Pages: The top level pages for the documentation set. 1671 Pages []*Page `json:"pages,omitempty"` 1672 1673 // Rules: A list of documentation rules that apply to individual API 1674 // elements. **NOTE:** All service configuration rules follow "last one 1675 // wins" order. 1676 Rules []*DocumentationRule `json:"rules,omitempty"` 1677 1678 // ServiceRootUrl: Specifies the service root url if the default one 1679 // (the service name from the yaml file) is not suitable. This can be 1680 // seen in any fully specified service urls as well as sections that 1681 // show a base that other urls are relative to. 1682 ServiceRootUrl string `json:"serviceRootUrl,omitempty"` 1683 1684 // Summary: A short summary of what the service does. Can only be 1685 // provided by plain text. 1686 Summary string `json:"summary,omitempty"` 1687 1688 // ForceSendFields is a list of field names (e.g. 1689 // "DocumentationRootUrl") to unconditionally include in API requests. 1690 // By default, fields with empty values are omitted from API requests. 1691 // However, any non-pointer, non-interface field appearing in 1692 // ForceSendFields will be sent to the server regardless of whether the 1693 // field is empty or not. This may be used to include empty fields in 1694 // Patch requests. 1695 ForceSendFields []string `json:"-"` 1696 1697 // NullFields is a list of field names (e.g. "DocumentationRootUrl") to 1698 // include in API requests with the JSON null value. By default, fields 1699 // with empty values are omitted from API requests. However, any field 1700 // with an empty value appearing in NullFields will be sent to the 1701 // server as null. It is an error if a field in this list has a 1702 // non-empty value. This may be used to include null fields in Patch 1703 // requests. 1704 NullFields []string `json:"-"` 1705} 1706 1707func (s *Documentation) MarshalJSON() ([]byte, error) { 1708 type NoMethod Documentation 1709 raw := NoMethod(*s) 1710 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1711} 1712 1713// DocumentationRule: A documentation rule provides information about 1714// individual API elements. 1715type DocumentationRule struct { 1716 // DeprecationDescription: Deprecation description of the selected 1717 // element(s). It can be provided if an element is marked as 1718 // `deprecated`. 1719 DeprecationDescription string `json:"deprecationDescription,omitempty"` 1720 1721 // Description: Description of the selected API(s). 1722 Description string `json:"description,omitempty"` 1723 1724 // Selector: The selector is a comma-separated list of patterns. Each 1725 // pattern is a qualified name of the element which may end in "*", 1726 // indicating a wildcard. Wildcards are only allowed at the end and for 1727 // a whole component of the qualified name, i.e. "foo.*" is ok, but not 1728 // "foo.b*" or "foo.*.bar". A wildcard will match one or more 1729 // components. To specify a default for all applicable elements, the 1730 // whole pattern "*" is used. 1731 Selector string `json:"selector,omitempty"` 1732 1733 // ForceSendFields is a list of field names (e.g. 1734 // "DeprecationDescription") to unconditionally include in API requests. 1735 // By default, fields with empty values are omitted from API requests. 1736 // However, any non-pointer, non-interface field appearing in 1737 // ForceSendFields will be sent to the server regardless of whether the 1738 // field is empty or not. This may be used to include empty fields in 1739 // Patch requests. 1740 ForceSendFields []string `json:"-"` 1741 1742 // NullFields is a list of field names (e.g. "DeprecationDescription") 1743 // to include in API requests with the JSON null value. By default, 1744 // fields with empty values are omitted from API requests. However, any 1745 // field with an empty value appearing in NullFields will be sent to the 1746 // server as null. It is an error if a field in this list has a 1747 // non-empty value. This may be used to include null fields in Patch 1748 // requests. 1749 NullFields []string `json:"-"` 1750} 1751 1752func (s *DocumentationRule) MarshalJSON() ([]byte, error) { 1753 type NoMethod DocumentationRule 1754 raw := NoMethod(*s) 1755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1756} 1757 1758// Empty: A generic empty message that you can re-use to avoid defining 1759// duplicated empty messages in your APIs. A typical example is to use 1760// it as the request or the response type of an API method. For 1761// instance: service Foo { rpc Bar(google.protobuf.Empty) returns 1762// (google.protobuf.Empty); } The JSON representation for `Empty` is 1763// empty JSON object `{}`. 1764type Empty struct { 1765 // ServerResponse contains the HTTP response code and headers from the 1766 // server. 1767 googleapi.ServerResponse `json:"-"` 1768} 1769 1770// EnableVpcServiceControlsRequest: Request to enable VPC service 1771// controls. 1772type EnableVpcServiceControlsRequest struct { 1773 // ConsumerNetwork: Required. The network that the consumer is using to 1774 // connect with services. Must be in the form of 1775 // projects/{project}/global/networks/{network} {project} is a project 1776 // number, as in '12345' {network} is network name. 1777 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 1778 1779 // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to 1780 // unconditionally include in API requests. By default, fields with 1781 // empty values are omitted from API requests. However, any non-pointer, 1782 // non-interface field appearing in ForceSendFields will be sent to the 1783 // server regardless of whether the field is empty or not. This may be 1784 // used to include empty fields in Patch requests. 1785 ForceSendFields []string `json:"-"` 1786 1787 // NullFields is a list of field names (e.g. "ConsumerNetwork") to 1788 // include in API requests with the JSON null value. By default, fields 1789 // with empty values are omitted from API requests. However, any field 1790 // with an empty value appearing in NullFields will be sent to the 1791 // server as null. It is an error if a field in this list has a 1792 // non-empty value. This may be used to include null fields in Patch 1793 // requests. 1794 NullFields []string `json:"-"` 1795} 1796 1797func (s *EnableVpcServiceControlsRequest) MarshalJSON() ([]byte, error) { 1798 type NoMethod EnableVpcServiceControlsRequest 1799 raw := NoMethod(*s) 1800 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1801} 1802 1803// Endpoint: `Endpoint` describes a network endpoint of a service that 1804// serves a set of APIs. It is commonly known as a service endpoint. A 1805// service may expose any number of service endpoints, and all service 1806// endpoints share the same service definition, such as quota limits and 1807// monitoring metrics. Example service configuration: name: 1808// library-example.googleapis.com endpoints: # Below entry makes 1809// 'google.example.library.v1.Library' # API be served from endpoint 1810// address library-example.googleapis.com. # It also allows HTTP OPTIONS 1811// calls to be passed to the backend, for # it to decide whether the 1812// subsequent cross-origin request is # allowed to proceed. - name: 1813// library-example.googleapis.com allow_cors: true 1814type Endpoint struct { 1815 // Aliases: Unimplemented. Dot not use. DEPRECATED: This field is no 1816 // longer supported. Instead of using aliases, please specify multiple 1817 // google.api.Endpoint for each of the intended aliases. Additional 1818 // names that this endpoint will be hosted on. 1819 Aliases []string `json:"aliases,omitempty"` 1820 1821 // AllowCors: Allowing CORS 1822 // (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka 1823 // cross-domain traffic, would allow the backends served from this 1824 // endpoint to receive and respond to HTTP OPTIONS requests. The 1825 // response will be used by the browser to determine whether the 1826 // subsequent cross-origin request is allowed to proceed. 1827 AllowCors bool `json:"allowCors,omitempty"` 1828 1829 // Name: The canonical name of this endpoint. 1830 Name string `json:"name,omitempty"` 1831 1832 // Target: The specification of an Internet routable address of API 1833 // frontend that will handle requests to this API Endpoint 1834 // (https://cloud.google.com/apis/design/glossary). It should be either 1835 // a valid IPv4 address or a fully-qualified domain name. For example, 1836 // "8.8.8.8" or "myservice.appspot.com". 1837 Target string `json:"target,omitempty"` 1838 1839 // ForceSendFields is a list of field names (e.g. "Aliases") to 1840 // unconditionally include in API requests. By default, fields with 1841 // empty values are omitted from API requests. However, any non-pointer, 1842 // non-interface field appearing in ForceSendFields will be sent to the 1843 // server regardless of whether the field is empty or not. This may be 1844 // used to include empty fields in Patch requests. 1845 ForceSendFields []string `json:"-"` 1846 1847 // NullFields is a list of field names (e.g. "Aliases") to include in 1848 // API requests with the JSON null value. By default, fields with empty 1849 // values are omitted from API requests. However, any field with an 1850 // empty value appearing in NullFields will be sent to the server as 1851 // null. It is an error if a field in this list has a non-empty value. 1852 // This may be used to include null fields in Patch requests. 1853 NullFields []string `json:"-"` 1854} 1855 1856func (s *Endpoint) MarshalJSON() ([]byte, error) { 1857 type NoMethod Endpoint 1858 raw := NoMethod(*s) 1859 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1860} 1861 1862// Enum: Enum type definition. 1863type Enum struct { 1864 // Enumvalue: Enum value definitions. 1865 Enumvalue []*EnumValue `json:"enumvalue,omitempty"` 1866 1867 // Name: Enum type name. 1868 Name string `json:"name,omitempty"` 1869 1870 // Options: Protocol buffer options. 1871 Options []*Option `json:"options,omitempty"` 1872 1873 // SourceContext: The source context. 1874 SourceContext *SourceContext `json:"sourceContext,omitempty"` 1875 1876 // Syntax: The source syntax. 1877 // 1878 // Possible values: 1879 // "SYNTAX_PROTO2" - Syntax `proto2`. 1880 // "SYNTAX_PROTO3" - Syntax `proto3`. 1881 Syntax string `json:"syntax,omitempty"` 1882 1883 // ForceSendFields is a list of field names (e.g. "Enumvalue") to 1884 // unconditionally include in API requests. By default, fields with 1885 // empty values are omitted from API requests. However, any non-pointer, 1886 // non-interface field appearing in ForceSendFields will be sent to the 1887 // server regardless of whether the field is empty or not. This may be 1888 // used to include empty fields in Patch requests. 1889 ForceSendFields []string `json:"-"` 1890 1891 // NullFields is a list of field names (e.g. "Enumvalue") to include in 1892 // API requests with the JSON null value. By default, fields with empty 1893 // values are omitted from API requests. However, any field with an 1894 // empty value appearing in NullFields will be sent to the server as 1895 // null. It is an error if a field in this list has a non-empty value. 1896 // This may be used to include null fields in Patch requests. 1897 NullFields []string `json:"-"` 1898} 1899 1900func (s *Enum) MarshalJSON() ([]byte, error) { 1901 type NoMethod Enum 1902 raw := NoMethod(*s) 1903 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1904} 1905 1906// EnumValue: Enum value definition. 1907type EnumValue struct { 1908 // Name: Enum value name. 1909 Name string `json:"name,omitempty"` 1910 1911 // Number: Enum value number. 1912 Number int64 `json:"number,omitempty"` 1913 1914 // Options: Protocol buffer options. 1915 Options []*Option `json:"options,omitempty"` 1916 1917 // ForceSendFields is a list of field names (e.g. "Name") to 1918 // unconditionally include in API requests. By default, fields with 1919 // empty values are omitted from API requests. However, any non-pointer, 1920 // non-interface field appearing in ForceSendFields will be sent to the 1921 // server regardless of whether the field is empty or not. This may be 1922 // used to include empty fields in Patch requests. 1923 ForceSendFields []string `json:"-"` 1924 1925 // NullFields is a list of field names (e.g. "Name") to include in API 1926 // requests with the JSON null value. By default, fields with empty 1927 // values are omitted from API requests. However, any field with an 1928 // empty value appearing in NullFields will be sent to the server as 1929 // null. It is an error if a field in this list has a non-empty value. 1930 // This may be used to include null fields in Patch requests. 1931 NullFields []string `json:"-"` 1932} 1933 1934func (s *EnumValue) MarshalJSON() ([]byte, error) { 1935 type NoMethod EnumValue 1936 raw := NoMethod(*s) 1937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1938} 1939 1940// Field: A single field of a message type. 1941type Field struct { 1942 // Cardinality: The field cardinality. 1943 // 1944 // Possible values: 1945 // "CARDINALITY_UNKNOWN" - For fields with unknown cardinality. 1946 // "CARDINALITY_OPTIONAL" - For optional fields. 1947 // "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only. 1948 // "CARDINALITY_REPEATED" - For repeated fields. 1949 Cardinality string `json:"cardinality,omitempty"` 1950 1951 // DefaultValue: The string value of the default value of this field. 1952 // Proto2 syntax only. 1953 DefaultValue string `json:"defaultValue,omitempty"` 1954 1955 // JsonName: The field JSON name. 1956 JsonName string `json:"jsonName,omitempty"` 1957 1958 // Kind: The field type. 1959 // 1960 // Possible values: 1961 // "TYPE_UNKNOWN" - Field type unknown. 1962 // "TYPE_DOUBLE" - Field type double. 1963 // "TYPE_FLOAT" - Field type float. 1964 // "TYPE_INT64" - Field type int64. 1965 // "TYPE_UINT64" - Field type uint64. 1966 // "TYPE_INT32" - Field type int32. 1967 // "TYPE_FIXED64" - Field type fixed64. 1968 // "TYPE_FIXED32" - Field type fixed32. 1969 // "TYPE_BOOL" - Field type bool. 1970 // "TYPE_STRING" - Field type string. 1971 // "TYPE_GROUP" - Field type group. Proto2 syntax only, and 1972 // deprecated. 1973 // "TYPE_MESSAGE" - Field type message. 1974 // "TYPE_BYTES" - Field type bytes. 1975 // "TYPE_UINT32" - Field type uint32. 1976 // "TYPE_ENUM" - Field type enum. 1977 // "TYPE_SFIXED32" - Field type sfixed32. 1978 // "TYPE_SFIXED64" - Field type sfixed64. 1979 // "TYPE_SINT32" - Field type sint32. 1980 // "TYPE_SINT64" - Field type sint64. 1981 Kind string `json:"kind,omitempty"` 1982 1983 // Name: The field name. 1984 Name string `json:"name,omitempty"` 1985 1986 // Number: The field number. 1987 Number int64 `json:"number,omitempty"` 1988 1989 // OneofIndex: The index of the field type in `Type.oneofs`, for message 1990 // or enumeration types. The first type has index 1; zero means the type 1991 // is not in the list. 1992 OneofIndex int64 `json:"oneofIndex,omitempty"` 1993 1994 // Options: The protocol buffer options. 1995 Options []*Option `json:"options,omitempty"` 1996 1997 // Packed: Whether to use alternative packed wire representation. 1998 Packed bool `json:"packed,omitempty"` 1999 2000 // TypeUrl: The field type URL, without the scheme, for message or 2001 // enumeration types. Example: 2002 // "type.googleapis.com/google.protobuf.Timestamp". 2003 TypeUrl string `json:"typeUrl,omitempty"` 2004 2005 // ForceSendFields is a list of field names (e.g. "Cardinality") to 2006 // unconditionally include in API requests. By default, fields with 2007 // empty values are omitted from API requests. However, any non-pointer, 2008 // non-interface field appearing in ForceSendFields will be sent to the 2009 // server regardless of whether the field is empty or not. This may be 2010 // used to include empty fields in Patch requests. 2011 ForceSendFields []string `json:"-"` 2012 2013 // NullFields is a list of field names (e.g. "Cardinality") to include 2014 // in API requests with the JSON null value. By default, fields with 2015 // empty values are omitted from API requests. However, any field with 2016 // an empty value appearing in NullFields will be sent to the server as 2017 // null. It is an error if a field in this list has a non-empty value. 2018 // This may be used to include null fields in Patch requests. 2019 NullFields []string `json:"-"` 2020} 2021 2022func (s *Field) MarshalJSON() ([]byte, error) { 2023 type NoMethod Field 2024 raw := NoMethod(*s) 2025 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2026} 2027 2028// GoogleCloudServicenetworkingV1ConsumerConfigReservedRange: Allocated 2029// IP address ranges for this private service access connection. 2030type GoogleCloudServicenetworkingV1ConsumerConfigReservedRange struct { 2031 // Address: The starting address of the reserved range. The address must 2032 // be a valid IPv4 address in the x.x.x.x format. This value combined 2033 // with the IP prefix length is the CIDR range for the reserved range. 2034 Address string `json:"address,omitempty"` 2035 2036 // IpPrefixLength: The prefix length of the reserved range. 2037 IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` 2038 2039 // Name: The name of the reserved range. 2040 Name string `json:"name,omitempty"` 2041 2042 // ForceSendFields is a list of field names (e.g. "Address") to 2043 // unconditionally include in API requests. By default, fields with 2044 // empty values are omitted from API requests. However, any non-pointer, 2045 // non-interface field appearing in ForceSendFields will be sent to the 2046 // server regardless of whether the field is empty or not. This may be 2047 // used to include empty fields in Patch requests. 2048 ForceSendFields []string `json:"-"` 2049 2050 // NullFields is a list of field names (e.g. "Address") to include in 2051 // API requests with the JSON null value. By default, fields with empty 2052 // values are omitted from API requests. However, any field with an 2053 // empty value appearing in NullFields will be sent to the server as 2054 // null. It is an error if a field in this list has a non-empty value. 2055 // This may be used to include null fields in Patch requests. 2056 NullFields []string `json:"-"` 2057} 2058 2059func (s *GoogleCloudServicenetworkingV1ConsumerConfigReservedRange) MarshalJSON() ([]byte, error) { 2060 type NoMethod GoogleCloudServicenetworkingV1ConsumerConfigReservedRange 2061 raw := NoMethod(*s) 2062 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2063} 2064 2065// GoogleCloudServicenetworkingV1betaConnection: Represents a private 2066// connection resource. A private connection is implemented as a VPC 2067// Network Peering connection between a service producer's VPC network 2068// and a service consumer's VPC network. 2069type GoogleCloudServicenetworkingV1betaConnection struct { 2070 // Network: The name of service consumer's VPC network that's connected 2071 // with service producer network, in the following format: 2072 // `projects/{project}/global/networks/{network}`. `{project}` is a 2073 // project number, such as in `12345` that includes the VPC service 2074 // consumer's VPC network. `{network}` is the name of the service 2075 // consumer's VPC network. 2076 Network string `json:"network,omitempty"` 2077 2078 // Peering: Output only. The name of the VPC Network Peering connection 2079 // that was created by the service producer. 2080 Peering string `json:"peering,omitempty"` 2081 2082 // ReservedPeeringRanges: The name of one or more allocated IP address 2083 // ranges for this service producer of type `PEERING`. Note that 2084 // invoking this method with a different range when connection is 2085 // already established will not modify already provisioned service 2086 // producer subnetworks. 2087 ReservedPeeringRanges []string `json:"reservedPeeringRanges,omitempty"` 2088 2089 // Service: Output only. The name of the peering service that's 2090 // associated with this connection, in the following format: 2091 // `services/{service name}`. 2092 Service string `json:"service,omitempty"` 2093 2094 // ForceSendFields is a list of field names (e.g. "Network") to 2095 // unconditionally include in API requests. By default, fields with 2096 // empty values are omitted from API requests. However, any non-pointer, 2097 // non-interface field appearing in ForceSendFields will be sent to the 2098 // server regardless of whether the field is empty or not. This may be 2099 // used to include empty fields in Patch requests. 2100 ForceSendFields []string `json:"-"` 2101 2102 // NullFields is a list of field names (e.g. "Network") to include in 2103 // API requests with the JSON null value. By default, fields with empty 2104 // values are omitted from API requests. However, any field with an 2105 // empty value appearing in NullFields will be sent to the server as 2106 // null. It is an error if a field in this list has a non-empty value. 2107 // This may be used to include null fields in Patch requests. 2108 NullFields []string `json:"-"` 2109} 2110 2111func (s *GoogleCloudServicenetworkingV1betaConnection) MarshalJSON() ([]byte, error) { 2112 type NoMethod GoogleCloudServicenetworkingV1betaConnection 2113 raw := NoMethod(*s) 2114 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2115} 2116 2117// GoogleCloudServicenetworkingV1betaSubnetwork: Represents a subnet 2118// that was created or discovered by a private access management 2119// service. 2120type GoogleCloudServicenetworkingV1betaSubnetwork struct { 2121 // IpCidrRange: Subnetwork CIDR range in `10.x.x.x/y` format. 2122 IpCidrRange string `json:"ipCidrRange,omitempty"` 2123 2124 // Name: Subnetwork name. See https://cloud.google.com/compute/docs/vpc/ 2125 Name string `json:"name,omitempty"` 2126 2127 // Network: In the Shared VPC host project, the VPC network that's 2128 // peered with the consumer network. For example: 2129 // `projects/1234321/global/networks/host-network` 2130 Network string `json:"network,omitempty"` 2131 2132 // OutsideAllocation: This is a discovered subnet that is not within the 2133 // current consumer allocated ranges. 2134 OutsideAllocation bool `json:"outsideAllocation,omitempty"` 2135 2136 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 2137 // unconditionally include in API requests. By default, fields with 2138 // empty values are omitted from API requests. However, any non-pointer, 2139 // non-interface field appearing in ForceSendFields will be sent to the 2140 // server regardless of whether the field is empty or not. This may be 2141 // used to include empty fields in Patch requests. 2142 ForceSendFields []string `json:"-"` 2143 2144 // NullFields is a list of field names (e.g. "IpCidrRange") to include 2145 // in API requests with the JSON null value. By default, fields with 2146 // empty values are omitted from API requests. However, any field with 2147 // an empty value appearing in NullFields will be sent to the server as 2148 // null. It is an error if a field in this list has a non-empty value. 2149 // This may be used to include null fields in Patch requests. 2150 NullFields []string `json:"-"` 2151} 2152 2153func (s *GoogleCloudServicenetworkingV1betaSubnetwork) MarshalJSON() ([]byte, error) { 2154 type NoMethod GoogleCloudServicenetworkingV1betaSubnetwork 2155 raw := NoMethod(*s) 2156 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2157} 2158 2159// Http: Defines the HTTP configuration for an API service. It contains 2160// a list of HttpRule, each specifying the mapping of an RPC method to 2161// one or more HTTP REST API methods. 2162type Http struct { 2163 // FullyDecodeReservedExpansion: When set to true, URL path parameters 2164 // will be fully URI-decoded except in cases of single segment matches 2165 // in reserved expansion, where "%2F" will be left encoded. The default 2166 // behavior is to not decode RFC 6570 reserved characters in multi 2167 // segment matches. 2168 FullyDecodeReservedExpansion bool `json:"fullyDecodeReservedExpansion,omitempty"` 2169 2170 // Rules: A list of HTTP configuration rules that apply to individual 2171 // API methods. **NOTE:** All service configuration rules follow "last 2172 // one wins" order. 2173 Rules []*HttpRule `json:"rules,omitempty"` 2174 2175 // ForceSendFields is a list of field names (e.g. 2176 // "FullyDecodeReservedExpansion") to unconditionally include in API 2177 // requests. By default, fields with empty values are omitted from API 2178 // requests. However, any non-pointer, non-interface field appearing in 2179 // ForceSendFields will be sent to the server regardless of whether the 2180 // field is empty or not. This may be used to include empty fields in 2181 // Patch requests. 2182 ForceSendFields []string `json:"-"` 2183 2184 // NullFields is a list of field names (e.g. 2185 // "FullyDecodeReservedExpansion") to include in API requests with the 2186 // JSON null value. By default, fields with empty values are omitted 2187 // from API requests. However, any field with an empty value appearing 2188 // in NullFields will be sent to the server as null. It is an error if a 2189 // field in this list has a non-empty value. This may be used to include 2190 // null fields in Patch requests. 2191 NullFields []string `json:"-"` 2192} 2193 2194func (s *Http) MarshalJSON() ([]byte, error) { 2195 type NoMethod Http 2196 raw := NoMethod(*s) 2197 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2198} 2199 2200// HttpRule: # gRPC Transcoding gRPC Transcoding is a feature for 2201// mapping between a gRPC method and one or more HTTP REST endpoints. It 2202// allows developers to build a single API service that supports both 2203// gRPC APIs and REST APIs. Many systems, including Google APIs 2204// (https://github.com/googleapis/googleapis), Cloud Endpoints 2205// (https://cloud.google.com/endpoints), gRPC Gateway 2206// (https://github.com/grpc-ecosystem/grpc-gateway), and Envoy 2207// (https://github.com/envoyproxy/envoy) proxy support this feature and 2208// use it for large scale production services. `HttpRule` defines the 2209// schema of the gRPC/REST mapping. The mapping specifies how different 2210// portions of the gRPC request message are mapped to the URL path, URL 2211// query parameters, and HTTP request body. It also controls how the 2212// gRPC response message is mapped to the HTTP response body. `HttpRule` 2213// is typically specified as an `google.api.http` annotation on the gRPC 2214// method. Each mapping specifies a URL path template and an HTTP 2215// method. The path template may refer to one or more fields in the gRPC 2216// request message, as long as each field is a non-repeated field with a 2217// primitive (non-message) type. The path template controls how fields 2218// of the request message are mapped to the URL path. Example: service 2219// Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { 2220// option (google.api.http) = { get: "/v1/{name=messages/*}" }; } } 2221// message GetMessageRequest { string name = 1; // Mapped to URL path. } 2222// message Message { string text = 1; // The resource content. } This 2223// enables an HTTP REST to gRPC mapping as below: HTTP | gRPC 2224// -----|----- `GET /v1/messages/123456` | `GetMessage(name: 2225// "messages/123456")` Any fields in the request message which are not 2226// bound by the path template automatically become HTTP query parameters 2227// if there is no HTTP request body. For example: service Messaging { 2228// rpc GetMessage(GetMessageRequest) returns (Message) { option 2229// (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message 2230// GetMessageRequest { message SubMessage { string subfield = 1; } 2231// string message_id = 1; // Mapped to URL path. int64 revision = 2; // 2232// Mapped to URL query parameter `revision`. SubMessage sub = 3; // 2233// Mapped to URL query parameter `sub.subfield`. } This enables a HTTP 2234// JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET 2235// /v1/messages/123456?revision=2&sub.subfield=foo` | 2236// `GetMessage(message_id: "123456" revision: 2 sub: 2237// SubMessage(subfield: "foo"))` Note that fields which are mapped to 2238// URL query parameters must have a primitive type or a repeated 2239// primitive type or a non-repeated message type. In the case of a 2240// repeated type, the parameter can be repeated in the URL as 2241// `...?param=A¶m=B`. In the case of a message type, each field of 2242// the message is mapped to a separate parameter, such as 2243// `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request 2244// body, the `body` field specifies the mapping. Consider a REST update 2245// method on the message resource collection: service Messaging { rpc 2246// UpdateMessage(UpdateMessageRequest) returns (Message) { option 2247// (google.api.http) = { patch: "/v1/messages/{message_id}" body: 2248// "message" }; } } message UpdateMessageRequest { string message_id = 2249// 1; // mapped to the URL Message message = 2; // mapped to the body } 2250// The following HTTP JSON to RPC mapping is enabled, where the 2251// representation of the JSON in the request body is determined by 2252// protos JSON encoding: HTTP | gRPC -----|----- `PATCH 2253// /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: 2254// "123456" message { text: "Hi!" })` The special name `*` can be used 2255// in the body mapping to define that every field not bound by the path 2256// template should be mapped to the request body. This enables the 2257// following alternative definition of the update method: service 2258// Messaging { rpc UpdateMessage(Message) returns (Message) { option 2259// (google.api.http) = { patch: "/v1/messages/{message_id}" body: "*" }; 2260// } } message Message { string message_id = 1; string text = 2; } The 2261// following HTTP JSON to RPC mapping is enabled: HTTP | gRPC 2262// -----|----- `PATCH /v1/messages/123456 { "text": "Hi!" }` | 2263// `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when 2264// using `*` in the body mapping, it is not possible to have HTTP 2265// parameters, as all fields not bound by the path end in the body. This 2266// makes this option more rarely used in practice when defining REST 2267// APIs. The common usage of `*` is in custom methods which don't use 2268// the URL at all for transferring data. It is possible to define 2269// multiple HTTP methods for one RPC by using the `additional_bindings` 2270// option. Example: service Messaging { rpc 2271// GetMessage(GetMessageRequest) returns (Message) { option 2272// (google.api.http) = { get: "/v1/messages/{message_id}" 2273// additional_bindings { get: 2274// "/v1/users/{user_id}/messages/{message_id}" } }; } } message 2275// GetMessageRequest { string message_id = 1; string user_id = 2; } This 2276// enables the following two alternative HTTP JSON to RPC mappings: HTTP 2277// | gRPC -----|----- `GET /v1/messages/123456` | 2278// `GetMessage(message_id: "123456")` `GET /v1/users/me/messages/123456` 2279// | `GetMessage(user_id: "me" message_id: "123456")` ## Rules for HTTP 2280// mapping 1. Leaf request fields (recursive expansion nested messages 2281// in the request message) are classified into three categories: - 2282// Fields referred by the path template. They are passed via the URL 2283// path. - Fields referred by the HttpRule.body. They are passed via the 2284// HTTP request body. - All other fields are passed via the URL query 2285// parameters, and the parameter name is the field path in the request 2286// message. A repeated field can be represented as multiple query 2287// parameters under the same name. 2. If HttpRule.body is "*", there is 2288// no URL query parameter, all fields are passed via URL path and HTTP 2289// request body. 3. If HttpRule.body is omitted, there is no HTTP 2290// request body, all fields are passed via URL path and URL query 2291// parameters. ### Path template syntax Template = "/" Segments [ Verb ] 2292// ; Segments = Segment { "/" Segment } ; Segment = "*" | "**" | LITERAL 2293// | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" ; 2294// FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` 2295// matches a single URL path segment. The syntax `**` matches zero or 2296// more URL path segments, which must be the last part of the URL path 2297// except the `Verb`. The syntax `Variable` matches part of the URL path 2298// as specified by its template. A variable template must not contain 2299// other variables. If a variable matches a single path segment, its 2300// template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The 2301// syntax `LITERAL` matches literal text in the URL path. If the 2302// `LITERAL` contains any reserved character, such characters should be 2303// percent-encoded before the matching. If a variable contains exactly 2304// one path segment, such as "{var}" or "{var=*}", when such a 2305// variable is expanded into a URL path on the client side, all 2306// characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server 2307// side does the reverse decoding. Such variables show up in the 2308// Discovery Document 2309// (https://developers.google.com/discovery/v1/reference/apis) as 2310// `{var}`. If a variable contains multiple path segments, such as 2311// "{var=foo/*}" or "{var=**}", when such a variable is expanded 2312// into a URL path on the client side, all characters except 2313// `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the 2314// reverse decoding, except "%2F" and "%2f" are left unchanged. Such 2315// variables show up in the Discovery Document 2316// (https://developers.google.com/discovery/v1/reference/apis) as 2317// `{+var}`. ## Using gRPC API Service Configuration gRPC API Service 2318// Configuration (service config) is a configuration language for 2319// configuring a gRPC service to become a user-facing product. The 2320// service config is simply the YAML representation of the 2321// `google.api.Service` proto message. As an alternative to annotating 2322// your proto file, you can configure gRPC transcoding in your service 2323// config YAML files. You do this by specifying a `HttpRule` that maps 2324// the gRPC method to a REST endpoint, achieving the same effect as the 2325// proto annotation. This can be particularly useful if you have a proto 2326// that is reused in multiple services. Note that any transcoding 2327// specified in the service config will override any matching 2328// transcoding configuration in the proto. Example: http: rules: # 2329// Selects a gRPC method and applies HttpRule to it. - selector: 2330// example.v1.Messaging.GetMessage get: 2331// /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC 2332// Transcoding is used to map a gRPC to JSON REST endpoints, the proto 2333// to JSON conversion must follow the proto3 specification 2334// (https://developers.google.com/protocol-buffers/docs/proto3#json). 2335// While the single segment variable follows the semantics of RFC 6570 2336// (https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String 2337// Expansion, the multi segment variable **does not** follow RFC 6570 2338// Section 3.2.3 Reserved Expansion. The reason is that the Reserved 2339// Expansion does not expand special characters like `?` and `#`, which 2340// would lead to invalid URLs. As the result, gRPC Transcoding uses a 2341// custom encoding for multi segment variables. The path variables 2342// **must not** refer to any repeated or mapped field, because client 2343// libraries are not capable of handling such variable expansion. The 2344// path variables **must not** capture the leading "/" character. The 2345// reason is that the most common use case "{var}" does not capture the 2346// leading "/" character. For consistency, all path variables must share 2347// the same behavior. Repeated message fields must not be mapped to URL 2348// query parameters, because no client library can support such 2349// complicated mapping. If an API needs to use a JSON array for request 2350// or response body, it can map the request or response body to a 2351// repeated field. However, some gRPC Transcoding implementations may 2352// not support this feature. 2353type HttpRule struct { 2354 // AdditionalBindings: Additional HTTP bindings for the selector. Nested 2355 // bindings must not contain an `additional_bindings` field themselves 2356 // (that is, the nesting may only be one level deep). 2357 AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"` 2358 2359 // Body: The name of the request field whose value is mapped to the HTTP 2360 // request body, or `*` for mapping all request fields not captured by 2361 // the path pattern to the HTTP body, or omitted for not having any HTTP 2362 // request body. NOTE: the referred field must be present at the 2363 // top-level of the request message type. 2364 Body string `json:"body,omitempty"` 2365 2366 // Custom: The custom pattern is used for specifying an HTTP method that 2367 // is not included in the `pattern` field, such as HEAD, or "*" to leave 2368 // the HTTP method unspecified for this rule. The wild-card rule is 2369 // useful for services that provide content to Web (HTML) clients. 2370 Custom *CustomHttpPattern `json:"custom,omitempty"` 2371 2372 // Delete: Maps to HTTP DELETE. Used for deleting a resource. 2373 Delete string `json:"delete,omitempty"` 2374 2375 // Get: Maps to HTTP GET. Used for listing and getting information about 2376 // resources. 2377 Get string `json:"get,omitempty"` 2378 2379 // Patch: Maps to HTTP PATCH. Used for updating a resource. 2380 Patch string `json:"patch,omitempty"` 2381 2382 // Post: Maps to HTTP POST. Used for creating a resource or performing 2383 // an action. 2384 Post string `json:"post,omitempty"` 2385 2386 // Put: Maps to HTTP PUT. Used for replacing a resource. 2387 Put string `json:"put,omitempty"` 2388 2389 // ResponseBody: Optional. The name of the response field whose value is 2390 // mapped to the HTTP response body. When omitted, the entire response 2391 // message will be used as the HTTP response body. NOTE: The referred 2392 // field must be present at the top-level of the response message type. 2393 ResponseBody string `json:"responseBody,omitempty"` 2394 2395 // Selector: Selects a method to which this rule applies. Refer to 2396 // selector for syntax details. 2397 Selector string `json:"selector,omitempty"` 2398 2399 // ForceSendFields is a list of field names (e.g. "AdditionalBindings") 2400 // to unconditionally include in API requests. By default, fields with 2401 // empty values are omitted from API requests. However, any non-pointer, 2402 // non-interface field appearing in ForceSendFields will be sent to the 2403 // server regardless of whether the field is empty or not. This may be 2404 // used to include empty fields in Patch requests. 2405 ForceSendFields []string `json:"-"` 2406 2407 // NullFields is a list of field names (e.g. "AdditionalBindings") to 2408 // include in API requests with the JSON null value. By default, fields 2409 // with empty values are omitted from API requests. However, any field 2410 // with an empty value appearing in NullFields will be sent to the 2411 // server as null. It is an error if a field in this list has a 2412 // non-empty value. This may be used to include null fields in Patch 2413 // requests. 2414 NullFields []string `json:"-"` 2415} 2416 2417func (s *HttpRule) MarshalJSON() ([]byte, error) { 2418 type NoMethod HttpRule 2419 raw := NoMethod(*s) 2420 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2421} 2422 2423// JwtLocation: Specifies a location to extract JWT from an API request. 2424type JwtLocation struct { 2425 // Header: Specifies HTTP header name to extract JWT token. 2426 Header string `json:"header,omitempty"` 2427 2428 // Query: Specifies URL query parameter name to extract JWT token. 2429 Query string `json:"query,omitempty"` 2430 2431 // ValuePrefix: The value prefix. The value format is 2432 // "value_prefix{token}" Only applies to "in" header type. Must be empty 2433 // for "in" query type. If not empty, the header value has to match 2434 // (case sensitive) this prefix. If not matched, JWT will not be 2435 // extracted. If matched, JWT will be extracted after the prefix is 2436 // removed. For example, for "Authorization: Bearer {JWT}", 2437 // value_prefix="Bearer " with a space at the end. 2438 ValuePrefix string `json:"valuePrefix,omitempty"` 2439 2440 // ForceSendFields is a list of field names (e.g. "Header") to 2441 // unconditionally include in API requests. By default, fields with 2442 // empty values are omitted from API requests. However, any non-pointer, 2443 // non-interface field appearing in ForceSendFields will be sent to the 2444 // server regardless of whether the field is empty or not. This may be 2445 // used to include empty fields in Patch requests. 2446 ForceSendFields []string `json:"-"` 2447 2448 // NullFields is a list of field names (e.g. "Header") to include in API 2449 // requests with the JSON null value. By default, fields with empty 2450 // values are omitted from API requests. However, any field with an 2451 // empty value appearing in NullFields will be sent to the server as 2452 // null. It is an error if a field in this list has a non-empty value. 2453 // This may be used to include null fields in Patch requests. 2454 NullFields []string `json:"-"` 2455} 2456 2457func (s *JwtLocation) MarshalJSON() ([]byte, error) { 2458 type NoMethod JwtLocation 2459 raw := NoMethod(*s) 2460 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2461} 2462 2463// LabelDescriptor: A description of a label. 2464type LabelDescriptor struct { 2465 // Description: A human-readable description for the label. 2466 Description string `json:"description,omitempty"` 2467 2468 // Key: The label key. 2469 Key string `json:"key,omitempty"` 2470 2471 // ValueType: The type of data that can be assigned to the label. 2472 // 2473 // Possible values: 2474 // "STRING" - A variable-length string. This is the default. 2475 // "BOOL" - Boolean; true or false. 2476 // "INT64" - A 64-bit signed integer. 2477 ValueType string `json:"valueType,omitempty"` 2478 2479 // ForceSendFields is a list of field names (e.g. "Description") to 2480 // unconditionally include in API requests. By default, fields with 2481 // empty values are omitted from API requests. However, any non-pointer, 2482 // non-interface field appearing in ForceSendFields will be sent to the 2483 // server regardless of whether the field is empty or not. This may be 2484 // used to include empty fields in Patch requests. 2485 ForceSendFields []string `json:"-"` 2486 2487 // NullFields is a list of field names (e.g. "Description") to include 2488 // in API requests with the JSON null value. By default, fields with 2489 // empty values are omitted from API requests. However, any field with 2490 // an empty value appearing in NullFields will be sent to the server as 2491 // null. It is an error if a field in this list has a non-empty value. 2492 // This may be used to include null fields in Patch requests. 2493 NullFields []string `json:"-"` 2494} 2495 2496func (s *LabelDescriptor) MarshalJSON() ([]byte, error) { 2497 type NoMethod LabelDescriptor 2498 raw := NoMethod(*s) 2499 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2500} 2501 2502// ListConnectionsResponse: ListConnectionsResponse is the response to 2503// list peering states for the given service and consumer project. 2504type ListConnectionsResponse struct { 2505 // Connections: The list of Connections. 2506 Connections []*Connection `json:"connections,omitempty"` 2507 2508 // ServerResponse contains the HTTP response code and headers from the 2509 // server. 2510 googleapi.ServerResponse `json:"-"` 2511 2512 // ForceSendFields is a list of field names (e.g. "Connections") to 2513 // unconditionally include in API requests. By default, fields with 2514 // empty values are omitted from API requests. However, any non-pointer, 2515 // non-interface field appearing in ForceSendFields will be sent to the 2516 // server regardless of whether the field is empty or not. This may be 2517 // used to include empty fields in Patch requests. 2518 ForceSendFields []string `json:"-"` 2519 2520 // NullFields is a list of field names (e.g. "Connections") to include 2521 // in API requests with the JSON null value. By default, fields with 2522 // empty values are omitted from API requests. However, any field with 2523 // an empty value appearing in NullFields will be sent to the server as 2524 // null. It is an error if a field in this list has a non-empty value. 2525 // This may be used to include null fields in Patch requests. 2526 NullFields []string `json:"-"` 2527} 2528 2529func (s *ListConnectionsResponse) MarshalJSON() ([]byte, error) { 2530 type NoMethod ListConnectionsResponse 2531 raw := NoMethod(*s) 2532 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2533} 2534 2535// ListOperationsResponse: The response message for 2536// Operations.ListOperations. 2537type ListOperationsResponse struct { 2538 // NextPageToken: The standard List next-page token. 2539 NextPageToken string `json:"nextPageToken,omitempty"` 2540 2541 // Operations: A list of operations that matches the specified filter in 2542 // the request. 2543 Operations []*Operation `json:"operations,omitempty"` 2544 2545 // ServerResponse contains the HTTP response code and headers from the 2546 // server. 2547 googleapi.ServerResponse `json:"-"` 2548 2549 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2550 // unconditionally include in API requests. By default, fields with 2551 // empty values are omitted from API requests. However, any non-pointer, 2552 // non-interface field appearing in ForceSendFields will be sent to the 2553 // server regardless of whether the field is empty or not. This may be 2554 // used to include empty fields in Patch requests. 2555 ForceSendFields []string `json:"-"` 2556 2557 // NullFields is a list of field names (e.g. "NextPageToken") to include 2558 // in API requests with the JSON null value. By default, fields with 2559 // empty values are omitted from API requests. However, any field with 2560 // an empty value appearing in NullFields will be sent to the server as 2561 // null. It is an error if a field in this list has a non-empty value. 2562 // This may be used to include null fields in Patch requests. 2563 NullFields []string `json:"-"` 2564} 2565 2566func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 2567 type NoMethod ListOperationsResponse 2568 raw := NoMethod(*s) 2569 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2570} 2571 2572// ListPeeredDnsDomainsResponse: Response to list peered DNS domains for 2573// a given connection. 2574type ListPeeredDnsDomainsResponse struct { 2575 // PeeredDnsDomains: The list of peered DNS domains. 2576 PeeredDnsDomains []*PeeredDnsDomain `json:"peeredDnsDomains,omitempty"` 2577 2578 // ServerResponse contains the HTTP response code and headers from the 2579 // server. 2580 googleapi.ServerResponse `json:"-"` 2581 2582 // ForceSendFields is a list of field names (e.g. "PeeredDnsDomains") to 2583 // unconditionally include in API requests. By default, fields with 2584 // empty values are omitted from API requests. However, any non-pointer, 2585 // non-interface field appearing in ForceSendFields will be sent to the 2586 // server regardless of whether the field is empty or not. This may be 2587 // used to include empty fields in Patch requests. 2588 ForceSendFields []string `json:"-"` 2589 2590 // NullFields is a list of field names (e.g. "PeeredDnsDomains") to 2591 // include in API requests with the JSON null value. By default, fields 2592 // with empty values are omitted from API requests. However, any field 2593 // with an empty value appearing in NullFields will be sent to the 2594 // server as null. It is an error if a field in this list has a 2595 // non-empty value. This may be used to include null fields in Patch 2596 // requests. 2597 NullFields []string `json:"-"` 2598} 2599 2600func (s *ListPeeredDnsDomainsResponse) MarshalJSON() ([]byte, error) { 2601 type NoMethod ListPeeredDnsDomainsResponse 2602 raw := NoMethod(*s) 2603 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2604} 2605 2606// LogDescriptor: A description of a log type. Example in YAML format: - 2607// name: library.googleapis.com/activity_history description: The 2608// history of borrowing and returning library items. display_name: 2609// Activity labels: - key: /customer_id description: Identifier of a 2610// library customer 2611type LogDescriptor struct { 2612 // Description: A human-readable description of this log. This 2613 // information appears in the documentation and can contain details. 2614 Description string `json:"description,omitempty"` 2615 2616 // DisplayName: The human-readable name for this log. This information 2617 // appears on the user interface and should be concise. 2618 DisplayName string `json:"displayName,omitempty"` 2619 2620 // Labels: The set of labels that are available to describe a specific 2621 // log entry. Runtime requests that contain labels not specified here 2622 // are considered invalid. 2623 Labels []*LabelDescriptor `json:"labels,omitempty"` 2624 2625 // Name: The name of the log. It must be less than 512 characters long 2626 // and can include the following characters: upper- and lower-case 2627 // alphanumeric characters [A-Za-z0-9], and punctuation characters 2628 // including slash, underscore, hyphen, period [/_-.]. 2629 Name string `json:"name,omitempty"` 2630 2631 // ForceSendFields is a list of field names (e.g. "Description") to 2632 // unconditionally include in API requests. By default, fields with 2633 // empty values are omitted from API requests. However, any non-pointer, 2634 // non-interface field appearing in ForceSendFields will be sent to the 2635 // server regardless of whether the field is empty or not. This may be 2636 // used to include empty fields in Patch requests. 2637 ForceSendFields []string `json:"-"` 2638 2639 // NullFields is a list of field names (e.g. "Description") to include 2640 // in API requests with the JSON null value. By default, fields with 2641 // empty values are omitted from API requests. However, any field with 2642 // an empty value appearing in NullFields will be sent to the server as 2643 // null. It is an error if a field in this list has a non-empty value. 2644 // This may be used to include null fields in Patch requests. 2645 NullFields []string `json:"-"` 2646} 2647 2648func (s *LogDescriptor) MarshalJSON() ([]byte, error) { 2649 type NoMethod LogDescriptor 2650 raw := NoMethod(*s) 2651 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2652} 2653 2654// Logging: Logging configuration of the service. The following example 2655// shows how to configure logs to be sent to the producer and consumer 2656// projects. In the example, the `activity_history` log is sent to both 2657// the producer and consumer projects, whereas the `purchase_history` 2658// log is only sent to the producer project. monitored_resources: - 2659// type: library.googleapis.com/branch labels: - key: /city description: 2660// The city where the library branch is located in. - key: /name 2661// description: The name of the branch. logs: - name: activity_history 2662// labels: - key: /customer_id - name: purchase_history logging: 2663// producer_destinations: - monitored_resource: 2664// library.googleapis.com/branch logs: - activity_history - 2665// purchase_history consumer_destinations: - monitored_resource: 2666// library.googleapis.com/branch logs: - activity_history 2667type Logging struct { 2668 // ConsumerDestinations: Logging configurations for sending logs to the 2669 // consumer project. There can be multiple consumer destinations, each 2670 // one must have a different monitored resource type. A log can be used 2671 // in at most one consumer destination. 2672 ConsumerDestinations []*LoggingDestination `json:"consumerDestinations,omitempty"` 2673 2674 // ProducerDestinations: Logging configurations for sending logs to the 2675 // producer project. There can be multiple producer destinations, each 2676 // one must have a different monitored resource type. A log can be used 2677 // in at most one producer destination. 2678 ProducerDestinations []*LoggingDestination `json:"producerDestinations,omitempty"` 2679 2680 // ForceSendFields is a list of field names (e.g. 2681 // "ConsumerDestinations") to unconditionally include in API requests. 2682 // By default, fields with empty values are omitted from API requests. 2683 // However, any non-pointer, non-interface field appearing in 2684 // ForceSendFields will be sent to the server regardless of whether the 2685 // field is empty or not. This may be used to include empty fields in 2686 // Patch requests. 2687 ForceSendFields []string `json:"-"` 2688 2689 // NullFields is a list of field names (e.g. "ConsumerDestinations") to 2690 // include in API requests with the JSON null value. By default, fields 2691 // with empty values are omitted from API requests. However, any field 2692 // with an empty value appearing in NullFields will be sent to the 2693 // server as null. It is an error if a field in this list has a 2694 // non-empty value. This may be used to include null fields in Patch 2695 // requests. 2696 NullFields []string `json:"-"` 2697} 2698 2699func (s *Logging) MarshalJSON() ([]byte, error) { 2700 type NoMethod Logging 2701 raw := NoMethod(*s) 2702 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2703} 2704 2705// LoggingDestination: Configuration of a specific logging destination 2706// (the producer project or the consumer project). 2707type LoggingDestination struct { 2708 // Logs: Names of the logs to be sent to this destination. Each name 2709 // must be defined in the Service.logs section. If the log name is not a 2710 // domain scoped name, it will be automatically prefixed with the 2711 // service name followed by "/". 2712 Logs []string `json:"logs,omitempty"` 2713 2714 // MonitoredResource: The monitored resource type. The type must be 2715 // defined in the Service.monitored_resources section. 2716 MonitoredResource string `json:"monitoredResource,omitempty"` 2717 2718 // ForceSendFields is a list of field names (e.g. "Logs") to 2719 // unconditionally include in API requests. By default, fields with 2720 // empty values are omitted from API requests. However, any non-pointer, 2721 // non-interface field appearing in ForceSendFields will be sent to the 2722 // server regardless of whether the field is empty or not. This may be 2723 // used to include empty fields in Patch requests. 2724 ForceSendFields []string `json:"-"` 2725 2726 // NullFields is a list of field names (e.g. "Logs") to include in API 2727 // requests with the JSON null value. By default, fields with empty 2728 // values are omitted from API requests. However, any field with an 2729 // empty value appearing in NullFields will be sent to the server as 2730 // null. It is an error if a field in this list has a non-empty value. 2731 // This may be used to include null fields in Patch requests. 2732 NullFields []string `json:"-"` 2733} 2734 2735func (s *LoggingDestination) MarshalJSON() ([]byte, error) { 2736 type NoMethod LoggingDestination 2737 raw := NoMethod(*s) 2738 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2739} 2740 2741// Method: Method represents a method of an API interface. 2742type Method struct { 2743 // Name: The simple name of this method. 2744 Name string `json:"name,omitempty"` 2745 2746 // Options: Any metadata attached to the method. 2747 Options []*Option `json:"options,omitempty"` 2748 2749 // RequestStreaming: If true, the request is streamed. 2750 RequestStreaming bool `json:"requestStreaming,omitempty"` 2751 2752 // RequestTypeUrl: A URL of the input message type. 2753 RequestTypeUrl string `json:"requestTypeUrl,omitempty"` 2754 2755 // ResponseStreaming: If true, the response is streamed. 2756 ResponseStreaming bool `json:"responseStreaming,omitempty"` 2757 2758 // ResponseTypeUrl: The URL of the output message type. 2759 ResponseTypeUrl string `json:"responseTypeUrl,omitempty"` 2760 2761 // Syntax: The source syntax of this method. 2762 // 2763 // Possible values: 2764 // "SYNTAX_PROTO2" - Syntax `proto2`. 2765 // "SYNTAX_PROTO3" - Syntax `proto3`. 2766 Syntax string `json:"syntax,omitempty"` 2767 2768 // ForceSendFields is a list of field names (e.g. "Name") to 2769 // unconditionally include in API requests. By default, fields with 2770 // empty values are omitted from API requests. However, any non-pointer, 2771 // non-interface field appearing in ForceSendFields will be sent to the 2772 // server regardless of whether the field is empty or not. This may be 2773 // used to include empty fields in Patch requests. 2774 ForceSendFields []string `json:"-"` 2775 2776 // NullFields is a list of field names (e.g. "Name") to include in API 2777 // requests with the JSON null value. By default, fields with empty 2778 // values are omitted from API requests. However, any field with an 2779 // empty value appearing in NullFields will be sent to the server as 2780 // null. It is an error if a field in this list has a non-empty value. 2781 // This may be used to include null fields in Patch requests. 2782 NullFields []string `json:"-"` 2783} 2784 2785func (s *Method) MarshalJSON() ([]byte, error) { 2786 type NoMethod Method 2787 raw := NoMethod(*s) 2788 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2789} 2790 2791// MetricDescriptor: Defines a metric type and its schema. Once a metric 2792// descriptor is created, deleting or altering it stops data collection 2793// and makes the metric type's existing data unusable. 2794type MetricDescriptor struct { 2795 // Description: A detailed description of the metric, which can be used 2796 // in documentation. 2797 Description string `json:"description,omitempty"` 2798 2799 // DisplayName: A concise name for the metric, which can be displayed in 2800 // user interfaces. Use sentence case without an ending period, for 2801 // example "Request count". This field is optional but it is recommended 2802 // to be set for any metrics associated with user-visible concepts, such 2803 // as Quota. 2804 DisplayName string `json:"displayName,omitempty"` 2805 2806 // Labels: The set of labels that can be used to describe a specific 2807 // instance of this metric type. For example, the 2808 // `appengine.googleapis.com/http/server/response_latencies` metric type 2809 // has a label for the HTTP response code, `response_code`, so you can 2810 // look at latencies for successful responses or just for responses that 2811 // failed. 2812 Labels []*LabelDescriptor `json:"labels,omitempty"` 2813 2814 // LaunchStage: Optional. The launch stage of the metric definition. 2815 // 2816 // Possible values: 2817 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. 2818 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not 2819 // use it. 2820 // "PRELAUNCH" - Prelaunch features are hidden from users and are only 2821 // visible internally. 2822 // "EARLY_ACCESS" - Early Access features are limited to a closed 2823 // group of testers. To use these features, you must sign up in advance 2824 // and sign a Trusted Tester agreement (which includes confidentiality 2825 // provisions). These features may be unstable, changed in 2826 // backward-incompatible ways, and are not guaranteed to be released. 2827 // "ALPHA" - Alpha is a limited availability test for releases before 2828 // they are cleared for widespread use. By Alpha, all significant design 2829 // issues are resolved and we are in the process of verifying 2830 // functionality. Alpha customers need to apply for access, agree to 2831 // applicable terms, and have their projects allowlisted. Alpha releases 2832 // don’t have to be feature complete, no SLAs are provided, and there 2833 // are no technical support obligations, but they will be far enough 2834 // along that customers can actually use them in test environments or 2835 // for limited-use tests -- just like they would in normal production 2836 // cases. 2837 // "BETA" - Beta is the point at which we are ready to open a release 2838 // for any customer to use. There are no SLA or technical support 2839 // obligations in a Beta release. Products will be complete from a 2840 // feature perspective, but may have some open outstanding issues. Beta 2841 // releases are suitable for limited production use cases. 2842 // "GA" - GA features are open to all developers and are considered 2843 // stable and fully qualified for production use. 2844 // "DEPRECATED" - Deprecated features are scheduled to be shut down 2845 // and removed. For more information, see the “Deprecation Policy” 2846 // section of our [Terms of Service](https://cloud.google.com/terms/) 2847 // and the [Google Cloud Platform Subject to the Deprecation 2848 // Policy](https://cloud.google.com/terms/deprecation) documentation. 2849 LaunchStage string `json:"launchStage,omitempty"` 2850 2851 // Metadata: Optional. Metadata which can be used to guide usage of the 2852 // metric. 2853 Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"` 2854 2855 // MetricKind: Whether the metric records instantaneous values, changes 2856 // to a value, etc. Some combinations of `metric_kind` and `value_type` 2857 // might not be supported. 2858 // 2859 // Possible values: 2860 // "METRIC_KIND_UNSPECIFIED" - Do not use this default value. 2861 // "GAUGE" - An instantaneous measurement of a value. 2862 // "DELTA" - The change in a value during a time interval. 2863 // "CUMULATIVE" - A value accumulated over a time interval. Cumulative 2864 // measurements in a time series should have the same start time and 2865 // increasing end times, until an event resets the cumulative value to 2866 // zero and sets a new start time for the following points. 2867 MetricKind string `json:"metricKind,omitempty"` 2868 2869 // MonitoredResourceTypes: Read-only. If present, then a time series, 2870 // which is identified partially by a metric type and a 2871 // MonitoredResourceDescriptor, that is associated with this metric type 2872 // can only be associated with one of the monitored resource types 2873 // listed here. 2874 MonitoredResourceTypes []string `json:"monitoredResourceTypes,omitempty"` 2875 2876 // Name: The resource name of the metric descriptor. 2877 Name string `json:"name,omitempty"` 2878 2879 // Type: The metric type, including its DNS name prefix. The type is not 2880 // URL-encoded. All user-defined metric types have the DNS name 2881 // `custom.googleapis.com` or `external.googleapis.com`. Metric types 2882 // should use a natural hierarchical grouping. For example: 2883 // "custom.googleapis.com/invoice/paid/amount" 2884 // "external.googleapis.com/prometheus/up" 2885 // "appengine.googleapis.com/http/server/response_latencies" 2886 Type string `json:"type,omitempty"` 2887 2888 // Unit: The units in which the metric value is reported. It is only 2889 // applicable if the `value_type` is `INT64`, `DOUBLE`, or 2890 // `DISTRIBUTION`. The `unit` defines the representation of the stored 2891 // metric values. Different systems might scale the values to be more 2892 // easily displayed (so a value of `0.02kBy` _might_ be displayed as 2893 // `20By`, and a value of `3523kBy` _might_ be displayed as `3.5MBy`). 2894 // However, if the `unit` is `kBy`, then the value of the metric is 2895 // always in thousands of bytes, no matter how it might be displayed. If 2896 // you want a custom metric to record the exact number of CPU-seconds 2897 // used by a job, you can create an `INT64 CUMULATIVE` metric whose 2898 // `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the 2899 // job uses 12,005 CPU-seconds, then the value is written as `12005`. 2900 // Alternatively, if you want a custom metric to record data in a more 2901 // granular way, you can create a `DOUBLE CUMULATIVE` metric whose 2902 // `unit` is `ks{CPU}`, and then write the value `12.005` (which is 2903 // `12005/1000`), or use `Kis{CPU}` and write `11.723` (which is 2904 // `12005/1024`). The supported units are a subset of The Unified Code 2905 // for Units of Measure (https://unitsofmeasure.org/ucum.html) standard: 2906 // **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * `min` 2907 // minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** 2908 // * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera 2909 // (10^12) * `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * 2910 // `Y` yotta (10^24) * `m` milli (10^-3) * `u` micro (10^-6) * `n` nano 2911 // (10^-9) * `p` pico (10^-12) * `f` femto (10^-15) * `a` atto (10^-18) 2912 // * `z` zepto (10^-21) * `y` yocto (10^-24) * `Ki` kibi (2^10) * `Mi` 2913 // mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) 2914 // **Grammar** The grammar also includes these connectors: * `/` 2915 // division or ratio (as an infix operator). For examples, `kBy/{email}` 2916 // or `MiBy/10ms` (although you should almost never have `/s` in a 2917 // metric `unit`; rates should always be computed at query time from the 2918 // underlying cumulative or delta value). * `.` multiplication or 2919 // composition (as an infix operator). For examples, `GBy.d` or 2920 // `k{watt}.h`. The grammar for a unit is as follows: Expression = 2921 // Component { "." Component } { "/" Component } ; Component = ( [ 2922 // PREFIX ] UNIT | "%" ) [ Annotation ] | Annotation | "1" ; Annotation 2923 // = "{" NAME "}" ; Notes: * `Annotation` is just a comment if it 2924 // follows a `UNIT`. If the annotation is used alone, then the unit is 2925 // equivalent to `1`. For examples, `{request}/s == 1/s`, 2926 // `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank 2927 // printable ASCII characters not containing `{` or `}`. * `1` 2928 // represents a unitary dimensionless unit 2929 // (https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as 2930 // in `1/s`. It is typically used when none of the basic units are 2931 // appropriate. For example, "new users per day" can be represented as 2932 // `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new 2933 // users). Alternatively, "thousands of page views per day" would be 2934 // represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric 2935 // value of `5.3` would mean "5300 page views per day"). * `%` 2936 // represents dimensionless value of 1/100, and annotates values giving 2937 // a percentage (so the metric values are typically in the range of 2938 // 0..100, and a metric value `3` means "3 percent"). * `10^2.%` 2939 // indicates a metric contains a ratio, typically in the range 0..1, 2940 // that will be multiplied by 100 and displayed as a percentage (so a 2941 // metric value `0.03` means "3 percent"). 2942 Unit string `json:"unit,omitempty"` 2943 2944 // ValueType: Whether the measurement is an integer, a floating-point 2945 // number, etc. Some combinations of `metric_kind` and `value_type` 2946 // might not be supported. 2947 // 2948 // Possible values: 2949 // "VALUE_TYPE_UNSPECIFIED" - Do not use this default value. 2950 // "BOOL" - The value is a boolean. This value type can be used only 2951 // if the metric kind is `GAUGE`. 2952 // "INT64" - The value is a signed 64-bit integer. 2953 // "DOUBLE" - The value is a double precision floating point number. 2954 // "STRING" - The value is a text string. This value type can be used 2955 // only if the metric kind is `GAUGE`. 2956 // "DISTRIBUTION" - The value is a `Distribution`. 2957 // "MONEY" - The value is money. 2958 ValueType string `json:"valueType,omitempty"` 2959 2960 // ForceSendFields is a list of field names (e.g. "Description") to 2961 // unconditionally include in API requests. By default, fields with 2962 // empty values are omitted from API requests. However, any non-pointer, 2963 // non-interface field appearing in ForceSendFields will be sent to the 2964 // server regardless of whether the field is empty or not. This may be 2965 // used to include empty fields in Patch requests. 2966 ForceSendFields []string `json:"-"` 2967 2968 // NullFields is a list of field names (e.g. "Description") to include 2969 // in API requests with the JSON null value. By default, fields with 2970 // empty values are omitted from API requests. However, any field with 2971 // an empty value appearing in NullFields will be sent to the server as 2972 // null. It is an error if a field in this list has a non-empty value. 2973 // This may be used to include null fields in Patch requests. 2974 NullFields []string `json:"-"` 2975} 2976 2977func (s *MetricDescriptor) MarshalJSON() ([]byte, error) { 2978 type NoMethod MetricDescriptor 2979 raw := NoMethod(*s) 2980 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2981} 2982 2983// MetricDescriptorMetadata: Additional annotations that can be used to 2984// guide the usage of a metric. 2985type MetricDescriptorMetadata struct { 2986 // IngestDelay: The delay of data points caused by ingestion. Data 2987 // points older than this age are guaranteed to be ingested and 2988 // available to be read, excluding data loss due to errors. 2989 IngestDelay string `json:"ingestDelay,omitempty"` 2990 2991 // LaunchStage: Deprecated. Must use the MetricDescriptor.launch_stage 2992 // instead. 2993 // 2994 // Possible values: 2995 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. 2996 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not 2997 // use it. 2998 // "PRELAUNCH" - Prelaunch features are hidden from users and are only 2999 // visible internally. 3000 // "EARLY_ACCESS" - Early Access features are limited to a closed 3001 // group of testers. To use these features, you must sign up in advance 3002 // and sign a Trusted Tester agreement (which includes confidentiality 3003 // provisions). These features may be unstable, changed in 3004 // backward-incompatible ways, and are not guaranteed to be released. 3005 // "ALPHA" - Alpha is a limited availability test for releases before 3006 // they are cleared for widespread use. By Alpha, all significant design 3007 // issues are resolved and we are in the process of verifying 3008 // functionality. Alpha customers need to apply for access, agree to 3009 // applicable terms, and have their projects allowlisted. Alpha releases 3010 // don’t have to be feature complete, no SLAs are provided, and there 3011 // are no technical support obligations, but they will be far enough 3012 // along that customers can actually use them in test environments or 3013 // for limited-use tests -- just like they would in normal production 3014 // cases. 3015 // "BETA" - Beta is the point at which we are ready to open a release 3016 // for any customer to use. There are no SLA or technical support 3017 // obligations in a Beta release. Products will be complete from a 3018 // feature perspective, but may have some open outstanding issues. Beta 3019 // releases are suitable for limited production use cases. 3020 // "GA" - GA features are open to all developers and are considered 3021 // stable and fully qualified for production use. 3022 // "DEPRECATED" - Deprecated features are scheduled to be shut down 3023 // and removed. For more information, see the “Deprecation Policy” 3024 // section of our [Terms of Service](https://cloud.google.com/terms/) 3025 // and the [Google Cloud Platform Subject to the Deprecation 3026 // Policy](https://cloud.google.com/terms/deprecation) documentation. 3027 LaunchStage string `json:"launchStage,omitempty"` 3028 3029 // SamplePeriod: The sampling period of metric data points. For metrics 3030 // which are written periodically, consecutive data points are stored at 3031 // this time interval, excluding data loss due to errors. Metrics with a 3032 // higher granularity have a smaller sampling period. 3033 SamplePeriod string `json:"samplePeriod,omitempty"` 3034 3035 // ForceSendFields is a list of field names (e.g. "IngestDelay") to 3036 // unconditionally include in API requests. By default, fields with 3037 // empty values are omitted from API requests. However, any non-pointer, 3038 // non-interface field appearing in ForceSendFields will be sent to the 3039 // server regardless of whether the field is empty or not. This may be 3040 // used to include empty fields in Patch requests. 3041 ForceSendFields []string `json:"-"` 3042 3043 // NullFields is a list of field names (e.g. "IngestDelay") to include 3044 // in API requests with the JSON null value. By default, fields with 3045 // empty values are omitted from API requests. However, any field with 3046 // an empty value appearing in NullFields will be sent to the server as 3047 // null. It is an error if a field in this list has a non-empty value. 3048 // This may be used to include null fields in Patch requests. 3049 NullFields []string `json:"-"` 3050} 3051 3052func (s *MetricDescriptorMetadata) MarshalJSON() ([]byte, error) { 3053 type NoMethod MetricDescriptorMetadata 3054 raw := NoMethod(*s) 3055 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3056} 3057 3058// MetricRule: Bind API methods to metrics. Binding a method to a metric 3059// causes that metric's configured quota behaviors to apply to the 3060// method call. 3061type MetricRule struct { 3062 // MetricCosts: Metrics to update when the selected methods are called, 3063 // and the associated cost applied to each metric. The key of the map is 3064 // the metric name, and the values are the amount increased for the 3065 // metric against which the quota limits are defined. The value must not 3066 // be negative. 3067 MetricCosts map[string]string `json:"metricCosts,omitempty"` 3068 3069 // Selector: Selects the methods to which this rule applies. Refer to 3070 // selector for syntax details. 3071 Selector string `json:"selector,omitempty"` 3072 3073 // ForceSendFields is a list of field names (e.g. "MetricCosts") to 3074 // unconditionally include in API requests. By default, fields with 3075 // empty values are omitted from API requests. However, any non-pointer, 3076 // non-interface field appearing in ForceSendFields will be sent to the 3077 // server regardless of whether the field is empty or not. This may be 3078 // used to include empty fields in Patch requests. 3079 ForceSendFields []string `json:"-"` 3080 3081 // NullFields is a list of field names (e.g. "MetricCosts") to include 3082 // in API requests with the JSON null value. By default, fields with 3083 // empty values are omitted from API requests. However, any field with 3084 // an empty value appearing in NullFields will be sent to the server as 3085 // null. It is an error if a field in this list has a non-empty value. 3086 // This may be used to include null fields in Patch requests. 3087 NullFields []string `json:"-"` 3088} 3089 3090func (s *MetricRule) MarshalJSON() ([]byte, error) { 3091 type NoMethod MetricRule 3092 raw := NoMethod(*s) 3093 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3094} 3095 3096// Mixin: Declares an API Interface to be included in this interface. 3097// The including interface must redeclare all the methods from the 3098// included interface, but documentation and options are inherited as 3099// follows: - If after comment and whitespace stripping, the 3100// documentation string of the redeclared method is empty, it will be 3101// inherited from the original method. - Each annotation belonging to 3102// the service config (http, visibility) which is not set in the 3103// redeclared method will be inherited. - If an http annotation is 3104// inherited, the path pattern will be modified as follows. Any version 3105// prefix will be replaced by the version of the including interface 3106// plus the root path if specified. Example of a simple mixin: package 3107// google.acl.v1; service AccessControl { // Get the underlying ACL 3108// object. rpc GetAcl(GetAclRequest) returns (Acl) { option 3109// (google.api.http).get = "/v1/{resource=**}:getAcl"; } } package 3110// google.storage.v2; service Storage { // rpc GetAcl(GetAclRequest) 3111// returns (Acl); // Get a data record. rpc GetData(GetDataRequest) 3112// returns (Data) { option (google.api.http).get = "/v2/{resource=**}"; 3113// } } Example of a mixin configuration: apis: - name: 3114// google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl 3115// The mixin construct implies that all methods in `AccessControl` are 3116// also declared with same name and request/response types in `Storage`. 3117// A documentation generator or annotation processor will see the 3118// effective `Storage.GetAcl` method after inheriting documentation and 3119// annotations as follows: service Storage { // Get the underlying ACL 3120// object. rpc GetAcl(GetAclRequest) returns (Acl) { option 3121// (google.api.http).get = "/v2/{resource=**}:getAcl"; } ... } Note how 3122// the version in the path pattern changed from `v1` to `v2`. If the 3123// `root` field in the mixin is specified, it should be a relative path 3124// under which inherited HTTP paths are placed. Example: apis: - name: 3125// google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl 3126// root: acls This implies the following inherited HTTP annotation: 3127// service Storage { // Get the underlying ACL object. rpc 3128// GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = 3129// "/v2/acls/{resource=**}:getAcl"; } ... } 3130type Mixin struct { 3131 // Name: The fully qualified name of the interface which is included. 3132 Name string `json:"name,omitempty"` 3133 3134 // Root: If non-empty specifies a path under which inherited HTTP paths 3135 // are rooted. 3136 Root string `json:"root,omitempty"` 3137 3138 // ForceSendFields is a list of field names (e.g. "Name") to 3139 // unconditionally include in API requests. By default, fields with 3140 // empty values are omitted from API requests. However, any non-pointer, 3141 // non-interface field appearing in ForceSendFields will be sent to the 3142 // server regardless of whether the field is empty or not. This may be 3143 // used to include empty fields in Patch requests. 3144 ForceSendFields []string `json:"-"` 3145 3146 // NullFields is a list of field names (e.g. "Name") to include in API 3147 // 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 *Mixin) MarshalJSON() ([]byte, error) { 3156 type NoMethod Mixin 3157 raw := NoMethod(*s) 3158 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3159} 3160 3161// MonitoredResourceDescriptor: An object that describes the schema of a 3162// MonitoredResource object using a type name and a set of labels. For 3163// example, the monitored resource descriptor for Google Compute Engine 3164// VM instances has a type of "gce_instance" and specifies the use of 3165// the labels "instance_id" and "zone" to identify particular VM 3166// instances. Different APIs can support different monitored resource 3167// types. APIs generally provide a `list` method that returns the 3168// monitored resource descriptors used by the API. 3169type MonitoredResourceDescriptor struct { 3170 // Description: Optional. A detailed description of the monitored 3171 // resource type that might be used in documentation. 3172 Description string `json:"description,omitempty"` 3173 3174 // DisplayName: Optional. A concise name for the monitored resource type 3175 // that might be displayed in user interfaces. It should be a Title 3176 // Cased Noun Phrase, without any article or other determiners. For 3177 // example, "Google Cloud SQL Database". 3178 DisplayName string `json:"displayName,omitempty"` 3179 3180 // Labels: Required. A set of labels used to describe instances of this 3181 // monitored resource type. For example, an individual Google Cloud SQL 3182 // database is identified by values for the labels "database_id" and 3183 // "zone". 3184 Labels []*LabelDescriptor `json:"labels,omitempty"` 3185 3186 // LaunchStage: Optional. The launch stage of the monitored resource 3187 // definition. 3188 // 3189 // Possible values: 3190 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. 3191 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not 3192 // use it. 3193 // "PRELAUNCH" - Prelaunch features are hidden from users and are only 3194 // visible internally. 3195 // "EARLY_ACCESS" - Early Access features are limited to a closed 3196 // group of testers. To use these features, you must sign up in advance 3197 // and sign a Trusted Tester agreement (which includes confidentiality 3198 // provisions). These features may be unstable, changed in 3199 // backward-incompatible ways, and are not guaranteed to be released. 3200 // "ALPHA" - Alpha is a limited availability test for releases before 3201 // they are cleared for widespread use. By Alpha, all significant design 3202 // issues are resolved and we are in the process of verifying 3203 // functionality. Alpha customers need to apply for access, agree to 3204 // applicable terms, and have their projects allowlisted. Alpha releases 3205 // don’t have to be feature complete, no SLAs are provided, and there 3206 // are no technical support obligations, but they will be far enough 3207 // along that customers can actually use them in test environments or 3208 // for limited-use tests -- just like they would in normal production 3209 // cases. 3210 // "BETA" - Beta is the point at which we are ready to open a release 3211 // for any customer to use. There are no SLA or technical support 3212 // obligations in a Beta release. Products will be complete from a 3213 // feature perspective, but may have some open outstanding issues. Beta 3214 // releases are suitable for limited production use cases. 3215 // "GA" - GA features are open to all developers and are considered 3216 // stable and fully qualified for production use. 3217 // "DEPRECATED" - Deprecated features are scheduled to be shut down 3218 // and removed. For more information, see the “Deprecation Policy” 3219 // section of our [Terms of Service](https://cloud.google.com/terms/) 3220 // and the [Google Cloud Platform Subject to the Deprecation 3221 // Policy](https://cloud.google.com/terms/deprecation) documentation. 3222 LaunchStage string `json:"launchStage,omitempty"` 3223 3224 // Name: Optional. The resource name of the monitored resource 3225 // descriptor: 3226 // "projects/{project_id}/monitoredResourceDescriptors/{type}" where 3227 // {type} is the value of the `type` field in this object and 3228 // {project_id} is a project ID that provides API-specific context for 3229 // accessing the type. APIs that do not use project information can use 3230 // the resource name format "monitoredResourceDescriptors/{type}". 3231 Name string `json:"name,omitempty"` 3232 3233 // Type: Required. The monitored resource type. For example, the type 3234 // "cloudsql_database" represents databases in Google Cloud SQL. 3235 Type string `json:"type,omitempty"` 3236 3237 // ForceSendFields is a list of field names (e.g. "Description") to 3238 // unconditionally include in API requests. By default, fields with 3239 // empty values are omitted from API requests. However, any non-pointer, 3240 // non-interface field appearing in ForceSendFields will be sent to the 3241 // server regardless of whether the field is empty or not. This may be 3242 // used to include empty fields in Patch requests. 3243 ForceSendFields []string `json:"-"` 3244 3245 // NullFields is a list of field names (e.g. "Description") to include 3246 // in API requests with the JSON null value. By default, fields with 3247 // empty values are omitted from API requests. However, any field with 3248 // an empty value appearing in NullFields will be sent to the server as 3249 // null. It is an error if a field in this list has a non-empty value. 3250 // This may be used to include null fields in Patch requests. 3251 NullFields []string `json:"-"` 3252} 3253 3254func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) { 3255 type NoMethod MonitoredResourceDescriptor 3256 raw := NoMethod(*s) 3257 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3258} 3259 3260// Monitoring: Monitoring configuration of the service. The example 3261// below shows how to configure monitored resources and metrics for 3262// monitoring. In the example, a monitored resource and two metrics are 3263// defined. The `library.googleapis.com/book/returned_count` metric is 3264// sent to both producer and consumer projects, whereas the 3265// `library.googleapis.com/book/num_overdue` metric is only sent to the 3266// consumer project. monitored_resources: - type: 3267// library.googleapis.com/Branch display_name: "Library Branch" 3268// description: "A branch of a library." launch_stage: GA labels: - key: 3269// resource_container description: "The Cloud container (ie. project id) 3270// for the Branch." - key: location description: "The location of the 3271// library branch." - key: branch_id description: "The id of the 3272// branch." metrics: - name: library.googleapis.com/book/returned_count 3273// display_name: "Books Returned" description: "The count of books that 3274// have been returned." launch_stage: GA metric_kind: DELTA value_type: 3275// INT64 unit: "1" labels: - key: customer_id description: "The id of 3276// the customer." - name: library.googleapis.com/book/num_overdue 3277// display_name: "Books Overdue" description: "The current number of 3278// overdue books." launch_stage: GA metric_kind: GAUGE value_type: INT64 3279// unit: "1" labels: - key: customer_id description: "The id of the 3280// customer." monitoring: producer_destinations: - monitored_resource: 3281// library.googleapis.com/Branch metrics: - 3282// library.googleapis.com/book/returned_count consumer_destinations: - 3283// monitored_resource: library.googleapis.com/Branch metrics: - 3284// library.googleapis.com/book/returned_count - 3285// library.googleapis.com/book/num_overdue 3286type Monitoring struct { 3287 // ConsumerDestinations: Monitoring configurations for sending metrics 3288 // to the consumer project. There can be multiple consumer destinations. 3289 // A monitored resource type may appear in multiple monitoring 3290 // destinations if different aggregations are needed for different sets 3291 // of metrics associated with that monitored resource type. A monitored 3292 // resource and metric pair may only be used once in the Monitoring 3293 // configuration. 3294 ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"` 3295 3296 // ProducerDestinations: Monitoring configurations for sending metrics 3297 // to the producer project. There can be multiple producer destinations. 3298 // A monitored resource type may appear in multiple monitoring 3299 // destinations if different aggregations are needed for different sets 3300 // of metrics associated with that monitored resource type. A monitored 3301 // resource and metric pair may only be used once in the Monitoring 3302 // configuration. 3303 ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"` 3304 3305 // ForceSendFields is a list of field names (e.g. 3306 // "ConsumerDestinations") to unconditionally include in API requests. 3307 // By default, fields with empty values are omitted from API requests. 3308 // However, any non-pointer, non-interface field appearing in 3309 // ForceSendFields will be sent to the server regardless of whether the 3310 // field is empty or not. This may be used to include empty fields in 3311 // Patch requests. 3312 ForceSendFields []string `json:"-"` 3313 3314 // NullFields is a list of field names (e.g. "ConsumerDestinations") to 3315 // include in API requests with the JSON null value. By default, fields 3316 // with empty values are omitted from API requests. However, any field 3317 // with an empty value appearing in NullFields will be sent to the 3318 // server as null. It is an error if a field in this list has a 3319 // non-empty value. This may be used to include null fields in Patch 3320 // requests. 3321 NullFields []string `json:"-"` 3322} 3323 3324func (s *Monitoring) MarshalJSON() ([]byte, error) { 3325 type NoMethod Monitoring 3326 raw := NoMethod(*s) 3327 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3328} 3329 3330// MonitoringDestination: Configuration of a specific monitoring 3331// destination (the producer project or the consumer project). 3332type MonitoringDestination struct { 3333 // Metrics: Types of the metrics to report to this monitoring 3334 // destination. Each type must be defined in Service.metrics section. 3335 Metrics []string `json:"metrics,omitempty"` 3336 3337 // MonitoredResource: The monitored resource type. The type must be 3338 // defined in Service.monitored_resources section. 3339 MonitoredResource string `json:"monitoredResource,omitempty"` 3340 3341 // ForceSendFields is a list of field names (e.g. "Metrics") to 3342 // unconditionally include in API requests. By default, fields with 3343 // empty values are omitted from API requests. However, any non-pointer, 3344 // non-interface field appearing in ForceSendFields will be sent to the 3345 // server regardless of whether the field is empty or not. This may be 3346 // used to include empty fields in Patch requests. 3347 ForceSendFields []string `json:"-"` 3348 3349 // NullFields is a list of field names (e.g. "Metrics") to include in 3350 // API requests with the JSON null value. By default, fields with empty 3351 // values are omitted from API requests. However, any field with an 3352 // empty value appearing in NullFields will be sent to the server as 3353 // null. It is an error if a field in this list has a non-empty value. 3354 // This may be used to include null fields in Patch requests. 3355 NullFields []string `json:"-"` 3356} 3357 3358func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { 3359 type NoMethod MonitoringDestination 3360 raw := NoMethod(*s) 3361 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3362} 3363 3364// OAuthRequirements: OAuth scopes are a way to define data and 3365// permissions on data. For example, there are scopes defined for 3366// "Read-only access to Google Calendar" and "Access to Cloud Platform". 3367// Users can consent to a scope for an application, giving it permission 3368// to access that data on their behalf. OAuth scope specifications 3369// should be fairly coarse grained; a user will need to see and 3370// understand the text description of what your scope means. In most 3371// cases: use one or at most two OAuth scopes for an entire family of 3372// products. If your product has multiple APIs, you should probably be 3373// sharing the OAuth scope across all of those APIs. When you need finer 3374// grained OAuth consent screens: talk with your product management 3375// about how developers will use them in practice. Please note that even 3376// though each of the canonical scopes is enough for a request to be 3377// accepted and passed to the backend, a request can still fail due to 3378// the backend requiring additional scopes or permissions. 3379type OAuthRequirements struct { 3380 // CanonicalScopes: The list of publicly documented OAuth scopes that 3381 // are allowed access. An OAuth token containing any of these scopes 3382 // will be accepted. Example: canonical_scopes: 3383 // https://www.googleapis.com/auth/calendar, 3384 // https://www.googleapis.com/auth/calendar.read 3385 CanonicalScopes string `json:"canonicalScopes,omitempty"` 3386 3387 // ForceSendFields is a list of field names (e.g. "CanonicalScopes") to 3388 // unconditionally include in API requests. By default, fields with 3389 // empty values are omitted from API requests. However, any non-pointer, 3390 // non-interface field appearing in ForceSendFields will be sent to the 3391 // server regardless of whether the field is empty or not. This may be 3392 // used to include empty fields in Patch requests. 3393 ForceSendFields []string `json:"-"` 3394 3395 // NullFields is a list of field names (e.g. "CanonicalScopes") to 3396 // include in API requests with the JSON null value. By default, fields 3397 // with empty values are omitted from API requests. However, any field 3398 // with an empty value appearing in NullFields will be sent to the 3399 // server as null. It is an error if a field in this list has a 3400 // non-empty value. This may be used to include null fields in Patch 3401 // requests. 3402 NullFields []string `json:"-"` 3403} 3404 3405func (s *OAuthRequirements) MarshalJSON() ([]byte, error) { 3406 type NoMethod OAuthRequirements 3407 raw := NoMethod(*s) 3408 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3409} 3410 3411// Operation: This resource represents a long-running operation that is 3412// the result of a network API call. 3413type Operation struct { 3414 // Done: If the value is `false`, it means the operation is still in 3415 // progress. If `true`, the operation is completed, and either `error` 3416 // or `response` is available. 3417 Done bool `json:"done,omitempty"` 3418 3419 // Error: The error result of the operation in case of failure or 3420 // cancellation. 3421 Error *Status `json:"error,omitempty"` 3422 3423 // Metadata: Service-specific metadata associated with the operation. It 3424 // typically contains progress information and common metadata such as 3425 // create time. Some services might not provide such metadata. Any 3426 // method that returns a long-running operation should document the 3427 // metadata type, if any. 3428 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3429 3430 // Name: The server-assigned name, which is only unique within the same 3431 // service that originally returns it. If you use the default HTTP 3432 // mapping, the `name` should be a resource name ending with 3433 // `operations/{unique_id}`. 3434 Name string `json:"name,omitempty"` 3435 3436 // Response: The normal response of the operation in case of success. If 3437 // the original method returns no data on success, such as `Delete`, the 3438 // response is `google.protobuf.Empty`. If the original method is 3439 // standard `Get`/`Create`/`Update`, the response should be the 3440 // resource. For other methods, the response should have the type 3441 // `XxxResponse`, where `Xxx` is the original method name. For example, 3442 // if the original method name is `TakeSnapshot()`, the inferred 3443 // response type is `TakeSnapshotResponse`. 3444 Response googleapi.RawMessage `json:"response,omitempty"` 3445 3446 // ServerResponse contains the HTTP response code and headers from the 3447 // server. 3448 googleapi.ServerResponse `json:"-"` 3449 3450 // ForceSendFields is a list of field names (e.g. "Done") to 3451 // unconditionally include in API requests. By default, fields with 3452 // empty values are omitted from API requests. However, any non-pointer, 3453 // non-interface field appearing in ForceSendFields will be sent to the 3454 // server regardless of whether the field is empty or not. This may be 3455 // used to include empty fields in Patch requests. 3456 ForceSendFields []string `json:"-"` 3457 3458 // NullFields is a list of field names (e.g. "Done") to include in API 3459 // requests with the JSON null value. By default, fields with empty 3460 // values are omitted from API requests. However, any field with an 3461 // empty value appearing in NullFields will be sent to the server as 3462 // null. It is an error if a field in this list has a non-empty value. 3463 // This may be used to include null fields in Patch requests. 3464 NullFields []string `json:"-"` 3465} 3466 3467func (s *Operation) MarshalJSON() ([]byte, error) { 3468 type NoMethod Operation 3469 raw := NoMethod(*s) 3470 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3471} 3472 3473// Option: A protocol buffer option, which can be attached to a message, 3474// field, enumeration, etc. 3475type Option struct { 3476 // Name: The option's name. For protobuf built-in options (options 3477 // defined in descriptor.proto), this is the short name. For example, 3478 // "map_entry". For custom options, it should be the fully-qualified 3479 // name. For example, "google.api.http". 3480 Name string `json:"name,omitempty"` 3481 3482 // Value: The option's value packed in an Any message. If the value is a 3483 // primitive, the corresponding wrapper type defined in 3484 // google/protobuf/wrappers.proto should be used. If the value is an 3485 // enum, it should be stored as an int32 value using the 3486 // google.protobuf.Int32Value type. 3487 Value googleapi.RawMessage `json:"value,omitempty"` 3488 3489 // ForceSendFields is a list of field names (e.g. "Name") to 3490 // unconditionally include in API requests. By default, fields with 3491 // empty values are omitted from API requests. However, any non-pointer, 3492 // non-interface field appearing in ForceSendFields will be sent to the 3493 // server regardless of whether the field is empty or not. This may be 3494 // used to include empty fields in Patch requests. 3495 ForceSendFields []string `json:"-"` 3496 3497 // NullFields is a list of field names (e.g. "Name") to include in API 3498 // requests with the JSON null value. By default, fields with empty 3499 // values are omitted from API requests. However, any field with an 3500 // empty value appearing in NullFields will be sent to the server as 3501 // null. It is an error if a field in this list has a non-empty value. 3502 // This may be used to include null fields in Patch requests. 3503 NullFields []string `json:"-"` 3504} 3505 3506func (s *Option) MarshalJSON() ([]byte, error) { 3507 type NoMethod Option 3508 raw := NoMethod(*s) 3509 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3510} 3511 3512// Page: Represents a documentation page. A page can contain subpages to 3513// represent nested documentation set structure. 3514type Page struct { 3515 // Content: The Markdown content of the page. You can use (== include 3516 // {path} ==) to include content from a Markdown file. 3517 Content string `json:"content,omitempty"` 3518 3519 // Name: The name of the page. It will be used as an identity of the 3520 // page to generate URI of the page, text of the link to this page in 3521 // navigation, etc. The full page name (start from the root page name to 3522 // this page concatenated with `.`) can be used as reference to the page 3523 // in your documentation. For example: pages: - name: Tutorial content: 3524 // (== include tutorial.md ==) subpages: - name: Java content: (== 3525 // include tutorial_java.md ==) You can reference `Java` page using 3526 // Markdown reference link syntax: `Java`. 3527 Name string `json:"name,omitempty"` 3528 3529 // Subpages: Subpages of this page. The order of subpages specified here 3530 // will be honored in the generated docset. 3531 Subpages []*Page `json:"subpages,omitempty"` 3532 3533 // ForceSendFields is a list of field names (e.g. "Content") to 3534 // unconditionally include in API requests. By default, fields with 3535 // empty values are omitted from API requests. However, any non-pointer, 3536 // non-interface field appearing in ForceSendFields will be sent to the 3537 // server regardless of whether the field is empty or not. This may be 3538 // used to include empty fields in Patch requests. 3539 ForceSendFields []string `json:"-"` 3540 3541 // NullFields is a list of field names (e.g. "Content") to include in 3542 // API requests with the JSON null value. By default, fields with empty 3543 // values are omitted from API requests. However, any field with an 3544 // empty value appearing in NullFields will be sent to the server as 3545 // null. It is an error if a field in this list has a non-empty value. 3546 // This may be used to include null fields in Patch requests. 3547 NullFields []string `json:"-"` 3548} 3549 3550func (s *Page) MarshalJSON() ([]byte, error) { 3551 type NoMethod Page 3552 raw := NoMethod(*s) 3553 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3554} 3555 3556// PeeredDnsDomain: DNS domain suffix for which requests originating in 3557// the producer VPC network are resolved in the associated consumer VPC 3558// network. 3559type PeeredDnsDomain struct { 3560 // DnsSuffix: The DNS domain name suffix e.g. `example.com.`. 3561 DnsSuffix string `json:"dnsSuffix,omitempty"` 3562 3563 // Name: User assigned name for this resource. Must be unique within the 3564 // consumer network. The name must be 1-63 characters long, must begin 3565 // with a letter, end with a letter or digit, and only contain lowercase 3566 // letters, digits or dashes. 3567 Name string `json:"name,omitempty"` 3568 3569 // ForceSendFields is a list of field names (e.g. "DnsSuffix") to 3570 // unconditionally include in API requests. By default, fields with 3571 // empty values are omitted from API requests. However, any non-pointer, 3572 // non-interface field appearing in ForceSendFields will be sent to the 3573 // server regardless of whether the field is empty or not. This may be 3574 // used to include empty fields in Patch requests. 3575 ForceSendFields []string `json:"-"` 3576 3577 // NullFields is a list of field names (e.g. "DnsSuffix") to include in 3578 // API requests with the JSON null value. By default, fields with empty 3579 // values are omitted from API requests. However, any field with an 3580 // empty value appearing in NullFields will be sent to the server as 3581 // null. It is an error if a field in this list has a non-empty value. 3582 // This may be used to include null fields in Patch requests. 3583 NullFields []string `json:"-"` 3584} 3585 3586func (s *PeeredDnsDomain) MarshalJSON() ([]byte, error) { 3587 type NoMethod PeeredDnsDomain 3588 raw := NoMethod(*s) 3589 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3590} 3591 3592// PeeredDnsDomainMetadata: Metadata provided through GetOperation 3593// request for the LRO generated by CreatePeeredDnsDomain API. 3594type PeeredDnsDomainMetadata struct { 3595} 3596 3597// PolicyBinding: Grouping of IAM role and IAM member. 3598type PolicyBinding struct { 3599 // Member: Required. Member to bind the role with. See 3600 // /iam/docs/reference/rest/v1/Policy#Binding for how to format each 3601 // member. Eg. - user:myuser@mydomain.com - 3602 // serviceAccount:my-service-account@app.gserviceaccount.com 3603 Member string `json:"member,omitempty"` 3604 3605 // Role: Required. Role to apply. Only allowlisted roles can be used at 3606 // the specified granularity. The role must be one of the following: - 3607 // 'roles/container.hostServiceAgentUser' applied on the shared VPC host 3608 // project - 'roles/compute.securityAdmin' applied on the shared VPC 3609 // host project 3610 Role string `json:"role,omitempty"` 3611 3612 // ForceSendFields is a list of field names (e.g. "Member") to 3613 // unconditionally include in API requests. By default, fields with 3614 // empty values are omitted from API requests. However, any non-pointer, 3615 // non-interface field appearing in ForceSendFields will be sent to the 3616 // server regardless of whether the field is empty or not. This may be 3617 // used to include empty fields in Patch requests. 3618 ForceSendFields []string `json:"-"` 3619 3620 // NullFields is a list of field names (e.g. "Member") to include in API 3621 // requests with the JSON null value. By default, fields with empty 3622 // values are omitted from API requests. However, any field with an 3623 // empty value appearing in NullFields will be sent to the server as 3624 // null. It is an error if a field in this list has a non-empty value. 3625 // This may be used to include null fields in Patch requests. 3626 NullFields []string `json:"-"` 3627} 3628 3629func (s *PolicyBinding) MarshalJSON() ([]byte, error) { 3630 type NoMethod PolicyBinding 3631 raw := NoMethod(*s) 3632 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3633} 3634 3635// Quota: Quota configuration helps to achieve fairness and budgeting in 3636// service usage. The metric based quota configuration works this way: - 3637// The service configuration defines a set of metrics. - For API calls, 3638// the quota.metric_rules maps methods to metrics with corresponding 3639// costs. - The quota.limits defines limits on the metrics, which will 3640// be used for quota checks at runtime. An example quota configuration 3641// in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: 3642// library.googleapis.com/write_calls unit: "1/min/{project}" # rate 3643// limit for consumer projects values: STANDARD: 10000 # The metric 3644// rules bind all methods to the read_calls metric, # except for the 3645// UpdateBook and DeleteBook methods. These two methods # are mapped to 3646// the write_calls metric, with the UpdateBook method # consuming at 3647// twice rate as the DeleteBook method. metric_rules: - selector: "*" 3648// metric_costs: library.googleapis.com/read_calls: 1 - selector: 3649// google.example.library.v1.LibraryService.UpdateBook metric_costs: 3650// library.googleapis.com/write_calls: 2 - selector: 3651// google.example.library.v1.LibraryService.DeleteBook metric_costs: 3652// library.googleapis.com/write_calls: 1 Corresponding Metric 3653// definition: metrics: - name: library.googleapis.com/read_calls 3654// display_name: Read requests metric_kind: DELTA value_type: INT64 - 3655// name: library.googleapis.com/write_calls display_name: Write requests 3656// metric_kind: DELTA value_type: INT64 3657type Quota struct { 3658 // Limits: List of `QuotaLimit` definitions for the service. 3659 Limits []*QuotaLimit `json:"limits,omitempty"` 3660 3661 // MetricRules: List of `MetricRule` definitions, each one mapping a 3662 // selected method to one or more metrics. 3663 MetricRules []*MetricRule `json:"metricRules,omitempty"` 3664 3665 // ForceSendFields is a list of field names (e.g. "Limits") to 3666 // unconditionally include in API requests. By default, fields with 3667 // empty values are omitted from API requests. However, any non-pointer, 3668 // non-interface field appearing in ForceSendFields will be sent to the 3669 // server regardless of whether the field is empty or not. This may be 3670 // used to include empty fields in Patch requests. 3671 ForceSendFields []string `json:"-"` 3672 3673 // NullFields is a list of field names (e.g. "Limits") to include in API 3674 // requests with the JSON null value. By default, fields with empty 3675 // values are omitted from API requests. However, any field with an 3676 // empty value appearing in NullFields will be sent to the server as 3677 // null. It is an error if a field in this list has a non-empty value. 3678 // This may be used to include null fields in Patch requests. 3679 NullFields []string `json:"-"` 3680} 3681 3682func (s *Quota) MarshalJSON() ([]byte, error) { 3683 type NoMethod Quota 3684 raw := NoMethod(*s) 3685 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3686} 3687 3688// QuotaLimit: `QuotaLimit` defines a specific limit that applies over a 3689// specified duration for a limit type. There can be at most one limit 3690// for a duration and limit type combination defined within a 3691// `QuotaGroup`. 3692type QuotaLimit struct { 3693 // DefaultLimit: Default number of tokens that can be consumed during 3694 // the specified duration. This is the number of tokens assigned when a 3695 // client application developer activates the service for his/her 3696 // project. Specifying a value of 0 will block all requests. This can be 3697 // used if you are provisioning quota to selected consumers and blocking 3698 // others. Similarly, a value of -1 will indicate an unlimited quota. No 3699 // other negative values are allowed. Used by group-based quotas only. 3700 DefaultLimit int64 `json:"defaultLimit,omitempty,string"` 3701 3702 // Description: Optional. User-visible, extended description for this 3703 // quota limit. Should be used only when more context is needed to 3704 // understand this limit than provided by the limit's display name (see: 3705 // `display_name`). 3706 Description string `json:"description,omitempty"` 3707 3708 // DisplayName: User-visible display name for this limit. Optional. If 3709 // not set, the UI will provide a default display name based on the 3710 // quota configuration. This field can be used to override the default 3711 // display name generated from the configuration. 3712 DisplayName string `json:"displayName,omitempty"` 3713 3714 // Duration: Duration of this limit in textual notation. Must be "100s" 3715 // or "1d". Used by group-based quotas only. 3716 Duration string `json:"duration,omitempty"` 3717 3718 // FreeTier: Free tier value displayed in the Developers Console for 3719 // this limit. The free tier is the number of tokens that will be 3720 // subtracted from the billed amount when billing is enabled. This field 3721 // can only be set on a limit with duration "1d", in a billable group; 3722 // it is invalid on any other limit. If this field is not set, it 3723 // defaults to 0, indicating that there is no free tier for this 3724 // service. Used by group-based quotas only. 3725 FreeTier int64 `json:"freeTier,omitempty,string"` 3726 3727 // MaxLimit: Maximum number of tokens that can be consumed during the 3728 // specified duration. Client application developers can override the 3729 // default limit up to this maximum. If specified, this value cannot be 3730 // set to a value less than the default limit. If not specified, it is 3731 // set to the default limit. To allow clients to apply overrides with no 3732 // upper bound, set this to -1, indicating unlimited maximum quota. Used 3733 // by group-based quotas only. 3734 MaxLimit int64 `json:"maxLimit,omitempty,string"` 3735 3736 // Metric: The name of the metric this quota limit applies to. The quota 3737 // limits with the same metric will be checked together during runtime. 3738 // The metric must be defined within the service config. 3739 Metric string `json:"metric,omitempty"` 3740 3741 // Name: Name of the quota limit. The name must be provided, and it must 3742 // be unique within the service. The name can only include alphanumeric 3743 // characters as well as '-'. The maximum length of the limit name is 64 3744 // characters. 3745 Name string `json:"name,omitempty"` 3746 3747 // Unit: Specify the unit of the quota limit. It uses the same syntax as 3748 // Metric.unit. The supported unit kinds are determined by the quota 3749 // backend system. Here are some examples: * "1/min/{project}" for quota 3750 // per minute per project. Note: the order of unit components is 3751 // insignificant. The "1" at the beginning is required to follow the 3752 // metric unit syntax. 3753 Unit string `json:"unit,omitempty"` 3754 3755 // Values: Tiered limit values. You must specify this as a key:value 3756 // pair, with an integer value that is the maximum number of requests 3757 // allowed for the specified unit. Currently only STANDARD is supported. 3758 Values map[string]string `json:"values,omitempty"` 3759 3760 // ForceSendFields is a list of field names (e.g. "DefaultLimit") to 3761 // unconditionally include in API requests. By default, fields with 3762 // empty values are omitted from API requests. However, any non-pointer, 3763 // non-interface field appearing in ForceSendFields will be sent to the 3764 // server regardless of whether the field is empty or not. This may be 3765 // used to include empty fields in Patch requests. 3766 ForceSendFields []string `json:"-"` 3767 3768 // NullFields is a list of field names (e.g. "DefaultLimit") to include 3769 // in API requests with the JSON null value. By default, fields with 3770 // empty values are omitted from API requests. However, any field with 3771 // an empty value appearing in NullFields will be sent to the server as 3772 // null. It is an error if a field in this list has a non-empty value. 3773 // This may be used to include null fields in Patch requests. 3774 NullFields []string `json:"-"` 3775} 3776 3777func (s *QuotaLimit) MarshalJSON() ([]byte, error) { 3778 type NoMethod QuotaLimit 3779 raw := NoMethod(*s) 3780 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3781} 3782 3783// Range: Represents a found unused range. 3784type Range struct { 3785 // IpCidrRange: CIDR range in "10.x.x.x/y" format that is within the 3786 // allocated ranges and currently unused. 3787 IpCidrRange string `json:"ipCidrRange,omitempty"` 3788 3789 // Network: In the Shared VPC host project, the VPC network that's 3790 // peered with the consumer network. For example: 3791 // `projects/1234321/global/networks/host-network` 3792 Network string `json:"network,omitempty"` 3793 3794 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 3795 // unconditionally include in API requests. By default, fields with 3796 // empty values are omitted from API requests. However, any non-pointer, 3797 // non-interface field appearing in ForceSendFields will be sent to the 3798 // server regardless of whether the field is empty or not. This may be 3799 // used to include empty fields in Patch requests. 3800 ForceSendFields []string `json:"-"` 3801 3802 // NullFields is a list of field names (e.g. "IpCidrRange") to include 3803 // in API requests with the JSON null value. By default, fields with 3804 // empty values are omitted from API requests. However, any field with 3805 // an empty value appearing in NullFields will be sent to the server as 3806 // null. It is an error if a field in this list has a non-empty value. 3807 // This may be used to include null fields in Patch requests. 3808 NullFields []string `json:"-"` 3809} 3810 3811func (s *Range) MarshalJSON() ([]byte, error) { 3812 type NoMethod Range 3813 raw := NoMethod(*s) 3814 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3815} 3816 3817// RangeReservation: Represents a range reservation. 3818type RangeReservation struct { 3819 // IpPrefixLength: Required. The size of the desired subnet. Use usual 3820 // CIDR range notation. For example, '30' to find unused x.x.x.x/30 CIDR 3821 // range. The goal is to determine if one of the allocated ranges has 3822 // enough free space for a subnet of the requested size. 3823 IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` 3824 3825 // RequestedRanges: Optional. The name of one or more allocated IP 3826 // address ranges associated with this private service access 3827 // connection. If no range names are provided all ranges associated with 3828 // this connection will be considered. If a CIDR range with the 3829 // specified IP prefix length is not available within these ranges the 3830 // validation fails. 3831 RequestedRanges []string `json:"requestedRanges,omitempty"` 3832 3833 // SecondaryRangeIpPrefixLengths: Optional. The size of the desired 3834 // secondary ranges for the subnet. Use usual CIDR range notation. For 3835 // example, '30' to find unused x.x.x.x/30 CIDR range. The goal is to 3836 // determine that the allocated ranges have enough free space for all 3837 // the requested secondary ranges. 3838 SecondaryRangeIpPrefixLengths []int64 `json:"secondaryRangeIpPrefixLengths,omitempty"` 3839 3840 // SubnetworkCandidates: Optional. List of subnetwork candidates to 3841 // validate. The required input fields are `name`, `network`, and 3842 // `region`. Subnetworks from this list which exist will be returned in 3843 // the response with the `ip_cidr_range`, `secondary_ip_cider_ranges`, 3844 // and `outside_allocation` fields set. 3845 SubnetworkCandidates []*Subnetwork `json:"subnetworkCandidates,omitempty"` 3846 3847 // ForceSendFields is a list of field names (e.g. "IpPrefixLength") to 3848 // unconditionally include in API requests. By default, fields with 3849 // empty values are omitted from API requests. However, any non-pointer, 3850 // non-interface field appearing in ForceSendFields will be sent to the 3851 // server regardless of whether the field is empty or not. This may be 3852 // used to include empty fields in Patch requests. 3853 ForceSendFields []string `json:"-"` 3854 3855 // NullFields is a list of field names (e.g. "IpPrefixLength") to 3856 // include in API requests with the JSON null value. By default, fields 3857 // with empty values are omitted from API requests. However, any field 3858 // with an empty value appearing in NullFields will be sent to the 3859 // server as null. It is an error if a field in this list has a 3860 // non-empty value. This may be used to include null fields in Patch 3861 // requests. 3862 NullFields []string `json:"-"` 3863} 3864 3865func (s *RangeReservation) MarshalJSON() ([]byte, error) { 3866 type NoMethod RangeReservation 3867 raw := NoMethod(*s) 3868 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3869} 3870 3871// RemoveDnsRecordSetMetadata: Metadata provided through GetOperation 3872// request for the LRO generated by RemoveDnsRecordSet API 3873type RemoveDnsRecordSetMetadata struct { 3874} 3875 3876// RemoveDnsRecordSetRequest: Request to remove a record set from a 3877// private managed DNS zone in the shared producer host project. The 3878// name, type, ttl, and data values must all exactly match an existing 3879// record set in the specified zone. 3880type RemoveDnsRecordSetRequest struct { 3881 // ConsumerNetwork: Required. The network that the consumer is using to 3882 // connect with services. Must be in the form of 3883 // projects/{project}/global/networks/{network} {project} is the project 3884 // number, as in '12345' {network} is the network name. 3885 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 3886 3887 // DnsRecordSet: Required. The DNS record set to remove. 3888 DnsRecordSet *DnsRecordSet `json:"dnsRecordSet,omitempty"` 3889 3890 // Zone: Required. The name of the private DNS zone in the shared 3891 // producer host project from which the record set will be removed. 3892 Zone string `json:"zone,omitempty"` 3893 3894 // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to 3895 // unconditionally include in API requests. By default, fields with 3896 // empty values are omitted from API requests. However, any non-pointer, 3897 // non-interface field appearing in ForceSendFields will be sent to the 3898 // server regardless of whether the field is empty or not. This may be 3899 // used to include empty fields in Patch requests. 3900 ForceSendFields []string `json:"-"` 3901 3902 // NullFields is a list of field names (e.g. "ConsumerNetwork") to 3903 // include in API requests with the JSON null value. By default, fields 3904 // with empty values are omitted from API requests. However, any field 3905 // with an empty value appearing in NullFields will be sent to the 3906 // server as null. It is an error if a field in this list has a 3907 // non-empty value. This may be used to include null fields in Patch 3908 // requests. 3909 NullFields []string `json:"-"` 3910} 3911 3912func (s *RemoveDnsRecordSetRequest) MarshalJSON() ([]byte, error) { 3913 type NoMethod RemoveDnsRecordSetRequest 3914 raw := NoMethod(*s) 3915 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3916} 3917 3918// RemoveDnsRecordSetResponse: Blank message response type for 3919// RemoveDnsRecordSet API 3920type RemoveDnsRecordSetResponse struct { 3921} 3922 3923// RemoveDnsZoneMetadata: Metadata provided through GetOperation request 3924// for the LRO generated by RemoveDnsZone API 3925type RemoveDnsZoneMetadata struct { 3926} 3927 3928// RemoveDnsZoneRequest: Request to remove a private managed DNS zone in 3929// the shared producer host project and a matching DNS peering zone in 3930// the consumer project. 3931type RemoveDnsZoneRequest struct { 3932 // ConsumerNetwork: Required. The network that the consumer is using to 3933 // connect with services. Must be in the form of 3934 // projects/{project}/global/networks/{network} {project} is the project 3935 // number, as in '12345' {network} is the network name. 3936 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 3937 3938 // Name: Required. The name for both the private zone in the shared 3939 // producer host project and the peering zone in the consumer project. 3940 Name string `json:"name,omitempty"` 3941 3942 // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to 3943 // unconditionally include in API requests. By default, fields with 3944 // empty values are omitted from API requests. However, any non-pointer, 3945 // non-interface field appearing in ForceSendFields will be sent to the 3946 // server regardless of whether the field is empty or not. This may be 3947 // used to include empty fields in Patch requests. 3948 ForceSendFields []string `json:"-"` 3949 3950 // NullFields is a list of field names (e.g. "ConsumerNetwork") to 3951 // include in API requests with the JSON null value. By default, fields 3952 // with empty values are omitted from API requests. However, any field 3953 // with an empty value appearing in NullFields will be sent to the 3954 // server as null. It is an error if a field in this list has a 3955 // non-empty value. This may be used to include null fields in Patch 3956 // requests. 3957 NullFields []string `json:"-"` 3958} 3959 3960func (s *RemoveDnsZoneRequest) MarshalJSON() ([]byte, error) { 3961 type NoMethod RemoveDnsZoneRequest 3962 raw := NoMethod(*s) 3963 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3964} 3965 3966// RemoveDnsZoneResponse: Blank message response type for RemoveDnsZone 3967// API 3968type RemoveDnsZoneResponse struct { 3969} 3970 3971// Route: Represents a route that was created or discovered by a private 3972// access management service. 3973type Route struct { 3974 // DestRange: Destination CIDR range that this route applies to. 3975 DestRange string `json:"destRange,omitempty"` 3976 3977 // Name: Route name. See https://cloud.google.com/vpc/docs/routes 3978 Name string `json:"name,omitempty"` 3979 3980 // Network: Fully-qualified URL of the VPC network in the producer host 3981 // tenant project that this route applies to. For example: 3982 // `projects/123456/global/networks/host-network` 3983 Network string `json:"network,omitempty"` 3984 3985 // NextHopGateway: Fully-qualified URL of the gateway that should handle 3986 // matching packets that this route applies to. For example: 3987 // `projects/123456/global/gateways/default-internet-gateway` 3988 NextHopGateway string `json:"nextHopGateway,omitempty"` 3989 3990 // ForceSendFields is a list of field names (e.g. "DestRange") to 3991 // unconditionally include in API requests. By default, fields with 3992 // empty values are omitted from API requests. However, any non-pointer, 3993 // non-interface field appearing in ForceSendFields will be sent to the 3994 // server regardless of whether the field is empty or not. This may be 3995 // used to include empty fields in Patch requests. 3996 ForceSendFields []string `json:"-"` 3997 3998 // NullFields is a list of field names (e.g. "DestRange") to include in 3999 // API requests with the JSON null value. By default, fields with empty 4000 // values are omitted from API requests. However, any field with an 4001 // empty value appearing in NullFields will be sent to the server as 4002 // null. It is an error if a field in this list has a non-empty value. 4003 // This may be used to include null fields in Patch requests. 4004 NullFields []string `json:"-"` 4005} 4006 4007func (s *Route) MarshalJSON() ([]byte, error) { 4008 type NoMethod Route 4009 raw := NoMethod(*s) 4010 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4011} 4012 4013// SearchRangeRequest: Request to search for an unused range within 4014// allocated ranges. 4015type SearchRangeRequest struct { 4016 // IpPrefixLength: Required. The prefix length of the IP range. Use 4017 // usual CIDR range notation. For example, '30' to find unused 4018 // x.x.x.x/30 CIDR range. Actual range will be determined using 4019 // allocated range for the consumer peered network and returned in the 4020 // result. 4021 IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` 4022 4023 // Network: Network name in the consumer project. This network must have 4024 // been already peered with a shared VPC network using CreateConnection 4025 // method. Must be in a form 4026 // 'projects/{project}/global/networks/{network}'. {project} is a 4027 // project number, as in '12345' {network} is network name. 4028 Network string `json:"network,omitempty"` 4029 4030 // ForceSendFields is a list of field names (e.g. "IpPrefixLength") to 4031 // unconditionally include in API requests. By default, fields with 4032 // empty values are omitted from API requests. However, any non-pointer, 4033 // non-interface field appearing in ForceSendFields will be sent to the 4034 // server regardless of whether the field is empty or not. This may be 4035 // used to include empty fields in Patch requests. 4036 ForceSendFields []string `json:"-"` 4037 4038 // NullFields is a list of field names (e.g. "IpPrefixLength") to 4039 // include in API requests with the JSON null value. By default, fields 4040 // with empty values are omitted from API requests. However, any field 4041 // with an empty value appearing in NullFields will be sent to the 4042 // server as null. It is an error if a field in this list has a 4043 // non-empty value. This may be used to include null fields in Patch 4044 // requests. 4045 NullFields []string `json:"-"` 4046} 4047 4048func (s *SearchRangeRequest) MarshalJSON() ([]byte, error) { 4049 type NoMethod SearchRangeRequest 4050 raw := NoMethod(*s) 4051 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4052} 4053 4054type SecondaryIpRange struct { 4055 // IpCidrRange: Secondary IP CIDR range in `x.x.x.x/y` format. 4056 IpCidrRange string `json:"ipCidrRange,omitempty"` 4057 4058 // RangeName: Name of the secondary IP range. 4059 RangeName string `json:"rangeName,omitempty"` 4060 4061 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 4062 // unconditionally include in API requests. By default, fields with 4063 // empty values are omitted from API requests. However, any non-pointer, 4064 // non-interface field appearing in ForceSendFields will be sent to the 4065 // server regardless of whether the field is empty or not. This may be 4066 // used to include empty fields in Patch requests. 4067 ForceSendFields []string `json:"-"` 4068 4069 // NullFields is a list of field names (e.g. "IpCidrRange") to include 4070 // in API requests with the JSON null value. By default, fields with 4071 // empty values are omitted from API requests. However, any field with 4072 // an empty value appearing in NullFields will be sent to the server as 4073 // null. It is an error if a field in this list has a non-empty value. 4074 // This may be used to include null fields in Patch requests. 4075 NullFields []string `json:"-"` 4076} 4077 4078func (s *SecondaryIpRange) MarshalJSON() ([]byte, error) { 4079 type NoMethod SecondaryIpRange 4080 raw := NoMethod(*s) 4081 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4082} 4083 4084type SecondaryIpRangeSpec struct { 4085 // IpPrefixLength: Required. The prefix length of the secondary IP 4086 // range. Use CIDR range notation, such as `30` to provision a secondary 4087 // IP range with an `x.x.x.x/30` CIDR range. The IP address range is 4088 // drawn from a pool of available ranges in the service consumer's 4089 // allocated range. 4090 IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` 4091 4092 // RangeName: Required. A name for the secondary IP range. The name must 4093 // be 1-63 characters long, and comply with RFC1035. The name must be 4094 // unique within the subnetwork. 4095 RangeName string `json:"rangeName,omitempty"` 4096 4097 // RequestedAddress: Optional. The starting address of a range. The 4098 // address must be a valid IPv4 address in the x.x.x.x format. This 4099 // value combined with the IP prefix range is the CIDR range for the 4100 // secondary IP range. The range must be within the allocated range that 4101 // is assigned to the private connection. If the CIDR range isn't 4102 // available, the call fails. 4103 RequestedAddress string `json:"requestedAddress,omitempty"` 4104 4105 // ForceSendFields is a list of field names (e.g. "IpPrefixLength") to 4106 // unconditionally include in API requests. By default, fields with 4107 // empty values are omitted from API requests. However, any non-pointer, 4108 // non-interface field appearing in ForceSendFields will be sent to the 4109 // server regardless of whether the field is empty or not. This may be 4110 // used to include empty fields in Patch requests. 4111 ForceSendFields []string `json:"-"` 4112 4113 // NullFields is a list of field names (e.g. "IpPrefixLength") to 4114 // include in API requests with the JSON null value. By default, fields 4115 // with empty values are omitted from API requests. However, any field 4116 // with an empty value appearing in NullFields will be sent to the 4117 // server as null. It is an error if a field in this list has a 4118 // non-empty value. This may be used to include null fields in Patch 4119 // requests. 4120 NullFields []string `json:"-"` 4121} 4122 4123func (s *SecondaryIpRangeSpec) MarshalJSON() ([]byte, error) { 4124 type NoMethod SecondaryIpRangeSpec 4125 raw := NoMethod(*s) 4126 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4127} 4128 4129// Service: `Service` is the root object of Google service configuration 4130// schema. It describes basic information about a service, such as the 4131// name and the title, and delegates other aspects to sub-sections. Each 4132// sub-section is either a proto message or a repeated proto message 4133// that configures a specific aspect, such as auth. See each proto 4134// message definition for details. Example: type: google.api.Service 4135// name: calendar.googleapis.com title: Google Calendar API apis: - 4136// name: google.calendar.v3.Calendar authentication: providers: - id: 4137// google_calendar_auth jwks_uri: 4138// https://www.googleapis.com/oauth2/v1/certs issuer: 4139// https://securetoken.google.com rules: - selector: "*" requirements: 4140// provider_id: google_calendar_auth 4141type Service struct { 4142 // Apis: A list of API interfaces exported by this service. Only the 4143 // `name` field of the google.protobuf.Api needs to be provided by the 4144 // configuration author, as the remaining fields will be derived from 4145 // the IDL during the normalization process. It is an error to specify 4146 // an API interface here which cannot be resolved against the associated 4147 // IDL files. 4148 Apis []*Api `json:"apis,omitempty"` 4149 4150 // Authentication: Auth configuration. 4151 Authentication *Authentication `json:"authentication,omitempty"` 4152 4153 // Backend: API backend configuration. 4154 Backend *Backend `json:"backend,omitempty"` 4155 4156 // Billing: Billing configuration. 4157 Billing *Billing `json:"billing,omitempty"` 4158 4159 // ConfigVersion: Obsolete. Do not use. This field has no semantic 4160 // meaning. The service config compiler always sets this field to `3`. 4161 ConfigVersion int64 `json:"configVersion,omitempty"` 4162 4163 // Context: Context configuration. 4164 Context *Context `json:"context,omitempty"` 4165 4166 // Control: Configuration for the service control plane. 4167 Control *Control `json:"control,omitempty"` 4168 4169 // CustomError: Custom error configuration. 4170 CustomError *CustomError `json:"customError,omitempty"` 4171 4172 // Documentation: Additional API documentation. 4173 Documentation *Documentation `json:"documentation,omitempty"` 4174 4175 // Endpoints: Configuration for network endpoints. If this is empty, 4176 // then an endpoint with the same name as the service is automatically 4177 // generated to service all defined APIs. 4178 Endpoints []*Endpoint `json:"endpoints,omitempty"` 4179 4180 // Enums: A list of all enum types included in this API service. Enums 4181 // referenced directly or indirectly by the `apis` are automatically 4182 // included. Enums which are not referenced but shall be included should 4183 // be listed here by name. Example: enums: - name: 4184 // google.someapi.v1.SomeEnum 4185 Enums []*Enum `json:"enums,omitempty"` 4186 4187 // Http: HTTP configuration. 4188 Http *Http `json:"http,omitempty"` 4189 4190 // Id: A unique ID for a specific instance of this message, typically 4191 // assigned by the client for tracking purpose. Must be no longer than 4192 // 63 characters and only lower case letters, digits, '.', '_' and '-' 4193 // are allowed. If empty, the server may choose to generate one instead. 4194 Id string `json:"id,omitempty"` 4195 4196 // Logging: Logging configuration. 4197 Logging *Logging `json:"logging,omitempty"` 4198 4199 // Logs: Defines the logs used by this service. 4200 Logs []*LogDescriptor `json:"logs,omitempty"` 4201 4202 // Metrics: Defines the metrics used by this service. 4203 Metrics []*MetricDescriptor `json:"metrics,omitempty"` 4204 4205 // MonitoredResources: Defines the monitored resources used by this 4206 // service. This is required by the Service.monitoring and 4207 // Service.logging configurations. 4208 MonitoredResources []*MonitoredResourceDescriptor `json:"monitoredResources,omitempty"` 4209 4210 // Monitoring: Monitoring configuration. 4211 Monitoring *Monitoring `json:"monitoring,omitempty"` 4212 4213 // Name: The service name, which is a DNS-like logical identifier for 4214 // the service, such as `calendar.googleapis.com`. The service name 4215 // typically goes through DNS verification to make sure the owner of the 4216 // service also owns the DNS name. 4217 Name string `json:"name,omitempty"` 4218 4219 // ProducerProjectId: The Google project that owns this service. 4220 ProducerProjectId string `json:"producerProjectId,omitempty"` 4221 4222 // Quota: Quota configuration. 4223 Quota *Quota `json:"quota,omitempty"` 4224 4225 // SourceInfo: Output only. The source information for this 4226 // configuration if available. 4227 SourceInfo *SourceInfo `json:"sourceInfo,omitempty"` 4228 4229 // SystemParameters: System parameter configuration. 4230 SystemParameters *SystemParameters `json:"systemParameters,omitempty"` 4231 4232 // SystemTypes: A list of all proto message types included in this API 4233 // service. It serves similar purpose as [google.api.Service.types], 4234 // except that these types are not needed by user-defined APIs. 4235 // Therefore, they will not show up in the generated discovery doc. This 4236 // field should only be used to define system APIs in ESF. 4237 SystemTypes []*Type `json:"systemTypes,omitempty"` 4238 4239 // Title: The product title for this service. 4240 Title string `json:"title,omitempty"` 4241 4242 // Types: A list of all proto message types included in this API 4243 // service. Types referenced directly or indirectly by the `apis` are 4244 // automatically included. Messages which are not referenced but shall 4245 // be included, such as types used by the `google.protobuf.Any` type, 4246 // should be listed here by name. Example: types: - name: 4247 // google.protobuf.Int32 4248 Types []*Type `json:"types,omitempty"` 4249 4250 // Usage: Configuration controlling usage of this service. 4251 Usage *Usage `json:"usage,omitempty"` 4252 4253 // ForceSendFields is a list of field names (e.g. "Apis") to 4254 // unconditionally include in API requests. By default, fields with 4255 // empty values are omitted from API requests. However, any non-pointer, 4256 // non-interface field appearing in ForceSendFields will be sent to the 4257 // server regardless of whether the field is empty or not. This may be 4258 // used to include empty fields in Patch requests. 4259 ForceSendFields []string `json:"-"` 4260 4261 // NullFields is a list of field names (e.g. "Apis") to include in API 4262 // requests with the JSON null value. By default, fields with empty 4263 // values are omitted from API requests. However, any field with an 4264 // empty value appearing in NullFields will be sent to the server as 4265 // null. It is an error if a field in this list has a non-empty value. 4266 // This may be used to include null fields in Patch requests. 4267 NullFields []string `json:"-"` 4268} 4269 4270func (s *Service) MarshalJSON() ([]byte, error) { 4271 type NoMethod Service 4272 raw := NoMethod(*s) 4273 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4274} 4275 4276// SourceContext: `SourceContext` represents information about the 4277// source of a protobuf element, like the file in which it is defined. 4278type SourceContext struct { 4279 // FileName: The path-qualified name of the .proto file that contained 4280 // the associated protobuf element. For example: 4281 // "google/protobuf/source_context.proto". 4282 FileName string `json:"fileName,omitempty"` 4283 4284 // ForceSendFields is a list of field names (e.g. "FileName") to 4285 // unconditionally include in API requests. By default, fields with 4286 // empty values are omitted from API requests. However, any non-pointer, 4287 // non-interface field appearing in ForceSendFields will be sent to the 4288 // server regardless of whether the field is empty or not. This may be 4289 // used to include empty fields in Patch requests. 4290 ForceSendFields []string `json:"-"` 4291 4292 // NullFields is a list of field names (e.g. "FileName") to include in 4293 // API requests with the JSON null value. By default, fields with empty 4294 // values are omitted from API requests. However, any field with an 4295 // empty value appearing in NullFields will be sent to the server as 4296 // null. It is an error if a field in this list has a non-empty value. 4297 // This may be used to include null fields in Patch requests. 4298 NullFields []string `json:"-"` 4299} 4300 4301func (s *SourceContext) MarshalJSON() ([]byte, error) { 4302 type NoMethod SourceContext 4303 raw := NoMethod(*s) 4304 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4305} 4306 4307// SourceInfo: Source information used to create a Service Config 4308type SourceInfo struct { 4309 // SourceFiles: All files used during config generation. 4310 SourceFiles []googleapi.RawMessage `json:"sourceFiles,omitempty"` 4311 4312 // ForceSendFields is a list of field names (e.g. "SourceFiles") to 4313 // unconditionally include in API requests. By default, fields with 4314 // empty values are omitted from API requests. However, any non-pointer, 4315 // non-interface field appearing in ForceSendFields will be sent to the 4316 // server regardless of whether the field is empty or not. This may be 4317 // used to include empty fields in Patch requests. 4318 ForceSendFields []string `json:"-"` 4319 4320 // NullFields is a list of field names (e.g. "SourceFiles") to include 4321 // in API requests with the JSON null value. By default, fields with 4322 // empty values are omitted from API requests. However, any field with 4323 // an empty value appearing in NullFields will be sent to the server as 4324 // null. It is an error if a field in this list has a non-empty value. 4325 // This may be used to include null fields in Patch requests. 4326 NullFields []string `json:"-"` 4327} 4328 4329func (s *SourceInfo) MarshalJSON() ([]byte, error) { 4330 type NoMethod SourceInfo 4331 raw := NoMethod(*s) 4332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4333} 4334 4335// Status: The `Status` type defines a logical error model that is 4336// suitable for different programming environments, including REST APIs 4337// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 4338// `Status` message contains three pieces of data: error code, error 4339// message, and error details. You can find out more about this error 4340// model and how to work with it in the API Design Guide 4341// (https://cloud.google.com/apis/design/errors). 4342type Status struct { 4343 // Code: The status code, which should be an enum value of 4344 // google.rpc.Code. 4345 Code int64 `json:"code,omitempty"` 4346 4347 // Details: A list of messages that carry the error details. There is a 4348 // common set of message types for APIs to use. 4349 Details []googleapi.RawMessage `json:"details,omitempty"` 4350 4351 // Message: A developer-facing error message, which should be in 4352 // English. Any user-facing error message should be localized and sent 4353 // in the google.rpc.Status.details field, or localized by the client. 4354 Message string `json:"message,omitempty"` 4355 4356 // ForceSendFields is a list of field names (e.g. "Code") to 4357 // unconditionally include in API requests. By default, fields with 4358 // empty values are omitted from API requests. However, any non-pointer, 4359 // non-interface field appearing in ForceSendFields will be sent to the 4360 // server regardless of whether the field is empty or not. This may be 4361 // used to include empty fields in Patch requests. 4362 ForceSendFields []string `json:"-"` 4363 4364 // NullFields is a list of field names (e.g. "Code") to include in API 4365 // requests with the JSON null value. By default, fields with empty 4366 // values are omitted from API requests. However, any field with an 4367 // empty value appearing in NullFields will be sent to the server as 4368 // null. It is an error if a field in this list has a non-empty value. 4369 // This may be used to include null fields in Patch requests. 4370 NullFields []string `json:"-"` 4371} 4372 4373func (s *Status) MarshalJSON() ([]byte, error) { 4374 type NoMethod Status 4375 raw := NoMethod(*s) 4376 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4377} 4378 4379// Subnetwork: Represents a subnet that was created or discovered by a 4380// private access management service. 4381type Subnetwork struct { 4382 // IpCidrRange: Subnetwork CIDR range in `10.x.x.x/y` format. 4383 IpCidrRange string `json:"ipCidrRange,omitempty"` 4384 4385 // Name: Subnetwork name. See https://cloud.google.com/compute/docs/vpc/ 4386 Name string `json:"name,omitempty"` 4387 4388 // Network: In the Shared VPC host project, the VPC network that's 4389 // peered with the consumer network. For example: 4390 // `projects/1234321/global/networks/host-network` 4391 Network string `json:"network,omitempty"` 4392 4393 // OutsideAllocation: This is a discovered subnet that is not within the 4394 // current consumer allocated ranges. 4395 OutsideAllocation bool `json:"outsideAllocation,omitempty"` 4396 4397 // Region: GCP region where the subnetwork is located. 4398 Region string `json:"region,omitempty"` 4399 4400 // SecondaryIpRanges: List of secondary IP ranges in this subnetwork. 4401 SecondaryIpRanges []*SecondaryIpRange `json:"secondaryIpRanges,omitempty"` 4402 4403 // ForceSendFields is a list of field names (e.g. "IpCidrRange") to 4404 // unconditionally include in API requests. By default, fields with 4405 // empty values are omitted from API requests. However, any non-pointer, 4406 // non-interface field appearing in ForceSendFields will be sent to the 4407 // server regardless of whether the field is empty or not. This may be 4408 // used to include empty fields in Patch requests. 4409 ForceSendFields []string `json:"-"` 4410 4411 // NullFields is a list of field names (e.g. "IpCidrRange") to include 4412 // in API requests with the JSON null value. By default, fields with 4413 // empty values are omitted from API requests. However, any field with 4414 // an empty value appearing in NullFields will be sent to the server as 4415 // null. It is an error if a field in this list has a non-empty value. 4416 // This may be used to include null fields in Patch requests. 4417 NullFields []string `json:"-"` 4418} 4419 4420func (s *Subnetwork) MarshalJSON() ([]byte, error) { 4421 type NoMethod Subnetwork 4422 raw := NoMethod(*s) 4423 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4424} 4425 4426// SystemParameter: Define a parameter's name and location. The 4427// parameter may be passed as either an HTTP header or a URL query 4428// parameter, and if both are passed the behavior is 4429// implementation-dependent. 4430type SystemParameter struct { 4431 // HttpHeader: Define the HTTP header name to use for the parameter. It 4432 // is case insensitive. 4433 HttpHeader string `json:"httpHeader,omitempty"` 4434 4435 // Name: Define the name of the parameter, such as "api_key" . It is 4436 // case sensitive. 4437 Name string `json:"name,omitempty"` 4438 4439 // UrlQueryParameter: Define the URL query parameter name to use for the 4440 // parameter. It is case sensitive. 4441 UrlQueryParameter string `json:"urlQueryParameter,omitempty"` 4442 4443 // ForceSendFields is a list of field names (e.g. "HttpHeader") to 4444 // unconditionally include in API requests. By default, fields with 4445 // empty values are omitted from API requests. However, any non-pointer, 4446 // non-interface field appearing in ForceSendFields will be sent to the 4447 // server regardless of whether the field is empty or not. This may be 4448 // used to include empty fields in Patch requests. 4449 ForceSendFields []string `json:"-"` 4450 4451 // NullFields is a list of field names (e.g. "HttpHeader") to include in 4452 // API requests with the JSON null value. By default, fields with empty 4453 // values are omitted from API requests. However, any field with an 4454 // empty value appearing in NullFields will be sent to the server as 4455 // null. It is an error if a field in this list has a non-empty value. 4456 // This may be used to include null fields in Patch requests. 4457 NullFields []string `json:"-"` 4458} 4459 4460func (s *SystemParameter) MarshalJSON() ([]byte, error) { 4461 type NoMethod SystemParameter 4462 raw := NoMethod(*s) 4463 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4464} 4465 4466// SystemParameterRule: Define a system parameter rule mapping system 4467// parameter definitions to methods. 4468type SystemParameterRule struct { 4469 // Parameters: Define parameters. Multiple names may be defined for a 4470 // parameter. For a given method call, only one of them should be used. 4471 // If multiple names are used the behavior is implementation-dependent. 4472 // If none of the specified names are present the behavior is 4473 // parameter-dependent. 4474 Parameters []*SystemParameter `json:"parameters,omitempty"` 4475 4476 // Selector: Selects the methods to which this rule applies. Use '*' to 4477 // indicate all methods in all APIs. Refer to selector for syntax 4478 // details. 4479 Selector string `json:"selector,omitempty"` 4480 4481 // ForceSendFields is a list of field names (e.g. "Parameters") to 4482 // unconditionally include in API requests. By default, fields with 4483 // empty values are omitted from API requests. However, any non-pointer, 4484 // non-interface field appearing in ForceSendFields will be sent to the 4485 // server regardless of whether the field is empty or not. This may be 4486 // used to include empty fields in Patch requests. 4487 ForceSendFields []string `json:"-"` 4488 4489 // NullFields is a list of field names (e.g. "Parameters") to include in 4490 // API requests with the JSON null value. By default, fields with empty 4491 // values are omitted from API requests. However, any field with an 4492 // empty value appearing in NullFields will be sent to the server as 4493 // null. It is an error if a field in this list has a non-empty value. 4494 // This may be used to include null fields in Patch requests. 4495 NullFields []string `json:"-"` 4496} 4497 4498func (s *SystemParameterRule) MarshalJSON() ([]byte, error) { 4499 type NoMethod SystemParameterRule 4500 raw := NoMethod(*s) 4501 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4502} 4503 4504// SystemParameters: ### System parameter configuration A system 4505// parameter is a special kind of parameter defined by the API system, 4506// not by an individual API. It is typically mapped to an HTTP header 4507// and/or a URL query parameter. This configuration specifies which 4508// methods change the names of the system parameters. 4509type SystemParameters struct { 4510 // Rules: Define system parameters. The parameters defined here will 4511 // override the default parameters implemented by the system. If this 4512 // field is missing from the service config, default system parameters 4513 // will be used. Default system parameters and names is 4514 // implementation-dependent. Example: define api key for all methods 4515 // system_parameters rules: - selector: "*" parameters: - name: api_key 4516 // url_query_parameter: api_key Example: define 2 api key names for a 4517 // specific method. system_parameters rules: - selector: "/ListShelves" 4518 // parameters: - name: api_key http_header: Api-Key1 - name: api_key 4519 // http_header: Api-Key2 **NOTE:** All service configuration rules 4520 // follow "last one wins" order. 4521 Rules []*SystemParameterRule `json:"rules,omitempty"` 4522 4523 // ForceSendFields is a list of field names (e.g. "Rules") to 4524 // unconditionally include in API requests. By default, fields with 4525 // empty values are omitted from API requests. However, any non-pointer, 4526 // non-interface field appearing in ForceSendFields will be sent to the 4527 // server regardless of whether the field is empty or not. This may be 4528 // used to include empty fields in Patch requests. 4529 ForceSendFields []string `json:"-"` 4530 4531 // NullFields is a list of field names (e.g. "Rules") to include in API 4532 // requests with the JSON null value. By default, fields with empty 4533 // values are omitted from API requests. However, any field with an 4534 // empty value appearing in NullFields will be sent to the server as 4535 // null. It is an error if a field in this list has a non-empty value. 4536 // This may be used to include null fields in Patch requests. 4537 NullFields []string `json:"-"` 4538} 4539 4540func (s *SystemParameters) MarshalJSON() ([]byte, error) { 4541 type NoMethod SystemParameters 4542 raw := NoMethod(*s) 4543 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4544} 4545 4546// Type: A protocol buffer message type. 4547type Type struct { 4548 // Fields: The list of fields. 4549 Fields []*Field `json:"fields,omitempty"` 4550 4551 // Name: The fully qualified message name. 4552 Name string `json:"name,omitempty"` 4553 4554 // Oneofs: The list of types appearing in `oneof` definitions in this 4555 // type. 4556 Oneofs []string `json:"oneofs,omitempty"` 4557 4558 // Options: The protocol buffer options. 4559 Options []*Option `json:"options,omitempty"` 4560 4561 // SourceContext: The source context. 4562 SourceContext *SourceContext `json:"sourceContext,omitempty"` 4563 4564 // Syntax: The source syntax. 4565 // 4566 // Possible values: 4567 // "SYNTAX_PROTO2" - Syntax `proto2`. 4568 // "SYNTAX_PROTO3" - Syntax `proto3`. 4569 Syntax string `json:"syntax,omitempty"` 4570 4571 // ForceSendFields is a list of field names (e.g. "Fields") to 4572 // unconditionally include in API requests. By default, fields with 4573 // empty values are omitted from API requests. However, any non-pointer, 4574 // non-interface field appearing in ForceSendFields will be sent to the 4575 // server regardless of whether the field is empty or not. This may be 4576 // used to include empty fields in Patch requests. 4577 ForceSendFields []string `json:"-"` 4578 4579 // NullFields is a list of field names (e.g. "Fields") to include in API 4580 // requests with the JSON null value. By default, fields with empty 4581 // values are omitted from API requests. However, any field with an 4582 // empty value appearing in NullFields will be sent to the server as 4583 // null. It is an error if a field in this list has a non-empty value. 4584 // This may be used to include null fields in Patch requests. 4585 NullFields []string `json:"-"` 4586} 4587 4588func (s *Type) MarshalJSON() ([]byte, error) { 4589 type NoMethod Type 4590 raw := NoMethod(*s) 4591 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4592} 4593 4594// UpdateConsumerConfigRequest: Request to update the configuration of a 4595// service networking connection including the import/export of custom 4596// routes and subnetwork routes with public IP. 4597type UpdateConsumerConfigRequest struct { 4598 // ConsumerConfig: Required. The updated peering config. 4599 ConsumerConfig *ConsumerConfig `json:"consumerConfig,omitempty"` 4600 4601 // ForceSendFields is a list of field names (e.g. "ConsumerConfig") to 4602 // unconditionally include in API requests. By default, fields with 4603 // empty values are omitted from API requests. However, any non-pointer, 4604 // non-interface field appearing in ForceSendFields will be sent to the 4605 // server regardless of whether the field is empty or not. This may be 4606 // used to include empty fields in Patch requests. 4607 ForceSendFields []string `json:"-"` 4608 4609 // NullFields is a list of field names (e.g. "ConsumerConfig") to 4610 // include in API requests with the JSON null value. By default, fields 4611 // with empty values are omitted from API requests. However, any field 4612 // with an empty value appearing in NullFields will be sent to the 4613 // server as null. It is an error if a field in this list has a 4614 // non-empty value. This may be used to include null fields in Patch 4615 // requests. 4616 NullFields []string `json:"-"` 4617} 4618 4619func (s *UpdateConsumerConfigRequest) MarshalJSON() ([]byte, error) { 4620 type NoMethod UpdateConsumerConfigRequest 4621 raw := NoMethod(*s) 4622 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4623} 4624 4625// UpdateDnsRecordSetMetadata: Metadata provided through GetOperation 4626// request for the LRO generated by UpdateDnsRecordSet API 4627type UpdateDnsRecordSetMetadata struct { 4628} 4629 4630// UpdateDnsRecordSetRequest: Request to update a record set from a 4631// private managed DNS zone in the shared producer host project. The 4632// name, type, ttl, and data values of the existing record set must all 4633// exactly match an existing record set in the specified zone. 4634type UpdateDnsRecordSetRequest struct { 4635 // ConsumerNetwork: Required. The network that the consumer is using to 4636 // connect with services. Must be in the form of 4637 // projects/{project}/global/networks/{network} {project} is the project 4638 // number, as in '12345' {network} is the network name. 4639 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 4640 4641 // ExistingDnsRecordSet: Required. The existing DNS record set to 4642 // update. 4643 ExistingDnsRecordSet *DnsRecordSet `json:"existingDnsRecordSet,omitempty"` 4644 4645 // NewDnsRecordSet: Required. The new values that the DNS record set 4646 // should be updated to hold. 4647 NewDnsRecordSet *DnsRecordSet `json:"newDnsRecordSet,omitempty"` 4648 4649 // Zone: Required. The name of the private DNS zone in the shared 4650 // producer host project from which the record set will be removed. 4651 Zone string `json:"zone,omitempty"` 4652 4653 // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to 4654 // unconditionally include in API requests. By default, fields with 4655 // empty values are omitted from API requests. However, any non-pointer, 4656 // non-interface field appearing in ForceSendFields will be sent to the 4657 // server regardless of whether the field is empty or not. This may be 4658 // used to include empty fields in Patch requests. 4659 ForceSendFields []string `json:"-"` 4660 4661 // NullFields is a list of field names (e.g. "ConsumerNetwork") to 4662 // include in API requests with the JSON null value. By default, fields 4663 // with empty values are omitted from API requests. However, any field 4664 // with an empty value appearing in NullFields will be sent to the 4665 // server as null. It is an error if a field in this list has a 4666 // non-empty value. This may be used to include null fields in Patch 4667 // requests. 4668 NullFields []string `json:"-"` 4669} 4670 4671func (s *UpdateDnsRecordSetRequest) MarshalJSON() ([]byte, error) { 4672 type NoMethod UpdateDnsRecordSetRequest 4673 raw := NoMethod(*s) 4674 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4675} 4676 4677// Usage: Configuration controlling usage of a service. 4678type Usage struct { 4679 // ProducerNotificationChannel: The full resource name of a channel used 4680 // for sending notifications to the service producer. Google Service 4681 // Management currently only supports Google Cloud Pub/Sub 4682 // (https://cloud.google.com/pubsub) as a notification channel. To use 4683 // Google Cloud Pub/Sub as the channel, this must be the name of a Cloud 4684 // Pub/Sub topic that uses the Cloud Pub/Sub topic name format 4685 // documented in https://cloud.google.com/pubsub/docs/overview. 4686 ProducerNotificationChannel string `json:"producerNotificationChannel,omitempty"` 4687 4688 // Requirements: Requirements that must be satisfied before a consumer 4689 // project can use the service. Each requirement is of the form /; for 4690 // example 'serviceusage.googleapis.com/billing-enabled'. For Google 4691 // APIs, a Terms of Service requirement must be included here. Google 4692 // Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". 4693 // Other Google APIs should include 4694 // "serviceusage.googleapis.com/tos/universal". Additional ToS can be 4695 // included based on the business needs. 4696 Requirements []string `json:"requirements,omitempty"` 4697 4698 // Rules: A list of usage rules that apply to individual API methods. 4699 // **NOTE:** All service configuration rules follow "last one wins" 4700 // order. 4701 Rules []*UsageRule `json:"rules,omitempty"` 4702 4703 // ForceSendFields is a list of field names (e.g. 4704 // "ProducerNotificationChannel") to unconditionally include in API 4705 // requests. By default, fields with empty values are omitted from API 4706 // requests. However, any non-pointer, non-interface field appearing in 4707 // ForceSendFields will be sent to the server regardless of whether the 4708 // field is empty or not. This may be used to include empty fields in 4709 // Patch requests. 4710 ForceSendFields []string `json:"-"` 4711 4712 // NullFields is a list of field names (e.g. 4713 // "ProducerNotificationChannel") to include in API requests with the 4714 // JSON null value. By default, fields with empty values are omitted 4715 // from API requests. However, any field with an empty value appearing 4716 // in NullFields will be sent to the server as null. It is an error if a 4717 // field in this list has a non-empty value. This may be used to include 4718 // null fields in Patch requests. 4719 NullFields []string `json:"-"` 4720} 4721 4722func (s *Usage) MarshalJSON() ([]byte, error) { 4723 type NoMethod Usage 4724 raw := NoMethod(*s) 4725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4726} 4727 4728// UsageRule: Usage configuration rules for the service. NOTE: Under 4729// development. Use this rule to configure unregistered calls for the 4730// service. Unregistered calls are calls that do not contain consumer 4731// project identity. (Example: calls that do not contain an API key). By 4732// default, API methods do not allow unregistered calls, and each method 4733// call must be identified by a consumer project identity. Use this rule 4734// to allow/disallow unregistered calls. Example of an API that wants to 4735// allow unregistered calls for entire service. usage: rules: - 4736// selector: "*" allow_unregistered_calls: true Example of a method that 4737// wants to allow unregistered calls. usage: rules: - selector: 4738// "google.example.library.v1.LibraryService.CreateBook" 4739// allow_unregistered_calls: true 4740type UsageRule struct { 4741 // AllowUnregisteredCalls: If true, the selected method allows 4742 // unregistered calls, e.g. calls that don't identify any user or 4743 // application. 4744 AllowUnregisteredCalls bool `json:"allowUnregisteredCalls,omitempty"` 4745 4746 // Selector: Selects the methods to which this rule applies. Use '*' to 4747 // indicate all methods in all APIs. Refer to selector for syntax 4748 // details. 4749 Selector string `json:"selector,omitempty"` 4750 4751 // SkipServiceControl: If true, the selected method should skip service 4752 // control and the control plane features, such as quota and billing, 4753 // will not be available. This flag is used by Google Cloud Endpoints to 4754 // bypass checks for internal methods, such as service health check 4755 // methods. 4756 SkipServiceControl bool `json:"skipServiceControl,omitempty"` 4757 4758 // ForceSendFields is a list of field names (e.g. 4759 // "AllowUnregisteredCalls") to unconditionally include in API requests. 4760 // By default, fields with empty values are omitted from API requests. 4761 // However, any non-pointer, non-interface field appearing in 4762 // ForceSendFields will be sent to the server regardless of whether the 4763 // field is empty or not. This may be used to include empty fields in 4764 // Patch requests. 4765 ForceSendFields []string `json:"-"` 4766 4767 // NullFields is a list of field names (e.g. "AllowUnregisteredCalls") 4768 // to include in API requests with the JSON null value. By default, 4769 // fields with empty values are omitted from API requests. However, any 4770 // field with an empty value appearing in NullFields will be sent to the 4771 // server as null. It is an error if a field in this list has a 4772 // non-empty value. This may be used to include null fields in Patch 4773 // requests. 4774 NullFields []string `json:"-"` 4775} 4776 4777func (s *UsageRule) MarshalJSON() ([]byte, error) { 4778 type NoMethod UsageRule 4779 raw := NoMethod(*s) 4780 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4781} 4782 4783type ValidateConsumerConfigRequest struct { 4784 // ConsumerNetwork: Required. The network that the consumer is using to 4785 // connect with services. Must be in the form of 4786 // projects/{project}/global/networks/{network} {project} is a project 4787 // number, as in '12345' {network} is network name. 4788 ConsumerNetwork string `json:"consumerNetwork,omitempty"` 4789 4790 // ConsumerProject: NETWORK_NOT_IN_CONSUMERS_PROJECT, 4791 // NETWORK_NOT_IN_CONSUMERS_HOST_PROJECT, and HOST_PROJECT_NOT_FOUND are 4792 // done when consumer_project is provided. 4793 ConsumerProject *ConsumerProject `json:"consumerProject,omitempty"` 4794 4795 // RangeReservation: RANGES_EXHAUSTED, RANGES_EXHAUSTED, and 4796 // RANGES_DELETED_LATER are done when range_reservation is provided. 4797 RangeReservation *RangeReservation `json:"rangeReservation,omitempty"` 4798 4799 // ValidateNetwork: The validations will be performed in the order 4800 // listed in the ValidationError enum. The first failure will return. If 4801 // a validation is not requested, then the next one will be performed. 4802 // SERVICE_NETWORKING_NOT_ENABLED and NETWORK_NOT_PEERED checks are 4803 // performed for all requests where validation is requested. 4804 // NETWORK_NOT_FOUND and NETWORK_DISCONNECTED checks are done for 4805 // requests that have validate_network set to true. 4806 ValidateNetwork bool `json:"validateNetwork,omitempty"` 4807 4808 // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to 4809 // unconditionally include in API requests. By default, fields with 4810 // empty values are omitted from API requests. However, any non-pointer, 4811 // non-interface field appearing in ForceSendFields will be sent to the 4812 // server regardless of whether the field is empty or not. This may be 4813 // used to include empty fields in Patch requests. 4814 ForceSendFields []string `json:"-"` 4815 4816 // NullFields is a list of field names (e.g. "ConsumerNetwork") to 4817 // include in API requests with the JSON null value. By default, fields 4818 // with empty values are omitted from API requests. However, any field 4819 // with an empty value appearing in NullFields will be sent to the 4820 // server as null. It is an error if a field in this list has a 4821 // non-empty value. This may be used to include null fields in Patch 4822 // requests. 4823 NullFields []string `json:"-"` 4824} 4825 4826func (s *ValidateConsumerConfigRequest) MarshalJSON() ([]byte, error) { 4827 type NoMethod ValidateConsumerConfigRequest 4828 raw := NoMethod(*s) 4829 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4830} 4831 4832type ValidateConsumerConfigResponse struct { 4833 // ExistingSubnetworkCandidates: List of subnetwork candidates from the 4834 // request which exist with the `ip_cidr_range`, 4835 // `secondary_ip_cider_ranges`, and `outside_allocation` fields set. 4836 ExistingSubnetworkCandidates []*Subnetwork `json:"existingSubnetworkCandidates,omitempty"` 4837 4838 // IsValid: Indicates whether all the requested validations passed. 4839 IsValid bool `json:"isValid,omitempty"` 4840 4841 // ValidationError: The first validation which failed. 4842 // 4843 // Possible values: 4844 // "VALIDATION_ERROR_UNSPECIFIED" 4845 // "VALIDATION_NOT_REQUESTED" - In case none of the validations are 4846 // requested. 4847 // "SERVICE_NETWORKING_NOT_ENABLED" 4848 // "NETWORK_NOT_FOUND" - The network provided by the consumer does not 4849 // exist. 4850 // "NETWORK_NOT_PEERED" - The network has not been peered with the 4851 // producer org. 4852 // "NETWORK_PEERING_DELETED" - The peering was created and later 4853 // deleted. 4854 // "NETWORK_NOT_IN_CONSUMERS_PROJECT" - The network is a regular VPC 4855 // but the network is not in the consumer's project. 4856 // "NETWORK_NOT_IN_CONSUMERS_HOST_PROJECT" - The consumer project is a 4857 // service project, and network is a shared VPC, but the network is not 4858 // in the host project of this consumer project. 4859 // "HOST_PROJECT_NOT_FOUND" - The host project associated with the 4860 // consumer project was not found. 4861 // "CONSUMER_PROJECT_NOT_SERVICE_PROJECT" - The consumer project is 4862 // not a service project for the specified host project. 4863 // "RANGES_EXHAUSTED" - The reserved IP ranges do not have enough 4864 // space to create a subnet of desired size. 4865 // "RANGES_NOT_RESERVED" - The IP ranges were not reserved. 4866 // "RANGES_DELETED_LATER" - The IP ranges were reserved but deleted 4867 // later. 4868 // "COMPUTE_API_NOT_ENABLED" - The consumer project does not have the 4869 // compute api enabled. 4870 ValidationError string `json:"validationError,omitempty"` 4871 4872 // ServerResponse contains the HTTP response code and headers from the 4873 // server. 4874 googleapi.ServerResponse `json:"-"` 4875 4876 // ForceSendFields is a list of field names (e.g. 4877 // "ExistingSubnetworkCandidates") to unconditionally include in API 4878 // requests. By default, fields with empty values are omitted from API 4879 // requests. However, any non-pointer, non-interface field appearing in 4880 // ForceSendFields will be sent to the server regardless of whether the 4881 // field is empty or not. This may be used to include empty fields in 4882 // Patch requests. 4883 ForceSendFields []string `json:"-"` 4884 4885 // NullFields is a list of field names (e.g. 4886 // "ExistingSubnetworkCandidates") to include in API requests with the 4887 // JSON null value. By default, fields with empty values are omitted 4888 // from API requests. However, any field with an empty value appearing 4889 // in NullFields will be sent to the server as null. It is an error if a 4890 // field in this list has a non-empty value. This may be used to include 4891 // null fields in Patch requests. 4892 NullFields []string `json:"-"` 4893} 4894 4895func (s *ValidateConsumerConfigResponse) MarshalJSON() ([]byte, error) { 4896 type NoMethod ValidateConsumerConfigResponse 4897 raw := NoMethod(*s) 4898 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4899} 4900 4901// method id "servicenetworking.operations.cancel": 4902 4903type OperationsCancelCall struct { 4904 s *APIService 4905 name string 4906 canceloperationrequest *CancelOperationRequest 4907 urlParams_ gensupport.URLParams 4908 ctx_ context.Context 4909 header_ http.Header 4910} 4911 4912// Cancel: Starts asynchronous cancellation on a long-running operation. 4913// The server makes a best effort to cancel the operation, but success 4914// is not guaranteed. If the server doesn't support this method, it 4915// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use 4916// Operations.GetOperation or other methods to check whether the 4917// cancellation succeeded or whether the operation completed despite 4918// cancellation. On successful cancellation, the operation is not 4919// deleted; instead, it becomes an operation with an Operation.error 4920// value with a google.rpc.Status.code of 1, corresponding to 4921// `Code.CANCELLED`. 4922// 4923// - name: The name of the operation resource to be cancelled. 4924func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall { 4925 c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4926 c.name = name 4927 c.canceloperationrequest = canceloperationrequest 4928 return c 4929} 4930 4931// Fields allows partial responses to be retrieved. See 4932// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4933// for more information. 4934func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall { 4935 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4936 return c 4937} 4938 4939// Context sets the context to be used in this call's Do method. Any 4940// pending HTTP request will be aborted if the provided context is 4941// canceled. 4942func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall { 4943 c.ctx_ = ctx 4944 return c 4945} 4946 4947// Header returns an http.Header that can be modified by the caller to 4948// add HTTP headers to the request. 4949func (c *OperationsCancelCall) Header() http.Header { 4950 if c.header_ == nil { 4951 c.header_ = make(http.Header) 4952 } 4953 return c.header_ 4954} 4955 4956func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) { 4957 reqHeaders := make(http.Header) 4958 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 4959 for k, v := range c.header_ { 4960 reqHeaders[k] = v 4961 } 4962 reqHeaders.Set("User-Agent", c.s.userAgent()) 4963 var body io.Reader = nil 4964 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 4965 if err != nil { 4966 return nil, err 4967 } 4968 reqHeaders.Set("Content-Type", "application/json") 4969 c.urlParams_.Set("alt", alt) 4970 c.urlParams_.Set("prettyPrint", "false") 4971 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") 4972 urls += "?" + c.urlParams_.Encode() 4973 req, err := http.NewRequest("POST", urls, body) 4974 if err != nil { 4975 return nil, err 4976 } 4977 req.Header = reqHeaders 4978 googleapi.Expand(req.URL, map[string]string{ 4979 "name": c.name, 4980 }) 4981 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4982} 4983 4984// Do executes the "servicenetworking.operations.cancel" call. 4985// Exactly one of *Empty or error will be non-nil. Any non-2xx status 4986// code is an error. Response headers are in either 4987// *Empty.ServerResponse.Header or (if a response was returned at all) 4988// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4989// check whether the returned error was because http.StatusNotModified 4990// was returned. 4991func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4992 gensupport.SetOptions(c.urlParams_, opts...) 4993 res, err := c.doRequest("json") 4994 if res != nil && res.StatusCode == http.StatusNotModified { 4995 if res.Body != nil { 4996 res.Body.Close() 4997 } 4998 return nil, &googleapi.Error{ 4999 Code: res.StatusCode, 5000 Header: res.Header, 5001 } 5002 } 5003 if err != nil { 5004 return nil, err 5005 } 5006 defer googleapi.CloseBody(res) 5007 if err := googleapi.CheckResponse(res); err != nil { 5008 return nil, err 5009 } 5010 ret := &Empty{ 5011 ServerResponse: googleapi.ServerResponse{ 5012 Header: res.Header, 5013 HTTPStatusCode: res.StatusCode, 5014 }, 5015 } 5016 target := &ret 5017 if err := gensupport.DecodeResponse(target, res); err != nil { 5018 return nil, err 5019 } 5020 return ret, nil 5021 // { 5022 // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", 5023 // "flatPath": "v1/operations/{operationsId}:cancel", 5024 // "httpMethod": "POST", 5025 // "id": "servicenetworking.operations.cancel", 5026 // "parameterOrder": [ 5027 // "name" 5028 // ], 5029 // "parameters": { 5030 // "name": { 5031 // "description": "The name of the operation resource to be cancelled.", 5032 // "location": "path", 5033 // "pattern": "^operations/.*$", 5034 // "required": true, 5035 // "type": "string" 5036 // } 5037 // }, 5038 // "path": "v1/{+name}:cancel", 5039 // "request": { 5040 // "$ref": "CancelOperationRequest" 5041 // }, 5042 // "response": { 5043 // "$ref": "Empty" 5044 // }, 5045 // "scopes": [ 5046 // "https://www.googleapis.com/auth/cloud-platform", 5047 // "https://www.googleapis.com/auth/service.management" 5048 // ] 5049 // } 5050 5051} 5052 5053// method id "servicenetworking.operations.delete": 5054 5055type OperationsDeleteCall struct { 5056 s *APIService 5057 name string 5058 urlParams_ gensupport.URLParams 5059 ctx_ context.Context 5060 header_ http.Header 5061} 5062 5063// Delete: Deletes a long-running operation. This method indicates that 5064// the client is no longer interested in the operation result. It does 5065// not cancel the operation. If the server doesn't support this method, 5066// it returns `google.rpc.Code.UNIMPLEMENTED`. 5067// 5068// - name: The name of the operation resource to be deleted. 5069func (r *OperationsService) Delete(name string) *OperationsDeleteCall { 5070 c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5071 c.name = name 5072 return c 5073} 5074 5075// Fields allows partial responses to be retrieved. See 5076// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5077// for more information. 5078func (c *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall { 5079 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5080 return c 5081} 5082 5083// Context sets the context to be used in this call's Do method. Any 5084// pending HTTP request will be aborted if the provided context is 5085// canceled. 5086func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall { 5087 c.ctx_ = ctx 5088 return c 5089} 5090 5091// Header returns an http.Header that can be modified by the caller to 5092// add HTTP headers to the request. 5093func (c *OperationsDeleteCall) Header() http.Header { 5094 if c.header_ == nil { 5095 c.header_ = make(http.Header) 5096 } 5097 return c.header_ 5098} 5099 5100func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) { 5101 reqHeaders := make(http.Header) 5102 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 5103 for k, v := range c.header_ { 5104 reqHeaders[k] = v 5105 } 5106 reqHeaders.Set("User-Agent", c.s.userAgent()) 5107 var body io.Reader = nil 5108 c.urlParams_.Set("alt", alt) 5109 c.urlParams_.Set("prettyPrint", "false") 5110 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5111 urls += "?" + c.urlParams_.Encode() 5112 req, err := http.NewRequest("DELETE", urls, body) 5113 if err != nil { 5114 return nil, err 5115 } 5116 req.Header = reqHeaders 5117 googleapi.Expand(req.URL, map[string]string{ 5118 "name": c.name, 5119 }) 5120 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5121} 5122 5123// Do executes the "servicenetworking.operations.delete" call. 5124// Exactly one of *Empty or error will be non-nil. Any non-2xx status 5125// code is an error. Response headers are in either 5126// *Empty.ServerResponse.Header or (if a response was returned at all) 5127// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5128// check whether the returned error was because http.StatusNotModified 5129// was returned. 5130func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 5131 gensupport.SetOptions(c.urlParams_, opts...) 5132 res, err := c.doRequest("json") 5133 if res != nil && res.StatusCode == http.StatusNotModified { 5134 if res.Body != nil { 5135 res.Body.Close() 5136 } 5137 return nil, &googleapi.Error{ 5138 Code: res.StatusCode, 5139 Header: res.Header, 5140 } 5141 } 5142 if err != nil { 5143 return nil, err 5144 } 5145 defer googleapi.CloseBody(res) 5146 if err := googleapi.CheckResponse(res); err != nil { 5147 return nil, err 5148 } 5149 ret := &Empty{ 5150 ServerResponse: googleapi.ServerResponse{ 5151 Header: res.Header, 5152 HTTPStatusCode: res.StatusCode, 5153 }, 5154 } 5155 target := &ret 5156 if err := gensupport.DecodeResponse(target, res); err != nil { 5157 return nil, err 5158 } 5159 return ret, nil 5160 // { 5161 // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", 5162 // "flatPath": "v1/operations/{operationsId}", 5163 // "httpMethod": "DELETE", 5164 // "id": "servicenetworking.operations.delete", 5165 // "parameterOrder": [ 5166 // "name" 5167 // ], 5168 // "parameters": { 5169 // "name": { 5170 // "description": "The name of the operation resource to be deleted.", 5171 // "location": "path", 5172 // "pattern": "^operations/.*$", 5173 // "required": true, 5174 // "type": "string" 5175 // } 5176 // }, 5177 // "path": "v1/{+name}", 5178 // "response": { 5179 // "$ref": "Empty" 5180 // }, 5181 // "scopes": [ 5182 // "https://www.googleapis.com/auth/cloud-platform", 5183 // "https://www.googleapis.com/auth/service.management" 5184 // ] 5185 // } 5186 5187} 5188 5189// method id "servicenetworking.operations.get": 5190 5191type OperationsGetCall struct { 5192 s *APIService 5193 name string 5194 urlParams_ gensupport.URLParams 5195 ifNoneMatch_ string 5196 ctx_ context.Context 5197 header_ http.Header 5198} 5199 5200// Get: Gets the latest state of a long-running operation. Clients can 5201// use this method to poll the operation result at intervals as 5202// recommended by the API service. 5203// 5204// - name: The name of the operation resource. 5205func (r *OperationsService) Get(name string) *OperationsGetCall { 5206 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5207 c.name = name 5208 return c 5209} 5210 5211// Fields allows partial responses to be retrieved. See 5212// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5213// for more information. 5214func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { 5215 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5216 return c 5217} 5218 5219// IfNoneMatch sets the optional parameter which makes the operation 5220// fail if the object's ETag matches the given value. This is useful for 5221// getting updates only after the object has changed since the last 5222// request. Use googleapi.IsNotModified to check whether the response 5223// error from Do is the result of In-None-Match. 5224func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { 5225 c.ifNoneMatch_ = entityTag 5226 return c 5227} 5228 5229// Context sets the context to be used in this call's Do method. Any 5230// pending HTTP request will be aborted if the provided context is 5231// canceled. 5232func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { 5233 c.ctx_ = ctx 5234 return c 5235} 5236 5237// Header returns an http.Header that can be modified by the caller to 5238// add HTTP headers to the request. 5239func (c *OperationsGetCall) Header() http.Header { 5240 if c.header_ == nil { 5241 c.header_ = make(http.Header) 5242 } 5243 return c.header_ 5244} 5245 5246func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { 5247 reqHeaders := make(http.Header) 5248 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 5249 for k, v := range c.header_ { 5250 reqHeaders[k] = v 5251 } 5252 reqHeaders.Set("User-Agent", c.s.userAgent()) 5253 if c.ifNoneMatch_ != "" { 5254 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5255 } 5256 var body io.Reader = nil 5257 c.urlParams_.Set("alt", alt) 5258 c.urlParams_.Set("prettyPrint", "false") 5259 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5260 urls += "?" + c.urlParams_.Encode() 5261 req, err := http.NewRequest("GET", urls, body) 5262 if err != nil { 5263 return nil, err 5264 } 5265 req.Header = reqHeaders 5266 googleapi.Expand(req.URL, map[string]string{ 5267 "name": c.name, 5268 }) 5269 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5270} 5271 5272// Do executes the "servicenetworking.operations.get" call. 5273// Exactly one of *Operation or error will be non-nil. Any non-2xx 5274// status code is an error. Response headers are in either 5275// *Operation.ServerResponse.Header or (if a response was returned at 5276// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5277// to check whether the returned error was because 5278// http.StatusNotModified was returned. 5279func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5280 gensupport.SetOptions(c.urlParams_, opts...) 5281 res, err := c.doRequest("json") 5282 if res != nil && res.StatusCode == http.StatusNotModified { 5283 if res.Body != nil { 5284 res.Body.Close() 5285 } 5286 return nil, &googleapi.Error{ 5287 Code: res.StatusCode, 5288 Header: res.Header, 5289 } 5290 } 5291 if err != nil { 5292 return nil, err 5293 } 5294 defer googleapi.CloseBody(res) 5295 if err := googleapi.CheckResponse(res); err != nil { 5296 return nil, err 5297 } 5298 ret := &Operation{ 5299 ServerResponse: googleapi.ServerResponse{ 5300 Header: res.Header, 5301 HTTPStatusCode: res.StatusCode, 5302 }, 5303 } 5304 target := &ret 5305 if err := gensupport.DecodeResponse(target, res); err != nil { 5306 return nil, err 5307 } 5308 return ret, nil 5309 // { 5310 // "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.", 5311 // "flatPath": "v1/operations/{operationsId}", 5312 // "httpMethod": "GET", 5313 // "id": "servicenetworking.operations.get", 5314 // "parameterOrder": [ 5315 // "name" 5316 // ], 5317 // "parameters": { 5318 // "name": { 5319 // "description": "The name of the operation resource.", 5320 // "location": "path", 5321 // "pattern": "^operations/[^/]+$", 5322 // "required": true, 5323 // "type": "string" 5324 // } 5325 // }, 5326 // "path": "v1/{+name}", 5327 // "response": { 5328 // "$ref": "Operation" 5329 // }, 5330 // "scopes": [ 5331 // "https://www.googleapis.com/auth/cloud-platform", 5332 // "https://www.googleapis.com/auth/service.management" 5333 // ] 5334 // } 5335 5336} 5337 5338// method id "servicenetworking.operations.list": 5339 5340type OperationsListCall struct { 5341 s *APIService 5342 name string 5343 urlParams_ gensupport.URLParams 5344 ifNoneMatch_ string 5345 ctx_ context.Context 5346 header_ http.Header 5347} 5348 5349// List: Lists operations that match the specified filter in the 5350// request. If the server doesn't support this method, it returns 5351// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to 5352// override the binding to use different resource name schemes, such as 5353// `users/*/operations`. To override the binding, API services can add a 5354// binding such as "/v1/{name=users/*}/operations" to their service 5355// configuration. For backwards compatibility, the default name includes 5356// the operations collection id, however overriding users must ensure 5357// the name binding is the parent resource, without the operations 5358// collection id. 5359// 5360// - name: The name of the operation's parent resource. 5361func (r *OperationsService) List(name string) *OperationsListCall { 5362 c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5363 c.name = name 5364 return c 5365} 5366 5367// Filter sets the optional parameter "filter": The standard list 5368// filter. 5369func (c *OperationsListCall) Filter(filter string) *OperationsListCall { 5370 c.urlParams_.Set("filter", filter) 5371 return c 5372} 5373 5374// PageSize sets the optional parameter "pageSize": The standard list 5375// page size. 5376func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { 5377 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5378 return c 5379} 5380 5381// PageToken sets the optional parameter "pageToken": The standard list 5382// page token. 5383func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { 5384 c.urlParams_.Set("pageToken", pageToken) 5385 return c 5386} 5387 5388// Fields allows partial responses to be retrieved. See 5389// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5390// for more information. 5391func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { 5392 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5393 return c 5394} 5395 5396// IfNoneMatch sets the optional parameter which makes the operation 5397// fail if the object's ETag matches the given value. This is useful for 5398// getting updates only after the object has changed since the last 5399// request. Use googleapi.IsNotModified to check whether the response 5400// error from Do is the result of In-None-Match. 5401func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { 5402 c.ifNoneMatch_ = entityTag 5403 return c 5404} 5405 5406// Context sets the context to be used in this call's Do method. Any 5407// pending HTTP request will be aborted if the provided context is 5408// canceled. 5409func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { 5410 c.ctx_ = ctx 5411 return c 5412} 5413 5414// Header returns an http.Header that can be modified by the caller to 5415// add HTTP headers to the request. 5416func (c *OperationsListCall) Header() http.Header { 5417 if c.header_ == nil { 5418 c.header_ = make(http.Header) 5419 } 5420 return c.header_ 5421} 5422 5423func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { 5424 reqHeaders := make(http.Header) 5425 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 5426 for k, v := range c.header_ { 5427 reqHeaders[k] = v 5428 } 5429 reqHeaders.Set("User-Agent", c.s.userAgent()) 5430 if c.ifNoneMatch_ != "" { 5431 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5432 } 5433 var body io.Reader = nil 5434 c.urlParams_.Set("alt", alt) 5435 c.urlParams_.Set("prettyPrint", "false") 5436 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5437 urls += "?" + c.urlParams_.Encode() 5438 req, err := http.NewRequest("GET", urls, body) 5439 if err != nil { 5440 return nil, err 5441 } 5442 req.Header = reqHeaders 5443 googleapi.Expand(req.URL, map[string]string{ 5444 "name": c.name, 5445 }) 5446 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5447} 5448 5449// Do executes the "servicenetworking.operations.list" call. 5450// Exactly one of *ListOperationsResponse or error will be non-nil. Any 5451// non-2xx status code is an error. Response headers are in either 5452// *ListOperationsResponse.ServerResponse.Header or (if a response was 5453// returned at all) in error.(*googleapi.Error).Header. Use 5454// googleapi.IsNotModified to check whether the returned error was 5455// because http.StatusNotModified was returned. 5456func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 5457 gensupport.SetOptions(c.urlParams_, opts...) 5458 res, err := c.doRequest("json") 5459 if res != nil && res.StatusCode == http.StatusNotModified { 5460 if res.Body != nil { 5461 res.Body.Close() 5462 } 5463 return nil, &googleapi.Error{ 5464 Code: res.StatusCode, 5465 Header: res.Header, 5466 } 5467 } 5468 if err != nil { 5469 return nil, err 5470 } 5471 defer googleapi.CloseBody(res) 5472 if err := googleapi.CheckResponse(res); err != nil { 5473 return nil, err 5474 } 5475 ret := &ListOperationsResponse{ 5476 ServerResponse: googleapi.ServerResponse{ 5477 Header: res.Header, 5478 HTTPStatusCode: res.StatusCode, 5479 }, 5480 } 5481 target := &ret 5482 if err := gensupport.DecodeResponse(target, res); err != nil { 5483 return nil, err 5484 } 5485 return ret, nil 5486 // { 5487 // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", 5488 // "flatPath": "v1/operations", 5489 // "httpMethod": "GET", 5490 // "id": "servicenetworking.operations.list", 5491 // "parameterOrder": [ 5492 // "name" 5493 // ], 5494 // "parameters": { 5495 // "filter": { 5496 // "description": "The standard list filter.", 5497 // "location": "query", 5498 // "type": "string" 5499 // }, 5500 // "name": { 5501 // "description": "The name of the operation's parent resource.", 5502 // "location": "path", 5503 // "pattern": "^operations$", 5504 // "required": true, 5505 // "type": "string" 5506 // }, 5507 // "pageSize": { 5508 // "description": "The standard list page size.", 5509 // "format": "int32", 5510 // "location": "query", 5511 // "type": "integer" 5512 // }, 5513 // "pageToken": { 5514 // "description": "The standard list page token.", 5515 // "location": "query", 5516 // "type": "string" 5517 // } 5518 // }, 5519 // "path": "v1/{+name}", 5520 // "response": { 5521 // "$ref": "ListOperationsResponse" 5522 // }, 5523 // "scopes": [ 5524 // "https://www.googleapis.com/auth/cloud-platform", 5525 // "https://www.googleapis.com/auth/service.management" 5526 // ] 5527 // } 5528 5529} 5530 5531// Pages invokes f for each page of results. 5532// A non-nil error returned from f will halt the iteration. 5533// The provided context supersedes any context provided to the Context method. 5534func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 5535 c.ctx_ = ctx 5536 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5537 for { 5538 x, err := c.Do() 5539 if err != nil { 5540 return err 5541 } 5542 if err := f(x); err != nil { 5543 return err 5544 } 5545 if x.NextPageToken == "" { 5546 return nil 5547 } 5548 c.PageToken(x.NextPageToken) 5549 } 5550} 5551 5552// method id "servicenetworking.services.addSubnetwork": 5553 5554type ServicesAddSubnetworkCall struct { 5555 s *APIService 5556 parent string 5557 addsubnetworkrequest *AddSubnetworkRequest 5558 urlParams_ gensupport.URLParams 5559 ctx_ context.Context 5560 header_ http.Header 5561} 5562 5563// AddSubnetwork: For service producers, provisions a new subnet in a 5564// peered service's shared VPC network in the requested region and with 5565// the requested size that's expressed as a CIDR range (number of 5566// leading bits of ipV4 network mask). The method checks against the 5567// assigned allocated ranges to find a non-conflicting IP address range. 5568// The method will reuse a subnet if subsequent calls contain the same 5569// subnet name, region, and prefix length. This method will make 5570// producer's tenant project to be a shared VPC service project as 5571// needed. 5572// 5573// - parent: A tenant project in the service producer organization, in 5574// the following format: 5575// services/{service}/{collection-id}/{resource-id}. {collection-id} 5576// is the cloud resource collection type that represents the tenant 5577// project. Only `projects` are supported. {resource-id} is the tenant 5578// project numeric id, such as `123456`. {service} the name of the 5579// peering service, such as `service-peering.example.com`. This 5580// service must already be enabled in the service consumer's project. 5581func (r *ServicesService) AddSubnetwork(parent string, addsubnetworkrequest *AddSubnetworkRequest) *ServicesAddSubnetworkCall { 5582 c := &ServicesAddSubnetworkCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5583 c.parent = parent 5584 c.addsubnetworkrequest = addsubnetworkrequest 5585 return c 5586} 5587 5588// Fields allows partial responses to be retrieved. See 5589// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5590// for more information. 5591func (c *ServicesAddSubnetworkCall) Fields(s ...googleapi.Field) *ServicesAddSubnetworkCall { 5592 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5593 return c 5594} 5595 5596// Context sets the context to be used in this call's Do method. Any 5597// pending HTTP request will be aborted if the provided context is 5598// canceled. 5599func (c *ServicesAddSubnetworkCall) Context(ctx context.Context) *ServicesAddSubnetworkCall { 5600 c.ctx_ = ctx 5601 return c 5602} 5603 5604// Header returns an http.Header that can be modified by the caller to 5605// add HTTP headers to the request. 5606func (c *ServicesAddSubnetworkCall) Header() http.Header { 5607 if c.header_ == nil { 5608 c.header_ = make(http.Header) 5609 } 5610 return c.header_ 5611} 5612 5613func (c *ServicesAddSubnetworkCall) doRequest(alt string) (*http.Response, error) { 5614 reqHeaders := make(http.Header) 5615 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 5616 for k, v := range c.header_ { 5617 reqHeaders[k] = v 5618 } 5619 reqHeaders.Set("User-Agent", c.s.userAgent()) 5620 var body io.Reader = nil 5621 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addsubnetworkrequest) 5622 if err != nil { 5623 return nil, err 5624 } 5625 reqHeaders.Set("Content-Type", "application/json") 5626 c.urlParams_.Set("alt", alt) 5627 c.urlParams_.Set("prettyPrint", "false") 5628 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:addSubnetwork") 5629 urls += "?" + c.urlParams_.Encode() 5630 req, err := http.NewRequest("POST", urls, body) 5631 if err != nil { 5632 return nil, err 5633 } 5634 req.Header = reqHeaders 5635 googleapi.Expand(req.URL, map[string]string{ 5636 "parent": c.parent, 5637 }) 5638 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5639} 5640 5641// Do executes the "servicenetworking.services.addSubnetwork" call. 5642// Exactly one of *Operation or error will be non-nil. Any non-2xx 5643// status code is an error. Response headers are in either 5644// *Operation.ServerResponse.Header or (if a response was returned at 5645// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5646// to check whether the returned error was because 5647// http.StatusNotModified was returned. 5648func (c *ServicesAddSubnetworkCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5649 gensupport.SetOptions(c.urlParams_, opts...) 5650 res, err := c.doRequest("json") 5651 if res != nil && res.StatusCode == http.StatusNotModified { 5652 if res.Body != nil { 5653 res.Body.Close() 5654 } 5655 return nil, &googleapi.Error{ 5656 Code: res.StatusCode, 5657 Header: res.Header, 5658 } 5659 } 5660 if err != nil { 5661 return nil, err 5662 } 5663 defer googleapi.CloseBody(res) 5664 if err := googleapi.CheckResponse(res); err != nil { 5665 return nil, err 5666 } 5667 ret := &Operation{ 5668 ServerResponse: googleapi.ServerResponse{ 5669 Header: res.Header, 5670 HTTPStatusCode: res.StatusCode, 5671 }, 5672 } 5673 target := &ret 5674 if err := gensupport.DecodeResponse(target, res); err != nil { 5675 return nil, err 5676 } 5677 return ret, nil 5678 // { 5679 // "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.", 5680 // "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}:addSubnetwork", 5681 // "httpMethod": "POST", 5682 // "id": "servicenetworking.services.addSubnetwork", 5683 // "parameterOrder": [ 5684 // "parent" 5685 // ], 5686 // "parameters": { 5687 // "parent": { 5688 // "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.", 5689 // "location": "path", 5690 // "pattern": "^services/[^/]+/[^/]+/[^/]+$", 5691 // "required": true, 5692 // "type": "string" 5693 // } 5694 // }, 5695 // "path": "v1/{+parent}:addSubnetwork", 5696 // "request": { 5697 // "$ref": "AddSubnetworkRequest" 5698 // }, 5699 // "response": { 5700 // "$ref": "Operation" 5701 // }, 5702 // "scopes": [ 5703 // "https://www.googleapis.com/auth/cloud-platform", 5704 // "https://www.googleapis.com/auth/service.management" 5705 // ] 5706 // } 5707 5708} 5709 5710// method id "servicenetworking.services.disableVpcServiceControls": 5711 5712type ServicesDisableVpcServiceControlsCall struct { 5713 s *APIService 5714 parent string 5715 disablevpcservicecontrolsrequest *DisableVpcServiceControlsRequest 5716 urlParams_ gensupport.URLParams 5717 ctx_ context.Context 5718 header_ http.Header 5719} 5720 5721// DisableVpcServiceControls: Disables VPC service controls for a 5722// connection. 5723// 5724// - parent: The service that is managing peering connectivity for a 5725// service producer's organization. For Google services that support 5726// this functionality, this value is 5727// `services/servicenetworking.googleapis.com`. 5728func (r *ServicesService) DisableVpcServiceControls(parent string, disablevpcservicecontrolsrequest *DisableVpcServiceControlsRequest) *ServicesDisableVpcServiceControlsCall { 5729 c := &ServicesDisableVpcServiceControlsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5730 c.parent = parent 5731 c.disablevpcservicecontrolsrequest = disablevpcservicecontrolsrequest 5732 return c 5733} 5734 5735// Fields allows partial responses to be retrieved. See 5736// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5737// for more information. 5738func (c *ServicesDisableVpcServiceControlsCall) Fields(s ...googleapi.Field) *ServicesDisableVpcServiceControlsCall { 5739 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5740 return c 5741} 5742 5743// Context sets the context to be used in this call's Do method. Any 5744// pending HTTP request will be aborted if the provided context is 5745// canceled. 5746func (c *ServicesDisableVpcServiceControlsCall) Context(ctx context.Context) *ServicesDisableVpcServiceControlsCall { 5747 c.ctx_ = ctx 5748 return c 5749} 5750 5751// Header returns an http.Header that can be modified by the caller to 5752// add HTTP headers to the request. 5753func (c *ServicesDisableVpcServiceControlsCall) Header() http.Header { 5754 if c.header_ == nil { 5755 c.header_ = make(http.Header) 5756 } 5757 return c.header_ 5758} 5759 5760func (c *ServicesDisableVpcServiceControlsCall) doRequest(alt string) (*http.Response, error) { 5761 reqHeaders := make(http.Header) 5762 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 5763 for k, v := range c.header_ { 5764 reqHeaders[k] = v 5765 } 5766 reqHeaders.Set("User-Agent", c.s.userAgent()) 5767 var body io.Reader = nil 5768 body, err := googleapi.WithoutDataWrapper.JSONReader(c.disablevpcservicecontrolsrequest) 5769 if err != nil { 5770 return nil, err 5771 } 5772 reqHeaders.Set("Content-Type", "application/json") 5773 c.urlParams_.Set("alt", alt) 5774 c.urlParams_.Set("prettyPrint", "false") 5775 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:disableVpcServiceControls") 5776 urls += "?" + c.urlParams_.Encode() 5777 req, err := http.NewRequest("PATCH", urls, body) 5778 if err != nil { 5779 return nil, err 5780 } 5781 req.Header = reqHeaders 5782 googleapi.Expand(req.URL, map[string]string{ 5783 "parent": c.parent, 5784 }) 5785 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5786} 5787 5788// Do executes the "servicenetworking.services.disableVpcServiceControls" call. 5789// Exactly one of *Operation or error will be non-nil. Any non-2xx 5790// status code is an error. Response headers are in either 5791// *Operation.ServerResponse.Header or (if a response was returned at 5792// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5793// to check whether the returned error was because 5794// http.StatusNotModified was returned. 5795func (c *ServicesDisableVpcServiceControlsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5796 gensupport.SetOptions(c.urlParams_, opts...) 5797 res, err := c.doRequest("json") 5798 if res != nil && res.StatusCode == http.StatusNotModified { 5799 if res.Body != nil { 5800 res.Body.Close() 5801 } 5802 return nil, &googleapi.Error{ 5803 Code: res.StatusCode, 5804 Header: res.Header, 5805 } 5806 } 5807 if err != nil { 5808 return nil, err 5809 } 5810 defer googleapi.CloseBody(res) 5811 if err := googleapi.CheckResponse(res); err != nil { 5812 return nil, err 5813 } 5814 ret := &Operation{ 5815 ServerResponse: googleapi.ServerResponse{ 5816 Header: res.Header, 5817 HTTPStatusCode: res.StatusCode, 5818 }, 5819 } 5820 target := &ret 5821 if err := gensupport.DecodeResponse(target, res); err != nil { 5822 return nil, err 5823 } 5824 return ret, nil 5825 // { 5826 // "description": "Disables VPC service controls for a connection.", 5827 // "flatPath": "v1/services/{servicesId}:disableVpcServiceControls", 5828 // "httpMethod": "PATCH", 5829 // "id": "servicenetworking.services.disableVpcServiceControls", 5830 // "parameterOrder": [ 5831 // "parent" 5832 // ], 5833 // "parameters": { 5834 // "parent": { 5835 // "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`.", 5836 // "location": "path", 5837 // "pattern": "^services/[^/]+$", 5838 // "required": true, 5839 // "type": "string" 5840 // } 5841 // }, 5842 // "path": "v1/{+parent}:disableVpcServiceControls", 5843 // "request": { 5844 // "$ref": "DisableVpcServiceControlsRequest" 5845 // }, 5846 // "response": { 5847 // "$ref": "Operation" 5848 // }, 5849 // "scopes": [ 5850 // "https://www.googleapis.com/auth/cloud-platform", 5851 // "https://www.googleapis.com/auth/service.management" 5852 // ] 5853 // } 5854 5855} 5856 5857// method id "servicenetworking.services.enableVpcServiceControls": 5858 5859type ServicesEnableVpcServiceControlsCall struct { 5860 s *APIService 5861 parent string 5862 enablevpcservicecontrolsrequest *EnableVpcServiceControlsRequest 5863 urlParams_ gensupport.URLParams 5864 ctx_ context.Context 5865 header_ http.Header 5866} 5867 5868// EnableVpcServiceControls: Enables VPC service controls for a 5869// connection. 5870// 5871// - parent: The service that is managing peering connectivity for a 5872// service producer's organization. For Google services that support 5873// this functionality, this value is 5874// `services/servicenetworking.googleapis.com`. 5875func (r *ServicesService) EnableVpcServiceControls(parent string, enablevpcservicecontrolsrequest *EnableVpcServiceControlsRequest) *ServicesEnableVpcServiceControlsCall { 5876 c := &ServicesEnableVpcServiceControlsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5877 c.parent = parent 5878 c.enablevpcservicecontrolsrequest = enablevpcservicecontrolsrequest 5879 return c 5880} 5881 5882// Fields allows partial responses to be retrieved. See 5883// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5884// for more information. 5885func (c *ServicesEnableVpcServiceControlsCall) Fields(s ...googleapi.Field) *ServicesEnableVpcServiceControlsCall { 5886 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5887 return c 5888} 5889 5890// Context sets the context to be used in this call's Do method. Any 5891// pending HTTP request will be aborted if the provided context is 5892// canceled. 5893func (c *ServicesEnableVpcServiceControlsCall) Context(ctx context.Context) *ServicesEnableVpcServiceControlsCall { 5894 c.ctx_ = ctx 5895 return c 5896} 5897 5898// Header returns an http.Header that can be modified by the caller to 5899// add HTTP headers to the request. 5900func (c *ServicesEnableVpcServiceControlsCall) Header() http.Header { 5901 if c.header_ == nil { 5902 c.header_ = make(http.Header) 5903 } 5904 return c.header_ 5905} 5906 5907func (c *ServicesEnableVpcServiceControlsCall) doRequest(alt string) (*http.Response, error) { 5908 reqHeaders := make(http.Header) 5909 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 5910 for k, v := range c.header_ { 5911 reqHeaders[k] = v 5912 } 5913 reqHeaders.Set("User-Agent", c.s.userAgent()) 5914 var body io.Reader = nil 5915 body, err := googleapi.WithoutDataWrapper.JSONReader(c.enablevpcservicecontrolsrequest) 5916 if err != nil { 5917 return nil, err 5918 } 5919 reqHeaders.Set("Content-Type", "application/json") 5920 c.urlParams_.Set("alt", alt) 5921 c.urlParams_.Set("prettyPrint", "false") 5922 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:enableVpcServiceControls") 5923 urls += "?" + c.urlParams_.Encode() 5924 req, err := http.NewRequest("PATCH", urls, body) 5925 if err != nil { 5926 return nil, err 5927 } 5928 req.Header = reqHeaders 5929 googleapi.Expand(req.URL, map[string]string{ 5930 "parent": c.parent, 5931 }) 5932 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5933} 5934 5935// Do executes the "servicenetworking.services.enableVpcServiceControls" call. 5936// Exactly one of *Operation or error will be non-nil. Any non-2xx 5937// status code is an error. Response headers are in either 5938// *Operation.ServerResponse.Header or (if a response was returned at 5939// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5940// to check whether the returned error was because 5941// http.StatusNotModified was returned. 5942func (c *ServicesEnableVpcServiceControlsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5943 gensupport.SetOptions(c.urlParams_, opts...) 5944 res, err := c.doRequest("json") 5945 if res != nil && res.StatusCode == http.StatusNotModified { 5946 if res.Body != nil { 5947 res.Body.Close() 5948 } 5949 return nil, &googleapi.Error{ 5950 Code: res.StatusCode, 5951 Header: res.Header, 5952 } 5953 } 5954 if err != nil { 5955 return nil, err 5956 } 5957 defer googleapi.CloseBody(res) 5958 if err := googleapi.CheckResponse(res); err != nil { 5959 return nil, err 5960 } 5961 ret := &Operation{ 5962 ServerResponse: googleapi.ServerResponse{ 5963 Header: res.Header, 5964 HTTPStatusCode: res.StatusCode, 5965 }, 5966 } 5967 target := &ret 5968 if err := gensupport.DecodeResponse(target, res); err != nil { 5969 return nil, err 5970 } 5971 return ret, nil 5972 // { 5973 // "description": "Enables VPC service controls for a connection.", 5974 // "flatPath": "v1/services/{servicesId}:enableVpcServiceControls", 5975 // "httpMethod": "PATCH", 5976 // "id": "servicenetworking.services.enableVpcServiceControls", 5977 // "parameterOrder": [ 5978 // "parent" 5979 // ], 5980 // "parameters": { 5981 // "parent": { 5982 // "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`.", 5983 // "location": "path", 5984 // "pattern": "^services/[^/]+$", 5985 // "required": true, 5986 // "type": "string" 5987 // } 5988 // }, 5989 // "path": "v1/{+parent}:enableVpcServiceControls", 5990 // "request": { 5991 // "$ref": "EnableVpcServiceControlsRequest" 5992 // }, 5993 // "response": { 5994 // "$ref": "Operation" 5995 // }, 5996 // "scopes": [ 5997 // "https://www.googleapis.com/auth/cloud-platform", 5998 // "https://www.googleapis.com/auth/service.management" 5999 // ] 6000 // } 6001 6002} 6003 6004// method id "servicenetworking.services.searchRange": 6005 6006type ServicesSearchRangeCall struct { 6007 s *APIService 6008 parent string 6009 searchrangerequest *SearchRangeRequest 6010 urlParams_ gensupport.URLParams 6011 ctx_ context.Context 6012 header_ http.Header 6013} 6014 6015// SearchRange: Service producers can use this method to find a 6016// currently unused range within consumer allocated ranges. This 6017// returned range is not reserved, and not guaranteed to remain unused. 6018// It will validate previously provided allocated ranges, find 6019// non-conflicting sub-range of requested size (expressed in number of 6020// leading bits of ipv4 network mask, as in CIDR range notation). 6021// 6022// - parent: This is in a form services/{service}. {service} the name of 6023// the private access management service, for example 6024// 'service-peering.example.com'. 6025func (r *ServicesService) SearchRange(parent string, searchrangerequest *SearchRangeRequest) *ServicesSearchRangeCall { 6026 c := &ServicesSearchRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6027 c.parent = parent 6028 c.searchrangerequest = searchrangerequest 6029 return c 6030} 6031 6032// Fields allows partial responses to be retrieved. See 6033// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6034// for more information. 6035func (c *ServicesSearchRangeCall) Fields(s ...googleapi.Field) *ServicesSearchRangeCall { 6036 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6037 return c 6038} 6039 6040// Context sets the context to be used in this call's Do method. Any 6041// pending HTTP request will be aborted if the provided context is 6042// canceled. 6043func (c *ServicesSearchRangeCall) Context(ctx context.Context) *ServicesSearchRangeCall { 6044 c.ctx_ = ctx 6045 return c 6046} 6047 6048// Header returns an http.Header that can be modified by the caller to 6049// add HTTP headers to the request. 6050func (c *ServicesSearchRangeCall) Header() http.Header { 6051 if c.header_ == nil { 6052 c.header_ = make(http.Header) 6053 } 6054 return c.header_ 6055} 6056 6057func (c *ServicesSearchRangeCall) doRequest(alt string) (*http.Response, error) { 6058 reqHeaders := make(http.Header) 6059 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 6060 for k, v := range c.header_ { 6061 reqHeaders[k] = v 6062 } 6063 reqHeaders.Set("User-Agent", c.s.userAgent()) 6064 var body io.Reader = nil 6065 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchrangerequest) 6066 if err != nil { 6067 return nil, err 6068 } 6069 reqHeaders.Set("Content-Type", "application/json") 6070 c.urlParams_.Set("alt", alt) 6071 c.urlParams_.Set("prettyPrint", "false") 6072 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:searchRange") 6073 urls += "?" + c.urlParams_.Encode() 6074 req, err := http.NewRequest("POST", urls, body) 6075 if err != nil { 6076 return nil, err 6077 } 6078 req.Header = reqHeaders 6079 googleapi.Expand(req.URL, map[string]string{ 6080 "parent": c.parent, 6081 }) 6082 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6083} 6084 6085// Do executes the "servicenetworking.services.searchRange" call. 6086// Exactly one of *Operation or error will be non-nil. Any non-2xx 6087// status code is an error. Response headers are in either 6088// *Operation.ServerResponse.Header or (if a response was returned at 6089// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6090// to check whether the returned error was because 6091// http.StatusNotModified was returned. 6092func (c *ServicesSearchRangeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6093 gensupport.SetOptions(c.urlParams_, opts...) 6094 res, err := c.doRequest("json") 6095 if res != nil && res.StatusCode == http.StatusNotModified { 6096 if res.Body != nil { 6097 res.Body.Close() 6098 } 6099 return nil, &googleapi.Error{ 6100 Code: res.StatusCode, 6101 Header: res.Header, 6102 } 6103 } 6104 if err != nil { 6105 return nil, err 6106 } 6107 defer googleapi.CloseBody(res) 6108 if err := googleapi.CheckResponse(res); err != nil { 6109 return nil, err 6110 } 6111 ret := &Operation{ 6112 ServerResponse: googleapi.ServerResponse{ 6113 Header: res.Header, 6114 HTTPStatusCode: res.StatusCode, 6115 }, 6116 } 6117 target := &ret 6118 if err := gensupport.DecodeResponse(target, res); err != nil { 6119 return nil, err 6120 } 6121 return ret, nil 6122 // { 6123 // "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).", 6124 // "flatPath": "v1/services/{servicesId}:searchRange", 6125 // "httpMethod": "POST", 6126 // "id": "servicenetworking.services.searchRange", 6127 // "parameterOrder": [ 6128 // "parent" 6129 // ], 6130 // "parameters": { 6131 // "parent": { 6132 // "description": "Required. This is in a form services/{service}. {service} the name of the private access management service, for example 'service-peering.example.com'.", 6133 // "location": "path", 6134 // "pattern": "^services/[^/]+$", 6135 // "required": true, 6136 // "type": "string" 6137 // } 6138 // }, 6139 // "path": "v1/{+parent}:searchRange", 6140 // "request": { 6141 // "$ref": "SearchRangeRequest" 6142 // }, 6143 // "response": { 6144 // "$ref": "Operation" 6145 // }, 6146 // "scopes": [ 6147 // "https://www.googleapis.com/auth/cloud-platform", 6148 // "https://www.googleapis.com/auth/service.management" 6149 // ] 6150 // } 6151 6152} 6153 6154// method id "servicenetworking.services.validate": 6155 6156type ServicesValidateCall struct { 6157 s *APIService 6158 parent string 6159 validateconsumerconfigrequest *ValidateConsumerConfigRequest 6160 urlParams_ gensupport.URLParams 6161 ctx_ context.Context 6162 header_ http.Header 6163} 6164 6165// Validate: Service producers use this method to validate if the 6166// consumer provided network, project and requested range are valid. 6167// This allows them to use a fail-fast mechanism for consumer requests, 6168// and not have to wait for AddSubnetwork operation completion to 6169// determine if user request is invalid. 6170// 6171// - parent: This is in a form services/{service} where {service} is the 6172// name of the private access management service. For example 6173// 'service-peering.example.com'. 6174func (r *ServicesService) Validate(parent string, validateconsumerconfigrequest *ValidateConsumerConfigRequest) *ServicesValidateCall { 6175 c := &ServicesValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6176 c.parent = parent 6177 c.validateconsumerconfigrequest = validateconsumerconfigrequest 6178 return c 6179} 6180 6181// Fields allows partial responses to be retrieved. See 6182// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6183// for more information. 6184func (c *ServicesValidateCall) Fields(s ...googleapi.Field) *ServicesValidateCall { 6185 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6186 return c 6187} 6188 6189// Context sets the context to be used in this call's Do method. Any 6190// pending HTTP request will be aborted if the provided context is 6191// canceled. 6192func (c *ServicesValidateCall) Context(ctx context.Context) *ServicesValidateCall { 6193 c.ctx_ = ctx 6194 return c 6195} 6196 6197// Header returns an http.Header that can be modified by the caller to 6198// add HTTP headers to the request. 6199func (c *ServicesValidateCall) Header() http.Header { 6200 if c.header_ == nil { 6201 c.header_ = make(http.Header) 6202 } 6203 return c.header_ 6204} 6205 6206func (c *ServicesValidateCall) doRequest(alt string) (*http.Response, error) { 6207 reqHeaders := make(http.Header) 6208 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 6209 for k, v := range c.header_ { 6210 reqHeaders[k] = v 6211 } 6212 reqHeaders.Set("User-Agent", c.s.userAgent()) 6213 var body io.Reader = nil 6214 body, err := googleapi.WithoutDataWrapper.JSONReader(c.validateconsumerconfigrequest) 6215 if err != nil { 6216 return nil, err 6217 } 6218 reqHeaders.Set("Content-Type", "application/json") 6219 c.urlParams_.Set("alt", alt) 6220 c.urlParams_.Set("prettyPrint", "false") 6221 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:validate") 6222 urls += "?" + c.urlParams_.Encode() 6223 req, err := http.NewRequest("POST", urls, body) 6224 if err != nil { 6225 return nil, err 6226 } 6227 req.Header = reqHeaders 6228 googleapi.Expand(req.URL, map[string]string{ 6229 "parent": c.parent, 6230 }) 6231 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6232} 6233 6234// Do executes the "servicenetworking.services.validate" call. 6235// Exactly one of *ValidateConsumerConfigResponse or error will be 6236// non-nil. Any non-2xx status code is an error. Response headers are in 6237// either *ValidateConsumerConfigResponse.ServerResponse.Header or (if a 6238// response was returned at all) in error.(*googleapi.Error).Header. Use 6239// googleapi.IsNotModified to check whether the returned error was 6240// because http.StatusNotModified was returned. 6241func (c *ServicesValidateCall) Do(opts ...googleapi.CallOption) (*ValidateConsumerConfigResponse, error) { 6242 gensupport.SetOptions(c.urlParams_, opts...) 6243 res, err := c.doRequest("json") 6244 if res != nil && res.StatusCode == http.StatusNotModified { 6245 if res.Body != nil { 6246 res.Body.Close() 6247 } 6248 return nil, &googleapi.Error{ 6249 Code: res.StatusCode, 6250 Header: res.Header, 6251 } 6252 } 6253 if err != nil { 6254 return nil, err 6255 } 6256 defer googleapi.CloseBody(res) 6257 if err := googleapi.CheckResponse(res); err != nil { 6258 return nil, err 6259 } 6260 ret := &ValidateConsumerConfigResponse{ 6261 ServerResponse: googleapi.ServerResponse{ 6262 Header: res.Header, 6263 HTTPStatusCode: res.StatusCode, 6264 }, 6265 } 6266 target := &ret 6267 if err := gensupport.DecodeResponse(target, res); err != nil { 6268 return nil, err 6269 } 6270 return ret, nil 6271 // { 6272 // "description": "Service producers use this method to validate if the consumer provided network, project and requested range are valid. This allows them to use a fail-fast mechanism for consumer requests, and not have to wait for AddSubnetwork operation completion to determine if user request is invalid.", 6273 // "flatPath": "v1/services/{servicesId}:validate", 6274 // "httpMethod": "POST", 6275 // "id": "servicenetworking.services.validate", 6276 // "parameterOrder": [ 6277 // "parent" 6278 // ], 6279 // "parameters": { 6280 // "parent": { 6281 // "description": "Required. This is in a form services/{service} where {service} is the name of the private access management service. For example 'service-peering.example.com'.", 6282 // "location": "path", 6283 // "pattern": "^services/[^/]+$", 6284 // "required": true, 6285 // "type": "string" 6286 // } 6287 // }, 6288 // "path": "v1/{+parent}:validate", 6289 // "request": { 6290 // "$ref": "ValidateConsumerConfigRequest" 6291 // }, 6292 // "response": { 6293 // "$ref": "ValidateConsumerConfigResponse" 6294 // }, 6295 // "scopes": [ 6296 // "https://www.googleapis.com/auth/cloud-platform", 6297 // "https://www.googleapis.com/auth/service.management" 6298 // ] 6299 // } 6300 6301} 6302 6303// method id "servicenetworking.services.connections.create": 6304 6305type ServicesConnectionsCreateCall struct { 6306 s *APIService 6307 parent string 6308 connection *Connection 6309 urlParams_ gensupport.URLParams 6310 ctx_ context.Context 6311 header_ http.Header 6312} 6313 6314// Create: Creates a private connection that establishes a VPC Network 6315// Peering connection to a VPC network in the service producer's 6316// organization. The administrator of the service consumer's VPC network 6317// invokes this method. The administrator must assign one or more 6318// allocated IP ranges for provisioning subnetworks in the service 6319// producer's VPC network. This connection is used for all supported 6320// services in the service producer's organization, so it only needs to 6321// be invoked once. 6322// 6323// - parent: The service that is managing peering connectivity for a 6324// service producer's organization. For Google services that support 6325// this functionality, this value is 6326// `services/servicenetworking.googleapis.com`. 6327func (r *ServicesConnectionsService) Create(parent string, connection *Connection) *ServicesConnectionsCreateCall { 6328 c := &ServicesConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6329 c.parent = parent 6330 c.connection = connection 6331 return c 6332} 6333 6334// Fields allows partial responses to be retrieved. See 6335// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6336// for more information. 6337func (c *ServicesConnectionsCreateCall) Fields(s ...googleapi.Field) *ServicesConnectionsCreateCall { 6338 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6339 return c 6340} 6341 6342// Context sets the context to be used in this call's Do method. Any 6343// pending HTTP request will be aborted if the provided context is 6344// canceled. 6345func (c *ServicesConnectionsCreateCall) Context(ctx context.Context) *ServicesConnectionsCreateCall { 6346 c.ctx_ = ctx 6347 return c 6348} 6349 6350// Header returns an http.Header that can be modified by the caller to 6351// add HTTP headers to the request. 6352func (c *ServicesConnectionsCreateCall) Header() http.Header { 6353 if c.header_ == nil { 6354 c.header_ = make(http.Header) 6355 } 6356 return c.header_ 6357} 6358 6359func (c *ServicesConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { 6360 reqHeaders := make(http.Header) 6361 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 6362 for k, v := range c.header_ { 6363 reqHeaders[k] = v 6364 } 6365 reqHeaders.Set("User-Agent", c.s.userAgent()) 6366 var body io.Reader = nil 6367 body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection) 6368 if err != nil { 6369 return nil, err 6370 } 6371 reqHeaders.Set("Content-Type", "application/json") 6372 c.urlParams_.Set("alt", alt) 6373 c.urlParams_.Set("prettyPrint", "false") 6374 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections") 6375 urls += "?" + c.urlParams_.Encode() 6376 req, err := http.NewRequest("POST", urls, body) 6377 if err != nil { 6378 return nil, err 6379 } 6380 req.Header = reqHeaders 6381 googleapi.Expand(req.URL, map[string]string{ 6382 "parent": c.parent, 6383 }) 6384 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6385} 6386 6387// Do executes the "servicenetworking.services.connections.create" call. 6388// Exactly one of *Operation or error will be non-nil. Any non-2xx 6389// status code is an error. Response headers are in either 6390// *Operation.ServerResponse.Header or (if a response was returned at 6391// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6392// to check whether the returned error was because 6393// http.StatusNotModified was returned. 6394func (c *ServicesConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6395 gensupport.SetOptions(c.urlParams_, opts...) 6396 res, err := c.doRequest("json") 6397 if res != nil && res.StatusCode == http.StatusNotModified { 6398 if res.Body != nil { 6399 res.Body.Close() 6400 } 6401 return nil, &googleapi.Error{ 6402 Code: res.StatusCode, 6403 Header: res.Header, 6404 } 6405 } 6406 if err != nil { 6407 return nil, err 6408 } 6409 defer googleapi.CloseBody(res) 6410 if err := googleapi.CheckResponse(res); err != nil { 6411 return nil, err 6412 } 6413 ret := &Operation{ 6414 ServerResponse: googleapi.ServerResponse{ 6415 Header: res.Header, 6416 HTTPStatusCode: res.StatusCode, 6417 }, 6418 } 6419 target := &ret 6420 if err := gensupport.DecodeResponse(target, res); err != nil { 6421 return nil, err 6422 } 6423 return ret, nil 6424 // { 6425 // "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.", 6426 // "flatPath": "v1/services/{servicesId}/connections", 6427 // "httpMethod": "POST", 6428 // "id": "servicenetworking.services.connections.create", 6429 // "parameterOrder": [ 6430 // "parent" 6431 // ], 6432 // "parameters": { 6433 // "parent": { 6434 // "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`.", 6435 // "location": "path", 6436 // "pattern": "^services/[^/]+$", 6437 // "required": true, 6438 // "type": "string" 6439 // } 6440 // }, 6441 // "path": "v1/{+parent}/connections", 6442 // "request": { 6443 // "$ref": "Connection" 6444 // }, 6445 // "response": { 6446 // "$ref": "Operation" 6447 // }, 6448 // "scopes": [ 6449 // "https://www.googleapis.com/auth/cloud-platform", 6450 // "https://www.googleapis.com/auth/service.management" 6451 // ] 6452 // } 6453 6454} 6455 6456// method id "servicenetworking.services.connections.deleteConnection": 6457 6458type ServicesConnectionsDeleteConnectionCall struct { 6459 s *APIService 6460 name string 6461 deleteconnectionrequest *DeleteConnectionRequest 6462 urlParams_ gensupport.URLParams 6463 ctx_ context.Context 6464 header_ http.Header 6465} 6466 6467// DeleteConnection: Deletes a private service access connection. 6468// 6469// - name: The private service connection that connects to a service 6470// producer organization. The name includes both the private service 6471// name and the VPC network peering name in the format of 6472// `services/{peering_service_name}/connections/{vpc_peering_name}`. 6473// For Google services that support this functionality, this is 6474// `services/servicenetworking.googleapis.com/connections/servicenetwor 6475// king-googleapis-com`. 6476func (r *ServicesConnectionsService) DeleteConnection(name string, deleteconnectionrequest *DeleteConnectionRequest) *ServicesConnectionsDeleteConnectionCall { 6477 c := &ServicesConnectionsDeleteConnectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6478 c.name = name 6479 c.deleteconnectionrequest = deleteconnectionrequest 6480 return c 6481} 6482 6483// Fields allows partial responses to be retrieved. See 6484// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6485// for more information. 6486func (c *ServicesConnectionsDeleteConnectionCall) Fields(s ...googleapi.Field) *ServicesConnectionsDeleteConnectionCall { 6487 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6488 return c 6489} 6490 6491// Context sets the context to be used in this call's Do method. Any 6492// pending HTTP request will be aborted if the provided context is 6493// canceled. 6494func (c *ServicesConnectionsDeleteConnectionCall) Context(ctx context.Context) *ServicesConnectionsDeleteConnectionCall { 6495 c.ctx_ = ctx 6496 return c 6497} 6498 6499// Header returns an http.Header that can be modified by the caller to 6500// add HTTP headers to the request. 6501func (c *ServicesConnectionsDeleteConnectionCall) Header() http.Header { 6502 if c.header_ == nil { 6503 c.header_ = make(http.Header) 6504 } 6505 return c.header_ 6506} 6507 6508func (c *ServicesConnectionsDeleteConnectionCall) doRequest(alt string) (*http.Response, error) { 6509 reqHeaders := make(http.Header) 6510 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 6511 for k, v := range c.header_ { 6512 reqHeaders[k] = v 6513 } 6514 reqHeaders.Set("User-Agent", c.s.userAgent()) 6515 var body io.Reader = nil 6516 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deleteconnectionrequest) 6517 if err != nil { 6518 return nil, err 6519 } 6520 reqHeaders.Set("Content-Type", "application/json") 6521 c.urlParams_.Set("alt", alt) 6522 c.urlParams_.Set("prettyPrint", "false") 6523 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 6524 urls += "?" + c.urlParams_.Encode() 6525 req, err := http.NewRequest("POST", urls, body) 6526 if err != nil { 6527 return nil, err 6528 } 6529 req.Header = reqHeaders 6530 googleapi.Expand(req.URL, map[string]string{ 6531 "name": c.name, 6532 }) 6533 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6534} 6535 6536// Do executes the "servicenetworking.services.connections.deleteConnection" call. 6537// Exactly one of *Operation or error will be non-nil. Any non-2xx 6538// status code is an error. Response headers are in either 6539// *Operation.ServerResponse.Header or (if a response was returned at 6540// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6541// to check whether the returned error was because 6542// http.StatusNotModified was returned. 6543func (c *ServicesConnectionsDeleteConnectionCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6544 gensupport.SetOptions(c.urlParams_, opts...) 6545 res, err := c.doRequest("json") 6546 if res != nil && res.StatusCode == http.StatusNotModified { 6547 if res.Body != nil { 6548 res.Body.Close() 6549 } 6550 return nil, &googleapi.Error{ 6551 Code: res.StatusCode, 6552 Header: res.Header, 6553 } 6554 } 6555 if err != nil { 6556 return nil, err 6557 } 6558 defer googleapi.CloseBody(res) 6559 if err := googleapi.CheckResponse(res); err != nil { 6560 return nil, err 6561 } 6562 ret := &Operation{ 6563 ServerResponse: googleapi.ServerResponse{ 6564 Header: res.Header, 6565 HTTPStatusCode: res.StatusCode, 6566 }, 6567 } 6568 target := &ret 6569 if err := gensupport.DecodeResponse(target, res); err != nil { 6570 return nil, err 6571 } 6572 return ret, nil 6573 // { 6574 // "description": "Deletes a private service access connection.", 6575 // "flatPath": "v1/services/{servicesId}/connections/{connectionsId}", 6576 // "httpMethod": "POST", 6577 // "id": "servicenetworking.services.connections.deleteConnection", 6578 // "parameterOrder": [ 6579 // "name" 6580 // ], 6581 // "parameters": { 6582 // "name": { 6583 // "description": "Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name}/connections/{vpc_peering_name}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.", 6584 // "location": "path", 6585 // "pattern": "^services/[^/]+/connections/[^/]+$", 6586 // "required": true, 6587 // "type": "string" 6588 // } 6589 // }, 6590 // "path": "v1/{+name}", 6591 // "request": { 6592 // "$ref": "DeleteConnectionRequest" 6593 // }, 6594 // "response": { 6595 // "$ref": "Operation" 6596 // }, 6597 // "scopes": [ 6598 // "https://www.googleapis.com/auth/cloud-platform", 6599 // "https://www.googleapis.com/auth/service.management" 6600 // ] 6601 // } 6602 6603} 6604 6605// method id "servicenetworking.services.connections.list": 6606 6607type ServicesConnectionsListCall struct { 6608 s *APIService 6609 parent string 6610 urlParams_ gensupport.URLParams 6611 ifNoneMatch_ string 6612 ctx_ context.Context 6613 header_ http.Header 6614} 6615 6616// List: List the private connections that are configured in a service 6617// consumer's VPC network. 6618// 6619// - parent: The service that is managing peering connectivity for a 6620// service producer's organization. For Google services that support 6621// this functionality, this value is 6622// `services/servicenetworking.googleapis.com`. If you specify 6623// `services/-` as the parameter value, all configured peering 6624// services are listed. 6625func (r *ServicesConnectionsService) List(parent string) *ServicesConnectionsListCall { 6626 c := &ServicesConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6627 c.parent = parent 6628 return c 6629} 6630 6631// Network sets the optional parameter "network": The name of service 6632// consumer's VPC network that's connected with service producer network 6633// through a private connection. The network name must be in the 6634// following format: `projects/{project}/global/networks/{network}`. 6635// {project} is a project number, such as in `12345` that includes the 6636// VPC service consumer's VPC network. {network} is the name of the 6637// service consumer's VPC network. 6638func (c *ServicesConnectionsListCall) Network(network string) *ServicesConnectionsListCall { 6639 c.urlParams_.Set("network", network) 6640 return c 6641} 6642 6643// Fields allows partial responses to be retrieved. See 6644// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6645// for more information. 6646func (c *ServicesConnectionsListCall) Fields(s ...googleapi.Field) *ServicesConnectionsListCall { 6647 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6648 return c 6649} 6650 6651// IfNoneMatch sets the optional parameter which makes the operation 6652// fail if the object's ETag matches the given value. This is useful for 6653// getting updates only after the object has changed since the last 6654// request. Use googleapi.IsNotModified to check whether the response 6655// error from Do is the result of In-None-Match. 6656func (c *ServicesConnectionsListCall) IfNoneMatch(entityTag string) *ServicesConnectionsListCall { 6657 c.ifNoneMatch_ = entityTag 6658 return c 6659} 6660 6661// Context sets the context to be used in this call's Do method. Any 6662// pending HTTP request will be aborted if the provided context is 6663// canceled. 6664func (c *ServicesConnectionsListCall) Context(ctx context.Context) *ServicesConnectionsListCall { 6665 c.ctx_ = ctx 6666 return c 6667} 6668 6669// Header returns an http.Header that can be modified by the caller to 6670// add HTTP headers to the request. 6671func (c *ServicesConnectionsListCall) Header() http.Header { 6672 if c.header_ == nil { 6673 c.header_ = make(http.Header) 6674 } 6675 return c.header_ 6676} 6677 6678func (c *ServicesConnectionsListCall) doRequest(alt string) (*http.Response, error) { 6679 reqHeaders := make(http.Header) 6680 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 6681 for k, v := range c.header_ { 6682 reqHeaders[k] = v 6683 } 6684 reqHeaders.Set("User-Agent", c.s.userAgent()) 6685 if c.ifNoneMatch_ != "" { 6686 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6687 } 6688 var body io.Reader = nil 6689 c.urlParams_.Set("alt", alt) 6690 c.urlParams_.Set("prettyPrint", "false") 6691 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections") 6692 urls += "?" + c.urlParams_.Encode() 6693 req, err := http.NewRequest("GET", urls, body) 6694 if err != nil { 6695 return nil, err 6696 } 6697 req.Header = reqHeaders 6698 googleapi.Expand(req.URL, map[string]string{ 6699 "parent": c.parent, 6700 }) 6701 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6702} 6703 6704// Do executes the "servicenetworking.services.connections.list" call. 6705// Exactly one of *ListConnectionsResponse or error will be non-nil. Any 6706// non-2xx status code is an error. Response headers are in either 6707// *ListConnectionsResponse.ServerResponse.Header or (if a response was 6708// returned at all) in error.(*googleapi.Error).Header. Use 6709// googleapi.IsNotModified to check whether the returned error was 6710// because http.StatusNotModified was returned. 6711func (c *ServicesConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) { 6712 gensupport.SetOptions(c.urlParams_, opts...) 6713 res, err := c.doRequest("json") 6714 if res != nil && res.StatusCode == http.StatusNotModified { 6715 if res.Body != nil { 6716 res.Body.Close() 6717 } 6718 return nil, &googleapi.Error{ 6719 Code: res.StatusCode, 6720 Header: res.Header, 6721 } 6722 } 6723 if err != nil { 6724 return nil, err 6725 } 6726 defer googleapi.CloseBody(res) 6727 if err := googleapi.CheckResponse(res); err != nil { 6728 return nil, err 6729 } 6730 ret := &ListConnectionsResponse{ 6731 ServerResponse: googleapi.ServerResponse{ 6732 Header: res.Header, 6733 HTTPStatusCode: res.StatusCode, 6734 }, 6735 } 6736 target := &ret 6737 if err := gensupport.DecodeResponse(target, res); err != nil { 6738 return nil, err 6739 } 6740 return ret, nil 6741 // { 6742 // "description": "List the private connections that are configured in a service consumer's VPC network.", 6743 // "flatPath": "v1/services/{servicesId}/connections", 6744 // "httpMethod": "GET", 6745 // "id": "servicenetworking.services.connections.list", 6746 // "parameterOrder": [ 6747 // "parent" 6748 // ], 6749 // "parameters": { 6750 // "network": { 6751 // "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.", 6752 // "location": "query", 6753 // "type": "string" 6754 // }, 6755 // "parent": { 6756 // "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 `services/-` as the parameter value, all configured peering services are listed.", 6757 // "location": "path", 6758 // "pattern": "^services/[^/]+$", 6759 // "required": true, 6760 // "type": "string" 6761 // } 6762 // }, 6763 // "path": "v1/{+parent}/connections", 6764 // "response": { 6765 // "$ref": "ListConnectionsResponse" 6766 // }, 6767 // "scopes": [ 6768 // "https://www.googleapis.com/auth/cloud-platform", 6769 // "https://www.googleapis.com/auth/service.management" 6770 // ] 6771 // } 6772 6773} 6774 6775// method id "servicenetworking.services.connections.patch": 6776 6777type ServicesConnectionsPatchCall struct { 6778 s *APIService 6779 name string 6780 connection *Connection 6781 urlParams_ gensupport.URLParams 6782 ctx_ context.Context 6783 header_ http.Header 6784} 6785 6786// Patch: Updates the allocated ranges that are assigned to a 6787// connection. 6788// 6789// - name: The private service connection that connects to a service 6790// producer organization. The name includes both the private service 6791// name and the VPC network peering name in the format of 6792// `services/{peering_service_name}/connections/{vpc_peering_name}`. 6793// For Google services that support this functionality, this is 6794// `services/servicenetworking.googleapis.com/connections/servicenetwor 6795// king-googleapis-com`. 6796func (r *ServicesConnectionsService) Patch(name string, connection *Connection) *ServicesConnectionsPatchCall { 6797 c := &ServicesConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6798 c.name = name 6799 c.connection = connection 6800 return c 6801} 6802 6803// Force sets the optional parameter "force": If a previously defined 6804// allocated range is removed, force flag must be set to true. 6805func (c *ServicesConnectionsPatchCall) Force(force bool) *ServicesConnectionsPatchCall { 6806 c.urlParams_.Set("force", fmt.Sprint(force)) 6807 return c 6808} 6809 6810// UpdateMask sets the optional parameter "updateMask": The update mask. 6811// If this is omitted, it defaults to "*". You can only update the 6812// listed peering ranges. 6813func (c *ServicesConnectionsPatchCall) UpdateMask(updateMask string) *ServicesConnectionsPatchCall { 6814 c.urlParams_.Set("updateMask", updateMask) 6815 return c 6816} 6817 6818// Fields allows partial responses to be retrieved. See 6819// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6820// for more information. 6821func (c *ServicesConnectionsPatchCall) Fields(s ...googleapi.Field) *ServicesConnectionsPatchCall { 6822 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6823 return c 6824} 6825 6826// Context sets the context to be used in this call's Do method. Any 6827// pending HTTP request will be aborted if the provided context is 6828// canceled. 6829func (c *ServicesConnectionsPatchCall) Context(ctx context.Context) *ServicesConnectionsPatchCall { 6830 c.ctx_ = ctx 6831 return c 6832} 6833 6834// Header returns an http.Header that can be modified by the caller to 6835// add HTTP headers to the request. 6836func (c *ServicesConnectionsPatchCall) Header() http.Header { 6837 if c.header_ == nil { 6838 c.header_ = make(http.Header) 6839 } 6840 return c.header_ 6841} 6842 6843func (c *ServicesConnectionsPatchCall) doRequest(alt string) (*http.Response, error) { 6844 reqHeaders := make(http.Header) 6845 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 6846 for k, v := range c.header_ { 6847 reqHeaders[k] = v 6848 } 6849 reqHeaders.Set("User-Agent", c.s.userAgent()) 6850 var body io.Reader = nil 6851 body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection) 6852 if err != nil { 6853 return nil, err 6854 } 6855 reqHeaders.Set("Content-Type", "application/json") 6856 c.urlParams_.Set("alt", alt) 6857 c.urlParams_.Set("prettyPrint", "false") 6858 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 6859 urls += "?" + c.urlParams_.Encode() 6860 req, err := http.NewRequest("PATCH", urls, body) 6861 if err != nil { 6862 return nil, err 6863 } 6864 req.Header = reqHeaders 6865 googleapi.Expand(req.URL, map[string]string{ 6866 "name": c.name, 6867 }) 6868 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6869} 6870 6871// Do executes the "servicenetworking.services.connections.patch" call. 6872// Exactly one of *Operation or error will be non-nil. Any non-2xx 6873// status code is an error. Response headers are in either 6874// *Operation.ServerResponse.Header or (if a response was returned at 6875// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6876// to check whether the returned error was because 6877// http.StatusNotModified was returned. 6878func (c *ServicesConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6879 gensupport.SetOptions(c.urlParams_, opts...) 6880 res, err := c.doRequest("json") 6881 if res != nil && res.StatusCode == http.StatusNotModified { 6882 if res.Body != nil { 6883 res.Body.Close() 6884 } 6885 return nil, &googleapi.Error{ 6886 Code: res.StatusCode, 6887 Header: res.Header, 6888 } 6889 } 6890 if err != nil { 6891 return nil, err 6892 } 6893 defer googleapi.CloseBody(res) 6894 if err := googleapi.CheckResponse(res); err != nil { 6895 return nil, err 6896 } 6897 ret := &Operation{ 6898 ServerResponse: googleapi.ServerResponse{ 6899 Header: res.Header, 6900 HTTPStatusCode: res.StatusCode, 6901 }, 6902 } 6903 target := &ret 6904 if err := gensupport.DecodeResponse(target, res); err != nil { 6905 return nil, err 6906 } 6907 return ret, nil 6908 // { 6909 // "description": "Updates the allocated ranges that are assigned to a connection.", 6910 // "flatPath": "v1/services/{servicesId}/connections/{connectionsId}", 6911 // "httpMethod": "PATCH", 6912 // "id": "servicenetworking.services.connections.patch", 6913 // "parameterOrder": [ 6914 // "name" 6915 // ], 6916 // "parameters": { 6917 // "force": { 6918 // "description": "If a previously defined allocated range is removed, force flag must be set to true.", 6919 // "location": "query", 6920 // "type": "boolean" 6921 // }, 6922 // "name": { 6923 // "description": "The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name}/connections/{vpc_peering_name}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.", 6924 // "location": "path", 6925 // "pattern": "^services/[^/]+/connections/[^/]+$", 6926 // "required": true, 6927 // "type": "string" 6928 // }, 6929 // "updateMask": { 6930 // "description": "The update mask. If this is omitted, it defaults to \"*\". You can only update the listed peering ranges.", 6931 // "format": "google-fieldmask", 6932 // "location": "query", 6933 // "type": "string" 6934 // } 6935 // }, 6936 // "path": "v1/{+name}", 6937 // "request": { 6938 // "$ref": "Connection" 6939 // }, 6940 // "response": { 6941 // "$ref": "Operation" 6942 // }, 6943 // "scopes": [ 6944 // "https://www.googleapis.com/auth/cloud-platform", 6945 // "https://www.googleapis.com/auth/service.management" 6946 // ] 6947 // } 6948 6949} 6950 6951// method id "servicenetworking.services.dnsRecordSets.add": 6952 6953type ServicesDnsRecordSetsAddCall struct { 6954 s *APIService 6955 parent string 6956 adddnsrecordsetrequest *AddDnsRecordSetRequest 6957 urlParams_ gensupport.URLParams 6958 ctx_ context.Context 6959 header_ http.Header 6960} 6961 6962// Add: Service producers can use this method to add DNS record sets to 6963// private DNS zones in the shared producer host project. 6964// 6965// - parent: The service that is managing peering connectivity for a 6966// service producer's organization. For Google services that support 6967// this functionality, this value is 6968// `services/servicenetworking.googleapis.com`. 6969func (r *ServicesDnsRecordSetsService) Add(parent string, adddnsrecordsetrequest *AddDnsRecordSetRequest) *ServicesDnsRecordSetsAddCall { 6970 c := &ServicesDnsRecordSetsAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6971 c.parent = parent 6972 c.adddnsrecordsetrequest = adddnsrecordsetrequest 6973 return c 6974} 6975 6976// Fields allows partial responses to be retrieved. See 6977// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6978// for more information. 6979func (c *ServicesDnsRecordSetsAddCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsAddCall { 6980 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6981 return c 6982} 6983 6984// Context sets the context to be used in this call's Do method. Any 6985// pending HTTP request will be aborted if the provided context is 6986// canceled. 6987func (c *ServicesDnsRecordSetsAddCall) Context(ctx context.Context) *ServicesDnsRecordSetsAddCall { 6988 c.ctx_ = ctx 6989 return c 6990} 6991 6992// Header returns an http.Header that can be modified by the caller to 6993// add HTTP headers to the request. 6994func (c *ServicesDnsRecordSetsAddCall) Header() http.Header { 6995 if c.header_ == nil { 6996 c.header_ = make(http.Header) 6997 } 6998 return c.header_ 6999} 7000 7001func (c *ServicesDnsRecordSetsAddCall) doRequest(alt string) (*http.Response, error) { 7002 reqHeaders := make(http.Header) 7003 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 7004 for k, v := range c.header_ { 7005 reqHeaders[k] = v 7006 } 7007 reqHeaders.Set("User-Agent", c.s.userAgent()) 7008 var body io.Reader = nil 7009 body, err := googleapi.WithoutDataWrapper.JSONReader(c.adddnsrecordsetrequest) 7010 if err != nil { 7011 return nil, err 7012 } 7013 reqHeaders.Set("Content-Type", "application/json") 7014 c.urlParams_.Set("alt", alt) 7015 c.urlParams_.Set("prettyPrint", "false") 7016 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:add") 7017 urls += "?" + c.urlParams_.Encode() 7018 req, err := http.NewRequest("POST", urls, body) 7019 if err != nil { 7020 return nil, err 7021 } 7022 req.Header = reqHeaders 7023 googleapi.Expand(req.URL, map[string]string{ 7024 "parent": c.parent, 7025 }) 7026 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7027} 7028 7029// Do executes the "servicenetworking.services.dnsRecordSets.add" call. 7030// Exactly one of *Operation or error will be non-nil. Any non-2xx 7031// status code is an error. Response headers are in either 7032// *Operation.ServerResponse.Header or (if a response was returned at 7033// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7034// to check whether the returned error was because 7035// http.StatusNotModified was returned. 7036func (c *ServicesDnsRecordSetsAddCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7037 gensupport.SetOptions(c.urlParams_, opts...) 7038 res, err := c.doRequest("json") 7039 if res != nil && res.StatusCode == http.StatusNotModified { 7040 if res.Body != nil { 7041 res.Body.Close() 7042 } 7043 return nil, &googleapi.Error{ 7044 Code: res.StatusCode, 7045 Header: res.Header, 7046 } 7047 } 7048 if err != nil { 7049 return nil, err 7050 } 7051 defer googleapi.CloseBody(res) 7052 if err := googleapi.CheckResponse(res); err != nil { 7053 return nil, err 7054 } 7055 ret := &Operation{ 7056 ServerResponse: googleapi.ServerResponse{ 7057 Header: res.Header, 7058 HTTPStatusCode: res.StatusCode, 7059 }, 7060 } 7061 target := &ret 7062 if err := gensupport.DecodeResponse(target, res); err != nil { 7063 return nil, err 7064 } 7065 return ret, nil 7066 // { 7067 // "description": "Service producers can use this method to add DNS record sets to private DNS zones in the shared producer host project.", 7068 // "flatPath": "v1/services/{servicesId}/dnsRecordSets:add", 7069 // "httpMethod": "POST", 7070 // "id": "servicenetworking.services.dnsRecordSets.add", 7071 // "parameterOrder": [ 7072 // "parent" 7073 // ], 7074 // "parameters": { 7075 // "parent": { 7076 // "description": "Required. 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`.", 7077 // "location": "path", 7078 // "pattern": "^services/[^/]+$", 7079 // "required": true, 7080 // "type": "string" 7081 // } 7082 // }, 7083 // "path": "v1/{+parent}/dnsRecordSets:add", 7084 // "request": { 7085 // "$ref": "AddDnsRecordSetRequest" 7086 // }, 7087 // "response": { 7088 // "$ref": "Operation" 7089 // }, 7090 // "scopes": [ 7091 // "https://www.googleapis.com/auth/cloud-platform", 7092 // "https://www.googleapis.com/auth/service.management" 7093 // ] 7094 // } 7095 7096} 7097 7098// method id "servicenetworking.services.dnsRecordSets.remove": 7099 7100type ServicesDnsRecordSetsRemoveCall struct { 7101 s *APIService 7102 parent string 7103 removednsrecordsetrequest *RemoveDnsRecordSetRequest 7104 urlParams_ gensupport.URLParams 7105 ctx_ context.Context 7106 header_ http.Header 7107} 7108 7109// Remove: Service producers can use this method to remove DNS record 7110// sets from private DNS zones in the shared producer host project. 7111// 7112// - parent: The service that is managing peering connectivity for a 7113// service producer's organization. For Google services that support 7114// this functionality, this value is 7115// `services/servicenetworking.googleapis.com`. 7116func (r *ServicesDnsRecordSetsService) Remove(parent string, removednsrecordsetrequest *RemoveDnsRecordSetRequest) *ServicesDnsRecordSetsRemoveCall { 7117 c := &ServicesDnsRecordSetsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7118 c.parent = parent 7119 c.removednsrecordsetrequest = removednsrecordsetrequest 7120 return c 7121} 7122 7123// Fields allows partial responses to be retrieved. See 7124// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7125// for more information. 7126func (c *ServicesDnsRecordSetsRemoveCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsRemoveCall { 7127 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7128 return c 7129} 7130 7131// Context sets the context to be used in this call's Do method. Any 7132// pending HTTP request will be aborted if the provided context is 7133// canceled. 7134func (c *ServicesDnsRecordSetsRemoveCall) Context(ctx context.Context) *ServicesDnsRecordSetsRemoveCall { 7135 c.ctx_ = ctx 7136 return c 7137} 7138 7139// Header returns an http.Header that can be modified by the caller to 7140// add HTTP headers to the request. 7141func (c *ServicesDnsRecordSetsRemoveCall) Header() http.Header { 7142 if c.header_ == nil { 7143 c.header_ = make(http.Header) 7144 } 7145 return c.header_ 7146} 7147 7148func (c *ServicesDnsRecordSetsRemoveCall) doRequest(alt string) (*http.Response, error) { 7149 reqHeaders := make(http.Header) 7150 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 7151 for k, v := range c.header_ { 7152 reqHeaders[k] = v 7153 } 7154 reqHeaders.Set("User-Agent", c.s.userAgent()) 7155 var body io.Reader = nil 7156 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removednsrecordsetrequest) 7157 if err != nil { 7158 return nil, err 7159 } 7160 reqHeaders.Set("Content-Type", "application/json") 7161 c.urlParams_.Set("alt", alt) 7162 c.urlParams_.Set("prettyPrint", "false") 7163 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:remove") 7164 urls += "?" + c.urlParams_.Encode() 7165 req, err := http.NewRequest("POST", urls, body) 7166 if err != nil { 7167 return nil, err 7168 } 7169 req.Header = reqHeaders 7170 googleapi.Expand(req.URL, map[string]string{ 7171 "parent": c.parent, 7172 }) 7173 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7174} 7175 7176// Do executes the "servicenetworking.services.dnsRecordSets.remove" call. 7177// Exactly one of *Operation or error will be non-nil. Any non-2xx 7178// status code is an error. Response headers are in either 7179// *Operation.ServerResponse.Header or (if a response was returned at 7180// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7181// to check whether the returned error was because 7182// http.StatusNotModified was returned. 7183func (c *ServicesDnsRecordSetsRemoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7184 gensupport.SetOptions(c.urlParams_, opts...) 7185 res, err := c.doRequest("json") 7186 if res != nil && res.StatusCode == http.StatusNotModified { 7187 if res.Body != nil { 7188 res.Body.Close() 7189 } 7190 return nil, &googleapi.Error{ 7191 Code: res.StatusCode, 7192 Header: res.Header, 7193 } 7194 } 7195 if err != nil { 7196 return nil, err 7197 } 7198 defer googleapi.CloseBody(res) 7199 if err := googleapi.CheckResponse(res); err != nil { 7200 return nil, err 7201 } 7202 ret := &Operation{ 7203 ServerResponse: googleapi.ServerResponse{ 7204 Header: res.Header, 7205 HTTPStatusCode: res.StatusCode, 7206 }, 7207 } 7208 target := &ret 7209 if err := gensupport.DecodeResponse(target, res); err != nil { 7210 return nil, err 7211 } 7212 return ret, nil 7213 // { 7214 // "description": "Service producers can use this method to remove DNS record sets from private DNS zones in the shared producer host project.", 7215 // "flatPath": "v1/services/{servicesId}/dnsRecordSets:remove", 7216 // "httpMethod": "POST", 7217 // "id": "servicenetworking.services.dnsRecordSets.remove", 7218 // "parameterOrder": [ 7219 // "parent" 7220 // ], 7221 // "parameters": { 7222 // "parent": { 7223 // "description": "Required. 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`.", 7224 // "location": "path", 7225 // "pattern": "^services/[^/]+$", 7226 // "required": true, 7227 // "type": "string" 7228 // } 7229 // }, 7230 // "path": "v1/{+parent}/dnsRecordSets:remove", 7231 // "request": { 7232 // "$ref": "RemoveDnsRecordSetRequest" 7233 // }, 7234 // "response": { 7235 // "$ref": "Operation" 7236 // }, 7237 // "scopes": [ 7238 // "https://www.googleapis.com/auth/cloud-platform", 7239 // "https://www.googleapis.com/auth/service.management" 7240 // ] 7241 // } 7242 7243} 7244 7245// method id "servicenetworking.services.dnsRecordSets.update": 7246 7247type ServicesDnsRecordSetsUpdateCall struct { 7248 s *APIService 7249 parent string 7250 updatednsrecordsetrequest *UpdateDnsRecordSetRequest 7251 urlParams_ gensupport.URLParams 7252 ctx_ context.Context 7253 header_ http.Header 7254} 7255 7256// Update: Service producers can use this method to update DNS record 7257// sets from private DNS zones in the shared producer host project. 7258// 7259// - parent: The service that is managing peering connectivity for a 7260// service producer's organization. For Google services that support 7261// this functionality, this value is 7262// `services/servicenetworking.googleapis.com`. 7263func (r *ServicesDnsRecordSetsService) Update(parent string, updatednsrecordsetrequest *UpdateDnsRecordSetRequest) *ServicesDnsRecordSetsUpdateCall { 7264 c := &ServicesDnsRecordSetsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7265 c.parent = parent 7266 c.updatednsrecordsetrequest = updatednsrecordsetrequest 7267 return c 7268} 7269 7270// Fields allows partial responses to be retrieved. See 7271// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7272// for more information. 7273func (c *ServicesDnsRecordSetsUpdateCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsUpdateCall { 7274 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7275 return c 7276} 7277 7278// Context sets the context to be used in this call's Do method. Any 7279// pending HTTP request will be aborted if the provided context is 7280// canceled. 7281func (c *ServicesDnsRecordSetsUpdateCall) Context(ctx context.Context) *ServicesDnsRecordSetsUpdateCall { 7282 c.ctx_ = ctx 7283 return c 7284} 7285 7286// Header returns an http.Header that can be modified by the caller to 7287// add HTTP headers to the request. 7288func (c *ServicesDnsRecordSetsUpdateCall) Header() http.Header { 7289 if c.header_ == nil { 7290 c.header_ = make(http.Header) 7291 } 7292 return c.header_ 7293} 7294 7295func (c *ServicesDnsRecordSetsUpdateCall) doRequest(alt string) (*http.Response, error) { 7296 reqHeaders := make(http.Header) 7297 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 7298 for k, v := range c.header_ { 7299 reqHeaders[k] = v 7300 } 7301 reqHeaders.Set("User-Agent", c.s.userAgent()) 7302 var body io.Reader = nil 7303 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatednsrecordsetrequest) 7304 if err != nil { 7305 return nil, err 7306 } 7307 reqHeaders.Set("Content-Type", "application/json") 7308 c.urlParams_.Set("alt", alt) 7309 c.urlParams_.Set("prettyPrint", "false") 7310 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:update") 7311 urls += "?" + c.urlParams_.Encode() 7312 req, err := http.NewRequest("POST", urls, body) 7313 if err != nil { 7314 return nil, err 7315 } 7316 req.Header = reqHeaders 7317 googleapi.Expand(req.URL, map[string]string{ 7318 "parent": c.parent, 7319 }) 7320 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7321} 7322 7323// Do executes the "servicenetworking.services.dnsRecordSets.update" call. 7324// Exactly one of *Operation or error will be non-nil. Any non-2xx 7325// status code is an error. Response headers are in either 7326// *Operation.ServerResponse.Header or (if a response was returned at 7327// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7328// to check whether the returned error was because 7329// http.StatusNotModified was returned. 7330func (c *ServicesDnsRecordSetsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7331 gensupport.SetOptions(c.urlParams_, opts...) 7332 res, err := c.doRequest("json") 7333 if res != nil && res.StatusCode == http.StatusNotModified { 7334 if res.Body != nil { 7335 res.Body.Close() 7336 } 7337 return nil, &googleapi.Error{ 7338 Code: res.StatusCode, 7339 Header: res.Header, 7340 } 7341 } 7342 if err != nil { 7343 return nil, err 7344 } 7345 defer googleapi.CloseBody(res) 7346 if err := googleapi.CheckResponse(res); err != nil { 7347 return nil, err 7348 } 7349 ret := &Operation{ 7350 ServerResponse: googleapi.ServerResponse{ 7351 Header: res.Header, 7352 HTTPStatusCode: res.StatusCode, 7353 }, 7354 } 7355 target := &ret 7356 if err := gensupport.DecodeResponse(target, res); err != nil { 7357 return nil, err 7358 } 7359 return ret, nil 7360 // { 7361 // "description": "Service producers can use this method to update DNS record sets from private DNS zones in the shared producer host project.", 7362 // "flatPath": "v1/services/{servicesId}/dnsRecordSets:update", 7363 // "httpMethod": "POST", 7364 // "id": "servicenetworking.services.dnsRecordSets.update", 7365 // "parameterOrder": [ 7366 // "parent" 7367 // ], 7368 // "parameters": { 7369 // "parent": { 7370 // "description": "Required. 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`.", 7371 // "location": "path", 7372 // "pattern": "^services/[^/]+$", 7373 // "required": true, 7374 // "type": "string" 7375 // } 7376 // }, 7377 // "path": "v1/{+parent}/dnsRecordSets:update", 7378 // "request": { 7379 // "$ref": "UpdateDnsRecordSetRequest" 7380 // }, 7381 // "response": { 7382 // "$ref": "Operation" 7383 // }, 7384 // "scopes": [ 7385 // "https://www.googleapis.com/auth/cloud-platform", 7386 // "https://www.googleapis.com/auth/service.management" 7387 // ] 7388 // } 7389 7390} 7391 7392// method id "servicenetworking.services.dnsZones.add": 7393 7394type ServicesDnsZonesAddCall struct { 7395 s *APIService 7396 parent string 7397 adddnszonerequest *AddDnsZoneRequest 7398 urlParams_ gensupport.URLParams 7399 ctx_ context.Context 7400 header_ http.Header 7401} 7402 7403// Add: Service producers can use this method to add private DNS zones 7404// in the shared producer host project and matching peering zones in the 7405// consumer project. 7406// 7407// - parent: The service that is managing peering connectivity for a 7408// service producer's organization. For Google services that support 7409// this functionality, this value is 7410// `services/servicenetworking.googleapis.com`. 7411func (r *ServicesDnsZonesService) Add(parent string, adddnszonerequest *AddDnsZoneRequest) *ServicesDnsZonesAddCall { 7412 c := &ServicesDnsZonesAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7413 c.parent = parent 7414 c.adddnszonerequest = adddnszonerequest 7415 return c 7416} 7417 7418// Fields allows partial responses to be retrieved. See 7419// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7420// for more information. 7421func (c *ServicesDnsZonesAddCall) Fields(s ...googleapi.Field) *ServicesDnsZonesAddCall { 7422 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7423 return c 7424} 7425 7426// Context sets the context to be used in this call's Do method. Any 7427// pending HTTP request will be aborted if the provided context is 7428// canceled. 7429func (c *ServicesDnsZonesAddCall) Context(ctx context.Context) *ServicesDnsZonesAddCall { 7430 c.ctx_ = ctx 7431 return c 7432} 7433 7434// Header returns an http.Header that can be modified by the caller to 7435// add HTTP headers to the request. 7436func (c *ServicesDnsZonesAddCall) Header() http.Header { 7437 if c.header_ == nil { 7438 c.header_ = make(http.Header) 7439 } 7440 return c.header_ 7441} 7442 7443func (c *ServicesDnsZonesAddCall) doRequest(alt string) (*http.Response, error) { 7444 reqHeaders := make(http.Header) 7445 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 7446 for k, v := range c.header_ { 7447 reqHeaders[k] = v 7448 } 7449 reqHeaders.Set("User-Agent", c.s.userAgent()) 7450 var body io.Reader = nil 7451 body, err := googleapi.WithoutDataWrapper.JSONReader(c.adddnszonerequest) 7452 if err != nil { 7453 return nil, err 7454 } 7455 reqHeaders.Set("Content-Type", "application/json") 7456 c.urlParams_.Set("alt", alt) 7457 c.urlParams_.Set("prettyPrint", "false") 7458 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsZones:add") 7459 urls += "?" + c.urlParams_.Encode() 7460 req, err := http.NewRequest("POST", urls, body) 7461 if err != nil { 7462 return nil, err 7463 } 7464 req.Header = reqHeaders 7465 googleapi.Expand(req.URL, map[string]string{ 7466 "parent": c.parent, 7467 }) 7468 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7469} 7470 7471// Do executes the "servicenetworking.services.dnsZones.add" call. 7472// Exactly one of *Operation or error will be non-nil. Any non-2xx 7473// status code is an error. Response headers are in either 7474// *Operation.ServerResponse.Header or (if a response was returned at 7475// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7476// to check whether the returned error was because 7477// http.StatusNotModified was returned. 7478func (c *ServicesDnsZonesAddCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7479 gensupport.SetOptions(c.urlParams_, opts...) 7480 res, err := c.doRequest("json") 7481 if res != nil && res.StatusCode == http.StatusNotModified { 7482 if res.Body != nil { 7483 res.Body.Close() 7484 } 7485 return nil, &googleapi.Error{ 7486 Code: res.StatusCode, 7487 Header: res.Header, 7488 } 7489 } 7490 if err != nil { 7491 return nil, err 7492 } 7493 defer googleapi.CloseBody(res) 7494 if err := googleapi.CheckResponse(res); err != nil { 7495 return nil, err 7496 } 7497 ret := &Operation{ 7498 ServerResponse: googleapi.ServerResponse{ 7499 Header: res.Header, 7500 HTTPStatusCode: res.StatusCode, 7501 }, 7502 } 7503 target := &ret 7504 if err := gensupport.DecodeResponse(target, res); err != nil { 7505 return nil, err 7506 } 7507 return ret, nil 7508 // { 7509 // "description": "Service producers can use this method to add private DNS zones in the shared producer host project and matching peering zones in the consumer project.", 7510 // "flatPath": "v1/services/{servicesId}/dnsZones:add", 7511 // "httpMethod": "POST", 7512 // "id": "servicenetworking.services.dnsZones.add", 7513 // "parameterOrder": [ 7514 // "parent" 7515 // ], 7516 // "parameters": { 7517 // "parent": { 7518 // "description": "Required. 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`.", 7519 // "location": "path", 7520 // "pattern": "^services/[^/]+$", 7521 // "required": true, 7522 // "type": "string" 7523 // } 7524 // }, 7525 // "path": "v1/{+parent}/dnsZones:add", 7526 // "request": { 7527 // "$ref": "AddDnsZoneRequest" 7528 // }, 7529 // "response": { 7530 // "$ref": "Operation" 7531 // }, 7532 // "scopes": [ 7533 // "https://www.googleapis.com/auth/cloud-platform", 7534 // "https://www.googleapis.com/auth/service.management" 7535 // ] 7536 // } 7537 7538} 7539 7540// method id "servicenetworking.services.dnsZones.remove": 7541 7542type ServicesDnsZonesRemoveCall struct { 7543 s *APIService 7544 parent string 7545 removednszonerequest *RemoveDnsZoneRequest 7546 urlParams_ gensupport.URLParams 7547 ctx_ context.Context 7548 header_ http.Header 7549} 7550 7551// Remove: Service producers can use this method to remove private DNS 7552// zones in the shared producer host project and matching peering zones 7553// in the consumer project. 7554// 7555// - parent: The service that is managing peering connectivity for a 7556// service producer's organization. For Google services that support 7557// this functionality, this value is 7558// `services/servicenetworking.googleapis.com`. 7559func (r *ServicesDnsZonesService) Remove(parent string, removednszonerequest *RemoveDnsZoneRequest) *ServicesDnsZonesRemoveCall { 7560 c := &ServicesDnsZonesRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7561 c.parent = parent 7562 c.removednszonerequest = removednszonerequest 7563 return c 7564} 7565 7566// Fields allows partial responses to be retrieved. See 7567// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7568// for more information. 7569func (c *ServicesDnsZonesRemoveCall) Fields(s ...googleapi.Field) *ServicesDnsZonesRemoveCall { 7570 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7571 return c 7572} 7573 7574// Context sets the context to be used in this call's Do method. Any 7575// pending HTTP request will be aborted if the provided context is 7576// canceled. 7577func (c *ServicesDnsZonesRemoveCall) Context(ctx context.Context) *ServicesDnsZonesRemoveCall { 7578 c.ctx_ = ctx 7579 return c 7580} 7581 7582// Header returns an http.Header that can be modified by the caller to 7583// add HTTP headers to the request. 7584func (c *ServicesDnsZonesRemoveCall) Header() http.Header { 7585 if c.header_ == nil { 7586 c.header_ = make(http.Header) 7587 } 7588 return c.header_ 7589} 7590 7591func (c *ServicesDnsZonesRemoveCall) doRequest(alt string) (*http.Response, error) { 7592 reqHeaders := make(http.Header) 7593 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 7594 for k, v := range c.header_ { 7595 reqHeaders[k] = v 7596 } 7597 reqHeaders.Set("User-Agent", c.s.userAgent()) 7598 var body io.Reader = nil 7599 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removednszonerequest) 7600 if err != nil { 7601 return nil, err 7602 } 7603 reqHeaders.Set("Content-Type", "application/json") 7604 c.urlParams_.Set("alt", alt) 7605 c.urlParams_.Set("prettyPrint", "false") 7606 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsZones:remove") 7607 urls += "?" + c.urlParams_.Encode() 7608 req, err := http.NewRequest("POST", urls, body) 7609 if err != nil { 7610 return nil, err 7611 } 7612 req.Header = reqHeaders 7613 googleapi.Expand(req.URL, map[string]string{ 7614 "parent": c.parent, 7615 }) 7616 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7617} 7618 7619// Do executes the "servicenetworking.services.dnsZones.remove" call. 7620// Exactly one of *Operation or error will be non-nil. Any non-2xx 7621// status code is an error. Response headers are in either 7622// *Operation.ServerResponse.Header or (if a response was returned at 7623// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7624// to check whether the returned error was because 7625// http.StatusNotModified was returned. 7626func (c *ServicesDnsZonesRemoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7627 gensupport.SetOptions(c.urlParams_, opts...) 7628 res, err := c.doRequest("json") 7629 if res != nil && res.StatusCode == http.StatusNotModified { 7630 if res.Body != nil { 7631 res.Body.Close() 7632 } 7633 return nil, &googleapi.Error{ 7634 Code: res.StatusCode, 7635 Header: res.Header, 7636 } 7637 } 7638 if err != nil { 7639 return nil, err 7640 } 7641 defer googleapi.CloseBody(res) 7642 if err := googleapi.CheckResponse(res); err != nil { 7643 return nil, err 7644 } 7645 ret := &Operation{ 7646 ServerResponse: googleapi.ServerResponse{ 7647 Header: res.Header, 7648 HTTPStatusCode: res.StatusCode, 7649 }, 7650 } 7651 target := &ret 7652 if err := gensupport.DecodeResponse(target, res); err != nil { 7653 return nil, err 7654 } 7655 return ret, nil 7656 // { 7657 // "description": "Service producers can use this method to remove private DNS zones in the shared producer host project and matching peering zones in the consumer project.", 7658 // "flatPath": "v1/services/{servicesId}/dnsZones:remove", 7659 // "httpMethod": "POST", 7660 // "id": "servicenetworking.services.dnsZones.remove", 7661 // "parameterOrder": [ 7662 // "parent" 7663 // ], 7664 // "parameters": { 7665 // "parent": { 7666 // "description": "Required. 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`.", 7667 // "location": "path", 7668 // "pattern": "^services/[^/]+$", 7669 // "required": true, 7670 // "type": "string" 7671 // } 7672 // }, 7673 // "path": "v1/{+parent}/dnsZones:remove", 7674 // "request": { 7675 // "$ref": "RemoveDnsZoneRequest" 7676 // }, 7677 // "response": { 7678 // "$ref": "Operation" 7679 // }, 7680 // "scopes": [ 7681 // "https://www.googleapis.com/auth/cloud-platform", 7682 // "https://www.googleapis.com/auth/service.management" 7683 // ] 7684 // } 7685 7686} 7687 7688// method id "servicenetworking.services.projects.global.networks.get": 7689 7690type ServicesProjectsGlobalNetworksGetCall struct { 7691 s *APIService 7692 name string 7693 urlParams_ gensupport.URLParams 7694 ifNoneMatch_ string 7695 ctx_ context.Context 7696 header_ http.Header 7697} 7698 7699// Get: Service producers use this method to get the configuration of 7700// their connection including the import/export of custom routes and 7701// subnetwork routes with public IP. 7702// 7703// - name: Name of the consumer config to retrieve in the format: 7704// `services/{service}/projects/{project}/global/networks/{network}`. 7705// {service} is the peering service that is managing connectivity for 7706// the service producer's organization. For Google services that 7707// support this functionality, this value is 7708// `servicenetworking.googleapis.com`. {project} is a project number 7709// e.g. `12345` that contains the service consumer's VPC network. 7710// {network} is the name of the service consumer's VPC network. 7711func (r *ServicesProjectsGlobalNetworksService) Get(name string) *ServicesProjectsGlobalNetworksGetCall { 7712 c := &ServicesProjectsGlobalNetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7713 c.name = name 7714 return c 7715} 7716 7717// Fields allows partial responses to be retrieved. See 7718// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7719// for more information. 7720func (c *ServicesProjectsGlobalNetworksGetCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksGetCall { 7721 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7722 return c 7723} 7724 7725// IfNoneMatch sets the optional parameter which makes the operation 7726// fail if the object's ETag matches the given value. This is useful for 7727// getting updates only after the object has changed since the last 7728// request. Use googleapi.IsNotModified to check whether the response 7729// error from Do is the result of In-None-Match. 7730func (c *ServicesProjectsGlobalNetworksGetCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksGetCall { 7731 c.ifNoneMatch_ = entityTag 7732 return c 7733} 7734 7735// Context sets the context to be used in this call's Do method. Any 7736// pending HTTP request will be aborted if the provided context is 7737// canceled. 7738func (c *ServicesProjectsGlobalNetworksGetCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksGetCall { 7739 c.ctx_ = ctx 7740 return c 7741} 7742 7743// Header returns an http.Header that can be modified by the caller to 7744// add HTTP headers to the request. 7745func (c *ServicesProjectsGlobalNetworksGetCall) Header() http.Header { 7746 if c.header_ == nil { 7747 c.header_ = make(http.Header) 7748 } 7749 return c.header_ 7750} 7751 7752func (c *ServicesProjectsGlobalNetworksGetCall) doRequest(alt string) (*http.Response, error) { 7753 reqHeaders := make(http.Header) 7754 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 7755 for k, v := range c.header_ { 7756 reqHeaders[k] = v 7757 } 7758 reqHeaders.Set("User-Agent", c.s.userAgent()) 7759 if c.ifNoneMatch_ != "" { 7760 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7761 } 7762 var body io.Reader = nil 7763 c.urlParams_.Set("alt", alt) 7764 c.urlParams_.Set("prettyPrint", "false") 7765 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7766 urls += "?" + c.urlParams_.Encode() 7767 req, err := http.NewRequest("GET", urls, body) 7768 if err != nil { 7769 return nil, err 7770 } 7771 req.Header = reqHeaders 7772 googleapi.Expand(req.URL, map[string]string{ 7773 "name": c.name, 7774 }) 7775 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7776} 7777 7778// Do executes the "servicenetworking.services.projects.global.networks.get" call. 7779// Exactly one of *ConsumerConfig or error will be non-nil. Any non-2xx 7780// status code is an error. Response headers are in either 7781// *ConsumerConfig.ServerResponse.Header or (if a response was returned 7782// at all) in error.(*googleapi.Error).Header. Use 7783// googleapi.IsNotModified to check whether the returned error was 7784// because http.StatusNotModified was returned. 7785func (c *ServicesProjectsGlobalNetworksGetCall) Do(opts ...googleapi.CallOption) (*ConsumerConfig, error) { 7786 gensupport.SetOptions(c.urlParams_, opts...) 7787 res, err := c.doRequest("json") 7788 if res != nil && res.StatusCode == http.StatusNotModified { 7789 if res.Body != nil { 7790 res.Body.Close() 7791 } 7792 return nil, &googleapi.Error{ 7793 Code: res.StatusCode, 7794 Header: res.Header, 7795 } 7796 } 7797 if err != nil { 7798 return nil, err 7799 } 7800 defer googleapi.CloseBody(res) 7801 if err := googleapi.CheckResponse(res); err != nil { 7802 return nil, err 7803 } 7804 ret := &ConsumerConfig{ 7805 ServerResponse: googleapi.ServerResponse{ 7806 Header: res.Header, 7807 HTTPStatusCode: res.StatusCode, 7808 }, 7809 } 7810 target := &ret 7811 if err := gensupport.DecodeResponse(target, res); err != nil { 7812 return nil, err 7813 } 7814 return ret, nil 7815 // { 7816 // "description": "Service producers use this method to get the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP.", 7817 // "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}", 7818 // "httpMethod": "GET", 7819 // "id": "servicenetworking.services.projects.global.networks.get", 7820 // "parameterOrder": [ 7821 // "name" 7822 // ], 7823 // "parameters": { 7824 // "name": { 7825 // "description": "Required. Name of the consumer config to retrieve in the format: `services/{service}/projects/{project}/global/networks/{network}`. {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is a project number e.g. `12345` that contains the service consumer's VPC network. {network} is the name of the service consumer's VPC network.", 7826 // "location": "path", 7827 // "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", 7828 // "required": true, 7829 // "type": "string" 7830 // } 7831 // }, 7832 // "path": "v1/{+name}", 7833 // "response": { 7834 // "$ref": "ConsumerConfig" 7835 // }, 7836 // "scopes": [ 7837 // "https://www.googleapis.com/auth/cloud-platform", 7838 // "https://www.googleapis.com/auth/service.management" 7839 // ] 7840 // } 7841 7842} 7843 7844// method id "servicenetworking.services.projects.global.networks.updateConsumerConfig": 7845 7846type ServicesProjectsGlobalNetworksUpdateConsumerConfigCall struct { 7847 s *APIService 7848 parent string 7849 updateconsumerconfigrequest *UpdateConsumerConfigRequest 7850 urlParams_ gensupport.URLParams 7851 ctx_ context.Context 7852 header_ http.Header 7853} 7854 7855// UpdateConsumerConfig: Service producers use this method to update the 7856// configuration of their connection including the import/export of 7857// custom routes and subnetwork routes with public IP. 7858// 7859// - parent: Parent resource identifying the connection for which the 7860// consumer config is being updated in the format: 7861// `services/{service}/projects/{project}/global/networks/{network}` 7862// {service} is the peering service that is managing connectivity for 7863// the service producer's organization. For Google services that 7864// support this functionality, this value is 7865// `servicenetworking.googleapis.com`. {project} is the number of the 7866// project that contains the service consumer's VPC network e.g. 7867// `12345`. {network} is the name of the service consumer's VPC 7868// network. 7869func (r *ServicesProjectsGlobalNetworksService) UpdateConsumerConfig(parent string, updateconsumerconfigrequest *UpdateConsumerConfigRequest) *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall { 7870 c := &ServicesProjectsGlobalNetworksUpdateConsumerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7871 c.parent = parent 7872 c.updateconsumerconfigrequest = updateconsumerconfigrequest 7873 return c 7874} 7875 7876// Fields allows partial responses to be retrieved. See 7877// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7878// for more information. 7879func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall { 7880 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7881 return c 7882} 7883 7884// Context sets the context to be used in this call's Do method. Any 7885// pending HTTP request will be aborted if the provided context is 7886// canceled. 7887func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall { 7888 c.ctx_ = ctx 7889 return c 7890} 7891 7892// Header returns an http.Header that can be modified by the caller to 7893// add HTTP headers to the request. 7894func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Header() http.Header { 7895 if c.header_ == nil { 7896 c.header_ = make(http.Header) 7897 } 7898 return c.header_ 7899} 7900 7901func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) doRequest(alt string) (*http.Response, error) { 7902 reqHeaders := make(http.Header) 7903 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 7904 for k, v := range c.header_ { 7905 reqHeaders[k] = v 7906 } 7907 reqHeaders.Set("User-Agent", c.s.userAgent()) 7908 var body io.Reader = nil 7909 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateconsumerconfigrequest) 7910 if err != nil { 7911 return nil, err 7912 } 7913 reqHeaders.Set("Content-Type", "application/json") 7914 c.urlParams_.Set("alt", alt) 7915 c.urlParams_.Set("prettyPrint", "false") 7916 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:updateConsumerConfig") 7917 urls += "?" + c.urlParams_.Encode() 7918 req, err := http.NewRequest("PATCH", urls, body) 7919 if err != nil { 7920 return nil, err 7921 } 7922 req.Header = reqHeaders 7923 googleapi.Expand(req.URL, map[string]string{ 7924 "parent": c.parent, 7925 }) 7926 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7927} 7928 7929// Do executes the "servicenetworking.services.projects.global.networks.updateConsumerConfig" call. 7930// Exactly one of *Operation or error will be non-nil. Any non-2xx 7931// status code is an error. Response headers are in either 7932// *Operation.ServerResponse.Header or (if a response was returned at 7933// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7934// to check whether the returned error was because 7935// http.StatusNotModified was returned. 7936func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7937 gensupport.SetOptions(c.urlParams_, opts...) 7938 res, err := c.doRequest("json") 7939 if res != nil && res.StatusCode == http.StatusNotModified { 7940 if res.Body != nil { 7941 res.Body.Close() 7942 } 7943 return nil, &googleapi.Error{ 7944 Code: res.StatusCode, 7945 Header: res.Header, 7946 } 7947 } 7948 if err != nil { 7949 return nil, err 7950 } 7951 defer googleapi.CloseBody(res) 7952 if err := googleapi.CheckResponse(res); err != nil { 7953 return nil, err 7954 } 7955 ret := &Operation{ 7956 ServerResponse: googleapi.ServerResponse{ 7957 Header: res.Header, 7958 HTTPStatusCode: res.StatusCode, 7959 }, 7960 } 7961 target := &ret 7962 if err := gensupport.DecodeResponse(target, res); err != nil { 7963 return nil, err 7964 } 7965 return ret, nil 7966 // { 7967 // "description": "Service producers use this method to update the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP.", 7968 // "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}:updateConsumerConfig", 7969 // "httpMethod": "PATCH", 7970 // "id": "servicenetworking.services.projects.global.networks.updateConsumerConfig", 7971 // "parameterOrder": [ 7972 // "parent" 7973 // ], 7974 // "parameters": { 7975 // "parent": { 7976 // "description": "Required. Parent resource identifying the connection for which the consumer config is being updated in the format: `services/{service}/projects/{project}/global/networks/{network}` {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network} is the name of the service consumer's VPC network.", 7977 // "location": "path", 7978 // "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", 7979 // "required": true, 7980 // "type": "string" 7981 // } 7982 // }, 7983 // "path": "v1/{+parent}:updateConsumerConfig", 7984 // "request": { 7985 // "$ref": "UpdateConsumerConfigRequest" 7986 // }, 7987 // "response": { 7988 // "$ref": "Operation" 7989 // }, 7990 // "scopes": [ 7991 // "https://www.googleapis.com/auth/cloud-platform", 7992 // "https://www.googleapis.com/auth/service.management" 7993 // ] 7994 // } 7995 7996} 7997 7998// method id "servicenetworking.services.projects.global.networks.peeredDnsDomains.create": 7999 8000type ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall struct { 8001 s *APIService 8002 parent string 8003 peereddnsdomain *PeeredDnsDomain 8004 urlParams_ gensupport.URLParams 8005 ctx_ context.Context 8006 header_ http.Header 8007} 8008 8009// Create: Creates a peered DNS domain which sends requests for records 8010// in given namespace originating in the service producer VPC network to 8011// the consumer VPC network to be resolved. 8012// 8013// - parent: Parent resource identifying the connection for which the 8014// peered DNS domain will be created in the format: 8015// `services/{service}/projects/{project}/global/networks/{network}` 8016// {service} is the peering service that is managing connectivity for 8017// the service producer's organization. For Google services that 8018// support this functionality, this value is 8019// `servicenetworking.googleapis.com`. {project} is the number of the 8020// project that contains the service consumer's VPC network e.g. 8021// `12345`. {network} is the name of the service consumer's VPC 8022// network. 8023func (r *ServicesProjectsGlobalNetworksPeeredDnsDomainsService) Create(parent string, peereddnsdomain *PeeredDnsDomain) *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall { 8024 c := &ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8025 c.parent = parent 8026 c.peereddnsdomain = peereddnsdomain 8027 return c 8028} 8029 8030// Fields allows partial responses to be retrieved. See 8031// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8032// for more information. 8033func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall { 8034 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8035 return c 8036} 8037 8038// Context sets the context to be used in this call's Do method. Any 8039// pending HTTP request will be aborted if the provided context is 8040// canceled. 8041func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall { 8042 c.ctx_ = ctx 8043 return c 8044} 8045 8046// Header returns an http.Header that can be modified by the caller to 8047// add HTTP headers to the request. 8048func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Header() http.Header { 8049 if c.header_ == nil { 8050 c.header_ = make(http.Header) 8051 } 8052 return c.header_ 8053} 8054 8055func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) doRequest(alt string) (*http.Response, error) { 8056 reqHeaders := make(http.Header) 8057 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 8058 for k, v := range c.header_ { 8059 reqHeaders[k] = v 8060 } 8061 reqHeaders.Set("User-Agent", c.s.userAgent()) 8062 var body io.Reader = nil 8063 body, err := googleapi.WithoutDataWrapper.JSONReader(c.peereddnsdomain) 8064 if err != nil { 8065 return nil, err 8066 } 8067 reqHeaders.Set("Content-Type", "application/json") 8068 c.urlParams_.Set("alt", alt) 8069 c.urlParams_.Set("prettyPrint", "false") 8070 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/peeredDnsDomains") 8071 urls += "?" + c.urlParams_.Encode() 8072 req, err := http.NewRequest("POST", urls, body) 8073 if err != nil { 8074 return nil, err 8075 } 8076 req.Header = reqHeaders 8077 googleapi.Expand(req.URL, map[string]string{ 8078 "parent": c.parent, 8079 }) 8080 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8081} 8082 8083// Do executes the "servicenetworking.services.projects.global.networks.peeredDnsDomains.create" call. 8084// Exactly one of *Operation or error will be non-nil. Any non-2xx 8085// status code is an error. Response headers are in either 8086// *Operation.ServerResponse.Header or (if a response was returned at 8087// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8088// to check whether the returned error was because 8089// http.StatusNotModified was returned. 8090func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8091 gensupport.SetOptions(c.urlParams_, opts...) 8092 res, err := c.doRequest("json") 8093 if res != nil && res.StatusCode == http.StatusNotModified { 8094 if res.Body != nil { 8095 res.Body.Close() 8096 } 8097 return nil, &googleapi.Error{ 8098 Code: res.StatusCode, 8099 Header: res.Header, 8100 } 8101 } 8102 if err != nil { 8103 return nil, err 8104 } 8105 defer googleapi.CloseBody(res) 8106 if err := googleapi.CheckResponse(res); err != nil { 8107 return nil, err 8108 } 8109 ret := &Operation{ 8110 ServerResponse: googleapi.ServerResponse{ 8111 Header: res.Header, 8112 HTTPStatusCode: res.StatusCode, 8113 }, 8114 } 8115 target := &ret 8116 if err := gensupport.DecodeResponse(target, res); err != nil { 8117 return nil, err 8118 } 8119 return ret, nil 8120 // { 8121 // "description": "Creates a peered DNS domain which sends requests for records in given namespace originating in the service producer VPC network to the consumer VPC network to be resolved.", 8122 // "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/peeredDnsDomains", 8123 // "httpMethod": "POST", 8124 // "id": "servicenetworking.services.projects.global.networks.peeredDnsDomains.create", 8125 // "parameterOrder": [ 8126 // "parent" 8127 // ], 8128 // "parameters": { 8129 // "parent": { 8130 // "description": "Required. Parent resource identifying the connection for which the peered DNS domain will be created in the format: `services/{service}/projects/{project}/global/networks/{network}` {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network} is the name of the service consumer's VPC network.", 8131 // "location": "path", 8132 // "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", 8133 // "required": true, 8134 // "type": "string" 8135 // } 8136 // }, 8137 // "path": "v1/{+parent}/peeredDnsDomains", 8138 // "request": { 8139 // "$ref": "PeeredDnsDomain" 8140 // }, 8141 // "response": { 8142 // "$ref": "Operation" 8143 // }, 8144 // "scopes": [ 8145 // "https://www.googleapis.com/auth/cloud-platform", 8146 // "https://www.googleapis.com/auth/service.management" 8147 // ] 8148 // } 8149 8150} 8151 8152// method id "servicenetworking.services.projects.global.networks.peeredDnsDomains.delete": 8153 8154type ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall struct { 8155 s *APIService 8156 name string 8157 urlParams_ gensupport.URLParams 8158 ctx_ context.Context 8159 header_ http.Header 8160} 8161 8162// Delete: Deletes a peered DNS domain. 8163// 8164// - name: The name of the peered DNS domain to delete in the format: 8165// `services/{service}/projects/{project}/global/networks/{network}/pee 8166// redDnsDomains/{name}`. {service} is the peering service that is 8167// managing connectivity for the service producer's organization. For 8168// Google services that support this functionality, this value is 8169// `servicenetworking.googleapis.com`. {project} is the number of the 8170// project that contains the service consumer's VPC network e.g. 8171// `12345`. {network} is the name of the service consumer's VPC 8172// network. {name} is the name of the peered DNS domain. 8173func (r *ServicesProjectsGlobalNetworksPeeredDnsDomainsService) Delete(name string) *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall { 8174 c := &ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8175 c.name = name 8176 return c 8177} 8178 8179// Fields allows partial responses to be retrieved. See 8180// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8181// for more information. 8182func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall { 8183 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8184 return c 8185} 8186 8187// Context sets the context to be used in this call's Do method. Any 8188// pending HTTP request will be aborted if the provided context is 8189// canceled. 8190func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall { 8191 c.ctx_ = ctx 8192 return c 8193} 8194 8195// Header returns an http.Header that can be modified by the caller to 8196// add HTTP headers to the request. 8197func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Header() http.Header { 8198 if c.header_ == nil { 8199 c.header_ = make(http.Header) 8200 } 8201 return c.header_ 8202} 8203 8204func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) doRequest(alt string) (*http.Response, error) { 8205 reqHeaders := make(http.Header) 8206 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 8207 for k, v := range c.header_ { 8208 reqHeaders[k] = v 8209 } 8210 reqHeaders.Set("User-Agent", c.s.userAgent()) 8211 var body io.Reader = nil 8212 c.urlParams_.Set("alt", alt) 8213 c.urlParams_.Set("prettyPrint", "false") 8214 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8215 urls += "?" + c.urlParams_.Encode() 8216 req, err := http.NewRequest("DELETE", urls, body) 8217 if err != nil { 8218 return nil, err 8219 } 8220 req.Header = reqHeaders 8221 googleapi.Expand(req.URL, map[string]string{ 8222 "name": c.name, 8223 }) 8224 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8225} 8226 8227// Do executes the "servicenetworking.services.projects.global.networks.peeredDnsDomains.delete" call. 8228// Exactly one of *Operation or error will be non-nil. Any non-2xx 8229// status code is an error. Response headers are in either 8230// *Operation.ServerResponse.Header or (if a response was returned at 8231// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8232// to check whether the returned error was because 8233// http.StatusNotModified was returned. 8234func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8235 gensupport.SetOptions(c.urlParams_, opts...) 8236 res, err := c.doRequest("json") 8237 if res != nil && res.StatusCode == http.StatusNotModified { 8238 if res.Body != nil { 8239 res.Body.Close() 8240 } 8241 return nil, &googleapi.Error{ 8242 Code: res.StatusCode, 8243 Header: res.Header, 8244 } 8245 } 8246 if err != nil { 8247 return nil, err 8248 } 8249 defer googleapi.CloseBody(res) 8250 if err := googleapi.CheckResponse(res); err != nil { 8251 return nil, err 8252 } 8253 ret := &Operation{ 8254 ServerResponse: googleapi.ServerResponse{ 8255 Header: res.Header, 8256 HTTPStatusCode: res.StatusCode, 8257 }, 8258 } 8259 target := &ret 8260 if err := gensupport.DecodeResponse(target, res); err != nil { 8261 return nil, err 8262 } 8263 return ret, nil 8264 // { 8265 // "description": "Deletes a peered DNS domain.", 8266 // "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/peeredDnsDomains/{peeredDnsDomainsId}", 8267 // "httpMethod": "DELETE", 8268 // "id": "servicenetworking.services.projects.global.networks.peeredDnsDomains.delete", 8269 // "parameterOrder": [ 8270 // "name" 8271 // ], 8272 // "parameters": { 8273 // "name": { 8274 // "description": "Required. The name of the peered DNS domain to delete in the format: `services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{name}`. {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network} is the name of the service consumer's VPC network. {name} is the name of the peered DNS domain.", 8275 // "location": "path", 8276 // "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+/peeredDnsDomains/[^/]+$", 8277 // "required": true, 8278 // "type": "string" 8279 // } 8280 // }, 8281 // "path": "v1/{+name}", 8282 // "response": { 8283 // "$ref": "Operation" 8284 // }, 8285 // "scopes": [ 8286 // "https://www.googleapis.com/auth/cloud-platform", 8287 // "https://www.googleapis.com/auth/service.management" 8288 // ] 8289 // } 8290 8291} 8292 8293// method id "servicenetworking.services.projects.global.networks.peeredDnsDomains.list": 8294 8295type ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall struct { 8296 s *APIService 8297 parent string 8298 urlParams_ gensupport.URLParams 8299 ifNoneMatch_ string 8300 ctx_ context.Context 8301 header_ http.Header 8302} 8303 8304// List: Lists peered DNS domains for a connection. 8305// 8306// - parent: Parent resource identifying the connection which owns this 8307// collection of peered DNS domains in the format: 8308// `services/{service}/projects/{project}/global/networks/{network}`. 8309// {service} is the peering service that is managing connectivity for 8310// the service producer's organization. For Google services that 8311// support this functionality, this value is 8312// `servicenetworking.googleapis.com`. {project} is a project number 8313// e.g. `12345` that contains the service consumer's VPC network. 8314// {network} is the name of the service consumer's VPC network. 8315func (r *ServicesProjectsGlobalNetworksPeeredDnsDomainsService) List(parent string) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { 8316 c := &ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8317 c.parent = parent 8318 return c 8319} 8320 8321// Fields allows partial responses to be retrieved. See 8322// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8323// for more information. 8324func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { 8325 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8326 return c 8327} 8328 8329// IfNoneMatch sets the optional parameter which makes the operation 8330// fail if the object's ETag matches the given value. This is useful for 8331// getting updates only after the object has changed since the last 8332// request. Use googleapi.IsNotModified to check whether the response 8333// error from Do is the result of In-None-Match. 8334func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { 8335 c.ifNoneMatch_ = entityTag 8336 return c 8337} 8338 8339// Context sets the context to be used in this call's Do method. Any 8340// pending HTTP request will be aborted if the provided context is 8341// canceled. 8342func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { 8343 c.ctx_ = ctx 8344 return c 8345} 8346 8347// Header returns an http.Header that can be modified by the caller to 8348// add HTTP headers to the request. 8349func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Header() http.Header { 8350 if c.header_ == nil { 8351 c.header_ = make(http.Header) 8352 } 8353 return c.header_ 8354} 8355 8356func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) doRequest(alt string) (*http.Response, error) { 8357 reqHeaders := make(http.Header) 8358 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 8359 for k, v := range c.header_ { 8360 reqHeaders[k] = v 8361 } 8362 reqHeaders.Set("User-Agent", c.s.userAgent()) 8363 if c.ifNoneMatch_ != "" { 8364 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8365 } 8366 var body io.Reader = nil 8367 c.urlParams_.Set("alt", alt) 8368 c.urlParams_.Set("prettyPrint", "false") 8369 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/peeredDnsDomains") 8370 urls += "?" + c.urlParams_.Encode() 8371 req, err := http.NewRequest("GET", urls, body) 8372 if err != nil { 8373 return nil, err 8374 } 8375 req.Header = reqHeaders 8376 googleapi.Expand(req.URL, map[string]string{ 8377 "parent": c.parent, 8378 }) 8379 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8380} 8381 8382// Do executes the "servicenetworking.services.projects.global.networks.peeredDnsDomains.list" call. 8383// Exactly one of *ListPeeredDnsDomainsResponse or error will be 8384// non-nil. Any non-2xx status code is an error. Response headers are in 8385// either *ListPeeredDnsDomainsResponse.ServerResponse.Header or (if a 8386// response was returned at all) in error.(*googleapi.Error).Header. Use 8387// googleapi.IsNotModified to check whether the returned error was 8388// because http.StatusNotModified was returned. 8389func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Do(opts ...googleapi.CallOption) (*ListPeeredDnsDomainsResponse, error) { 8390 gensupport.SetOptions(c.urlParams_, opts...) 8391 res, err := c.doRequest("json") 8392 if res != nil && res.StatusCode == http.StatusNotModified { 8393 if res.Body != nil { 8394 res.Body.Close() 8395 } 8396 return nil, &googleapi.Error{ 8397 Code: res.StatusCode, 8398 Header: res.Header, 8399 } 8400 } 8401 if err != nil { 8402 return nil, err 8403 } 8404 defer googleapi.CloseBody(res) 8405 if err := googleapi.CheckResponse(res); err != nil { 8406 return nil, err 8407 } 8408 ret := &ListPeeredDnsDomainsResponse{ 8409 ServerResponse: googleapi.ServerResponse{ 8410 Header: res.Header, 8411 HTTPStatusCode: res.StatusCode, 8412 }, 8413 } 8414 target := &ret 8415 if err := gensupport.DecodeResponse(target, res); err != nil { 8416 return nil, err 8417 } 8418 return ret, nil 8419 // { 8420 // "description": "Lists peered DNS domains for a connection.", 8421 // "flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/peeredDnsDomains", 8422 // "httpMethod": "GET", 8423 // "id": "servicenetworking.services.projects.global.networks.peeredDnsDomains.list", 8424 // "parameterOrder": [ 8425 // "parent" 8426 // ], 8427 // "parameters": { 8428 // "parent": { 8429 // "description": "Required. Parent resource identifying the connection which owns this collection of peered DNS domains in the format: `services/{service}/projects/{project}/global/networks/{network}`. {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is a project number e.g. `12345` that contains the service consumer's VPC network. {network} is the name of the service consumer's VPC network.", 8430 // "location": "path", 8431 // "pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", 8432 // "required": true, 8433 // "type": "string" 8434 // } 8435 // }, 8436 // "path": "v1/{+parent}/peeredDnsDomains", 8437 // "response": { 8438 // "$ref": "ListPeeredDnsDomainsResponse" 8439 // }, 8440 // "scopes": [ 8441 // "https://www.googleapis.com/auth/cloud-platform", 8442 // "https://www.googleapis.com/auth/service.management" 8443 // ] 8444 // } 8445 8446} 8447 8448// method id "servicenetworking.services.roles.add": 8449 8450type ServicesRolesAddCall struct { 8451 s *APIService 8452 parent string 8453 addrolesrequest *AddRolesRequest 8454 urlParams_ gensupport.URLParams 8455 ctx_ context.Context 8456 header_ http.Header 8457} 8458 8459// Add: Service producers can use this method to add roles in the shared 8460// VPC host project. Each role is bound to the provided member. Each 8461// role must be selected from within an allowlisted set of roles. Each 8462// role is applied at only the granularity specified in the allowlist. 8463// 8464// - parent: This is in a form services/{service} where {service} is the 8465// name of the private access management service. For example 8466// 'service-peering.example.com'. 8467func (r *ServicesRolesService) Add(parent string, addrolesrequest *AddRolesRequest) *ServicesRolesAddCall { 8468 c := &ServicesRolesAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8469 c.parent = parent 8470 c.addrolesrequest = addrolesrequest 8471 return c 8472} 8473 8474// Fields allows partial responses to be retrieved. See 8475// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8476// for more information. 8477func (c *ServicesRolesAddCall) Fields(s ...googleapi.Field) *ServicesRolesAddCall { 8478 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8479 return c 8480} 8481 8482// Context sets the context to be used in this call's Do method. Any 8483// pending HTTP request will be aborted if the provided context is 8484// canceled. 8485func (c *ServicesRolesAddCall) Context(ctx context.Context) *ServicesRolesAddCall { 8486 c.ctx_ = ctx 8487 return c 8488} 8489 8490// Header returns an http.Header that can be modified by the caller to 8491// add HTTP headers to the request. 8492func (c *ServicesRolesAddCall) Header() http.Header { 8493 if c.header_ == nil { 8494 c.header_ = make(http.Header) 8495 } 8496 return c.header_ 8497} 8498 8499func (c *ServicesRolesAddCall) doRequest(alt string) (*http.Response, error) { 8500 reqHeaders := make(http.Header) 8501 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 8502 for k, v := range c.header_ { 8503 reqHeaders[k] = v 8504 } 8505 reqHeaders.Set("User-Agent", c.s.userAgent()) 8506 var body io.Reader = nil 8507 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addrolesrequest) 8508 if err != nil { 8509 return nil, err 8510 } 8511 reqHeaders.Set("Content-Type", "application/json") 8512 c.urlParams_.Set("alt", alt) 8513 c.urlParams_.Set("prettyPrint", "false") 8514 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/roles:add") 8515 urls += "?" + c.urlParams_.Encode() 8516 req, err := http.NewRequest("POST", urls, body) 8517 if err != nil { 8518 return nil, err 8519 } 8520 req.Header = reqHeaders 8521 googleapi.Expand(req.URL, map[string]string{ 8522 "parent": c.parent, 8523 }) 8524 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8525} 8526 8527// Do executes the "servicenetworking.services.roles.add" call. 8528// Exactly one of *Operation or error will be non-nil. Any non-2xx 8529// status code is an error. Response headers are in either 8530// *Operation.ServerResponse.Header or (if a response was returned at 8531// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8532// to check whether the returned error was because 8533// http.StatusNotModified was returned. 8534func (c *ServicesRolesAddCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8535 gensupport.SetOptions(c.urlParams_, opts...) 8536 res, err := c.doRequest("json") 8537 if res != nil && res.StatusCode == http.StatusNotModified { 8538 if res.Body != nil { 8539 res.Body.Close() 8540 } 8541 return nil, &googleapi.Error{ 8542 Code: res.StatusCode, 8543 Header: res.Header, 8544 } 8545 } 8546 if err != nil { 8547 return nil, err 8548 } 8549 defer googleapi.CloseBody(res) 8550 if err := googleapi.CheckResponse(res); err != nil { 8551 return nil, err 8552 } 8553 ret := &Operation{ 8554 ServerResponse: googleapi.ServerResponse{ 8555 Header: res.Header, 8556 HTTPStatusCode: res.StatusCode, 8557 }, 8558 } 8559 target := &ret 8560 if err := gensupport.DecodeResponse(target, res); err != nil { 8561 return nil, err 8562 } 8563 return ret, nil 8564 // { 8565 // "description": "Service producers can use this method to add roles in the shared VPC host project. Each role is bound to the provided member. Each role must be selected from within an allowlisted set of roles. Each role is applied at only the granularity specified in the allowlist.", 8566 // "flatPath": "v1/services/{servicesId}/roles:add", 8567 // "httpMethod": "POST", 8568 // "id": "servicenetworking.services.roles.add", 8569 // "parameterOrder": [ 8570 // "parent" 8571 // ], 8572 // "parameters": { 8573 // "parent": { 8574 // "description": "Required. This is in a form services/{service} where {service} is the name of the private access management service. For example 'service-peering.example.com'.", 8575 // "location": "path", 8576 // "pattern": "^services/[^/]+$", 8577 // "required": true, 8578 // "type": "string" 8579 // } 8580 // }, 8581 // "path": "v1/{+parent}/roles:add", 8582 // "request": { 8583 // "$ref": "AddRolesRequest" 8584 // }, 8585 // "response": { 8586 // "$ref": "Operation" 8587 // }, 8588 // "scopes": [ 8589 // "https://www.googleapis.com/auth/cloud-platform", 8590 // "https://www.googleapis.com/auth/service.management" 8591 // ] 8592 // } 8593 8594} 8595