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