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