| 1 |
// Copyright 2026 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 |
"log/slog" |
| 66 |
"net/http" |
| 67 |
"net/url" |
| 68 |
"strconv" |
| 69 |
"strings" |
| 70 |
|
| 71 |
"github.com/googleapis/gax-go/v2/internallog" |
| 72 |
googleapi "google.golang.org/api/googleapi" |
| 73 |
internal "google.golang.org/api/internal" |
| 74 |
gensupport "google.golang.org/api/internal/gensupport" |
| 75 |
option "google.golang.org/api/option" |
| 76 |
internaloption "google.golang.org/api/option/internaloption" |
| 77 |
htransport "google.golang.org/api/transport/http" |
| 78 |
) |
| 79 |
|
| 80 |
// Always reference these packages, just in case the auto-generated code |
| 81 |
// below doesn't. |
| 82 |
var _ = bytes.NewBuffer |
| 83 |
var _ = strconv.Itoa |
| 84 |
var _ = fmt.Sprintf |
| 85 |
var _ = json.NewDecoder |
| 86 |
var _ = io.Copy |
| 87 |
var _ = url.Parse |
| 88 |
var _ = gensupport.MarshalJSON |
| 89 |
var _ = googleapi.Version |
| 90 |
var _ = errors.New |
| 91 |
var _ = strings.Replace |
| 92 |
var _ = context.Canceled |
| 93 |
var _ = internaloption.WithDefaultEndpoint |
| 94 |
var _ = internal.Version |
| 95 |
var _ = internallog.New |
| 96 |
|
| 97 |
const apiId = "servicenetworking:v1" |
| 98 |
const apiName = "servicenetworking" |
| 99 |
const apiVersion = "v1" |
| 100 |
const basePath = "https://servicenetworking.googleapis.com/" |
| 101 |
const basePathTemplate = "https://servicenetworking.UNIVERSE_DOMAIN/" |
| 102 |
const mtlsBasePath = "https://servicenetworking.mtls.googleapis.com/" |
| 103 |
|
| 104 |
// OAuth2 scopes used by this API. |
| 105 |
const ( |
| 106 |
// See, edit, configure, and delete your Google Cloud data and see the email |
| 107 |
// address for your Google Account. |
| 108 |
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" |
| 109 |
|
| 110 |
// Manage your Google API service configuration |
| 111 |
ServiceManagementScope = "https://www.googleapis.com/auth/service.management" |
| 112 |
) |
| 113 |
|
| 114 |
// NewService creates a new APIService. |
| 115 |
func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { |
| 116 |
scopesOption := internaloption.WithDefaultScopes( |
| 117 |
"https://www.googleapis.com/auth/cloud-platform", |
| 118 |
"https://www.googleapis.com/auth/service.management", |
| 119 |
) |
| 120 |
// NOTE: prepend, so we don't override user-specified scopes. |
| 121 |
opts = append([]option.ClientOption{scopesOption}, opts...) |
| 122 |
opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) |
| 123 |
opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) |
| 124 |
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) |
| 125 |
opts = append(opts, internaloption.EnableNewAuthLibrary()) |
| 126 |
client, endpoint, err := htransport.NewClient(ctx, opts...) |
| 127 |
if err != nil { |
| 128 |
return nil, err |
| 129 |
} |
| 130 |
s := &APIService{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} |
| 131 |
s.Operations = NewOperationsService(s) |
| 132 |
s.Services = NewServicesService(s) |
| 133 |
if endpoint != "" { |
| 134 |
s.BasePath = endpoint |
| 135 |
} |
| 136 |
return s, nil |
| 137 |
} |
| 138 |
|
| 139 |
// New creates a new APIService. It uses the provided http.Client for requests. |
| 140 |
// |
| 141 |
// Deprecated: please use NewService instead. |
| 142 |
// To provide a custom HTTP client, use option.WithHTTPClient. |
| 143 |
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. |
| 144 |
func New(client *http.Client) (*APIService, error) { |
| 145 |
if client == nil { |
| 146 |
return nil, errors.New("client is nil") |
| 147 |
} |
| 148 |
return NewService(context.TODO(), option.WithHTTPClient(client)) |
| 149 |
} |
| 150 |
|
| 151 |
type APIService struct { |
| 152 |
client *http.Client |
| 153 |
logger *slog.Logger |
| 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 GCE |
| 468 |
// subnetwork request idempotency. If two equivalent concurrent requests are |
| 469 |
// made, GCE 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 GCE). Maximum value of 14 days (enforced by GCE |
| 475 |
// limit). |
| 476 |
ComputeIdempotencyWindow string `json:"computeIdempotencyWindow,omitempty"` |
| 477 |
// Consumer: Required. A resource that represents the service consumer, such as |
| 478 |
// `projects/123456`. The project number can be different from the value in the |
| 479 |
// consumer network parameter. For example, the network might be part of a |
| 480 |
// Shared VPC network. In those cases, Service Networking validates that this |
| 481 |
// resource belongs to that Shared VPC. |
| 482 |
Consumer string `json:"consumer,omitempty"` |
| 483 |
// ConsumerNetwork: Required. The name of the service consumer's VPC network. |
| 484 |
// The network must have an existing private connection that was provisioned |
| 485 |
// through the connections.create method. The name must be in the following |
| 486 |
// format: `projects/{project}/global/networks/{network}`, where {project} is a |
| 487 |
// project number, such as `12345`. {network} is the name of a VPC network in |
| 488 |
// the project. |
| 489 |
ConsumerNetwork string `json:"consumerNetwork,omitempty"` |
| 490 |
// Description: Optional. Description of the subnet. |
| 491 |
Description string `json:"description,omitempty"` |
| 492 |
// InternalRange: Optional. The url of an Internal Range. Eg: |
| 493 |
// `projects//locations/global/internalRanges/`. If specified, it means that |
| 494 |
// the subnetwork cidr will be created using the combination of |
| 495 |
// requested_address/ip_prefix_length. Note that the subnet cidr has to be |
| 496 |
// within the cidr range of this Internal Range. |
| 497 |
InternalRange string `json:"internalRange,omitempty"` |
| 498 |
// IpPrefixLength: Required. The prefix length of the subnet's IP address |
| 499 |
// range. Use CIDR range notation, such as `29` to provision a subnet with an |
| 500 |
// `x.x.x.x/29` CIDR range. The IP address range is drawn from a pool of |
| 501 |
// available ranges in the service consumer's allocated range. GCE disallows |
| 502 |
// subnets with prefix_length > 29 |
| 503 |
IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` |
| 504 |
// OutsideAllocationPublicIpRange: Optional. Enable outside allocation using |
| 505 |
// public IP addresses. Any public IP range may be specified. If this field is |
| 506 |
// provided, we will not use customer reserved ranges for this primary IP |
| 507 |
// range. |
| 508 |
OutsideAllocationPublicIpRange string `json:"outsideAllocationPublicIpRange,omitempty"` |
| 509 |
// PrivateIpv6GoogleAccess: Optional. The private IPv6 google access type for |
| 510 |
// the VMs in this subnet. For information about the access types that can be |
| 511 |
// set using this field, see subnetwork |
| 512 |
// (https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the |
| 513 |
// Compute API documentation. |
| 514 |
PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` |
| 515 |
// Purpose: Optional. Defines the purpose field of the subnet, e.g. |
| 516 |
// 'PRIVATE_SERVICE_CONNECT'. For information about the purposes that can be |
| 517 |
// set using this field, see subnetwork |
| 518 |
// (https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the |
| 519 |
// Compute API documentation. |
| 520 |
Purpose string `json:"purpose,omitempty"` |
| 521 |
// Region: Required. The name of a region |
| 522 |
// (https://cloud.google.com/compute/docs/regions-zones) for the subnet, such |
| 523 |
// `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 |
// SkipRequestedAddressValidation: Optional. Skips validating if the |
| 546 |
// requested_address is in use by SN VPC’s peering group. Compute Engine will |
| 547 |
// still perform this check and fail the request if the requested_address is in |
| 548 |
// use. Note that Compute Engine does not check for the existence of dynamic |
| 549 |
// routes when performing this check. Caller of this API should make sure that |
| 550 |
// there are no dynamic routes overlapping with the |
| 551 |
// requested_address/prefix_length IP address range otherwise the created |
| 552 |
// subnet could cause misrouting. |
| 553 |
SkipRequestedAddressValidation bool `json:"skipRequestedAddressValidation,omitempty"` |
| 554 |
// Subnetwork: Required. A name for the new subnet. For information about the |
| 555 |
// naming requirements, see subnetwork |
| 556 |
// (https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the |
| 557 |
// Compute API documentation. |
| 558 |
Subnetwork string `json:"subnetwork,omitempty"` |
| 559 |
// SubnetworkUsers: A list of members that are granted the |
| 560 |
// `roles/servicenetworking.subnetworkAdmin` role on the subnet. |
| 561 |
SubnetworkUsers []string `json:"subnetworkUsers,omitempty"` |
| 562 |
// UseCustomComputeIdempotencyWindow: Optional. Specifies if Service Networking |
| 563 |
// should use a custom time bucket for GCE idempotency. If false, Service |
| 564 |
// Networking uses a 300 second (5 minute) GCE idempotency window. If true, |
| 565 |
// Service Networking uses a custom idempotency window provided by the user in |
| 566 |
// field compute_idempotency_window. |
| 567 |
UseCustomComputeIdempotencyWindow bool `json:"useCustomComputeIdempotencyWindow,omitempty"` |
| 568 |
// ForceSendFields is a list of field names (e.g. |
| 569 |
// "AllowSubnetCidrRoutesOverlap") to unconditionally include in API requests. |
| 570 |
// By default, fields with empty or default values are omitted from API |
| 571 |
// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields |
| 572 |
// for more details. |
| 573 |
ForceSendFields []string `json:"-"` |
| 574 |
// NullFields is a list of field names (e.g. "AllowSubnetCidrRoutesOverlap") to |
| 575 |
// include in API requests with the JSON null value. By default, fields with |
| 576 |
// empty values are omitted from API requests. See |
| 577 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 578 |
NullFields []string `json:"-"` |
| 579 |
} |
| 580 |
|
| 581 |
func (s AddSubnetworkRequest) MarshalJSON() ([]byte, error) { |
| 582 |
type NoMethod AddSubnetworkRequest |
| 583 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 584 |
} |
| 585 |
|
| 586 |
// Api: Api is a light-weight descriptor for an API Interface. Interfaces are |
| 587 |
// also described as "protocol buffer services" in some contexts, such as by |
| 588 |
// the "service" keyword in a .proto file, but they are different from API |
| 589 |
// Services, which represent a concrete implementation of an interface as |
| 590 |
// opposed to simply a description of methods and bindings. They are also |
| 591 |
// sometimes simply referred to as "APIs" in other contexts, such as the name |
| 592 |
// of this message itself. See https://cloud.google.com/apis/design/glossary |
| 593 |
// for detailed terminology. New usages of this message as an alternative to |
| 594 |
// ServiceDescriptorProto are strongly discouraged. This message does not |
| 595 |
// reliability preserve all information necessary to model the schema and |
| 596 |
// preserve semantics. Instead make use of FileDescriptorSet which preserves |
| 597 |
// the necessary information. |
| 598 |
type Api struct { |
| 599 |
// Edition: The source edition string, only valid when syntax is |
| 600 |
// SYNTAX_EDITIONS. |
| 601 |
Edition string `json:"edition,omitempty"` |
| 602 |
// Methods: The methods of this interface, in unspecified order. |
| 603 |
Methods []*Method `json:"methods,omitempty"` |
| 604 |
// Mixins: Included interfaces. See Mixin. |
| 605 |
Mixins []*Mixin `json:"mixins,omitempty"` |
| 606 |
// Name: The fully qualified name of this interface, including package name |
| 607 |
// followed by the interface's simple name. |
| 608 |
Name string `json:"name,omitempty"` |
| 609 |
// Options: Any metadata attached to the interface. |
| 610 |
Options []*Option `json:"options,omitempty"` |
| 611 |
// SourceContext: Source context for the protocol buffer service represented by |
| 612 |
// this message. |
| 613 |
SourceContext *SourceContext `json:"sourceContext,omitempty"` |
| 614 |
// Syntax: The source syntax of the service. |
| 615 |
// |
| 616 |
// Possible values: |
| 617 |
// "SYNTAX_PROTO2" - Syntax `proto2`. |
| 618 |
// "SYNTAX_PROTO3" - Syntax `proto3`. |
| 619 |
// "SYNTAX_EDITIONS" - Syntax `editions`. |
| 620 |
Syntax string `json:"syntax,omitempty"` |
| 621 |
// Version: A version string for this interface. If specified, must have the |
| 622 |
// form `major-version.minor-version`, as in `1.10`. If the minor version is |
| 623 |
// omitted, it defaults to zero. If the entire version field is empty, the |
| 624 |
// major version is derived from the package name, as outlined below. If the |
| 625 |
// field is not empty, the version in the package name will be verified to be |
| 626 |
// consistent with what is provided here. The versioning schema uses semantic |
| 627 |
// versioning (http://semver.org) where the major version number indicates a |
| 628 |
// breaking change and the minor version an additive, non-breaking change. Both |
| 629 |
// version numbers are signals to users what to expect from different versions, |
| 630 |
// and should be carefully chosen based on the product plan. The major version |
| 631 |
// is also reflected in the package name of the interface, which must end in |
| 632 |
// `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can |
| 633 |
// be omitted. Zero major versions must only be used for experimental, non-GA |
| 634 |
// interfaces. |
| 635 |
Version string `json:"version,omitempty"` |
| 636 |
// ForceSendFields is a list of field names (e.g. "Edition") to unconditionally |
| 637 |
// include in API requests. By default, fields with empty or default values are |
| 638 |
// omitted from API requests. See |
| 639 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 640 |
// details. |
| 641 |
ForceSendFields []string `json:"-"` |
| 642 |
// NullFields is a list of field names (e.g. "Edition") to include in API |
| 643 |
// requests with the JSON null value. By default, fields with empty values are |
| 644 |
// omitted from API requests. See |
| 645 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 646 |
NullFields []string `json:"-"` |
| 647 |
} |
| 648 |
|
| 649 |
func (s Api) MarshalJSON() ([]byte, error) { |
| 650 |
type NoMethod Api |
| 651 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 652 |
} |
| 653 |
|
| 654 |
// Aspect: Aspect represents Generic aspect. It is used to configure an aspect |
| 655 |
// without making direct changes to service.proto |
| 656 |
type Aspect struct { |
| 657 |
// Kind: The type of this aspect configuration. |
| 658 |
Kind string `json:"kind,omitempty"` |
| 659 |
// Rules: Optional. Rules of the Configuration. |
| 660 |
Rules []*AspectRule `json:"rules,omitempty"` |
| 661 |
// Spec: Content of the configuration. The underlying schema should be defined |
| 662 |
// by Aspect owners as protobuf message under `google/api/configaspects/proto`. |
| 663 |
Spec googleapi.RawMessage `json:"spec,omitempty"` |
| 664 |
// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally |
| 665 |
// include in API requests. By default, fields with empty or default values are |
| 666 |
// omitted from API requests. See |
| 667 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 668 |
// details. |
| 669 |
ForceSendFields []string `json:"-"` |
| 670 |
// NullFields is a list of field names (e.g. "Kind") to include in API requests |
| 671 |
// with the JSON null value. By default, fields with empty values are omitted |
| 672 |
// from API requests. See |
| 673 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 674 |
NullFields []string `json:"-"` |
| 675 |
} |
| 676 |
|
| 677 |
func (s Aspect) MarshalJSON() ([]byte, error) { |
| 678 |
type NoMethod Aspect |
| 679 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 680 |
} |
| 681 |
|
| 682 |
// AspectRule: Rule-based configuration for an aspect. |
| 683 |
type AspectRule struct { |
| 684 |
// Config: Required. Rules of the configuration. The underlying schema should |
| 685 |
// be defined by Aspect owners as protobuf message under |
| 686 |
// `google/api/configaspects/proto`. |
| 687 |
Config googleapi.RawMessage `json:"config,omitempty"` |
| 688 |
// Selector: Required. Selects the RPC methods to which this rule applies. |
| 689 |
// Refer to selector for syntax details. |
| 690 |
Selector string `json:"selector,omitempty"` |
| 691 |
// ForceSendFields is a list of field names (e.g. "Config") to unconditionally |
| 692 |
// include in API requests. By default, fields with empty or default values are |
| 693 |
// omitted from API requests. See |
| 694 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 695 |
// details. |
| 696 |
ForceSendFields []string `json:"-"` |
| 697 |
// NullFields is a list of field names (e.g. "Config") to include in API |
| 698 |
// requests with the JSON null value. By default, fields with empty values are |
| 699 |
// omitted from API requests. See |
| 700 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 701 |
NullFields []string `json:"-"` |
| 702 |
} |
| 703 |
|
| 704 |
func (s AspectRule) MarshalJSON() ([]byte, error) { |
| 705 |
type NoMethod AspectRule |
| 706 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 707 |
} |
| 708 |
|
| 709 |
// AuthProvider: Configuration for an authentication provider, including |
| 710 |
// support for JSON Web Token (JWT) |
| 711 |
// (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). |
| 712 |
type AuthProvider struct { |
| 713 |
// Audiences: The list of JWT audiences |
| 714 |
// (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). |
| 715 |
// that are allowed to access. A JWT containing any of these audiences will be |
| 716 |
// accepted. When this setting is absent, JWTs with audiences: - |
| 717 |
// "https://[service.name]/[google.protobuf.Api.name]" - |
| 718 |
// "https://[service.name]/" will be accepted. For example, if no audiences are |
| 719 |
// in the setting, LibraryService API will accept JWTs with the following |
| 720 |
// audiences: - |
| 721 |
// https://library-example.googleapis.com/google.example.library.v1.LibraryService |
| 722 |
// - https://library-example.googleapis.com/ Example: audiences: |
| 723 |
// bookstore_android.apps.googleusercontent.com, |
| 724 |
// bookstore_web.apps.googleusercontent.com |
| 725 |
Audiences string `json:"audiences,omitempty"` |
| 726 |
// AuthorizationUrl: Redirect URL if JWT token is required but not present or |
| 727 |
// is expired. Implement authorizationUrl of securityDefinitions in OpenAPI |
| 728 |
// spec. |
| 729 |
AuthorizationUrl string `json:"authorizationUrl,omitempty"` |
| 730 |
// Id: The unique identifier of the auth provider. It will be referred to by |
| 731 |
// `AuthRequirement.provider_id`. Example: "bookstore_auth". |
| 732 |
Id string `json:"id,omitempty"` |
| 733 |
// Issuer: Identifies the principal that issued the JWT. See |
| 734 |
// https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 |
| 735 |
// Usually a URL or an email address. Example: https://securetoken.google.com |
| 736 |
// Example: [email protected] |
| 737 |
Issuer string `json:"issuer,omitempty"` |
| 738 |
// JwksUri: URL of the provider's public key set to validate signature of the |
| 739 |
// JWT. See OpenID Discovery |
| 740 |
// (https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). |
| 741 |
// Optional if the key set document: - can be retrieved from OpenID Discovery |
| 742 |
// (https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer. |
| 743 |
// - can be inferred from the email domain of the issuer (e.g. a Google service |
| 744 |
// account). Example: https://www.googleapis.com/oauth2/v1/certs |
| 745 |
JwksUri string `json:"jwksUri,omitempty"` |
| 746 |
// JwtLocations: Defines the locations to extract the JWT. For now it is only |
| 747 |
// used by the Cloud Endpoints to store the OpenAPI extension |
| 748 |
// [x-google-jwt-locations] |
| 749 |
// (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) |
| 750 |
// JWT locations can be one of HTTP headers, URL query parameters or cookies. |
| 751 |
// The rule is that the first match wins. If not specified, default to use |
| 752 |
// following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion |
| 753 |
// 3) access_token query parameter Default locations can be specified as |
| 754 |
// followings: jwt_locations: - header: Authorization value_prefix: "Bearer " - |
| 755 |
// header: x-goog-iap-jwt-assertion - query: access_token |
| 756 |
JwtLocations []*JwtLocation `json:"jwtLocations,omitempty"` |
| 757 |
// ForceSendFields is a list of field names (e.g. "Audiences") 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. "Audiences") 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 AuthProvider) MarshalJSON() ([]byte, error) { |
| 771 |
type NoMethod AuthProvider |
| 772 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 773 |
} |
| 774 |
|
| 775 |
// AuthRequirement: User-defined authentication requirements, including support |
| 776 |
// for JSON Web Token (JWT) |
| 777 |
// (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). |
| 778 |
type AuthRequirement struct { |
| 779 |
// Audiences: NOTE: This will be deprecated soon, once AuthProvider.audiences |
| 780 |
// is implemented and accepted in all the runtime components. The list of JWT |
| 781 |
// audiences |
| 782 |
// (https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). |
| 783 |
// that are allowed to access. A JWT containing any of these audiences will be |
| 784 |
// accepted. When this setting is absent, only JWTs with audience |
| 785 |
// "https://Service_name/API_name" will be accepted. For example, if no |
| 786 |
// audiences are in the setting, LibraryService API will only accept JWTs with |
| 787 |
// the following audience |
| 788 |
// "https://library-example.googleapis.com/google.example.library.v1.LibraryServ |
| 789 |
// ice". Example: audiences: bookstore_android.apps.googleusercontent.com, |
| 790 |
// bookstore_web.apps.googleusercontent.com |
| 791 |
Audiences string `json:"audiences,omitempty"` |
| 792 |
// ProviderId: id from authentication provider. Example: provider_id: |
| 793 |
// bookstore_auth |
| 794 |
ProviderId string `json:"providerId,omitempty"` |
| 795 |
// ForceSendFields is a list of field names (e.g. "Audiences") to |
| 796 |
// unconditionally include in API requests. By default, fields with empty or |
| 797 |
// default values are omitted from API requests. See |
| 798 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 799 |
// details. |
| 800 |
ForceSendFields []string `json:"-"` |
| 801 |
// NullFields is a list of field names (e.g. "Audiences") to include in API |
| 802 |
// requests with the JSON null value. By default, fields with empty values are |
| 803 |
// omitted from API requests. See |
| 804 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 805 |
NullFields []string `json:"-"` |
| 806 |
} |
| 807 |
|
| 808 |
func (s AuthRequirement) MarshalJSON() ([]byte, error) { |
| 809 |
type NoMethod AuthRequirement |
| 810 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 811 |
} |
| 812 |
|
| 813 |
// Authentication: `Authentication` defines the authentication configuration |
| 814 |
// for API methods provided by an API service. Example: name: |
| 815 |
// calendar.googleapis.com authentication: providers: - id: |
| 816 |
// google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs |
| 817 |
// issuer: https://securetoken.google.com rules: - selector: "*" requirements: |
| 818 |
// provider_id: google_calendar_auth - selector: google.calendar.Delegate |
| 819 |
// oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read |
| 820 |
type Authentication struct { |
| 821 |
// Providers: Defines a set of authentication providers that a service |
| 822 |
// supports. |
| 823 |
Providers []*AuthProvider `json:"providers,omitempty"` |
| 824 |
// Rules: A list of authentication rules that apply to individual API methods. |
| 825 |
// **NOTE:** All service configuration rules follow "last one wins" order. |
| 826 |
Rules []*AuthenticationRule `json:"rules,omitempty"` |
| 827 |
// ForceSendFields is a list of field names (e.g. "Providers") to |
| 828 |
// unconditionally include in API requests. By default, fields with empty or |
| 829 |
// default values are omitted from API requests. See |
| 830 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 831 |
// details. |
| 832 |
ForceSendFields []string `json:"-"` |
| 833 |
// NullFields is a list of field names (e.g. "Providers") to include in API |
| 834 |
// requests with the JSON null value. By default, fields with empty values are |
| 835 |
// omitted from API requests. See |
| 836 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 837 |
NullFields []string `json:"-"` |
| 838 |
} |
| 839 |
|
| 840 |
func (s Authentication) MarshalJSON() ([]byte, error) { |
| 841 |
type NoMethod Authentication |
| 842 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 843 |
} |
| 844 |
|
| 845 |
// AuthenticationRule: Authentication rules for the service. By default, if a |
| 846 |
// method has any authentication requirements, every request must include a |
| 847 |
// valid credential matching one of the requirements. It's an error to include |
| 848 |
// more than one kind of credential in a single request. If a method doesn't |
| 849 |
// have any auth requirements, request credentials will be ignored. |
| 850 |
type AuthenticationRule struct { |
| 851 |
// AllowWithoutCredential: If true, the service accepts API keys without any |
| 852 |
// other credential. This flag only applies to HTTP and gRPC requests. |
| 853 |
AllowWithoutCredential bool `json:"allowWithoutCredential,omitempty"` |
| 854 |
// Oauth: The requirements for OAuth credentials. |
| 855 |
Oauth *OAuthRequirements `json:"oauth,omitempty"` |
| 856 |
// Requirements: Requirements for additional authentication providers. |
| 857 |
Requirements []*AuthRequirement `json:"requirements,omitempty"` |
| 858 |
// Selector: Selects the methods to which this rule applies. Refer to selector |
| 859 |
// for syntax details. |
| 860 |
Selector string `json:"selector,omitempty"` |
| 861 |
// ForceSendFields is a list of field names (e.g. "AllowWithoutCredential") to |
| 862 |
// unconditionally include in API requests. By default, fields with empty or |
| 863 |
// default values are omitted from API requests. See |
| 864 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 865 |
// details. |
| 866 |
ForceSendFields []string `json:"-"` |
| 867 |
// NullFields is a list of field names (e.g. "AllowWithoutCredential") to |
| 868 |
// include in API requests with the JSON null value. By default, fields with |
| 869 |
// empty values are omitted from API requests. See |
| 870 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 871 |
NullFields []string `json:"-"` |
| 872 |
} |
| 873 |
|
| 874 |
func (s AuthenticationRule) MarshalJSON() ([]byte, error) { |
| 875 |
type NoMethod AuthenticationRule |
| 876 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 877 |
} |
| 878 |
|
| 879 |
// Backend: `Backend` defines the backend configuration for a service. |
| 880 |
type Backend struct { |
| 881 |
// Rules: A list of API backend rules that apply to individual API methods. |
| 882 |
// **NOTE:** All service configuration rules follow "last one wins" order. |
| 883 |
Rules []*BackendRule `json:"rules,omitempty"` |
| 884 |
// ForceSendFields is a list of field names (e.g. "Rules") to unconditionally |
| 885 |
// include in API requests. By default, fields with empty or default values are |
| 886 |
// omitted from API requests. See |
| 887 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 888 |
// details. |
| 889 |
ForceSendFields []string `json:"-"` |
| 890 |
// NullFields is a list of field names (e.g. "Rules") to include in API |
| 891 |
// requests with the JSON null value. By default, fields with empty values are |
| 892 |
// omitted from API requests. See |
| 893 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 894 |
NullFields []string `json:"-"` |
| 895 |
} |
| 896 |
|
| 897 |
func (s Backend) MarshalJSON() ([]byte, error) { |
| 898 |
type NoMethod Backend |
| 899 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 900 |
} |
| 901 |
|
| 902 |
// BackendRule: A backend rule provides configuration for an individual API |
| 903 |
// element. |
| 904 |
type BackendRule struct { |
| 905 |
// Address: The address of the API backend. The scheme is used to determine the |
| 906 |
// backend protocol and security. The following schemes are accepted: SCHEME |
| 907 |
// PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None |
| 908 |
// grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving |
| 909 |
// out the scheme may cause constrasting behaviors across platforms. If the |
| 910 |
// port is unspecified, the default is: - 80 for schemes without TLS - 443 for |
| 911 |
// schemes with TLS For HTTP backends, use protocol to specify the protocol |
| 912 |
// version. |
| 913 |
Address string `json:"address,omitempty"` |
| 914 |
// Deadline: The number of seconds to wait for a response from a request. The |
| 915 |
// default varies based on the request protocol and deployment environment. |
| 916 |
Deadline float64 `json:"deadline,omitempty"` |
| 917 |
// DisableAuth: When disable_auth is true, a JWT ID token won't be generated |
| 918 |
// and the original "Authorization" HTTP header will be preserved. If the |
| 919 |
// header is used to carry the original token and is expected by the backend, |
| 920 |
// this field must be set to true to preserve the header. |
| 921 |
DisableAuth bool `json:"disableAuth,omitempty"` |
| 922 |
// JwtAudience: The JWT audience is used when generating a JWT ID token for the |
| 923 |
// backend. This ID token will be added in the HTTP "authorization" header, and |
| 924 |
// sent to the backend. |
| 925 |
JwtAudience string `json:"jwtAudience,omitempty"` |
| 926 |
// LoadBalancingPolicy: The load balancing policy used for connection to the |
| 927 |
// application backend. Defined as an arbitrary string to accomondate custom |
| 928 |
// load balancing policies supported by the underlying channel, but suggest |
| 929 |
// most users use one of the standard policies, such as the default, |
| 930 |
// "RoundRobin". |
| 931 |
LoadBalancingPolicy string `json:"loadBalancingPolicy,omitempty"` |
| 932 |
// MinDeadline: Deprecated, do not use. |
| 933 |
MinDeadline float64 `json:"minDeadline,omitempty"` |
| 934 |
// OperationDeadline: The number of seconds to wait for the completion of a |
| 935 |
// long running operation. The default is no deadline. |
| 936 |
OperationDeadline float64 `json:"operationDeadline,omitempty"` |
| 937 |
// OverridesByRequestProtocol: The map between request protocol and the backend |
| 938 |
// address. |
| 939 |
OverridesByRequestProtocol map[string]BackendRule `json:"overridesByRequestProtocol,omitempty"` |
| 940 |
// PathTranslation: Path translation specifies how to combine the backend |
| 941 |
// address with the request path in order to produce the appropriate forwarding |
| 942 |
// URL for the request. See PathTranslation for more details. |
| 943 |
// |
| 944 |
// Possible values: |
| 945 |
// "PATH_TRANSLATION_UNSPECIFIED" |
| 946 |
// "CONSTANT_ADDRESS" - Use the backend address as-is, with no modification |
| 947 |
// to the path. If the URL pattern contains variables, the variable names and |
| 948 |
// values will be appended to the query string. If a query string parameter and |
| 949 |
// a URL pattern variable have the same name, this may result in duplicate keys |
| 950 |
// in the query string. # Examples Given the following operation config: Method |
| 951 |
// path: /api/company/{cid}/user/{uid} Backend address: |
| 952 |
// https://example.cloudfunctions.net/getUser Requests to the following request |
| 953 |
// paths will call the backend at the translated path: Request path: |
| 954 |
// /api/company/widgetworks/user/johndoe Translated: |
| 955 |
// https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe |
| 956 |
// Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: |
| 957 |
// https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe |
| 958 |
// "APPEND_PATH_TO_ADDRESS" - The request path will be appended to the |
| 959 |
// backend address. # Examples Given the following operation config: Method |
| 960 |
// path: /api/company/{cid}/user/{uid} Backend address: |
| 961 |
// https://example.appspot.com Requests to the following request paths will |
| 962 |
// call the backend at the translated path: Request path: |
| 963 |
// /api/company/widgetworks/user/johndoe Translated: |
| 964 |
// https://example.appspot.com/api/company/widgetworks/user/johndoe Request |
| 965 |
// path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: |
| 966 |
// https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST |
| 967 |
PathTranslation string `json:"pathTranslation,omitempty"` |
| 968 |
// Protocol: The protocol used for sending a request to the backend. The |
| 969 |
// supported values are "http/1.1" and "h2". The default value is inferred from |
| 970 |
// the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// |
| 971 |
// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that |
| 972 |
// support HTTP/2, set this field to "h2" for improved performance. Configuring |
| 973 |
// this field to non-default values is only supported for secure HTTP backends. |
| 974 |
// This field will be ignored for all other backends. See |
| 975 |
// https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids |
| 976 |
// for more details on the supported values. |
| 977 |
Protocol string `json:"protocol,omitempty"` |
| 978 |
// Selector: Selects the methods to which this rule applies. Refer to selector |
| 979 |
// for syntax details. |
| 980 |
Selector string `json:"selector,omitempty"` |
| 981 |
// ForceSendFields is a list of field names (e.g. "Address") to unconditionally |
| 982 |
// include in API requests. By default, fields with empty or default values are |
| 983 |
// omitted from API requests. See |
| 984 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 985 |
// details. |
| 986 |
ForceSendFields []string `json:"-"` |
| 987 |
// NullFields is a list of field names (e.g. "Address") to include in API |
| 988 |
// requests with the JSON null value. By default, fields with empty values are |
| 989 |
// omitted from API requests. See |
| 990 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 991 |
NullFields []string `json:"-"` |
| 992 |
} |
| 993 |
|
| 994 |
func (s BackendRule) MarshalJSON() ([]byte, error) { |
| 995 |
type NoMethod BackendRule |
| 996 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 997 |
} |
| 998 |
|
| 999 |
func (s *BackendRule) UnmarshalJSON(data []byte) error { |
| 1000 |
type NoMethod BackendRule |
| 1001 |
var s1 struct { |
| 1002 |
Deadline gensupport.JSONFloat64 `json:"deadline"` |
| 1003 |
MinDeadline gensupport.JSONFloat64 `json:"minDeadline"` |
| 1004 |
OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` |
| 1005 |
*NoMethod |
| 1006 |
} |
| 1007 |
s1.NoMethod = (*NoMethod)(s) |
| 1008 |
if err := json.Unmarshal(data, &s1); err != nil { |
| 1009 |
return err |
| 1010 |
} |
| 1011 |
s.Deadline = float64(s1.Deadline) |
| 1012 |
s.MinDeadline = float64(s1.MinDeadline) |
| 1013 |
s.OperationDeadline = float64(s1.OperationDeadline) |
| 1014 |
return nil |
| 1015 |
} |
| 1016 |
|
| 1017 |
// BatchingConfigProto: `BatchingConfigProto` defines the batching |
| 1018 |
// configuration for an API method. |
| 1019 |
type BatchingConfigProto struct { |
| 1020 |
// BatchDescriptor: The request and response fields used in batching. |
| 1021 |
BatchDescriptor *BatchingDescriptorProto `json:"batchDescriptor,omitempty"` |
| 1022 |
// Thresholds: The thresholds which trigger a batched request to be sent. |
| 1023 |
Thresholds *BatchingSettingsProto `json:"thresholds,omitempty"` |
| 1024 |
// ForceSendFields is a list of field names (e.g. "BatchDescriptor") to |
| 1025 |
// unconditionally include in API requests. By default, fields with empty or |
| 1026 |
// default values are omitted from API requests. See |
| 1027 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1028 |
// details. |
| 1029 |
ForceSendFields []string `json:"-"` |
| 1030 |
// NullFields is a list of field names (e.g. "BatchDescriptor") to include in |
| 1031 |
// API requests with the JSON null value. By default, fields with empty values |
| 1032 |
// are omitted from API requests. See |
| 1033 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1034 |
NullFields []string `json:"-"` |
| 1035 |
} |
| 1036 |
|
| 1037 |
func (s BatchingConfigProto) MarshalJSON() ([]byte, error) { |
| 1038 |
type NoMethod BatchingConfigProto |
| 1039 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1040 |
} |
| 1041 |
|
| 1042 |
// BatchingDescriptorProto: `BatchingDescriptorProto` specifies the fields of |
| 1043 |
// the request message to be used for batching, and, optionally, the fields of |
| 1044 |
// the response message to be used for demultiplexing. |
| 1045 |
type BatchingDescriptorProto struct { |
| 1046 |
// BatchedField: The repeated field in the request message to be aggregated by |
| 1047 |
// batching. |
| 1048 |
BatchedField string `json:"batchedField,omitempty"` |
| 1049 |
// DiscriminatorFields: A list of the fields in the request message. Two |
| 1050 |
// requests will be batched together only if the values of every field |
| 1051 |
// specified in `request_discriminator_fields` is equal between the two |
| 1052 |
// requests. |
| 1053 |
DiscriminatorFields []string `json:"discriminatorFields,omitempty"` |
| 1054 |
// SubresponseField: Optional. When present, indicates the field in the |
| 1055 |
// response message to be used to demultiplex the response into multiple |
| 1056 |
// response messages, in correspondence with the multiple request messages |
| 1057 |
// originally batched together. |
| 1058 |
SubresponseField string `json:"subresponseField,omitempty"` |
| 1059 |
// ForceSendFields is a list of field names (e.g. "BatchedField") to |
| 1060 |
// unconditionally include in API requests. By default, fields with empty or |
| 1061 |
// default values are omitted from API requests. See |
| 1062 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1063 |
// details. |
| 1064 |
ForceSendFields []string `json:"-"` |
| 1065 |
// NullFields is a list of field names (e.g. "BatchedField") to include in API |
| 1066 |
// requests with the JSON null value. By default, fields with empty values are |
| 1067 |
// omitted from API requests. See |
| 1068 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1069 |
NullFields []string `json:"-"` |
| 1070 |
} |
| 1071 |
|
| 1072 |
func (s BatchingDescriptorProto) MarshalJSON() ([]byte, error) { |
| 1073 |
type NoMethod BatchingDescriptorProto |
| 1074 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1075 |
} |
| 1076 |
|
| 1077 |
// BatchingSettingsProto: `BatchingSettingsProto` specifies a set of batching |
| 1078 |
// thresholds, each of which acts as a trigger to send a batch of messages as a |
| 1079 |
// request. At least one threshold must be positive nonzero. |
| 1080 |
type BatchingSettingsProto struct { |
| 1081 |
// DelayThreshold: The duration after which a batch should be sent, starting |
| 1082 |
// from the addition of the first message to that batch. |
| 1083 |
DelayThreshold string `json:"delayThreshold,omitempty"` |
| 1084 |
// ElementCountLimit: The maximum number of elements collected in a batch that |
| 1085 |
// could be accepted by server. |
| 1086 |
ElementCountLimit int64 `json:"elementCountLimit,omitempty"` |
| 1087 |
// ElementCountThreshold: The number of elements of a field collected into a |
| 1088 |
// batch which, if exceeded, causes the batch to be sent. |
| 1089 |
ElementCountThreshold int64 `json:"elementCountThreshold,omitempty"` |
| 1090 |
// FlowControlByteLimit: The maximum size of data allowed by flow control. |
| 1091 |
FlowControlByteLimit int64 `json:"flowControlByteLimit,omitempty"` |
| 1092 |
// FlowControlElementLimit: The maximum number of elements allowed by flow |
| 1093 |
// control. |
| 1094 |
FlowControlElementLimit int64 `json:"flowControlElementLimit,omitempty"` |
| 1095 |
// FlowControlLimitExceededBehavior: The behavior to take when the flow control |
| 1096 |
// limit is exceeded. |
| 1097 |
// |
| 1098 |
// Possible values: |
| 1099 |
// "UNSET_BEHAVIOR" - Default behavior, system-defined. |
| 1100 |
// "THROW_EXCEPTION" - Stop operation, raise error. |
| 1101 |
// "BLOCK" - Pause operation until limit clears. |
| 1102 |
// "IGNORE" - Continue operation, disregard limit. |
| 1103 |
FlowControlLimitExceededBehavior string `json:"flowControlLimitExceededBehavior,omitempty"` |
| 1104 |
// RequestByteLimit: The maximum size of the request that could be accepted by |
| 1105 |
// server. |
| 1106 |
RequestByteLimit int64 `json:"requestByteLimit,omitempty"` |
| 1107 |
// RequestByteThreshold: The aggregated size of the batched field which, if |
| 1108 |
// exceeded, causes the batch to be sent. This size is computed by aggregating |
| 1109 |
// the sizes of the request field to be batched, not of the entire request |
| 1110 |
// message. |
| 1111 |
RequestByteThreshold int64 `json:"requestByteThreshold,omitempty,string"` |
| 1112 |
// ForceSendFields is a list of field names (e.g. "DelayThreshold") to |
| 1113 |
// unconditionally include in API requests. By default, fields with empty or |
| 1114 |
// default values are omitted from API requests. See |
| 1115 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1116 |
// details. |
| 1117 |
ForceSendFields []string `json:"-"` |
| 1118 |
// NullFields is a list of field names (e.g. "DelayThreshold") to include in |
| 1119 |
// API requests with the JSON null value. By default, fields with empty values |
| 1120 |
// are omitted from API requests. See |
| 1121 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1122 |
NullFields []string `json:"-"` |
| 1123 |
} |
| 1124 |
|
| 1125 |
func (s BatchingSettingsProto) MarshalJSON() ([]byte, error) { |
| 1126 |
type NoMethod BatchingSettingsProto |
| 1127 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1128 |
} |
| 1129 |
|
| 1130 |
// Billing: Billing related configuration of the service. The following example |
| 1131 |
// shows how to configure monitored resources and metrics for billing, |
| 1132 |
// `consumer_destinations` is the only supported destination and the monitored |
| 1133 |
// resources need at least one label key `cloud.googleapis.com/location` to |
| 1134 |
// indicate the location of the billing usage, using different monitored |
| 1135 |
// resources between monitoring and billing is recommended so they can be |
| 1136 |
// evolved independently: monitored_resources: - type: |
| 1137 |
// library.googleapis.com/billing_branch labels: - key: |
| 1138 |
// cloud.googleapis.com/location description: | Predefined label to support |
| 1139 |
// billing location restriction. - key: city description: | Custom label to |
| 1140 |
// define the city where the library branch is located in. - key: name |
| 1141 |
// description: Custom label to define the name of the library branch. metrics: |
| 1142 |
// - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA |
| 1143 |
// value_type: INT64 unit: "1" billing: consumer_destinations: - |
| 1144 |
// monitored_resource: library.googleapis.com/billing_branch metrics: - |
| 1145 |
// library.googleapis.com/book/borrowed_count |
| 1146 |
type Billing struct { |
| 1147 |
// ConsumerDestinations: Billing configurations for sending metrics to the |
| 1148 |
// consumer project. There can be multiple consumer destinations per service, |
| 1149 |
// each one must have a different monitored resource type. A metric can be used |
| 1150 |
// in at most one consumer destination. |
| 1151 |
ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"` |
| 1152 |
// ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to |
| 1153 |
// unconditionally include in API requests. By default, fields with empty or |
| 1154 |
// default values are omitted from API requests. See |
| 1155 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1156 |
// details. |
| 1157 |
ForceSendFields []string `json:"-"` |
| 1158 |
// NullFields is a list of field names (e.g. "ConsumerDestinations") to include |
| 1159 |
// in API requests with the JSON null value. By default, fields with empty |
| 1160 |
// values are omitted from API requests. See |
| 1161 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1162 |
NullFields []string `json:"-"` |
| 1163 |
} |
| 1164 |
|
| 1165 |
func (s Billing) MarshalJSON() ([]byte, error) { |
| 1166 |
type NoMethod Billing |
| 1167 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1168 |
} |
| 1169 |
|
| 1170 |
// BillingDestination: Configuration of a specific billing destination |
| 1171 |
// (Currently only support bill against consumer project). |
| 1172 |
type BillingDestination struct { |
| 1173 |
// Metrics: Names of the metrics to report to this billing destination. Each |
| 1174 |
// name must be defined in Service.metrics section. |
| 1175 |
Metrics []string `json:"metrics,omitempty"` |
| 1176 |
// MonitoredResource: The monitored resource type. The type must be defined in |
| 1177 |
// Service.monitored_resources section. |
| 1178 |
MonitoredResource string `json:"monitoredResource,omitempty"` |
| 1179 |
// ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally |
| 1180 |
// include in API requests. By default, fields with empty or default values are |
| 1181 |
// omitted from API requests. See |
| 1182 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1183 |
// details. |
| 1184 |
ForceSendFields []string `json:"-"` |
| 1185 |
// NullFields is a list of field names (e.g. "Metrics") to include in API |
| 1186 |
// requests with the JSON null value. By default, fields with empty values are |
| 1187 |
// omitted from API requests. See |
| 1188 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1189 |
NullFields []string `json:"-"` |
| 1190 |
} |
| 1191 |
|
| 1192 |
func (s BillingDestination) MarshalJSON() ([]byte, error) { |
| 1193 |
type NoMethod BillingDestination |
| 1194 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1195 |
} |
| 1196 |
|
| 1197 |
// CancelOperationRequest: The request message for Operations.CancelOperation. |
| 1198 |
type CancelOperationRequest struct { |
| 1199 |
} |
| 1200 |
|
| 1201 |
// CleanupConnectionMetadata: Metadata provided through GetOperation request |
| 1202 |
// for the LRO generated by Cleanup Connection API |
| 1203 |
type CleanupConnectionMetadata struct { |
| 1204 |
} |
| 1205 |
|
| 1206 |
// ClientLibrarySettings: Details about how and where to publish client |
| 1207 |
// libraries. |
| 1208 |
type ClientLibrarySettings struct { |
| 1209 |
// CppSettings: Settings for C++ client libraries. |
| 1210 |
CppSettings *CppSettings `json:"cppSettings,omitempty"` |
| 1211 |
// DotnetSettings: Settings for .NET client libraries. |
| 1212 |
DotnetSettings *DotnetSettings `json:"dotnetSettings,omitempty"` |
| 1213 |
// GoSettings: Settings for Go client libraries. |
| 1214 |
GoSettings *GoSettings `json:"goSettings,omitempty"` |
| 1215 |
// JavaSettings: Settings for legacy Java features, supported in the Service |
| 1216 |
// YAML. |
| 1217 |
JavaSettings *JavaSettings `json:"javaSettings,omitempty"` |
| 1218 |
// LaunchStage: Launch stage of this version of the API. |
| 1219 |
// |
| 1220 |
// Possible values: |
| 1221 |
// "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. |
| 1222 |
// "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use |
| 1223 |
// it. |
| 1224 |
// "PRELAUNCH" - Prelaunch features are hidden from users and are only |
| 1225 |
// visible internally. |
| 1226 |
// "EARLY_ACCESS" - Early Access features are limited to a closed group of |
| 1227 |
// testers. To use these features, you must sign up in advance and sign a |
| 1228 |
// Trusted Tester agreement (which includes confidentiality provisions). These |
| 1229 |
// features may be unstable, changed in backward-incompatible ways, and are not |
| 1230 |
// guaranteed to be released. |
| 1231 |
// "ALPHA" - Alpha is a limited availability test for releases before they |
| 1232 |
// are cleared for widespread use. By Alpha, all significant design issues are |
| 1233 |
// resolved and we are in the process of verifying functionality. Alpha |
| 1234 |
// customers need to apply for access, agree to applicable terms, and have |
| 1235 |
// their projects allowlisted. Alpha releases don't have to be feature |
| 1236 |
// complete, no SLAs are provided, and there are no technical support |
| 1237 |
// obligations, but they will be far enough along that customers can actually |
| 1238 |
// use them in test environments or for limited-use tests -- just like they |
| 1239 |
// would in normal production cases. |
| 1240 |
// "BETA" - Beta is the point at which we are ready to open a release for any |
| 1241 |
// customer to use. There are no SLA or technical support obligations in a Beta |
| 1242 |
// release. Products will be complete from a feature perspective, but may have |
| 1243 |
// some open outstanding issues. Beta releases are suitable for limited |
| 1244 |
// production use cases. |
| 1245 |
// "GA" - GA features are open to all developers and are considered stable |
| 1246 |
// and fully qualified for production use. |
| 1247 |
// "DEPRECATED" - Deprecated features are scheduled to be shut down and |
| 1248 |
// removed. For more information, see the "Deprecation Policy" section of our |
| 1249 |
// [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud |
| 1250 |
// Platform Subject to the Deprecation |
| 1251 |
// Policy](https://cloud.google.com/terms/deprecation) documentation. |
| 1252 |
LaunchStage string `json:"launchStage,omitempty"` |
| 1253 |
// NodeSettings: Settings for Node client libraries. |
| 1254 |
NodeSettings *NodeSettings `json:"nodeSettings,omitempty"` |
| 1255 |
// PhpSettings: Settings for PHP client libraries. |
| 1256 |
PhpSettings *PhpSettings `json:"phpSettings,omitempty"` |
| 1257 |
// PythonSettings: Settings for Python client libraries. |
| 1258 |
PythonSettings *PythonSettings `json:"pythonSettings,omitempty"` |
| 1259 |
// RestNumericEnums: When using transport=rest, the client request will encode |
| 1260 |
// enums as numbers rather than strings. |
| 1261 |
RestNumericEnums bool `json:"restNumericEnums,omitempty"` |
| 1262 |
// RubySettings: Settings for Ruby client libraries. |
| 1263 |
RubySettings *RubySettings `json:"rubySettings,omitempty"` |
| 1264 |
// Version: Version of the API to apply these settings to. This is the full |
| 1265 |
// protobuf package for the API, ending in the version element. Examples: |
| 1266 |
// "google.cloud.speech.v1" and "google.spanner.admin.database.v1". |
| 1267 |
Version string `json:"version,omitempty"` |
| 1268 |
// ForceSendFields is a list of field names (e.g. "CppSettings") to |
| 1269 |
// unconditionally include in API requests. By default, fields with empty or |
| 1270 |
// default values are omitted from API requests. See |
| 1271 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1272 |
// details. |
| 1273 |
ForceSendFields []string `json:"-"` |
| 1274 |
// NullFields is a list of field names (e.g. "CppSettings") to include in API |
| 1275 |
// requests with the JSON null value. By default, fields with empty values are |
| 1276 |
// omitted from API requests. See |
| 1277 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1278 |
NullFields []string `json:"-"` |
| 1279 |
} |
| 1280 |
|
| 1281 |
func (s ClientLibrarySettings) MarshalJSON() ([]byte, error) { |
| 1282 |
type NoMethod ClientLibrarySettings |
| 1283 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1284 |
} |
| 1285 |
|
| 1286 |
// CloudSQLConfig: Cloud SQL configuration. |
| 1287 |
type CloudSQLConfig struct { |
| 1288 |
// Service: Required. Peering service used for peering with the Cloud SQL |
| 1289 |
// project. |
| 1290 |
Service string `json:"service,omitempty"` |
| 1291 |
// UmbrellaNetwork: Required. The name of the umbrella network in the Cloud SQL |
| 1292 |
// umbrella project. |
| 1293 |
UmbrellaNetwork string `json:"umbrellaNetwork,omitempty"` |
| 1294 |
// UmbrellaProject: Required. The project number of the Cloud SQL umbrella |
| 1295 |
// project. |
| 1296 |
UmbrellaProject int64 `json:"umbrellaProject,omitempty,string"` |
| 1297 |
// ForceSendFields is a list of field names (e.g. "Service") to unconditionally |
| 1298 |
// include in API requests. By default, fields with empty or default values are |
| 1299 |
// omitted from API requests. See |
| 1300 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1301 |
// details. |
| 1302 |
ForceSendFields []string `json:"-"` |
| 1303 |
// NullFields is a list of field names (e.g. "Service") to include in API |
| 1304 |
// requests with the JSON null value. By default, fields with empty values are |
| 1305 |
// omitted from API requests. See |
| 1306 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1307 |
NullFields []string `json:"-"` |
| 1308 |
} |
| 1309 |
|
| 1310 |
func (s CloudSQLConfig) MarshalJSON() ([]byte, error) { |
| 1311 |
type NoMethod CloudSQLConfig |
| 1312 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1313 |
} |
| 1314 |
|
| 1315 |
// CommonLanguageSettings: Required information for every language. |
| 1316 |
type CommonLanguageSettings struct { |
| 1317 |
// Destinations: The destination where API teams want this client library to be |
| 1318 |
// published. |
| 1319 |
// |
| 1320 |
// Possible values: |
| 1321 |
// "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" - Client libraries will neither |
| 1322 |
// be generated nor published to package managers. |
| 1323 |
// "GITHUB" - Generate the client library in a repo under |
| 1324 |
// github.com/googleapis, but don't publish it to package managers. |
| 1325 |
// "PACKAGE_MANAGER" - Publish the library to package managers like nuget.org |
| 1326 |
// and npmjs.com. |
| 1327 |
Destinations []string `json:"destinations,omitempty"` |
| 1328 |
// ReferenceDocsUri: Link to automatically generated reference documentation. |
| 1329 |
// Example: https://cloud.google.com/nodejs/docs/reference/asset/latest |
| 1330 |
ReferenceDocsUri string `json:"referenceDocsUri,omitempty"` |
| 1331 |
// SelectiveGapicGeneration: Configuration for which RPCs should be generated |
| 1332 |
// in the GAPIC client. Note: This field should not be used in most cases. |
| 1333 |
SelectiveGapicGeneration *SelectiveGapicGeneration `json:"selectiveGapicGeneration,omitempty"` |
| 1334 |
// ForceSendFields is a list of field names (e.g. "Destinations") to |
| 1335 |
// unconditionally include in API requests. By default, fields with empty or |
| 1336 |
// default values are omitted from API requests. See |
| 1337 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1338 |
// details. |
| 1339 |
ForceSendFields []string `json:"-"` |
| 1340 |
// NullFields is a list of field names (e.g. "Destinations") to include in API |
| 1341 |
// requests with the JSON null value. By default, fields with empty values are |
| 1342 |
// omitted from API requests. See |
| 1343 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1344 |
NullFields []string `json:"-"` |
| 1345 |
} |
| 1346 |
|
| 1347 |
func (s CommonLanguageSettings) MarshalJSON() ([]byte, error) { |
| 1348 |
type NoMethod CommonLanguageSettings |
| 1349 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1350 |
} |
| 1351 |
|
| 1352 |
// Connection: Represents a private connection resource. A private connection |
| 1353 |
// is implemented as a VPC Network Peering connection between a service |
| 1354 |
// producer's VPC network and a service consumer's VPC network. |
| 1355 |
type Connection struct { |
| 1356 |
// Network: Required. The name of service consumer's VPC network that's |
| 1357 |
// connected with service producer network, in the following format: |
| 1358 |
// `projects/{project}/global/networks/{network}`. `{project}` is a project |
| 1359 |
// number, such as in `12345` that includes the VPC service consumer's VPC |
| 1360 |
// network. `{network}` is the name of the service consumer's VPC network. |
| 1361 |
Network string `json:"network,omitempty"` |
| 1362 |
// Peering: Output only. The name of the VPC Network Peering connection that |
| 1363 |
// was created by the service producer. |
| 1364 |
Peering string `json:"peering,omitempty"` |
| 1365 |
// ReservedPeeringRanges: The name of one or more allocated IP address ranges |
| 1366 |
// for this service producer of type `PEERING`. Note that invoking |
| 1367 |
// CreateConnection method with a different range when connection is already |
| 1368 |
// established will not modify already provisioned service producer |
| 1369 |
// subnetworks. If CreateConnection method is invoked repeatedly to reconnect |
| 1370 |
// when peering connection had been disconnected on the consumer side, leaving |
| 1371 |
// this field empty will restore previously allocated IP ranges. |
| 1372 |
ReservedPeeringRanges []string `json:"reservedPeeringRanges,omitempty"` |
| 1373 |
// Service: Output only. The name of the peering service that's associated with |
| 1374 |
// this connection, in the following format: `services/{service name}`. |
| 1375 |
Service string `json:"service,omitempty"` |
| 1376 |
// ForceSendFields is a list of field names (e.g. "Network") to unconditionally |
| 1377 |
// include in API requests. By default, fields with empty or default values are |
| 1378 |
// omitted from API requests. See |
| 1379 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1380 |
// details. |
| 1381 |
ForceSendFields []string `json:"-"` |
| 1382 |
// NullFields is a list of field names (e.g. "Network") to include in API |
| 1383 |
// requests with the JSON null value. By default, fields with empty values are |
| 1384 |
// omitted from API requests. See |
| 1385 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1386 |
NullFields []string `json:"-"` |
| 1387 |
} |
| 1388 |
|
| 1389 |
func (s Connection) MarshalJSON() ([]byte, error) { |
| 1390 |
type NoMethod Connection |
| 1391 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1392 |
} |
| 1393 |
|
| 1394 |
// ConsumerConfig: Configuration information for a private service access |
| 1395 |
// connection. |
| 1396 |
type ConsumerConfig struct { |
| 1397 |
// CloudsqlConfigs: Represents one or multiple Cloud SQL configurations. |
| 1398 |
CloudsqlConfigs []*CloudSQLConfig `json:"cloudsqlConfigs,omitempty"` |
| 1399 |
// ConsumerExportCustomRoutes: Export custom routes flag value for peering from |
| 1400 |
// consumer to producer. |
| 1401 |
ConsumerExportCustomRoutes bool `json:"consumerExportCustomRoutes,omitempty"` |
| 1402 |
// ConsumerExportSubnetRoutesWithPublicIp: Export subnet routes with public ip |
| 1403 |
// flag value for peering from consumer to producer. |
| 1404 |
ConsumerExportSubnetRoutesWithPublicIp bool `json:"consumerExportSubnetRoutesWithPublicIp,omitempty"` |
| 1405 |
// ConsumerImportCustomRoutes: Import custom routes flag value for peering from |
| 1406 |
// consumer to producer. |
| 1407 |
ConsumerImportCustomRoutes bool `json:"consumerImportCustomRoutes,omitempty"` |
| 1408 |
// ConsumerImportSubnetRoutesWithPublicIp: Import subnet routes with public ip |
| 1409 |
// flag value for peering from consumer to producer. |
| 1410 |
ConsumerImportSubnetRoutesWithPublicIp bool `json:"consumerImportSubnetRoutesWithPublicIp,omitempty"` |
| 1411 |
// ConsumerPeeringActive: Output only. If this is true, consumer peering is |
| 1412 |
// active. |
| 1413 |
ConsumerPeeringActive bool `json:"consumerPeeringActive,omitempty"` |
| 1414 |
// ProducerExportCustomRoutes: Export custom routes flag value for peering from |
| 1415 |
// producer to consumer. |
| 1416 |
ProducerExportCustomRoutes bool `json:"producerExportCustomRoutes,omitempty"` |
| 1417 |
// ProducerExportSubnetRoutesWithPublicIp: Export subnet routes with public ip |
| 1418 |
// flag value for peering from producer to consumer. |
| 1419 |
ProducerExportSubnetRoutesWithPublicIp bool `json:"producerExportSubnetRoutesWithPublicIp,omitempty"` |
| 1420 |
// ProducerImportCustomRoutes: Import custom routes flag value for peering from |
| 1421 |
// producer to consumer. |
| 1422 |
ProducerImportCustomRoutes bool `json:"producerImportCustomRoutes,omitempty"` |
| 1423 |
// ProducerImportSubnetRoutesWithPublicIp: Import subnet routes with public ip |
| 1424 |
// flag value for peering from producer to consumer. |
| 1425 |
ProducerImportSubnetRoutesWithPublicIp bool `json:"producerImportSubnetRoutesWithPublicIp,omitempty"` |
| 1426 |
// ProducerNetwork: Output only. The VPC host network that is used to host |
| 1427 |
// managed service instances. In the format, |
| 1428 |
// projects/{project}/global/networks/{network} where {project} is the project |
| 1429 |
// number e.g. '12345' and {network} is the network name. |
| 1430 |
ProducerNetwork string `json:"producerNetwork,omitempty"` |
| 1431 |
// ReservedRanges: Output only. The reserved ranges associated with this |
| 1432 |
// private service access connection. |
| 1433 |
ReservedRanges []*GoogleCloudServicenetworkingV1ConsumerConfigReservedRange `json:"reservedRanges,omitempty"` |
| 1434 |
// UsedIpRanges: Output only. The IP ranges already in use by consumer or |
| 1435 |
// producer |
| 1436 |
UsedIpRanges []string `json:"usedIpRanges,omitempty"` |
| 1437 |
// VpcScReferenceArchitectureEnabled: Output only. Indicates whether the VPC |
| 1438 |
// Service Controls reference architecture is configured for the producer VPC |
| 1439 |
// host network. |
| 1440 |
VpcScReferenceArchitectureEnabled bool `json:"vpcScReferenceArchitectureEnabled,omitempty"` |
| 1441 |
|
| 1442 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 1443 |
googleapi.ServerResponse `json:"-"` |
| 1444 |
// ForceSendFields is a list of field names (e.g. "CloudsqlConfigs") to |
| 1445 |
// unconditionally include in API requests. By default, fields with empty or |
| 1446 |
// default values are omitted from API requests. See |
| 1447 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1448 |
// details. |
| 1449 |
ForceSendFields []string `json:"-"` |
| 1450 |
// NullFields is a list of field names (e.g. "CloudsqlConfigs") to include in |
| 1451 |
// API requests with the JSON null value. By default, fields with empty values |
| 1452 |
// are omitted from API requests. See |
| 1453 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1454 |
NullFields []string `json:"-"` |
| 1455 |
} |
| 1456 |
|
| 1457 |
func (s ConsumerConfig) MarshalJSON() ([]byte, error) { |
| 1458 |
type NoMethod ConsumerConfig |
| 1459 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1460 |
} |
| 1461 |
|
| 1462 |
// ConsumerConfigMetadata: Metadata provided through GetOperation request for |
| 1463 |
// the LRO generated by UpdateConsumerConfig API. |
| 1464 |
type ConsumerConfigMetadata struct { |
| 1465 |
} |
| 1466 |
|
| 1467 |
// ConsumerProject: Represents a consumer project. |
| 1468 |
type ConsumerProject struct { |
| 1469 |
// ProjectNum: Required. Project number of the consumer that is launching the |
| 1470 |
// service instance. It can own the network that is peered with Google or, be a |
| 1471 |
// service project in an XPN where the host project has the network. |
| 1472 |
ProjectNum int64 `json:"projectNum,omitempty,string"` |
| 1473 |
// ForceSendFields is a list of field names (e.g. "ProjectNum") to |
| 1474 |
// unconditionally include in API requests. By default, fields with empty or |
| 1475 |
// default values are omitted from API requests. See |
| 1476 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1477 |
// details. |
| 1478 |
ForceSendFields []string `json:"-"` |
| 1479 |
// NullFields is a list of field names (e.g. "ProjectNum") to include in API |
| 1480 |
// requests with the JSON null value. By default, fields with empty values are |
| 1481 |
// omitted from API requests. See |
| 1482 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1483 |
NullFields []string `json:"-"` |
| 1484 |
} |
| 1485 |
|
| 1486 |
func (s ConsumerProject) MarshalJSON() ([]byte, error) { |
| 1487 |
type NoMethod ConsumerProject |
| 1488 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1489 |
} |
| 1490 |
|
| 1491 |
// Context: `Context` defines which contexts an API requests. Example: context: |
| 1492 |
// rules: - selector: "*" requested: - google.rpc.context.ProjectContext - |
| 1493 |
// google.rpc.context.OriginContext The above specifies that all methods in the |
| 1494 |
// API request `google.rpc.context.ProjectContext` and |
| 1495 |
// `google.rpc.context.OriginContext`. Available context types are defined in |
| 1496 |
// package `google.rpc.context`. This also provides mechanism to allowlist any |
| 1497 |
// protobuf message extension that can be sent in grpc metadata using |
| 1498 |
// “x-goog-ext--bin” and “x-goog-ext--jspb” format. For example, list |
| 1499 |
// any service specific protobuf types that can appear in grpc metadata as |
| 1500 |
// follows in your yaml file: Example: context: rules: - selector: |
| 1501 |
// "google.example.library.v1.LibraryService.CreateBook" |
| 1502 |
// allowed_request_extensions: - google.foo.v1.NewExtension |
| 1503 |
// allowed_response_extensions: - google.foo.v1.NewExtension You can also |
| 1504 |
// specify extension ID instead of fully qualified extension name here. |
| 1505 |
type Context struct { |
| 1506 |
// Rules: A list of RPC context rules that apply to individual API methods. |
| 1507 |
// **NOTE:** All service configuration rules follow "last one wins" order. |
| 1508 |
Rules []*ContextRule `json:"rules,omitempty"` |
| 1509 |
// ForceSendFields is a list of field names (e.g. "Rules") to unconditionally |
| 1510 |
// include in API requests. By default, fields with empty or default values are |
| 1511 |
// omitted from API requests. See |
| 1512 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1513 |
// details. |
| 1514 |
ForceSendFields []string `json:"-"` |
| 1515 |
// NullFields is a list of field names (e.g. "Rules") to include in API |
| 1516 |
// requests with the JSON null value. By default, fields with empty values are |
| 1517 |
// omitted from API requests. See |
| 1518 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1519 |
NullFields []string `json:"-"` |
| 1520 |
} |
| 1521 |
|
| 1522 |
func (s Context) MarshalJSON() ([]byte, error) { |
| 1523 |
type NoMethod Context |
| 1524 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1525 |
} |
| 1526 |
|
| 1527 |
// ContextRule: A context rule provides information about the context for an |
| 1528 |
// individual API element. |
| 1529 |
type ContextRule struct { |
| 1530 |
// AllowedRequestExtensions: A list of full type names or extension IDs of |
| 1531 |
// extensions allowed in grpc side channel from client to backend. |
| 1532 |
AllowedRequestExtensions []string `json:"allowedRequestExtensions,omitempty"` |
| 1533 |
// AllowedResponseExtensions: A list of full type names or extension IDs of |
| 1534 |
// extensions allowed in grpc side channel from backend to client. |
| 1535 |
AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` |
| 1536 |
// Provided: A list of full type names of provided contexts. It is used to |
| 1537 |
// support propagating HTTP headers and ETags from the response extension. |
| 1538 |
Provided []string `json:"provided,omitempty"` |
| 1539 |
// Requested: A list of full type names of requested contexts, only the |
| 1540 |
// requested context will be made available to the backend. |
| 1541 |
Requested []string `json:"requested,omitempty"` |
| 1542 |
// Selector: Selects the methods to which this rule applies. Refer to selector |
| 1543 |
// for syntax details. |
| 1544 |
Selector string `json:"selector,omitempty"` |
| 1545 |
// ForceSendFields is a list of field names (e.g. "AllowedRequestExtensions") |
| 1546 |
// to unconditionally include in API requests. By default, fields with empty or |
| 1547 |
// default values are omitted from API requests. See |
| 1548 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1549 |
// details. |
| 1550 |
ForceSendFields []string `json:"-"` |
| 1551 |
// NullFields is a list of field names (e.g. "AllowedRequestExtensions") to |
| 1552 |
// include in API requests with the JSON null value. By default, fields with |
| 1553 |
// empty values are omitted from API requests. See |
| 1554 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1555 |
NullFields []string `json:"-"` |
| 1556 |
} |
| 1557 |
|
| 1558 |
func (s ContextRule) MarshalJSON() ([]byte, error) { |
| 1559 |
type NoMethod ContextRule |
| 1560 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1561 |
} |
| 1562 |
|
| 1563 |
// Control: Selects and configures the service controller used by the service. |
| 1564 |
// Example: control: environment: servicecontrol.googleapis.com |
| 1565 |
type Control struct { |
| 1566 |
// Environment: The service controller environment to use. If empty, no control |
| 1567 |
// plane features (like quota and billing) will be enabled. The recommended |
| 1568 |
// value for most services is servicecontrol.googleapis.com. |
| 1569 |
Environment string `json:"environment,omitempty"` |
| 1570 |
// MethodPolicies: Defines policies applying to the API methods of the service. |
| 1571 |
MethodPolicies []*MethodPolicy `json:"methodPolicies,omitempty"` |
| 1572 |
// ForceSendFields is a list of field names (e.g. "Environment") to |
| 1573 |
// unconditionally include in API requests. By default, fields with empty or |
| 1574 |
// default values are omitted from API requests. See |
| 1575 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1576 |
// details. |
| 1577 |
ForceSendFields []string `json:"-"` |
| 1578 |
// NullFields is a list of field names (e.g. "Environment") to include in API |
| 1579 |
// requests with the JSON null value. By default, fields with empty values are |
| 1580 |
// omitted from API requests. See |
| 1581 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1582 |
NullFields []string `json:"-"` |
| 1583 |
} |
| 1584 |
|
| 1585 |
func (s Control) MarshalJSON() ([]byte, error) { |
| 1586 |
type NoMethod Control |
| 1587 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1588 |
} |
| 1589 |
|
| 1590 |
// CppSettings: Settings for C++ client libraries. |
| 1591 |
type CppSettings struct { |
| 1592 |
// Common: Some settings. |
| 1593 |
Common *CommonLanguageSettings `json:"common,omitempty"` |
| 1594 |
// ForceSendFields is a list of field names (e.g. "Common") to unconditionally |
| 1595 |
// include in API requests. By default, fields with empty or default values are |
| 1596 |
// omitted from API requests. See |
| 1597 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1598 |
// details. |
| 1599 |
ForceSendFields []string `json:"-"` |
| 1600 |
// NullFields is a list of field names (e.g. "Common") to include in API |
| 1601 |
// requests with the JSON null value. By default, fields with empty values are |
| 1602 |
// omitted from API requests. See |
| 1603 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1604 |
NullFields []string `json:"-"` |
| 1605 |
} |
| 1606 |
|
| 1607 |
func (s CppSettings) MarshalJSON() ([]byte, error) { |
| 1608 |
type NoMethod CppSettings |
| 1609 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1610 |
} |
| 1611 |
|
| 1612 |
// CustomError: Customize service error responses. For example, list any |
| 1613 |
// service specific protobuf types that can appear in error detail lists of |
| 1614 |
// error responses. Example: custom_error: types: - google.foo.v1.CustomError - |
| 1615 |
// google.foo.v1.AnotherError |
| 1616 |
type CustomError struct { |
| 1617 |
// Rules: The list of custom error rules that apply to individual API messages. |
| 1618 |
// **NOTE:** All service configuration rules follow "last one wins" order. |
| 1619 |
Rules []*CustomErrorRule `json:"rules,omitempty"` |
| 1620 |
// Types: The list of custom error detail types, e.g. |
| 1621 |
// 'google.foo.v1.CustomError'. |
| 1622 |
Types []string `json:"types,omitempty"` |
| 1623 |
// ForceSendFields is a list of field names (e.g. "Rules") to unconditionally |
| 1624 |
// include in API requests. By default, fields with empty or default values are |
| 1625 |
// omitted from API requests. See |
| 1626 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1627 |
// details. |
| 1628 |
ForceSendFields []string `json:"-"` |
| 1629 |
// NullFields is a list of field names (e.g. "Rules") to include in API |
| 1630 |
// requests with the JSON null value. By default, fields with empty values are |
| 1631 |
// omitted from API requests. See |
| 1632 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1633 |
NullFields []string `json:"-"` |
| 1634 |
} |
| 1635 |
|
| 1636 |
func (s CustomError) MarshalJSON() ([]byte, error) { |
| 1637 |
type NoMethod CustomError |
| 1638 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1639 |
} |
| 1640 |
|
| 1641 |
// CustomErrorRule: A custom error rule. |
| 1642 |
type CustomErrorRule struct { |
| 1643 |
// IsErrorType: Mark this message as possible payload in error response. |
| 1644 |
// Otherwise, objects of this type will be filtered when they appear in error |
| 1645 |
// payload. |
| 1646 |
IsErrorType bool `json:"isErrorType,omitempty"` |
| 1647 |
// Selector: Selects messages to which this rule applies. Refer to selector for |
| 1648 |
// syntax details. |
| 1649 |
Selector string `json:"selector,omitempty"` |
| 1650 |
// ForceSendFields is a list of field names (e.g. "IsErrorType") to |
| 1651 |
// unconditionally include in API requests. By default, fields with empty or |
| 1652 |
// default values are omitted from API requests. See |
| 1653 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1654 |
// details. |
| 1655 |
ForceSendFields []string `json:"-"` |
| 1656 |
// NullFields is a list of field names (e.g. "IsErrorType") to include in API |
| 1657 |
// requests with the JSON null value. By default, fields with empty values are |
| 1658 |
// omitted from API requests. See |
| 1659 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1660 |
NullFields []string `json:"-"` |
| 1661 |
} |
| 1662 |
|
| 1663 |
func (s CustomErrorRule) MarshalJSON() ([]byte, error) { |
| 1664 |
type NoMethod CustomErrorRule |
| 1665 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1666 |
} |
| 1667 |
|
| 1668 |
// CustomHttpPattern: A custom pattern is used for defining custom HTTP verb. |
| 1669 |
type CustomHttpPattern struct { |
| 1670 |
// Kind: The name of this custom HTTP verb. |
| 1671 |
Kind string `json:"kind,omitempty"` |
| 1672 |
// Path: The path matched by this custom verb. |
| 1673 |
Path string `json:"path,omitempty"` |
| 1674 |
// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally |
| 1675 |
// include in API requests. By default, fields with empty or default values are |
| 1676 |
// omitted from API requests. See |
| 1677 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1678 |
// details. |
| 1679 |
ForceSendFields []string `json:"-"` |
| 1680 |
// NullFields is a list of field names (e.g. "Kind") to include in API requests |
| 1681 |
// with the JSON null value. By default, fields with empty values are omitted |
| 1682 |
// from API requests. See |
| 1683 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1684 |
NullFields []string `json:"-"` |
| 1685 |
} |
| 1686 |
|
| 1687 |
func (s CustomHttpPattern) MarshalJSON() ([]byte, error) { |
| 1688 |
type NoMethod CustomHttpPattern |
| 1689 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1690 |
} |
| 1691 |
|
| 1692 |
// DeleteConnectionMetadata: Metadata provided through GetOperation request for |
| 1693 |
// the LRO generated by Delete Connection API |
| 1694 |
type DeleteConnectionMetadata struct { |
| 1695 |
} |
| 1696 |
|
| 1697 |
// DeleteConnectionRequest: Request to delete a private service access |
| 1698 |
// connection. The call will fail if there are any managed service instances |
| 1699 |
// using this connection. |
| 1700 |
type DeleteConnectionRequest struct { |
| 1701 |
// ConsumerNetwork: Required. The network that the consumer is using to connect |
| 1702 |
// with services. Must be in the form of |
| 1703 |
// projects/{project}/global/networks/{network} {project} is a project number, |
| 1704 |
// as in '12345' {network} is a network name. |
| 1705 |
ConsumerNetwork string `json:"consumerNetwork,omitempty"` |
| 1706 |
// ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to |
| 1707 |
// unconditionally include in API requests. By default, fields with empty or |
| 1708 |
// default values are omitted from API requests. See |
| 1709 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1710 |
// details. |
| 1711 |
ForceSendFields []string `json:"-"` |
| 1712 |
// NullFields is a list of field names (e.g. "ConsumerNetwork") to include in |
| 1713 |
// API requests with the JSON null value. By default, fields with empty values |
| 1714 |
// are omitted from API requests. See |
| 1715 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1716 |
NullFields []string `json:"-"` |
| 1717 |
} |
| 1718 |
|
| 1719 |
func (s DeleteConnectionRequest) MarshalJSON() ([]byte, error) { |
| 1720 |
type NoMethod DeleteConnectionRequest |
| 1721 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1722 |
} |
| 1723 |
|
| 1724 |
// DeletePeeredDnsDomainMetadata: Metadata provided through GetOperation |
| 1725 |
// request for the LRO generated by DeletePeeredDnsDomain API. |
| 1726 |
type DeletePeeredDnsDomainMetadata struct { |
| 1727 |
} |
| 1728 |
|
| 1729 |
// DisableVpcServiceControlsRequest: Request to disable VPC service controls. |
| 1730 |
type DisableVpcServiceControlsRequest struct { |
| 1731 |
// ConsumerNetwork: Required. The network that the consumer is using to connect |
| 1732 |
// with services. Must be in the form of |
| 1733 |
// projects/{project}/global/networks/{network} {project} is a project number, |
| 1734 |
// as in '12345' {network} is network name. |
| 1735 |
ConsumerNetwork string `json:"consumerNetwork,omitempty"` |
| 1736 |
// ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to |
| 1737 |
// unconditionally include in API requests. By default, fields with empty or |
| 1738 |
// default values are omitted from API requests. See |
| 1739 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1740 |
// details. |
| 1741 |
ForceSendFields []string `json:"-"` |
| 1742 |
// NullFields is a list of field names (e.g. "ConsumerNetwork") to include in |
| 1743 |
// API requests with the JSON null value. By default, fields with empty values |
| 1744 |
// are omitted from API requests. See |
| 1745 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1746 |
NullFields []string `json:"-"` |
| 1747 |
} |
| 1748 |
|
| 1749 |
func (s DisableVpcServiceControlsRequest) MarshalJSON() ([]byte, error) { |
| 1750 |
type NoMethod DisableVpcServiceControlsRequest |
| 1751 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1752 |
} |
| 1753 |
|
| 1754 |
// DnsRecordSet: Represents a DNS record set resource. |
| 1755 |
type DnsRecordSet struct { |
| 1756 |
// Data: Required. As defined in RFC 1035 (section 5) and RFC 1034 (section |
| 1757 |
// 3.6.1) for examples see https://cloud.google.com/dns/records/json-record. |
| 1758 |
Data []string `json:"data,omitempty"` |
| 1759 |
// Domain: Required. The DNS or domain name of the record set, e.g. |
| 1760 |
// `test.example.com`. Cloud DNS requires that a DNS suffix ends with a |
| 1761 |
// trailing dot. |
| 1762 |
Domain string `json:"domain,omitempty"` |
| 1763 |
// Ttl: Required. The period of time for which this RecordSet can be cached by |
| 1764 |
// resolvers. |
| 1765 |
Ttl string `json:"ttl,omitempty"` |
| 1766 |
// Type: Required. The identifier of a supported record type. |
| 1767 |
Type string `json:"type,omitempty"` |
| 1768 |
|
| 1769 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 1770 |
googleapi.ServerResponse `json:"-"` |
| 1771 |
// ForceSendFields is a list of field names (e.g. "Data") to unconditionally |
| 1772 |
// include in API requests. By default, fields with empty or default values are |
| 1773 |
// omitted from API requests. See |
| 1774 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1775 |
// details. |
| 1776 |
ForceSendFields []string `json:"-"` |
| 1777 |
// NullFields is a list of field names (e.g. "Data") to include in API requests |
| 1778 |
// with the JSON null value. By default, fields with empty values are omitted |
| 1779 |
// from API requests. See |
| 1780 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1781 |
NullFields []string `json:"-"` |
| 1782 |
} |
| 1783 |
|
| 1784 |
func (s DnsRecordSet) MarshalJSON() ([]byte, error) { |
| 1785 |
type NoMethod DnsRecordSet |
| 1786 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1787 |
} |
| 1788 |
|
| 1789 |
// DnsZone: Represents a DNS zone resource. |
| 1790 |
type DnsZone struct { |
| 1791 |
// DnsSuffix: The DNS name suffix of this zone e.g. `example.com.`. Cloud DNS |
| 1792 |
// requires that a DNS suffix ends with a trailing dot. |
| 1793 |
DnsSuffix string `json:"dnsSuffix,omitempty"` |
| 1794 |
// Name: User assigned name for this resource. Must be unique within the |
| 1795 |
// project. The name must be 1-63 characters long, must begin with a letter, |
| 1796 |
// end with a letter or digit, and only contain lowercase letters, digits or |
| 1797 |
// dashes. |
| 1798 |
Name string `json:"name,omitempty"` |
| 1799 |
// ForceSendFields is a list of field names (e.g. "DnsSuffix") to |
| 1800 |
// unconditionally include in API requests. By default, fields with empty or |
| 1801 |
// default values are omitted from API requests. See |
| 1802 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1803 |
// details. |
| 1804 |
ForceSendFields []string `json:"-"` |
| 1805 |
// NullFields is a list of field names (e.g. "DnsSuffix") to include in API |
| 1806 |
// requests with the JSON null value. By default, fields with empty values are |
| 1807 |
// omitted from API requests. See |
| 1808 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1809 |
NullFields []string `json:"-"` |
| 1810 |
} |
| 1811 |
|
| 1812 |
func (s DnsZone) MarshalJSON() ([]byte, error) { |
| 1813 |
type NoMethod DnsZone |
| 1814 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1815 |
} |
| 1816 |
|
| 1817 |
// DnsZonePair: * Represents a pair of private and peering DNS zone resources. |
| 1818 |
// * |
| 1819 |
type DnsZonePair struct { |
| 1820 |
// ConsumerPeeringZone: The DNS peering zone in the consumer project. |
| 1821 |
ConsumerPeeringZone *DnsZone `json:"consumerPeeringZone,omitempty"` |
| 1822 |
// ProducerPrivateZone: The private DNS zone in the shared producer host |
| 1823 |
// project. |
| 1824 |
ProducerPrivateZone *DnsZone `json:"producerPrivateZone,omitempty"` |
| 1825 |
// ForceSendFields is a list of field names (e.g. "ConsumerPeeringZone") to |
| 1826 |
// unconditionally include in API requests. By default, fields with empty or |
| 1827 |
// default values are omitted from API requests. See |
| 1828 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1829 |
// details. |
| 1830 |
ForceSendFields []string `json:"-"` |
| 1831 |
// NullFields is a list of field names (e.g. "ConsumerPeeringZone") to include |
| 1832 |
// in API requests with the JSON null value. By default, fields with empty |
| 1833 |
// values are omitted from API requests. See |
| 1834 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1835 |
NullFields []string `json:"-"` |
| 1836 |
} |
| 1837 |
|
| 1838 |
func (s DnsZonePair) MarshalJSON() ([]byte, error) { |
| 1839 |
type NoMethod DnsZonePair |
| 1840 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1841 |
} |
| 1842 |
|
| 1843 |
// Documentation: `Documentation` provides the information for describing a |
| 1844 |
// service. Example: documentation: summary: > The Google Calendar API gives |
| 1845 |
// access to most calendar features. pages: - name: Overview content: (== |
| 1846 |
// include google/foo/overview.md ==) - name: Tutorial content: (== include |
| 1847 |
// google/foo/tutorial.md ==) subpages: - name: Java content: (== include |
| 1848 |
// google/foo/tutorial_java.md ==) rules: - selector: |
| 1849 |
// google.calendar.Calendar.Get description: > ... - selector: |
| 1850 |
// google.calendar.Calendar.Put description: > ... Documentation is provided in |
| 1851 |
// markdown syntax. In addition to standard markdown features, definition |
| 1852 |
// lists, tables and fenced code blocks are supported. Section headers can be |
| 1853 |
// provided and are interpreted relative to the section nesting of the context |
| 1854 |
// where a documentation fragment is embedded. Documentation from the IDL is |
| 1855 |
// merged with documentation defined via the config at normalization time, |
| 1856 |
// where documentation provided by config rules overrides IDL provided. A |
| 1857 |
// number of constructs specific to the API platform are supported in |
| 1858 |
// documentation text. In order to reference a proto element, the following |
| 1859 |
// notation can be used: [fully.qualified.proto.name][] To override the display |
| 1860 |
// text used for the link, this can be used: [display |
| 1861 |
// text][fully.qualified.proto.name] Text can be excluded from doc using the |
| 1862 |
// following notation: (-- internal comment --) A few directives are available |
| 1863 |
// in documentation. Note that directives must appear on a single line to be |
| 1864 |
// properly identified. The `include` directive includes a markdown file from |
| 1865 |
// an external source: (== include path/to/file ==) The `resource_for` |
| 1866 |
// directive marks a message to be the resource of a collection in REST view. |
| 1867 |
// If it is not specified, tools attempt to infer the resource from the |
| 1868 |
// operations in a collection: (== resource_for v1.shelves.books ==) The |
| 1869 |
// directive `suppress_warning` does not directly affect documentation and is |
| 1870 |
// documented together with service config validation. |
| 1871 |
type Documentation struct { |
| 1872 |
// AdditionalIamInfo: Optional information about the IAM configuration. This is |
| 1873 |
// typically used to link to documentation about a product's IAM roles and |
| 1874 |
// permissions. |
| 1875 |
AdditionalIamInfo string `json:"additionalIamInfo,omitempty"` |
| 1876 |
// DocumentationRootUrl: The URL to the root of documentation. |
| 1877 |
DocumentationRootUrl string `json:"documentationRootUrl,omitempty"` |
| 1878 |
// Overview: Declares a single overview page. For example: documentation: |
| 1879 |
// summary: ... overview: (== include overview.md ==) This is a shortcut for |
| 1880 |
// the following declaration (using pages style): documentation: summary: ... |
| 1881 |
// pages: - name: Overview content: (== include overview.md ==) Note: you |
| 1882 |
// cannot specify both `overview` field and `pages` field. |
| 1883 |
Overview string `json:"overview,omitempty"` |
| 1884 |
// Pages: The top level pages for the documentation set. |
| 1885 |
Pages []*Page `json:"pages,omitempty"` |
| 1886 |
// Rules: A list of documentation rules that apply to individual API elements. |
| 1887 |
// **NOTE:** All service configuration rules follow "last one wins" order. |
| 1888 |
Rules []*DocumentationRule `json:"rules,omitempty"` |
| 1889 |
// SectionOverrides: Specifies section and content to override the boilerplate |
| 1890 |
// content. Currently overrides following sections: 1. |
| 1891 |
// rest.service.client_libraries |
| 1892 |
SectionOverrides []*Page `json:"sectionOverrides,omitempty"` |
| 1893 |
// ServiceRootUrl: Specifies the service root url if the default one (the |
| 1894 |
// service name from the yaml file) is not suitable. This can be seen in any |
| 1895 |
// fully specified service urls as well as sections that show a base that other |
| 1896 |
// urls are relative to. |
| 1897 |
ServiceRootUrl string `json:"serviceRootUrl,omitempty"` |
| 1898 |
// Summary: A short description of what the service does. The summary must be |
| 1899 |
// plain text. It becomes the overview of the service displayed in Google Cloud |
| 1900 |
// Console. NOTE: This field is equivalent to the standard field `description`. |
| 1901 |
Summary string `json:"summary,omitempty"` |
| 1902 |
// ForceSendFields is a list of field names (e.g. "AdditionalIamInfo") to |
| 1903 |
// unconditionally include in API requests. By default, fields with empty or |
| 1904 |
// default values are omitted from API requests. See |
| 1905 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1906 |
// details. |
| 1907 |
ForceSendFields []string `json:"-"` |
| 1908 |
// NullFields is a list of field names (e.g. "AdditionalIamInfo") to include in |
| 1909 |
// API requests with the JSON null value. By default, fields with empty values |
| 1910 |
// are omitted from API requests. See |
| 1911 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1912 |
NullFields []string `json:"-"` |
| 1913 |
} |
| 1914 |
|
| 1915 |
func (s Documentation) MarshalJSON() ([]byte, error) { |
| 1916 |
type NoMethod Documentation |
| 1917 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1918 |
} |
| 1919 |
|
| 1920 |
// DocumentationRule: A documentation rule provides information about |
| 1921 |
// individual API elements. |
| 1922 |
type DocumentationRule struct { |
| 1923 |
// DeprecationDescription: Deprecation description of the selected element(s). |
| 1924 |
// It can be provided if an element is marked as `deprecated`. |
| 1925 |
DeprecationDescription string `json:"deprecationDescription,omitempty"` |
| 1926 |
// Description: Description of the selected proto element (e.g. a message, a |
| 1927 |
// method, a 'service' definition, or a field). Defaults to leading & trailing |
| 1928 |
// comments taken from the proto source definition of the proto element. |
| 1929 |
Description string `json:"description,omitempty"` |
| 1930 |
// DisableReplacementWords: String of comma or space separated case-sensitive |
| 1931 |
// words for which method/field name replacement will be disabled. |
| 1932 |
DisableReplacementWords string `json:"disableReplacementWords,omitempty"` |
| 1933 |
// Selector: The selector is a comma-separated list of patterns for any element |
| 1934 |
// such as a method, a field, an enum value. Each pattern is a qualified name |
| 1935 |
// of the element which may end in "*", indicating a wildcard. Wildcards are |
| 1936 |
// only allowed at the end and for a whole component of the qualified name, |
| 1937 |
// i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match |
| 1938 |
// one or more components. To specify a default for all applicable elements, |
| 1939 |
// the whole pattern "*" is used. |
| 1940 |
Selector string `json:"selector,omitempty"` |
| 1941 |
// ForceSendFields is a list of field names (e.g. "DeprecationDescription") to |
| 1942 |
// unconditionally include in API requests. By default, fields with empty or |
| 1943 |
// default values are omitted from API requests. See |
| 1944 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1945 |
// details. |
| 1946 |
ForceSendFields []string `json:"-"` |
| 1947 |
// NullFields is a list of field names (e.g. "DeprecationDescription") to |
| 1948 |
// include in API requests with the JSON null value. By default, fields with |
| 1949 |
// empty values are omitted from API requests. See |
| 1950 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1951 |
NullFields []string `json:"-"` |
| 1952 |
} |
| 1953 |
|
| 1954 |
func (s DocumentationRule) MarshalJSON() ([]byte, error) { |
| 1955 |
type NoMethod DocumentationRule |
| 1956 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1957 |
} |
| 1958 |
|
| 1959 |
// DotnetSettings: Settings for Dotnet client libraries. |
| 1960 |
type DotnetSettings struct { |
| 1961 |
// Common: Some settings. |
| 1962 |
Common *CommonLanguageSettings `json:"common,omitempty"` |
| 1963 |
// ForcedNamespaceAliases: Namespaces which must be aliased in snippets due to |
| 1964 |
// a known (but non-generator-predictable) naming collision |
| 1965 |
ForcedNamespaceAliases []string `json:"forcedNamespaceAliases,omitempty"` |
| 1966 |
// HandwrittenSignatures: Method signatures (in the form |
| 1967 |
// "service.method(signature)") which are provided separately, so shouldn't be |
| 1968 |
// generated. Snippets *calling* these methods are still generated, however. |
| 1969 |
HandwrittenSignatures []string `json:"handwrittenSignatures,omitempty"` |
| 1970 |
// IgnoredResources: List of full resource types to ignore during generation. |
| 1971 |
// This is typically used for API-specific Location resources, which should be |
| 1972 |
// handled by the generator as if they were actually the common Location |
| 1973 |
// resources. Example entry: "documentai.googleapis.com/Location" |
| 1974 |
IgnoredResources []string `json:"ignoredResources,omitempty"` |
| 1975 |
// RenamedResources: Map from full resource types to the effective short name |
| 1976 |
// for the resource. This is used when otherwise resource named from different |
| 1977 |
// services would cause naming collisions. Example entry: |
| 1978 |
// "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" |
| 1979 |
RenamedResources map[string]string `json:"renamedResources,omitempty"` |
| 1980 |
// RenamedServices: Map from original service names to renamed versions. This |
| 1981 |
// is used when the default generated types would cause a naming conflict. |
| 1982 |
// (Neither name is fully-qualified.) Example: Subscriber to |
| 1983 |
// SubscriberServiceApi. |
| 1984 |
RenamedServices map[string]string `json:"renamedServices,omitempty"` |
| 1985 |
// ForceSendFields is a list of field names (e.g. "Common") to unconditionally |
| 1986 |
// include in API requests. By default, fields with empty or default values are |
| 1987 |
// omitted from API requests. See |
| 1988 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1989 |
// details. |
| 1990 |
ForceSendFields []string `json:"-"` |
| 1991 |
// NullFields is a list of field names (e.g. "Common") to include in API |
| 1992 |
// requests with the JSON null value. By default, fields with empty values are |
| 1993 |
// omitted from API requests. See |
| 1994 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1995 |
NullFields []string `json:"-"` |
| 1996 |
} |
| 1997 |
|
| 1998 |
func (s DotnetSettings) MarshalJSON() ([]byte, error) { |
| 1999 |
type NoMethod DotnetSettings |
| 2000 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2001 |
} |
| 2002 |
|
| 2003 |
// Empty: A generic empty message that you can re-use to avoid defining |
| 2004 |
// duplicated empty messages in your APIs. A typical example is to use it as |
| 2005 |
// the request or the response type of an API method. For instance: service Foo |
| 2006 |
// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
| 2007 |
type Empty struct { |
| 2008 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2009 |
googleapi.ServerResponse `json:"-"` |
| 2010 |
} |
| 2011 |
|
| 2012 |
// EnableVpcServiceControlsRequest: Request to enable VPC service controls. |
| 2013 |
type EnableVpcServiceControlsRequest struct { |
| 2014 |
// ConsumerNetwork: Required. The network that the consumer is using to connect |
| 2015 |
// with services. Must be in the form of |
| 2016 |
// projects/{project}/global/networks/{network} {project} is a project number, |
| 2017 |
// as in '12345' {network} is network name. |
| 2018 |
ConsumerNetwork string `json:"consumerNetwork,omitempty"` |
| 2019 |
// ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to |
| 2020 |
// unconditionally include in API requests. By default, fields with empty or |
| 2021 |
// default values are omitted from API requests. See |
| 2022 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2023 |
// details. |
| 2024 |
ForceSendFields []string `json:"-"` |
| 2025 |
// NullFields is a list of field names (e.g. "ConsumerNetwork") to include in |
| 2026 |
// API requests with the JSON null value. By default, fields with empty values |
| 2027 |
// are omitted from API requests. See |
| 2028 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2029 |
NullFields []string `json:"-"` |
| 2030 |
} |
| 2031 |
|
| 2032 |
func (s EnableVpcServiceControlsRequest) MarshalJSON() ([]byte, error) { |
| 2033 |
type NoMethod EnableVpcServiceControlsRequest |
| 2034 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2035 |
} |
| 2036 |
|
| 2037 |
// Endpoint: `Endpoint` describes a network address of a service that serves a |
| 2038 |
// set of APIs. It is commonly known as a service endpoint. A service may |
| 2039 |
// expose any number of service endpoints, and all service endpoints share the |
| 2040 |
// same service definition, such as quota limits and monitoring metrics. |
| 2041 |
// Example: type: google.api.Service name: library-example.googleapis.com |
| 2042 |
// endpoints: # Declares network address |
| 2043 |
// `https://library-example.googleapis.com` # for service |
| 2044 |
// `library-example.googleapis.com`. The `https` scheme # is implicit for all |
| 2045 |
// service endpoints. Other schemes may be # supported in the future. - name: |
| 2046 |
// library-example.googleapis.com allow_cors: false - name: |
| 2047 |
// content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls |
| 2048 |
// to be passed to the API frontend, for it # to decide whether the subsequent |
| 2049 |
// cross-origin request is allowed # to proceed. allow_cors: true |
| 2050 |
type Endpoint struct { |
| 2051 |
// Aliases: Aliases for this endpoint, these will be served by the same UrlMap |
| 2052 |
// as the parent endpoint, and will be provisioned in the GCP stack for the |
| 2053 |
// Regional Endpoints. |
| 2054 |
Aliases []string `json:"aliases,omitempty"` |
| 2055 |
// AllowCors: Allowing CORS |
| 2056 |
// (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka |
| 2057 |
// cross-domain traffic, would allow the backends served from this endpoint to |
| 2058 |
// receive and respond to HTTP OPTIONS requests. The response will be used by |
| 2059 |
// the browser to determine whether the subsequent cross-origin request is |
| 2060 |
// allowed to proceed. |
| 2061 |
AllowCors bool `json:"allowCors,omitempty"` |
| 2062 |
// Name: The canonical name of this endpoint. |
| 2063 |
Name string `json:"name,omitempty"` |
| 2064 |
// Target: The specification of an Internet routable address of API frontend |
| 2065 |
// that will handle requests to this API Endpoint |
| 2066 |
// (https://cloud.google.com/apis/design/glossary). It should be either a valid |
| 2067 |
// IPv4 address or a fully-qualified domain name. For example, "8.8.8.8" or |
| 2068 |
// "myservice.appspot.com". |
| 2069 |
Target string `json:"target,omitempty"` |
| 2070 |
// ForceSendFields is a list of field names (e.g. "Aliases") to unconditionally |
| 2071 |
// include in API requests. By default, fields with empty or default values are |
| 2072 |
// omitted from API requests. See |
| 2073 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2074 |
// details. |
| 2075 |
ForceSendFields []string `json:"-"` |
| 2076 |
// NullFields is a list of field names (e.g. "Aliases") to include in API |
| 2077 |
// requests with the JSON null value. By default, fields with empty values are |
| 2078 |
// omitted from API requests. See |
| 2079 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2080 |
NullFields []string `json:"-"` |
| 2081 |
} |
| 2082 |
|
| 2083 |
func (s Endpoint) MarshalJSON() ([]byte, error) { |
| 2084 |
type NoMethod Endpoint |
| 2085 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2086 |
} |
| 2087 |
|
| 2088 |
// Enum: Enum type definition. New usages of this message as an alternative to |
| 2089 |
// EnumDescriptorProto are strongly discouraged. This message does not |
| 2090 |
// reliability preserve all information necessary to model the schema and |
| 2091 |
// preserve semantics. Instead make use of FileDescriptorSet which preserves |
| 2092 |
// the necessary information. |
| 2093 |
type Enum struct { |
| 2094 |
// Edition: The source edition string, only valid when syntax is |
| 2095 |
// SYNTAX_EDITIONS. |
| 2096 |
Edition string `json:"edition,omitempty"` |
| 2097 |
// Enumvalue: Enum value definitions. |
| 2098 |
Enumvalue []*EnumValue `json:"enumvalue,omitempty"` |
| 2099 |
// Name: Enum type name. |
| 2100 |
Name string `json:"name,omitempty"` |
| 2101 |
// Options: Protocol buffer options. |
| 2102 |
Options []*Option `json:"options,omitempty"` |
| 2103 |
// SourceContext: The source context. |
| 2104 |
SourceContext *SourceContext `json:"sourceContext,omitempty"` |
| 2105 |
// Syntax: The source syntax. |
| 2106 |
// |
| 2107 |
// Possible values: |
| 2108 |
// "SYNTAX_PROTO2" - Syntax `proto2`. |
| 2109 |
// "SYNTAX_PROTO3" - Syntax `proto3`. |
| 2110 |
// "SYNTAX_EDITIONS" - Syntax `editions`. |
| 2111 |
Syntax string `json:"syntax,omitempty"` |
| 2112 |
// ForceSendFields is a list of field names (e.g. "Edition") to unconditionally |
| 2113 |
// include in API requests. By default, fields with empty or default values are |
| 2114 |
// omitted from API requests. See |
| 2115 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2116 |
// details. |
| 2117 |
ForceSendFields []string `json:"-"` |
| 2118 |
// NullFields is a list of field names (e.g. "Edition") to include in API |
| 2119 |
// requests with the JSON null value. By default, fields with empty values are |
| 2120 |
// omitted from API requests. See |
| 2121 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2122 |
NullFields []string `json:"-"` |
| 2123 |
} |
| 2124 |
|
| 2125 |
func (s Enum) MarshalJSON() ([]byte, error) { |
| 2126 |
type NoMethod Enum |
| 2127 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2128 |
} |
| 2129 |
|
| 2130 |
// EnumValue: Enum value definition. New usages of this message as an |
| 2131 |
// alternative to EnumValueDescriptorProto are strongly discouraged. This |
| 2132 |
// message does not reliability preserve all information necessary to model the |
| 2133 |
// schema and preserve semantics. Instead make use of FileDescriptorSet which |
| 2134 |
// preserves the necessary information. |
| 2135 |
type EnumValue struct { |
| 2136 |
// Name: Enum value name. |
| 2137 |
Name string `json:"name,omitempty"` |
| 2138 |
// Number: Enum value number. |
| 2139 |
Number int64 `json:"number,omitempty"` |
| 2140 |
// Options: Protocol buffer options. |
| 2141 |
Options []*Option `json:"options,omitempty"` |
| 2142 |
// ForceSendFields is a list of field names (e.g. "Name") to unconditionally |
| 2143 |
// include in API requests. By default, fields with empty or default values are |
| 2144 |
// omitted from API requests. See |
| 2145 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2146 |
// details. |
| 2147 |
ForceSendFields []string `json:"-"` |
| 2148 |
// NullFields is a list of field names (e.g. "Name") to include in API requests |
| 2149 |
// with the JSON null value. By default, fields with empty values are omitted |
| 2150 |
// from API requests. See |
| 2151 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2152 |
NullFields []string `json:"-"` |
| 2153 |
} |
| 2154 |
|
| 2155 |
func (s EnumValue) MarshalJSON() ([]byte, error) { |
| 2156 |
type NoMethod EnumValue |
| 2157 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2158 |
} |
| 2159 |
|
| 2160 |
// ExperimentalFeatures: Experimental features to be included during client |
| 2161 |
// library generation. These fields will be deprecated once the feature |
| 2162 |
// graduates and is enabled by default. |
| 2163 |
type ExperimentalFeatures struct { |
| 2164 |
// ProtobufPythonicTypesEnabled: Enables generation of protobuf code using new |
| 2165 |
// types that are more Pythonic which are included in `protobuf>=5.29.x`. This |
| 2166 |
// feature will be enabled by default 1 month after launching the feature in |
| 2167 |
// preview packages. |
| 2168 |
ProtobufPythonicTypesEnabled bool `json:"protobufPythonicTypesEnabled,omitempty"` |
| 2169 |
// RestAsyncIoEnabled: Enables generation of asynchronous REST clients if |
| 2170 |
// `rest` transport is enabled. By default, asynchronous REST clients will not |
| 2171 |
// be generated. This feature will be enabled by default 1 month after |
| 2172 |
// launching the feature in preview packages. |
| 2173 |
RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` |
| 2174 |
// UnversionedPackageDisabled: Disables generation of an unversioned Python |
| 2175 |
// package for this client library. This means that the module names will need |
| 2176 |
// to be versioned in import statements. For example `import |
| 2177 |
// google.cloud.library_v2` instead of `import google.cloud.library`. |
| 2178 |
UnversionedPackageDisabled bool `json:"unversionedPackageDisabled,omitempty"` |
| 2179 |
// ForceSendFields is a list of field names (e.g. |
| 2180 |
// "ProtobufPythonicTypesEnabled") to unconditionally include in API requests. |
| 2181 |
// By default, fields with empty or default values are omitted from API |
| 2182 |
// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields |
| 2183 |
// for more details. |
| 2184 |
ForceSendFields []string `json:"-"` |
| 2185 |
// NullFields is a list of field names (e.g. "ProtobufPythonicTypesEnabled") to |
| 2186 |
// include in API requests with the JSON null value. By default, fields with |
| 2187 |
// empty values are omitted from API requests. See |
| 2188 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2189 |
NullFields []string `json:"-"` |
| 2190 |
} |
| 2191 |
|
| 2192 |
func (s ExperimentalFeatures) MarshalJSON() ([]byte, error) { |
| 2193 |
type NoMethod ExperimentalFeatures |
| 2194 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2195 |
} |
| 2196 |
|
| 2197 |
// Field: A single field of a message type. New usages of this message as an |
| 2198 |
// alternative to FieldDescriptorProto are strongly discouraged. This message |
| 2199 |
// does not reliability preserve all information necessary to model the schema |
| 2200 |
// and preserve semantics. Instead make use of FileDescriptorSet which |
| 2201 |
// preserves the necessary information. |
| 2202 |
type Field struct { |
| 2203 |
// Cardinality: The field cardinality. |
| 2204 |
// |
| 2205 |
// Possible values: |
| 2206 |
// "CARDINALITY_UNKNOWN" - For fields with unknown cardinality. |
| 2207 |
// "CARDINALITY_OPTIONAL" - For optional fields. |
| 2208 |
// "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only. |
| 2209 |
// "CARDINALITY_REPEATED" - For repeated fields. |
| 2210 |
Cardinality string `json:"cardinality,omitempty"` |
| 2211 |
// DefaultValue: The string value of the default value of this field. Proto2 |
| 2212 |
// syntax only. |
| 2213 |
DefaultValue string `json:"defaultValue,omitempty"` |
| 2214 |
// JsonName: The field JSON name. |
| 2215 |
JsonName string `json:"jsonName,omitempty"` |
| 2216 |
// Kind: The field type. |
| 2217 |
// |
| 2218 |
// Possible values: |
| 2219 |
// "TYPE_UNKNOWN" - Field type unknown. |
| 2220 |
// "TYPE_DOUBLE" - Field type double. |
| 2221 |
// "TYPE_FLOAT" - Field type float. |
| 2222 |
// "TYPE_INT64" - Field type int64. |
| 2223 |
// "TYPE_UINT64" - Field type uint64. |
| 2224 |
// "TYPE_INT32" - Field type int32. |
| 2225 |
// "TYPE_FIXED64" - Field type fixed64. |
| 2226 |
// "TYPE_FIXED32" - Field type fixed32. |
| 2227 |
// "TYPE_BOOL" - Field type bool. |
| 2228 |
// "TYPE_STRING" - Field type string. |
| 2229 |
// "TYPE_GROUP" - Field type group. Proto2 syntax only, and deprecated. |
| 2230 |
// "TYPE_MESSAGE" - Field type message. |
| 2231 |
// "TYPE_BYTES" - Field type bytes. |
| 2232 |
// "TYPE_UINT32" - Field type uint32. |
| 2233 |
// "TYPE_ENUM" - Field type enum. |
| 2234 |
// "TYPE_SFIXED32" - Field type sfixed32. |
| 2235 |
// "TYPE_SFIXED64" - Field type sfixed64. |
| 2236 |
// "TYPE_SINT32" - Field type sint32. |
| 2237 |
// "TYPE_SINT64" - Field type sint64. |
| 2238 |
Kind string `json:"kind,omitempty"` |
| 2239 |
// Name: The field name. |
| 2240 |
Name string `json:"name,omitempty"` |
| 2241 |
// Number: The field number. |
| 2242 |
Number int64 `json:"number,omitempty"` |
| 2243 |
// OneofIndex: The index of the field type in `Type.oneofs`, for message or |
| 2244 |
// enumeration types. The first type has index 1; zero means the type is not in |
| 2245 |
// the list. |
| 2246 |
OneofIndex int64 `json:"oneofIndex,omitempty"` |
| 2247 |
// Options: The protocol buffer options. |
| 2248 |
Options []*Option `json:"options,omitempty"` |
| 2249 |
// Packed: Whether to use alternative packed wire representation. |
| 2250 |
Packed bool `json:"packed,omitempty"` |
| 2251 |
// TypeUrl: The field type URL, without the scheme, for message or enumeration |
| 2252 |
// types. Example: "type.googleapis.com/google.protobuf.Timestamp". |
| 2253 |
TypeUrl string `json:"typeUrl,omitempty"` |
| 2254 |
// ForceSendFields is a list of field names (e.g. "Cardinality") to |
| 2255 |
// unconditionally include in API requests. By default, fields with empty or |
| 2256 |
// default values are omitted from API requests. See |
| 2257 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2258 |
// details. |
| 2259 |
ForceSendFields []string `json:"-"` |
| 2260 |
// NullFields is a list of field names (e.g. "Cardinality") to include in API |
| 2261 |
// requests with the JSON null value. By default, fields with empty values are |
| 2262 |
// omitted from API requests. See |
| 2263 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2264 |
NullFields []string `json:"-"` |
| 2265 |
} |
| 2266 |
|
| 2267 |
func (s Field) MarshalJSON() ([]byte, error) { |
| 2268 |
type NoMethod Field |
| 2269 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2270 |
} |
| 2271 |
|
| 2272 |
// FieldPolicy: Google API Policy Annotation This message defines a simple API |
| 2273 |
// policy annotation that can be used to annotate API request and response |
| 2274 |
// message fields with applicable policies. One field may have multiple |
| 2275 |
// applicable policies that must all be satisfied before a request can be |
| 2276 |
// processed. This policy annotation is used to generate the overall policy |
| 2277 |
// that will be used for automatic runtime policy enforcement and documentation |
| 2278 |
// generation. |
| 2279 |
type FieldPolicy struct { |
| 2280 |
// ResourcePermission: Specifies the required permission(s) for the resource |
| 2281 |
// referred to by the field. It requires the field contains a valid resource |
| 2282 |
// reference, and the request must pass the permission checks to proceed. For |
| 2283 |
// example, "resourcemanager.projects.get". |
| 2284 |
ResourcePermission string `json:"resourcePermission,omitempty"` |
| 2285 |
// ResourceType: Specifies the resource type for the resource referred to by |
| 2286 |
// the field. |
| 2287 |
ResourceType string `json:"resourceType,omitempty"` |
| 2288 |
// Selector: Selects one or more request or response message fields to apply |
| 2289 |
// this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the |
| 2290 |
// selector must be left as empty. The service config generator will |
| 2291 |
// automatically fill the correct value. When a `FieldPolicy` is used in |
| 2292 |
// service config, the selector must be a comma-separated string with valid |
| 2293 |
// request or response field paths, such as "foo.bar" or "foo.bar,foo.baz". |
| 2294 |
Selector string `json:"selector,omitempty"` |
| 2295 |
// ForceSendFields is a list of field names (e.g. "ResourcePermission") to |
| 2296 |
// unconditionally include in API requests. By default, fields with empty or |
| 2297 |
// default values are omitted from API requests. See |
| 2298 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2299 |
// details. |
| 2300 |
ForceSendFields []string `json:"-"` |
| 2301 |
// NullFields is a list of field names (e.g. "ResourcePermission") to include |
| 2302 |
// in API requests with the JSON null value. By default, fields with empty |
| 2303 |
// values are omitted from API requests. See |
| 2304 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2305 |
NullFields []string `json:"-"` |
| 2306 |
} |
| 2307 |
|
| 2308 |
func (s FieldPolicy) MarshalJSON() ([]byte, error) { |
| 2309 |
type NoMethod FieldPolicy |
| 2310 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2311 |
} |
| 2312 |
|
| 2313 |
// GetDnsZoneResponse: Represents managed DNS zones created in the shared |
| 2314 |
// Producer host and consumer projects. |
| 2315 |
type GetDnsZoneResponse struct { |
| 2316 |
// ConsumerPeeringZone: The DNS peering zone created in the consumer project. |
| 2317 |
ConsumerPeeringZone *DnsZone `json:"consumerPeeringZone,omitempty"` |
| 2318 |
// ProducerPrivateZone: The private DNS zone created in the shared producer |
| 2319 |
// host project. |
| 2320 |
ProducerPrivateZone *DnsZone `json:"producerPrivateZone,omitempty"` |
| 2321 |
|
| 2322 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2323 |
googleapi.ServerResponse `json:"-"` |
| 2324 |
// ForceSendFields is a list of field names (e.g. "ConsumerPeeringZone") to |
| 2325 |
// unconditionally include in API requests. By default, fields with empty or |
| 2326 |
// default values are omitted from API requests. See |
| 2327 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2328 |
// details. |
| 2329 |
ForceSendFields []string `json:"-"` |
| 2330 |
// NullFields is a list of field names (e.g. "ConsumerPeeringZone") to include |
| 2331 |
// in API requests with the JSON null value. By default, fields with empty |
| 2332 |
// values are omitted from API requests. See |
| 2333 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2334 |
NullFields []string `json:"-"` |
| 2335 |
} |
| 2336 |
|
| 2337 |
func (s GetDnsZoneResponse) MarshalJSON() ([]byte, error) { |
| 2338 |
type NoMethod GetDnsZoneResponse |
| 2339 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2340 |
} |
| 2341 |
|
| 2342 |
// GoSettings: Settings for Go client libraries. |
| 2343 |
type GoSettings struct { |
| 2344 |
// Common: Some settings. |
| 2345 |
Common *CommonLanguageSettings `json:"common,omitempty"` |
| 2346 |
// RenamedServices: Map of service names to renamed services. Keys are the |
| 2347 |
// package relative service names and values are the name to be used for the |
| 2348 |
// service client and call options. Example: publishing: go_settings: |
| 2349 |
// renamed_services: Publisher: TopicAdmin |
| 2350 |
RenamedServices map[string]string `json:"renamedServices,omitempty"` |
| 2351 |
// ForceSendFields is a list of field names (e.g. "Common") to unconditionally |
| 2352 |
// include in API requests. By default, fields with empty or default values are |
| 2353 |
// omitted from API requests. See |
| 2354 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2355 |
// details. |
| 2356 |
ForceSendFields []string `json:"-"` |
| 2357 |
// NullFields is a list of field names (e.g. "Common") to include in API |
| 2358 |
// requests with the JSON null value. By default, fields with empty values are |
| 2359 |
// omitted from API requests. See |
| 2360 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2361 |
NullFields []string `json:"-"` |
| 2362 |
} |
| 2363 |
|
| 2364 |
func (s GoSettings) MarshalJSON() ([]byte, error) { |
| 2365 |
type NoMethod GoSettings |
| 2366 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2367 |
} |
| 2368 |
|
| 2369 |
// GoogleCloudServicenetworkingV1ConsumerConfigReservedRange: Allocated IP |
| 2370 |
// address ranges for this private service access connection. |
| 2371 |
type GoogleCloudServicenetworkingV1ConsumerConfigReservedRange struct { |
| 2372 |
// Address: The starting address of the reserved range. The address must be a |
| 2373 |
// valid IPv4 address in the x.x.x.x format. This value combined with the IP |
| 2374 |
// prefix length is the CIDR range for the reserved range. |
| 2375 |
Address string `json:"address,omitempty"` |
| 2376 |
// IpPrefixLength: The prefix length of the reserved range. |
| 2377 |
IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` |
| 2378 |
// Name: The name of the reserved range. |
| 2379 |
Name string `json:"name,omitempty"` |
| 2380 |
// ForceSendFields is a list of field names (e.g. "Address") to unconditionally |
| 2381 |
// include in API requests. By default, fields with empty or default values are |
| 2382 |
// omitted from API requests. See |
| 2383 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2384 |
// details. |
| 2385 |
ForceSendFields []string `json:"-"` |
| 2386 |
// NullFields is a list of field names (e.g. "Address") to include in API |
| 2387 |
// requests with the JSON null value. By default, fields with empty values are |
| 2388 |
// omitted from API requests. See |
| 2389 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2390 |
NullFields []string `json:"-"` |
| 2391 |
} |
| 2392 |
|
| 2393 |
func (s GoogleCloudServicenetworkingV1ConsumerConfigReservedRange) MarshalJSON() ([]byte, error) { |
| 2394 |
type NoMethod GoogleCloudServicenetworkingV1ConsumerConfigReservedRange |
| 2395 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2396 |
} |
| 2397 |
|
| 2398 |
// GoogleCloudServicenetworkingV1betaConnection: Represents a private |
| 2399 |
// connection resource. A private connection is implemented as a VPC Network |
| 2400 |
// Peering connection between a service producer's VPC network and a service |
| 2401 |
// consumer's VPC network. |
| 2402 |
type GoogleCloudServicenetworkingV1betaConnection struct { |
| 2403 |
// Network: The name of service consumer's VPC network that's connected with |
| 2404 |
// service producer network, in the following format: |
| 2405 |
// `projects/{project}/global/networks/{network}`. `{project}` is a project |
| 2406 |
// number, such as in `12345` that includes the VPC service consumer's VPC |
| 2407 |
// network. `{network}` is the name of the service consumer's VPC network. |
| 2408 |
Network string `json:"network,omitempty"` |
| 2409 |
// Peering: Output only. The name of the VPC Network Peering connection that |
| 2410 |
// was created by the service producer. |
| 2411 |
Peering string `json:"peering,omitempty"` |
| 2412 |
// ReservedPeeringRanges: The name of one or more allocated IP address ranges |
| 2413 |
// for this service producer of type `PEERING`. Note that invoking this method |
| 2414 |
// with a different range when connection is already established will not |
| 2415 |
// modify already provisioned service producer subnetworks. |
| 2416 |
ReservedPeeringRanges []string `json:"reservedPeeringRanges,omitempty"` |
| 2417 |
// Service: Output only. The name of the peering service that's associated with |
| 2418 |
// this connection, in the following format: `services/{service name}`. |
| 2419 |
Service string `json:"service,omitempty"` |
| 2420 |
// ForceSendFields is a list of field names (e.g. "Network") to unconditionally |
| 2421 |
// include in API requests. By default, fields with empty or default values are |
| 2422 |
// omitted from API requests. See |
| 2423 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2424 |
// details. |
| 2425 |
ForceSendFields []string `json:"-"` |
| 2426 |
// NullFields is a list of field names (e.g. "Network") to include in API |
| 2427 |
// requests with the JSON null value. By default, fields with empty values are |
| 2428 |
// omitted from API requests. See |
| 2429 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2430 |
NullFields []string `json:"-"` |
| 2431 |
} |
| 2432 |
|
| 2433 |
func (s GoogleCloudServicenetworkingV1betaConnection) MarshalJSON() ([]byte, error) { |
| 2434 |
type NoMethod GoogleCloudServicenetworkingV1betaConnection |
| 2435 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2436 |
} |
| 2437 |
|
| 2438 |
// GoogleCloudServicenetworkingV1betaSubnetwork: Represents a subnet that was |
| 2439 |
// created or discovered by a private access management service. |
| 2440 |
type GoogleCloudServicenetworkingV1betaSubnetwork struct { |
| 2441 |
// IpCidrRange: Subnetwork CIDR range in `10.x.x.x/y` format. |
| 2442 |
IpCidrRange string `json:"ipCidrRange,omitempty"` |
| 2443 |
// Name: Subnetwork name. See https://cloud.google.com/compute/docs/vpc/ |
| 2444 |
Name string `json:"name,omitempty"` |
| 2445 |
// Network: In the Shared VPC host project, the VPC network that's peered with |
| 2446 |
// the consumer network. For example: |
| 2447 |
// `projects/1234321/global/networks/host-network` |
| 2448 |
Network string `json:"network,omitempty"` |
| 2449 |
// OutsideAllocation: This is a discovered subnet that is not within the |
| 2450 |
// current consumer allocated ranges. |
| 2451 |
OutsideAllocation bool `json:"outsideAllocation,omitempty"` |
| 2452 |
// ForceSendFields is a list of field names (e.g. "IpCidrRange") to |
| 2453 |
// unconditionally include in API requests. By default, fields with empty or |
| 2454 |
// default values are omitted from API requests. See |
| 2455 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2456 |
// details. |
| 2457 |
ForceSendFields []string `json:"-"` |
| 2458 |
// NullFields is a list of field names (e.g. "IpCidrRange") to include in API |
| 2459 |
// requests with the JSON null value. By default, fields with empty values are |
| 2460 |
// omitted from API requests. See |
| 2461 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2462 |
NullFields []string `json:"-"` |
| 2463 |
} |
| 2464 |
|
| 2465 |
func (s GoogleCloudServicenetworkingV1betaSubnetwork) MarshalJSON() ([]byte, error) { |
| 2466 |
type NoMethod GoogleCloudServicenetworkingV1betaSubnetwork |
| 2467 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2468 |
} |
| 2469 |
|
| 2470 |
// Http: Defines the HTTP configuration for an API service. It contains a list |
| 2471 |
// of HttpRule, each specifying the mapping of an RPC method to one or more |
| 2472 |
// HTTP REST API methods. |
| 2473 |
type Http struct { |
| 2474 |
// FullyDecodeReservedExpansion: When set to true, URL path parameters will be |
| 2475 |
// fully URI-decoded except in cases of single segment matches in reserved |
| 2476 |
// expansion, where "%2F" will be left encoded. The default behavior is to not |
| 2477 |
// decode RFC 6570 reserved characters in multi segment matches. |
| 2478 |
FullyDecodeReservedExpansion bool `json:"fullyDecodeReservedExpansion,omitempty"` |
| 2479 |
// Rules: A list of HTTP configuration rules that apply to individual API |
| 2480 |
// methods. **NOTE:** All service configuration rules follow "last one wins" |
| 2481 |
// order. |
| 2482 |
Rules []*HttpRule `json:"rules,omitempty"` |
| 2483 |
// ForceSendFields is a list of field names (e.g. |
| 2484 |
// "FullyDecodeReservedExpansion") to unconditionally include in API requests. |
| 2485 |
// By default, fields with empty or default values are omitted from API |
| 2486 |
// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields |
| 2487 |
// for more details. |
| 2488 |
ForceSendFields []string `json:"-"` |
| 2489 |
// NullFields is a list of field names (e.g. "FullyDecodeReservedExpansion") to |
| 2490 |
// include in API requests with the JSON null value. By default, fields with |
| 2491 |
// empty values are omitted from API requests. See |
| 2492 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2493 |
NullFields []string `json:"-"` |
| 2494 |
} |
| 2495 |
|
| 2496 |
func (s Http) MarshalJSON() ([]byte, error) { |
| 2497 |
type NoMethod Http |
| 2498 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2499 |
} |
| 2500 |
|
| 2501 |
// HttpRule: gRPC Transcoding gRPC Transcoding is a feature for mapping between |
| 2502 |
// a gRPC method and one or more HTTP REST endpoints. It allows developers to |
| 2503 |
// build a single API service that supports both gRPC APIs and REST APIs. Many |
| 2504 |
// systems, including Google APIs (https://github.com/googleapis/googleapis), |
| 2505 |
// Cloud Endpoints (https://cloud.google.com/endpoints), gRPC Gateway |
| 2506 |
// (https://github.com/grpc-ecosystem/grpc-gateway), and Envoy |
| 2507 |
// (https://github.com/envoyproxy/envoy) proxy support this feature and use it |
| 2508 |
// for large scale production services. `HttpRule` defines the schema of the |
| 2509 |
// gRPC/REST mapping. The mapping specifies how different portions of the gRPC |
| 2510 |
// request message are mapped to the URL path, URL query parameters, and HTTP |
| 2511 |
// request body. It also controls how the gRPC response message is mapped to |
| 2512 |
// the HTTP response body. `HttpRule` is typically specified as an |
| 2513 |
// `google.api.http` annotation on the gRPC method. Each mapping specifies a |
| 2514 |
// URL path template and an HTTP method. The path template may refer to one or |
| 2515 |
// more fields in the gRPC request message, as long as each field is a |
| 2516 |
// non-repeated field with a primitive (non-message) type. The path template |
| 2517 |
// controls how fields of the request message are mapped to the URL path. |
| 2518 |
// Example: service Messaging { rpc GetMessage(GetMessageRequest) returns |
| 2519 |
// (Message) { option (google.api.http) = { get: "/v1/{name=messages/*}" }; } } |
| 2520 |
// message GetMessageRequest { string name = 1; // Mapped to URL path. } |
| 2521 |
// message Message { string text = 1; // The resource content. } This enables |
| 2522 |
// an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - |
| 2523 |
// gRPC: `GetMessage(name: "messages/123456")` Any fields in the request |
| 2524 |
// message which are not bound by the path template automatically become HTTP |
| 2525 |
// query parameters if there is no HTTP request body. For example: service |
| 2526 |
// Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option |
| 2527 |
// (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message |
| 2528 |
// GetMessageRequest { message SubMessage { string subfield = 1; } string |
| 2529 |
// message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL |
| 2530 |
// query parameter `revision`. SubMessage sub = 3; // Mapped to URL query |
| 2531 |
// parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as |
| 2532 |
// below: - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` - gRPC: |
| 2533 |
// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: |
| 2534 |
// "foo"))` Note that fields which are mapped to URL query parameters must have |
| 2535 |
// a primitive type or a repeated primitive type or a non-repeated message |
| 2536 |
// type. In the case of a repeated type, the parameter can be repeated in the |
| 2537 |
// URL as `...?param=A¶m=B`. In the case of a message type, each field of |
| 2538 |
// the message is mapped to a separate parameter, such as |
| 2539 |
// `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, |
| 2540 |
// the `body` field specifies the mapping. Consider a REST update method on the |
| 2541 |
// message resource collection: service Messaging { rpc |
| 2542 |
// UpdateMessage(UpdateMessageRequest) returns (Message) { option |
| 2543 |
// (google.api.http) = { patch: "/v1/messages/{message_id}" body: "message" }; |
| 2544 |
// } } message UpdateMessageRequest { string message_id = 1; // mapped to the |
| 2545 |
// URL Message message = 2; // mapped to the body } The following HTTP JSON to |
| 2546 |
// RPC mapping is enabled, where the representation of the JSON in the request |
| 2547 |
// body is determined by protos JSON encoding: - HTTP: `PATCH |
| 2548 |
// /v1/messages/123456 { "text": "Hi!" }` - gRPC: `UpdateMessage(message_id: |
| 2549 |
// "123456" message { text: "Hi!" })` The special name `*` can be used in the |
| 2550 |
// body mapping to define that every field not bound by the path template |
| 2551 |
// should be mapped to the request body. This enables the following alternative |
| 2552 |
// definition of the update method: service Messaging { rpc |
| 2553 |
// UpdateMessage(Message) returns (Message) { option (google.api.http) = { |
| 2554 |
// patch: "/v1/messages/{message_id}" body: "*" }; } } message Message { string |
| 2555 |
// message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is |
| 2556 |
// enabled: - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - gRPC: |
| 2557 |
// `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using `*` |
| 2558 |
// in the body mapping, it is not possible to have HTTP parameters, as all |
| 2559 |
// fields not bound by the path end in the body. This makes this option more |
| 2560 |
// rarely used in practice when defining REST APIs. The common usage of `*` is |
| 2561 |
// in custom methods which don't use the URL at all for transferring data. It |
| 2562 |
// is possible to define multiple HTTP methods for one RPC by using the |
| 2563 |
// `additional_bindings` option. Example: service Messaging { rpc |
| 2564 |
// GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = |
| 2565 |
// { get: "/v1/messages/{message_id}" additional_bindings { get: |
| 2566 |
// "/v1/users/{user_id}/messages/{message_id}" } }; } } message |
| 2567 |
// GetMessageRequest { string message_id = 1; string user_id = 2; } This |
| 2568 |
// enables the following two alternative HTTP JSON to RPC mappings: - HTTP: |
| 2569 |
// `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: "123456")` - HTTP: |
| 2570 |
// `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: "me" |
| 2571 |
// message_id: "123456")` Rules for HTTP mapping 1. Leaf request fields |
| 2572 |
// (recursive expansion nested messages in the request message) are classified |
| 2573 |
// into three categories: - Fields referred by the path template. They are |
| 2574 |
// passed via the URL path. - Fields referred by the HttpRule.body. They are |
| 2575 |
// passed via the HTTP request body. - All other fields are passed via the URL |
| 2576 |
// query parameters, and the parameter name is the field path in the request |
| 2577 |
// message. A repeated field can be represented as multiple query parameters |
| 2578 |
// under the same name. 2. If HttpRule.body is "*", there is no URL query |
| 2579 |
// parameter, all fields are passed via URL path and HTTP request body. 3. If |
| 2580 |
// HttpRule.body is omitted, there is no HTTP request body, all fields are |
| 2581 |
// passed via URL path and URL query parameters. Path template syntax Template |
| 2582 |
// = "/" Segments [ Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" |
| 2583 |
// | "**" | LITERAL | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" |
| 2584 |
// ; FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` |
| 2585 |
// matches a single URL path segment. The syntax `**` matches zero or more URL |
| 2586 |
// path segments, which must be the last part of the URL path except the |
| 2587 |
// `Verb`. The syntax `Variable` matches part of the URL path as specified by |
| 2588 |
// its template. A variable template must not contain other variables. If a |
| 2589 |
// variable matches a single path segment, its template may be omitted, e.g. |
| 2590 |
// `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal |
| 2591 |
// text in the URL path. If the `LITERAL` contains any reserved character, such |
| 2592 |
// characters should be percent-encoded before the matching. If a variable |
| 2593 |
// contains exactly one path segment, such as "{var}" or "{var=*}", when |
| 2594 |
// such a variable is expanded into a URL path on the client side, all |
| 2595 |
// characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side |
| 2596 |
// does the reverse decoding. Such variables show up in the Discovery Document |
| 2597 |
// (https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a |
| 2598 |
// variable contains multiple path segments, such as "{var=foo/*}" or |
| 2599 |
// "{var=**}", when such a variable is expanded into a URL path on the client |
| 2600 |
// side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The |
| 2601 |
// server side does the reverse decoding, except "%2F" and "%2f" are left |
| 2602 |
// unchanged. Such variables show up in the Discovery Document |
| 2603 |
// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. |
| 2604 |
// Using gRPC API Service Configuration gRPC API Service Configuration (service |
| 2605 |
// config) is a configuration language for configuring a gRPC service to become |
| 2606 |
// a user-facing product. The service config is simply the YAML representation |
| 2607 |
// of the `google.api.Service` proto message. As an alternative to annotating |
| 2608 |
// your proto file, you can configure gRPC transcoding in your service config |
| 2609 |
// YAML files. You do this by specifying a `HttpRule` that maps the gRPC method |
| 2610 |
// to a REST endpoint, achieving the same effect as the proto annotation. This |
| 2611 |
// can be particularly useful if you have a proto that is reused in multiple |
| 2612 |
// services. Note that any transcoding specified in the service config will |
| 2613 |
// override any matching transcoding configuration in the proto. The following |
| 2614 |
// example selects a gRPC method and applies an `HttpRule` to it: http: rules: |
| 2615 |
// - selector: example.v1.Messaging.GetMessage get: |
| 2616 |
// /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding |
| 2617 |
// is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion |
| 2618 |
// must follow the proto3 specification |
| 2619 |
// (https://developers.google.com/protocol-buffers/docs/proto3#json). While the |
| 2620 |
// single segment variable follows the semantics of RFC 6570 |
| 2621 |
// (https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, |
| 2622 |
// the multi segment variable **does not** follow RFC 6570 Section 3.2.3 |
| 2623 |
// Reserved Expansion. The reason is that the Reserved Expansion does not |
| 2624 |
// expand special characters like `?` and `#`, which would lead to invalid |
| 2625 |
// URLs. As the result, gRPC Transcoding uses a custom encoding for multi |
| 2626 |
// segment variables. The path variables **must not** refer to any repeated or |
| 2627 |
// mapped field, because client libraries are not capable of handling such |
| 2628 |
// variable expansion. The path variables **must not** capture the leading "/" |
| 2629 |
// character. The reason is that the most common use case "{var}" does not |
| 2630 |
// capture the leading "/" character. For consistency, all path variables must |
| 2631 |
// share the same behavior. Repeated message fields must not be mapped to URL |
| 2632 |
// query parameters, because no client library can support such complicated |
| 2633 |
// mapping. If an API needs to use a JSON array for request or response body, |
| 2634 |
// it can map the request or response body to a repeated field. However, some |
| 2635 |
// gRPC Transcoding implementations may not support this feature. |
| 2636 |
type HttpRule struct { |
| 2637 |
// AdditionalBindings: Additional HTTP bindings for the selector. Nested |
| 2638 |
// bindings must not contain an `additional_bindings` field themselves (that |
| 2639 |
// is, the nesting may only be one level deep). |
| 2640 |
AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"` |
| 2641 |
// Body: The name of the request field whose value is mapped to the HTTP |
| 2642 |
// request body, or `*` for mapping all request fields not captured by the path |
| 2643 |
// pattern to the HTTP body, or omitted for not having any HTTP request body. |
| 2644 |
// NOTE: the referred field must be present at the top-level of the request |
| 2645 |
// message type. |
| 2646 |
Body string `json:"body,omitempty"` |
| 2647 |
// Custom: The custom pattern is used for specifying an HTTP method that is not |
| 2648 |
// included in the `pattern` field, such as HEAD, or "*" to leave the HTTP |
| 2649 |
// method unspecified for this rule. The wild-card rule is useful for services |
| 2650 |
// that provide content to Web (HTML) clients. |
| 2651 |
Custom *CustomHttpPattern `json:"custom,omitempty"` |
| 2652 |
// Delete: Maps to HTTP DELETE. Used for deleting a resource. |
| 2653 |
Delete string `json:"delete,omitempty"` |
| 2654 |
// Get: Maps to HTTP GET. Used for listing and getting information about |
| 2655 |
// resources. |
| 2656 |
Get string `json:"get,omitempty"` |
| 2657 |
// Patch: Maps to HTTP PATCH. Used for updating a resource. |
| 2658 |
Patch string `json:"patch,omitempty"` |
| 2659 |
// Post: Maps to HTTP POST. Used for creating a resource or performing an |
| 2660 |
// action. |
| 2661 |
Post string `json:"post,omitempty"` |
| 2662 |
// Put: Maps to HTTP PUT. Used for replacing a resource. |
| 2663 |
Put string `json:"put,omitempty"` |
| 2664 |
// ResponseBody: Optional. The name of the response field whose value is mapped |
| 2665 |
// to the HTTP response body. When omitted, the entire response message will be |
| 2666 |
// used as the HTTP response body. NOTE: The referred field must be present at |
| 2667 |
// the top-level of the response message type. |
| 2668 |
ResponseBody string `json:"responseBody,omitempty"` |
| 2669 |
// Selector: Selects a method to which this rule applies. Refer to selector for |
| 2670 |
// syntax details. |
| 2671 |
Selector string `json:"selector,omitempty"` |
| 2672 |
// ForceSendFields is a list of field names (e.g. "AdditionalBindings") to |
| 2673 |
// unconditionally include in API requests. By default, fields with empty or |
| 2674 |
// default values are omitted from API requests. See |
| 2675 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2676 |
// details. |
| 2677 |
ForceSendFields []string `json:"-"` |
| 2678 |
// NullFields is a list of field names (e.g. "AdditionalBindings") to include |
| 2679 |
// in API requests with the JSON null value. By default, fields with empty |
| 2680 |
// values are omitted from API requests. See |
| 2681 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2682 |
NullFields []string `json:"-"` |
| 2683 |
} |
| 2684 |
|
| 2685 |
func (s HttpRule) MarshalJSON() ([]byte, error) { |
| 2686 |
type NoMethod HttpRule |
| 2687 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2688 |
} |
| 2689 |
|
| 2690 |
// JavaSettings: Settings for Java client libraries. |
| 2691 |
type JavaSettings struct { |
| 2692 |
// Common: Some settings. |
| 2693 |
Common *CommonLanguageSettings `json:"common,omitempty"` |
| 2694 |
// LibraryPackage: The package name to use in Java. Clobbers the java_package |
| 2695 |
// option set in the protobuf. This should be used **only** by APIs who have |
| 2696 |
// already set the language_settings.java.package_name" field in gapic.yaml. |
| 2697 |
// API teams should use the protobuf java_package option where possible. |
| 2698 |
// Example of a YAML configuration:: publishing: library_settings: |
| 2699 |
// java_settings: library_package: com.google.cloud.pubsub.v1 |
| 2700 |
LibraryPackage string `json:"libraryPackage,omitempty"` |
| 2701 |
// ServiceClassNames: Configure the Java class name to use instead of the |
| 2702 |
// service's for its corresponding generated GAPIC client. Keys are |
| 2703 |
// fully-qualified service names as they appear in the protobuf (including the |
| 2704 |
// full the language_settings.java.interface_names" field in gapic.yaml. API |
| 2705 |
// teams should otherwise use the service name as it appears in the protobuf. |
| 2706 |
// Example of a YAML configuration:: publishing: java_settings: |
| 2707 |
// service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - |
| 2708 |
// google.pubsub.v1.Subscriber: SubscriptionAdmin |
| 2709 |
ServiceClassNames map[string]string `json:"serviceClassNames,omitempty"` |
| 2710 |
// ForceSendFields is a list of field names (e.g. "Common") to unconditionally |
| 2711 |
// include in API requests. By default, fields with empty or default values are |
| 2712 |
// omitted from API requests. See |
| 2713 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2714 |
// details. |
| 2715 |
ForceSendFields []string `json:"-"` |
| 2716 |
// NullFields is a list of field names (e.g. "Common") to include in API |
| 2717 |
// requests with the JSON null value. By default, fields with empty values are |
| 2718 |
// omitted from API requests. See |
| 2719 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2720 |
NullFields []string `json:"-"` |
| 2721 |
} |
| 2722 |
|
| 2723 |
func (s JavaSettings) MarshalJSON() ([]byte, error) { |
| 2724 |
type NoMethod JavaSettings |
| 2725 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2726 |
} |
| 2727 |
|
| 2728 |
// JwtLocation: Specifies a location to extract JWT from an API request. |
| 2729 |
type JwtLocation struct { |
| 2730 |
// Cookie: Specifies cookie name to extract JWT token. |
| 2731 |
Cookie string `json:"cookie,omitempty"` |
| 2732 |
// Header: Specifies HTTP header name to extract JWT token. |
| 2733 |
Header string `json:"header,omitempty"` |
| 2734 |
// Query: Specifies URL query parameter name to extract JWT token. |
| 2735 |
Query string `json:"query,omitempty"` |
| 2736 |
// ValuePrefix: The value prefix. The value format is "value_prefix{token}" |
| 2737 |
// Only applies to "in" header type. Must be empty for "in" query type. If not |
| 2738 |
// empty, the header value has to match (case sensitive) this prefix. If not |
| 2739 |
// matched, JWT will not be extracted. If matched, JWT will be extracted after |
| 2740 |
// the prefix is removed. For example, for "Authorization: Bearer {JWT}", |
| 2741 |
// value_prefix="Bearer " with a space at the end. |
| 2742 |
ValuePrefix string `json:"valuePrefix,omitempty"` |
| 2743 |
// ForceSendFields is a list of field names (e.g. "Cookie") to unconditionally |
| 2744 |
// include in API requests. By default, fields with empty or default values are |
| 2745 |
// omitted from API requests. See |
| 2746 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2747 |
// details. |
| 2748 |
ForceSendFields []string `json:"-"` |
| 2749 |
// NullFields is a list of field names (e.g. "Cookie") to include in API |
| 2750 |
// requests with the JSON null value. By default, fields with empty values are |
| 2751 |
// omitted from API requests. See |
| 2752 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2753 |
NullFields []string `json:"-"` |
| 2754 |
} |
| 2755 |
|
| 2756 |
func (s JwtLocation) MarshalJSON() ([]byte, error) { |
| 2757 |
type NoMethod JwtLocation |
| 2758 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2759 |
} |
| 2760 |
|
| 2761 |
// LabelDescriptor: A description of a label. |
| 2762 |
type LabelDescriptor struct { |
| 2763 |
// Description: A human-readable description for the label. |
| 2764 |
Description string `json:"description,omitempty"` |
| 2765 |
// Key: The label key. |
| 2766 |
Key string `json:"key,omitempty"` |
| 2767 |
// ValueType: The type of data that can be assigned to the label. |
| 2768 |
// |
| 2769 |
// Possible values: |
| 2770 |
// "STRING" - A variable-length string. This is the default. |
| 2771 |
// "BOOL" - Boolean; true or false. |
| 2772 |
// "INT64" - A 64-bit signed integer. |
| 2773 |
ValueType string `json:"valueType,omitempty"` |
| 2774 |
// ForceSendFields is a list of field names (e.g. "Description") to |
| 2775 |
// unconditionally include in API requests. By default, fields with empty or |
| 2776 |
// default values are omitted from API requests. See |
| 2777 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2778 |
// details. |
| 2779 |
ForceSendFields []string `json:"-"` |
| 2780 |
// NullFields is a list of field names (e.g. "Description") to include in API |
| 2781 |
// requests with the JSON null value. By default, fields with empty values are |
| 2782 |
// omitted from API requests. See |
| 2783 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2784 |
NullFields []string `json:"-"` |
| 2785 |
} |
| 2786 |
|
| 2787 |
func (s LabelDescriptor) MarshalJSON() ([]byte, error) { |
| 2788 |
type NoMethod LabelDescriptor |
| 2789 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2790 |
} |
| 2791 |
|
| 2792 |
// ListConnectionsResponse: ListConnectionsResponse is the response to list |
| 2793 |
// peering states for the given service and consumer project. |
| 2794 |
type ListConnectionsResponse struct { |
| 2795 |
// Connections: The list of Connections. |
| 2796 |
Connections []*Connection `json:"connections,omitempty"` |
| 2797 |
|
| 2798 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2799 |
googleapi.ServerResponse `json:"-"` |
| 2800 |
// ForceSendFields is a list of field names (e.g. "Connections") to |
| 2801 |
// unconditionally include in API requests. By default, fields with empty or |
| 2802 |
// default values are omitted from API requests. See |
| 2803 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2804 |
// details. |
| 2805 |
ForceSendFields []string `json:"-"` |
| 2806 |
// NullFields is a list of field names (e.g. "Connections") to include in API |
| 2807 |
// requests with the JSON null value. By default, fields with empty values are |
| 2808 |
// omitted from API requests. See |
| 2809 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2810 |
NullFields []string `json:"-"` |
| 2811 |
} |
| 2812 |
|
| 2813 |
func (s ListConnectionsResponse) MarshalJSON() ([]byte, error) { |
| 2814 |
type NoMethod ListConnectionsResponse |
| 2815 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2816 |
} |
| 2817 |
|
| 2818 |
// ListDnsRecordSetsResponse: Represents all DNS RecordSets associated with the |
| 2819 |
// producer network |
| 2820 |
type ListDnsRecordSetsResponse struct { |
| 2821 |
// DnsRecordSets: DNS record Set Resource |
| 2822 |
DnsRecordSets []*DnsRecordSet `json:"dnsRecordSets,omitempty"` |
| 2823 |
|
| 2824 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2825 |
googleapi.ServerResponse `json:"-"` |
| 2826 |
// ForceSendFields is a list of field names (e.g. "DnsRecordSets") to |
| 2827 |
// unconditionally include in API requests. By default, fields with empty or |
| 2828 |
// default values are omitted from API requests. See |
| 2829 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2830 |
// details. |
| 2831 |
ForceSendFields []string `json:"-"` |
| 2832 |
// NullFields is a list of field names (e.g. "DnsRecordSets") to include in API |
| 2833 |
// requests with the JSON null value. By default, fields with empty values are |
| 2834 |
// omitted from API requests. See |
| 2835 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2836 |
NullFields []string `json:"-"` |
| 2837 |
} |
| 2838 |
|
| 2839 |
func (s ListDnsRecordSetsResponse) MarshalJSON() ([]byte, error) { |
| 2840 |
type NoMethod ListDnsRecordSetsResponse |
| 2841 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2842 |
} |
| 2843 |
|
| 2844 |
// ListDnsZonesResponse: Represents all DNS zones in the shared producer host |
| 2845 |
// project and the matching peering zones in the consumer project. |
| 2846 |
type ListDnsZonesResponse struct { |
| 2847 |
// DnsZonePairs: All pairs of private DNS zones in the shared producer host |
| 2848 |
// project and the matching peering zones in the consumer project.. |
| 2849 |
DnsZonePairs []*DnsZonePair `json:"dnsZonePairs,omitempty"` |
| 2850 |
|
| 2851 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2852 |
googleapi.ServerResponse `json:"-"` |
| 2853 |
// ForceSendFields is a list of field names (e.g. "DnsZonePairs") to |
| 2854 |
// unconditionally include in API requests. By default, fields with empty or |
| 2855 |
// default values are omitted from API requests. See |
| 2856 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2857 |
// details. |
| 2858 |
ForceSendFields []string `json:"-"` |
| 2859 |
// NullFields is a list of field names (e.g. "DnsZonePairs") to include in API |
| 2860 |
// requests with the JSON null value. By default, fields with empty values are |
| 2861 |
// omitted from API requests. See |
| 2862 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2863 |
NullFields []string `json:"-"` |
| 2864 |
} |
| 2865 |
|
| 2866 |
func (s ListDnsZonesResponse) MarshalJSON() ([]byte, error) { |
| 2867 |
type NoMethod ListDnsZonesResponse |
| 2868 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2869 |
} |
| 2870 |
|
| 2871 |
// ListOperationsResponse: The response message for Operations.ListOperations. |
| 2872 |
type ListOperationsResponse struct { |
| 2873 |
// NextPageToken: The standard List next-page token. |
| 2874 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 2875 |
// Operations: A list of operations that matches the specified filter in the |
| 2876 |
// request. |
| 2877 |
Operations []*Operation `json:"operations,omitempty"` |
| 2878 |
// Unreachable: Unordered list. Unreachable resources. Populated when the |
| 2879 |
// request sets `ListOperationsRequest.return_partial_success` and reads across |
| 2880 |
// collections. For example, when attempting to list all resources across all |
| 2881 |
// supported locations. |
| 2882 |
Unreachable []string `json:"unreachable,omitempty"` |
| 2883 |
|
| 2884 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2885 |
googleapi.ServerResponse `json:"-"` |
| 2886 |
// ForceSendFields is a list of field names (e.g. "NextPageToken") to |
| 2887 |
// unconditionally include in API requests. By default, fields with empty or |
| 2888 |
// default values are omitted from API requests. See |
| 2889 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2890 |
// details. |
| 2891 |
ForceSendFields []string `json:"-"` |
| 2892 |
// NullFields is a list of field names (e.g. "NextPageToken") to include in API |
| 2893 |
// requests with the JSON null value. By default, fields with empty values are |
| 2894 |
// omitted from API requests. See |
| 2895 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2896 |
NullFields []string `json:"-"` |
| 2897 |
} |
| 2898 |
|
| 2899 |
func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { |
| 2900 |
type NoMethod ListOperationsResponse |
| 2901 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2902 |
} |
| 2903 |
|
| 2904 |
// ListPeeredDnsDomainsResponse: Response to list peered DNS domains for a |
| 2905 |
// given connection. |
| 2906 |
type ListPeeredDnsDomainsResponse struct { |
| 2907 |
// PeeredDnsDomains: The list of peered DNS domains. |
| 2908 |
PeeredDnsDomains []*PeeredDnsDomain `json:"peeredDnsDomains,omitempty"` |
| 2909 |
|
| 2910 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2911 |
googleapi.ServerResponse `json:"-"` |
| 2912 |
// ForceSendFields is a list of field names (e.g. "PeeredDnsDomains") to |
| 2913 |
// unconditionally include in API requests. By default, fields with empty or |
| 2914 |
// default values are omitted from API requests. See |
| 2915 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2916 |
// details. |
| 2917 |
ForceSendFields []string `json:"-"` |
| 2918 |
// NullFields is a list of field names (e.g. "PeeredDnsDomains") to include in |
| 2919 |
// API requests with the JSON null value. By default, fields with empty values |
| 2920 |
// are omitted from API requests. See |
| 2921 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2922 |
NullFields []string `json:"-"` |
| 2923 |
} |
| 2924 |
|
| 2925 |
func (s ListPeeredDnsDomainsResponse) MarshalJSON() ([]byte, error) { |
| 2926 |
type NoMethod ListPeeredDnsDomainsResponse |
| 2927 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2928 |
} |
| 2929 |
|
| 2930 |
// LogDescriptor: A description of a log type. Example in YAML format: - name: |
| 2931 |
// library.googleapis.com/activity_history description: The history of |
| 2932 |
// borrowing and returning library items. display_name: Activity labels: - key: |
| 2933 |
// /customer_id description: Identifier of a library customer |
| 2934 |
type LogDescriptor struct { |
| 2935 |
// Description: A human-readable description of this log. This information |
| 2936 |
// appears in the documentation and can contain details. |
| 2937 |
Description string `json:"description,omitempty"` |
| 2938 |
// DisplayName: The human-readable name for this log. This information appears |
| 2939 |
// on the user interface and should be concise. |
| 2940 |
DisplayName string `json:"displayName,omitempty"` |
| 2941 |
// Labels: The set of labels that are available to describe a specific log |
| 2942 |
// entry. Runtime requests that contain labels not specified here are |
| 2943 |
// considered invalid. |
| 2944 |
Labels []*LabelDescriptor `json:"labels,omitempty"` |
| 2945 |
// Name: The name of the log. It must be less than 512 characters long and can |
| 2946 |
// include the following characters: upper- and lower-case alphanumeric |
| 2947 |
// characters [A-Za-z0-9], and punctuation characters including slash, |
| 2948 |
// underscore, hyphen, period [/_-.]. |
| 2949 |
Name string `json:"name,omitempty"` |
| 2950 |
// ForceSendFields is a list of field names (e.g. "Description") to |
| 2951 |
// unconditionally include in API requests. By default, fields with empty or |
| 2952 |
// default values are omitted from API requests. See |
| 2953 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2954 |
// details. |
| 2955 |
ForceSendFields []string `json:"-"` |
| 2956 |
// NullFields is a list of field names (e.g. "Description") to include in API |
| 2957 |
// requests with the JSON null value. By default, fields with empty values are |
| 2958 |
// omitted from API requests. See |
| 2959 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2960 |
NullFields []string `json:"-"` |
| 2961 |
} |
| 2962 |
|
| 2963 |
func (s LogDescriptor) MarshalJSON() ([]byte, error) { |
| 2964 |
type NoMethod LogDescriptor |
| 2965 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2966 |
} |
| 2967 |
|
| 2968 |
// Logging: Logging configuration of the service. The following example shows |
| 2969 |
// how to configure logs to be sent to the producer and consumer projects. In |
| 2970 |
// the example, the `activity_history` log is sent to both the producer and |
| 2971 |
// consumer projects, whereas the `purchase_history` log is only sent to the |
| 2972 |
// producer project. monitored_resources: - type: library.googleapis.com/branch |
| 2973 |
// labels: - key: /city description: The city where the library branch is |
| 2974 |
// located in. - key: /name description: The name of the branch. logs: - name: |
| 2975 |
// activity_history labels: - key: /customer_id - name: purchase_history |
| 2976 |
// logging: producer_destinations: - monitored_resource: |
| 2977 |
// library.googleapis.com/branch logs: - activity_history - purchase_history |
| 2978 |
// consumer_destinations: - monitored_resource: library.googleapis.com/branch |
| 2979 |
// logs: - activity_history |
| 2980 |
type Logging struct { |
| 2981 |
// ConsumerDestinations: Logging configurations for sending logs to the |
| 2982 |
// consumer project. There can be multiple consumer destinations, each one must |
| 2983 |
// have a different monitored resource type. A log can be used in at most one |
| 2984 |
// consumer destination. |
| 2985 |
ConsumerDestinations []*LoggingDestination `json:"consumerDestinations,omitempty"` |
| 2986 |
// ProducerDestinations: Logging configurations for sending logs to the |
| 2987 |
// producer project. There can be multiple producer destinations, each one must |
| 2988 |
// have a different monitored resource type. A log can be used in at most one |
| 2989 |
// producer destination. |
| 2990 |
ProducerDestinations []*LoggingDestination `json:"producerDestinations,omitempty"` |
| 2991 |
// ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to |
| 2992 |
// unconditionally include in API requests. By default, fields with empty or |
| 2993 |
// default values are omitted from API requests. See |
| 2994 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2995 |
// details. |
| 2996 |
ForceSendFields []string `json:"-"` |
| 2997 |
// NullFields is a list of field names (e.g. "ConsumerDestinations") to include |
| 2998 |
// in API requests with the JSON null value. By default, fields with empty |
| 2999 |
// values are omitted from API requests. See |
| 3000 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3001 |
NullFields []string `json:"-"` |
| 3002 |
} |
| 3003 |
|
| 3004 |
func (s Logging) MarshalJSON() ([]byte, error) { |
| 3005 |
type NoMethod Logging |
| 3006 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3007 |
} |
| 3008 |
|
| 3009 |
// LoggingDestination: Configuration of a specific logging destination (the |
| 3010 |
// producer project or the consumer project). |
| 3011 |
type LoggingDestination struct { |
| 3012 |
// Logs: Names of the logs to be sent to this destination. Each name must be |
| 3013 |
// defined in the Service.logs section. If the log name is not a domain scoped |
| 3014 |
// name, it will be automatically prefixed with the service name followed by |
| 3015 |
// "/". |
| 3016 |
Logs []string `json:"logs,omitempty"` |
| 3017 |
// MonitoredResource: The monitored resource type. The type must be defined in |
| 3018 |
// the Service.monitored_resources section. |
| 3019 |
MonitoredResource string `json:"monitoredResource,omitempty"` |
| 3020 |
// ForceSendFields is a list of field names (e.g. "Logs") to unconditionally |
| 3021 |
// include in API requests. By default, fields with empty or default values are |
| 3022 |
// omitted from API requests. See |
| 3023 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3024 |
// details. |
| 3025 |
ForceSendFields []string `json:"-"` |
| 3026 |
// NullFields is a list of field names (e.g. "Logs") to include in API requests |
| 3027 |
// with the JSON null value. By default, fields with empty values are omitted |
| 3028 |
// from API requests. See |
| 3029 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3030 |
NullFields []string `json:"-"` |
| 3031 |
} |
| 3032 |
|
| 3033 |
func (s LoggingDestination) MarshalJSON() ([]byte, error) { |
| 3034 |
type NoMethod LoggingDestination |
| 3035 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3036 |
} |
| 3037 |
|
| 3038 |
// LongRunning: Describes settings to use when generating API methods that use |
| 3039 |
// the long-running operation pattern. All default values below are from those |
| 3040 |
// used in the client library generators (e.g. Java |
| 3041 |
// (https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). |
| 3042 |
type LongRunning struct { |
| 3043 |
// InitialPollDelay: Initial delay after which the first poll request will be |
| 3044 |
// made. Default value: 5 seconds. |
| 3045 |
InitialPollDelay string `json:"initialPollDelay,omitempty"` |
| 3046 |
// MaxPollDelay: Maximum time between two subsequent poll requests. Default |
| 3047 |
// value: 45 seconds. |
| 3048 |
MaxPollDelay string `json:"maxPollDelay,omitempty"` |
| 3049 |
// PollDelayMultiplier: Multiplier to gradually increase delay between |
| 3050 |
// subsequent polls until it reaches max_poll_delay. Default value: 1.5. |
| 3051 |
PollDelayMultiplier float64 `json:"pollDelayMultiplier,omitempty"` |
| 3052 |
// TotalPollTimeout: Total polling timeout. Default value: 5 minutes. |
| 3053 |
TotalPollTimeout string `json:"totalPollTimeout,omitempty"` |
| 3054 |
// ForceSendFields is a list of field names (e.g. "InitialPollDelay") to |
| 3055 |
// unconditionally include in API requests. By default, fields with empty or |
| 3056 |
// default values are omitted from API requests. See |
| 3057 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3058 |
// details. |
| 3059 |
ForceSendFields []string `json:"-"` |
| 3060 |
// NullFields is a list of field names (e.g. "InitialPollDelay") to include in |
| 3061 |
// API requests with the JSON null value. By default, fields with empty values |
| 3062 |
// are omitted from API requests. See |
| 3063 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3064 |
NullFields []string `json:"-"` |
| 3065 |
} |
| 3066 |
|
| 3067 |
func (s LongRunning) MarshalJSON() ([]byte, error) { |
| 3068 |
type NoMethod LongRunning |
| 3069 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3070 |
} |
| 3071 |
|
| 3072 |
func (s *LongRunning) UnmarshalJSON(data []byte) error { |
| 3073 |
type NoMethod LongRunning |
| 3074 |
var s1 struct { |
| 3075 |
PollDelayMultiplier gensupport.JSONFloat64 `json:"pollDelayMultiplier"` |
| 3076 |
*NoMethod |
| 3077 |
} |
| 3078 |
s1.NoMethod = (*NoMethod)(s) |
| 3079 |
if err := json.Unmarshal(data, &s1); err != nil { |
| 3080 |
return err |
| 3081 |
} |
| 3082 |
s.PollDelayMultiplier = float64(s1.PollDelayMultiplier) |
| 3083 |
return nil |
| 3084 |
} |
| 3085 |
|
| 3086 |
// Method: Method represents a method of an API interface. New usages of this |
| 3087 |
// message as an alternative to MethodDescriptorProto are strongly discouraged. |
| 3088 |
// This message does not reliability preserve all information necessary to |
| 3089 |
// model the schema and preserve semantics. Instead make use of |
| 3090 |
// FileDescriptorSet which preserves the necessary information. |
| 3091 |
type Method struct { |
| 3092 |
// Edition: The source edition string, only valid when syntax is |
| 3093 |
// SYNTAX_EDITIONS. This field should be ignored, instead the edition should be |
| 3094 |
// inherited from Api. This is similar to Field and EnumValue. |
| 3095 |
Edition string `json:"edition,omitempty"` |
| 3096 |
// Name: The simple name of this method. |
| 3097 |
Name string `json:"name,omitempty"` |
| 3098 |
// Options: Any metadata attached to the method. |
| 3099 |
Options []*Option `json:"options,omitempty"` |
| 3100 |
// RequestStreaming: If true, the request is streamed. |
| 3101 |
RequestStreaming bool `json:"requestStreaming,omitempty"` |
| 3102 |
// RequestTypeUrl: A URL of the input message type. |
| 3103 |
RequestTypeUrl string `json:"requestTypeUrl,omitempty"` |
| 3104 |
// ResponseStreaming: If true, the response is streamed. |
| 3105 |
ResponseStreaming bool `json:"responseStreaming,omitempty"` |
| 3106 |
// ResponseTypeUrl: The URL of the output message type. |
| 3107 |
ResponseTypeUrl string `json:"responseTypeUrl,omitempty"` |
| 3108 |
// Syntax: The source syntax of this method. This field should be ignored, |
| 3109 |
// instead the syntax should be inherited from Api. This is similar to Field |
| 3110 |
// and EnumValue. |
| 3111 |
// |
| 3112 |
// Possible values: |
| 3113 |
// "SYNTAX_PROTO2" - Syntax `proto2`. |
| 3114 |
// "SYNTAX_PROTO3" - Syntax `proto3`. |
| 3115 |
// "SYNTAX_EDITIONS" - Syntax `editions`. |
| 3116 |
Syntax string `json:"syntax,omitempty"` |
| 3117 |
// ForceSendFields is a list of field names (e.g. "Edition") to unconditionally |
| 3118 |
// include in API requests. By default, fields with empty or default values are |
| 3119 |
// omitted from API requests. See |
| 3120 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3121 |
// details. |
| 3122 |
ForceSendFields []string `json:"-"` |
| 3123 |
// NullFields is a list of field names (e.g. "Edition") to include in API |
| 3124 |
// requests with the JSON null value. By default, fields with empty values are |
| 3125 |
// omitted from API requests. See |
| 3126 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3127 |
NullFields []string `json:"-"` |
| 3128 |
} |
| 3129 |
|
| 3130 |
func (s Method) MarshalJSON() ([]byte, error) { |
| 3131 |
type NoMethod Method |
| 3132 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3133 |
} |
| 3134 |
|
| 3135 |
// MethodPolicy: Defines policies applying to an RPC method. |
| 3136 |
type MethodPolicy struct { |
| 3137 |
// RequestPolicies: Policies that are applicable to the request message. |
| 3138 |
RequestPolicies []*FieldPolicy `json:"requestPolicies,omitempty"` |
| 3139 |
// Selector: Selects a method to which these policies should be enforced, for |
| 3140 |
// example, "google.pubsub.v1.Subscriber.CreateSubscription". Refer to selector |
| 3141 |
// for syntax details. NOTE: This field must not be set in the proto |
| 3142 |
// annotation. It will be automatically filled by the service config compiler . |
| 3143 |
Selector string `json:"selector,omitempty"` |
| 3144 |
// ForceSendFields is a list of field names (e.g. "RequestPolicies") to |
| 3145 |
// unconditionally include in API requests. By default, fields with empty or |
| 3146 |
// default values are omitted from API requests. See |
| 3147 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3148 |
// details. |
| 3149 |
ForceSendFields []string `json:"-"` |
| 3150 |
// NullFields is a list of field names (e.g. "RequestPolicies") to include in |
| 3151 |
// API requests with the JSON null value. By default, fields with empty values |
| 3152 |
// are omitted from API requests. See |
| 3153 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3154 |
NullFields []string `json:"-"` |
| 3155 |
} |
| 3156 |
|
| 3157 |
func (s MethodPolicy) MarshalJSON() ([]byte, error) { |
| 3158 |
type NoMethod MethodPolicy |
| 3159 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3160 |
} |
| 3161 |
|
| 3162 |
// MethodSettings: Describes the generator configuration for a method. |
| 3163 |
type MethodSettings struct { |
| 3164 |
// AutoPopulatedFields: List of top-level fields of the request message, that |
| 3165 |
// should be automatically populated by the client libraries based on their |
| 3166 |
// (google.api.field_info).format. Currently supported format: UUID4. Example |
| 3167 |
// of a YAML configuration: publishing: method_settings: - selector: |
| 3168 |
// google.example.v1.ExampleService.CreateExample auto_populated_fields: - |
| 3169 |
// request_id |
| 3170 |
AutoPopulatedFields []string `json:"autoPopulatedFields,omitempty"` |
| 3171 |
// Batching: Batching configuration for an API method in client libraries. |
| 3172 |
// Example of a YAML configuration: publishing: method_settings: - selector: |
| 3173 |
// google.example.v1.ExampleService.BatchCreateExample batching: |
| 3174 |
// element_count_threshold: 1000 request_byte_threshold: 100000000 |
| 3175 |
// delay_threshold_millis: 10 |
| 3176 |
Batching *BatchingConfigProto `json:"batching,omitempty"` |
| 3177 |
// LongRunning: Describes settings to use for long-running operations when |
| 3178 |
// generating API methods for RPCs. Complements RPCs that use the annotations |
| 3179 |
// in google/longrunning/operations.proto. Example of a YAML configuration:: |
| 3180 |
// publishing: method_settings: - selector: |
| 3181 |
// google.cloud.speech.v2.Speech.BatchRecognize long_running: |
| 3182 |
// initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 |
| 3183 |
// max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes |
| 3184 |
LongRunning *LongRunning `json:"longRunning,omitempty"` |
| 3185 |
// Selector: The fully qualified name of the method, for which the options |
| 3186 |
// below apply. This is used to find the method to apply the options. Example: |
| 3187 |
// publishing: method_settings: - selector: |
| 3188 |
// google.storage.control.v2.StorageControl.CreateFolder # method settings for |
| 3189 |
// CreateFolder... |
| 3190 |
Selector string `json:"selector,omitempty"` |
| 3191 |
// ForceSendFields is a list of field names (e.g. "AutoPopulatedFields") to |
| 3192 |
// unconditionally include in API requests. By default, fields with empty or |
| 3193 |
// default values are omitted from API requests. See |
| 3194 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3195 |
// details. |
| 3196 |
ForceSendFields []string `json:"-"` |
| 3197 |
// NullFields is a list of field names (e.g. "AutoPopulatedFields") to include |
| 3198 |
// in API requests with the JSON null value. By default, fields with empty |
| 3199 |
// values are omitted from API requests. See |
| 3200 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3201 |
NullFields []string `json:"-"` |
| 3202 |
} |
| 3203 |
|
| 3204 |
func (s MethodSettings) MarshalJSON() ([]byte, error) { |
| 3205 |
type NoMethod MethodSettings |
| 3206 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3207 |
} |
| 3208 |
|
| 3209 |
// MetricDescriptor: Defines a metric type and its schema. Once a metric |
| 3210 |
// descriptor is created, deleting or altering it stops data collection and |
| 3211 |
// makes the metric type's existing data unusable. |
| 3212 |
type MetricDescriptor struct { |
| 3213 |
// Description: A detailed description of the metric, which can be used in |
| 3214 |
// documentation. |
| 3215 |
Description string `json:"description,omitempty"` |
| 3216 |
// DisplayName: A concise name for the metric, which can be displayed in user |
| 3217 |
// interfaces. Use sentence case without an ending period, for example "Request |
| 3218 |
// count". This field is optional but it is recommended to be set for any |
| 3219 |
// metrics associated with user-visible concepts, such as Quota. |
| 3220 |
DisplayName string `json:"displayName,omitempty"` |
| 3221 |
// Labels: The set of labels that can be used to describe a specific instance |
| 3222 |
// of this metric type. For example, the |
| 3223 |
// `appengine.googleapis.com/http/server/response_latencies` metric type has a |
| 3224 |
// label for the HTTP response code, `response_code`, so you can look at |
| 3225 |
// latencies for successful responses or just for responses that failed. |
| 3226 |
Labels []*LabelDescriptor `json:"labels,omitempty"` |
| 3227 |
// LaunchStage: Optional. The launch stage of the metric definition. |
| 3228 |
// |
| 3229 |
// Possible values: |
| 3230 |
// "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. |
| 3231 |
// "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use |
| 3232 |
// it. |
| 3233 |
// "PRELAUNCH" - Prelaunch features are hidden from users and are only |
| 3234 |
// visible internally. |
| 3235 |
// "EARLY_ACCESS" - Early Access features are limited to a closed group of |
| 3236 |
// testers. To use these features, you must sign up in advance and sign a |
| 3237 |
// Trusted Tester agreement (which includes confidentiality provisions). These |
| 3238 |
// features may be unstable, changed in backward-incompatible ways, and are not |
| 3239 |
// guaranteed to be released. |
| 3240 |
// "ALPHA" - Alpha is a limited availability test for releases before they |
| 3241 |
// are cleared for widespread use. By Alpha, all significant design issues are |
| 3242 |
// resolved and we are in the process of verifying functionality. Alpha |
| 3243 |
// customers need to apply for access, agree to applicable terms, and have |
| 3244 |
// their projects allowlisted. Alpha releases don't have to be feature |
| 3245 |
// complete, no SLAs are provided, and there are no technical support |
| 3246 |
// obligations, but they will be far enough along that customers can actually |
| 3247 |
// use them in test environments or for limited-use tests -- just like they |
| 3248 |
// would in normal production cases. |
| 3249 |
// "BETA" - Beta is the point at which we are ready to open a release for any |
| 3250 |
// customer to use. There are no SLA or technical support obligations in a Beta |
| 3251 |
// release. Products will be complete from a feature perspective, but may have |
| 3252 |
// some open outstanding issues. Beta releases are suitable for limited |
| 3253 |
// production use cases. |
| 3254 |
// "GA" - GA features are open to all developers and are considered stable |
| 3255 |
// and fully qualified for production use. |
| 3256 |
// "DEPRECATED" - Deprecated features are scheduled to be shut down and |
| 3257 |
// removed. For more information, see the "Deprecation Policy" section of our |
| 3258 |
// [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud |
| 3259 |
// Platform Subject to the Deprecation |
| 3260 |
// Policy](https://cloud.google.com/terms/deprecation) documentation. |
| 3261 |
LaunchStage string `json:"launchStage,omitempty"` |
| 3262 |
// Metadata: Optional. Metadata which can be used to guide usage of the metric. |
| 3263 |
Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"` |
| 3264 |
// MetricKind: Whether the metric records instantaneous values, changes to a |
| 3265 |
// value, etc. Some combinations of `metric_kind` and `value_type` might not be |
| 3266 |
// supported. |
| 3267 |
// |
| 3268 |
// Possible values: |
| 3269 |
// "METRIC_KIND_UNSPECIFIED" - Do not use this default value. |
| 3270 |
// "GAUGE" - An instantaneous measurement of a value. |
| 3271 |
// "DELTA" - The change in a value during a time interval. |
| 3272 |
// "CUMULATIVE" - A value accumulated over a time interval. Cumulative |
| 3273 |
// measurements in a time series should have the same start time and increasing |
| 3274 |
// end times, until an event resets the cumulative value to zero and sets a new |
| 3275 |
// start time for the following points. |
| 3276 |
MetricKind string `json:"metricKind,omitempty"` |
| 3277 |
// MonitoredResourceTypes: Read-only. If present, then a time series, which is |
| 3278 |
// identified partially by a metric type and a MonitoredResourceDescriptor, |
| 3279 |
// that is associated with this metric type can only be associated with one of |
| 3280 |
// the monitored resource types listed here. |
| 3281 |
MonitoredResourceTypes []string `json:"monitoredResourceTypes,omitempty"` |
| 3282 |
// Name: The resource name of the metric descriptor. |
| 3283 |
Name string `json:"name,omitempty"` |
| 3284 |
// Type: The metric type, including its DNS name prefix. The type is not |
| 3285 |
// URL-encoded. All user-defined metric types have the DNS name |
| 3286 |
// `custom.googleapis.com` or `external.googleapis.com`. Metric types should |
| 3287 |
// use a natural hierarchical grouping. For example: |
| 3288 |
// "custom.googleapis.com/invoice/paid/amount" |
| 3289 |
// "external.googleapis.com/prometheus/up" |
| 3290 |
// "appengine.googleapis.com/http/server/response_latencies" |
| 3291 |
Type string `json:"type,omitempty"` |
| 3292 |
// Unit: The units in which the metric value is reported. It is only applicable |
| 3293 |
// if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` |
| 3294 |
// defines the representation of the stored metric values. Different systems |
| 3295 |
// might scale the values to be more easily displayed (so a value of `0.02kBy` |
| 3296 |
// _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be |
| 3297 |
// displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of |
| 3298 |
// the metric is always in thousands of bytes, no matter how it might be |
| 3299 |
// displayed. If you want a custom metric to record the exact number of |
| 3300 |
// CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose |
| 3301 |
// `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses |
| 3302 |
// 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if |
| 3303 |
// you want a custom metric to record data in a more granular way, you can |
| 3304 |
// create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then |
| 3305 |
// write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and |
| 3306 |
// write `11.723` (which is `12005/1024`). The supported units are a subset of |
| 3307 |
// The Unified Code for Units of Measure (https://unitsofmeasure.org/ucum.html) |
| 3308 |
// standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * |
| 3309 |
// `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** |
| 3310 |
// * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * |
| 3311 |
// `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * |
| 3312 |
// `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) |
| 3313 |
// * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto |
| 3314 |
// (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` |
| 3315 |
// tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these |
| 3316 |
// connectors: * `/` division or ratio (as an infix operator). For examples, |
| 3317 |
// `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in |
| 3318 |
// a metric `unit`; rates should always be computed at query time from the |
| 3319 |
// underlying cumulative or delta value). * `.` multiplication or composition |
| 3320 |
// (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar |
| 3321 |
// for a unit is as follows: Expression = Component { "." Component } { "/" |
| 3322 |
// Component } ; Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] | |
| 3323 |
// Annotation | "1" ; Annotation = "{" NAME "}" ; Notes: * `Annotation` is just |
| 3324 |
// a comment if it follows a `UNIT`. If the annotation is used alone, then the |
| 3325 |
// unit is equivalent to `1`. For examples, `{request}/s == 1/s`, |
| 3326 |
// `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable |
| 3327 |
// ASCII characters not containing `{` or `}`. * `1` represents a unitary |
| 3328 |
// dimensionless unit (https://en.wikipedia.org/wiki/Dimensionless_quantity) of |
| 3329 |
// 1, such as in `1/s`. It is typically used when none of the basic units are |
| 3330 |
// appropriate. For example, "new users per day" can be represented as `1/d` or |
| 3331 |
// `{new-users}/d` (and a metric value `5` would mean "5 new users). |
| 3332 |
// Alternatively, "thousands of page views per day" would be represented as |
| 3333 |
// `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would |
| 3334 |
// mean "5300 page views per day"). * `%` represents dimensionless value of |
| 3335 |
// 1/100, and annotates values giving a percentage (so the metric values are |
| 3336 |
// typically in the range of 0..100, and a metric value `3` means "3 percent"). |
| 3337 |
// * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1, |
| 3338 |
// that will be multiplied by 100 and displayed as a percentage (so a metric |
| 3339 |
// value `0.03` means "3 percent"). |
| 3340 |
Unit string `json:"unit,omitempty"` |
| 3341 |
// ValueType: Whether the measurement is an integer, a floating-point number, |
| 3342 |
// etc. Some combinations of `metric_kind` and `value_type` might not be |
| 3343 |
// supported. |
| 3344 |
// |
| 3345 |
// Possible values: |
| 3346 |
// "VALUE_TYPE_UNSPECIFIED" - Do not use this default value. |
| 3347 |
// "BOOL" - The value is a boolean. This value type can be used only if the |
| 3348 |
// metric kind is `GAUGE`. |
| 3349 |
// "INT64" - The value is a signed 64-bit integer. |
| 3350 |
// "DOUBLE" - The value is a double precision floating point number. |
| 3351 |
// "STRING" - The value is a text string. This value type can be used only if |
| 3352 |
// the metric kind is `GAUGE`. |
| 3353 |
// "DISTRIBUTION" - The value is a `Distribution`. |
| 3354 |
// "MONEY" - The value is money. |
| 3355 |
ValueType string `json:"valueType,omitempty"` |
| 3356 |
// ForceSendFields is a list of field names (e.g. "Description") to |
| 3357 |
// unconditionally include in API requests. By default, fields with empty or |
| 3358 |
// default values are omitted from API requests. See |
| 3359 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3360 |
// details. |
| 3361 |
ForceSendFields []string `json:"-"` |
| 3362 |
// NullFields is a list of field names (e.g. "Description") to include in API |
| 3363 |
// requests with the JSON null value. By default, fields with empty values are |
| 3364 |
// omitted from API requests. See |
| 3365 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3366 |
NullFields []string `json:"-"` |
| 3367 |
} |
| 3368 |
|
| 3369 |
func (s MetricDescriptor) MarshalJSON() ([]byte, error) { |
| 3370 |
type NoMethod MetricDescriptor |
| 3371 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3372 |
} |
| 3373 |
|
| 3374 |
// MetricDescriptorMetadata: Additional annotations that can be used to guide |
| 3375 |
// the usage of a metric. |
| 3376 |
type MetricDescriptorMetadata struct { |
| 3377 |
// IngestDelay: The delay of data points caused by ingestion. Data points older |
| 3378 |
// than this age are guaranteed to be ingested and available to be read, |
| 3379 |
// excluding data loss due to errors. |
| 3380 |
IngestDelay string `json:"ingestDelay,omitempty"` |
| 3381 |
// LaunchStage: Deprecated. Must use the MetricDescriptor.launch_stage instead. |
| 3382 |
// |
| 3383 |
// Possible values: |
| 3384 |
// "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. |
| 3385 |
// "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use |
| 3386 |
// it. |
| 3387 |
// "PRELAUNCH" - Prelaunch features are hidden from users and are only |
| 3388 |
// visible internally. |
| 3389 |
// "EARLY_ACCESS" - Early Access features are limited to a closed group of |
| 3390 |
// testers. To use these features, you must sign up in advance and sign a |
| 3391 |
// Trusted Tester agreement (which includes confidentiality provisions). These |
| 3392 |
// features may be unstable, changed in backward-incompatible ways, and are not |
| 3393 |
// guaranteed to be released. |
| 3394 |
// "ALPHA" - Alpha is a limited availability test for releases before they |
| 3395 |
// are cleared for widespread use. By Alpha, all significant design issues are |
| 3396 |
// resolved and we are in the process of verifying functionality. Alpha |
| 3397 |
// customers need to apply for access, agree to applicable terms, and have |
| 3398 |
// their projects allowlisted. Alpha releases don't have to be feature |
| 3399 |
// complete, no SLAs are provided, and there are no technical support |
| 3400 |
// obligations, but they will be far enough along that customers can actually |
| 3401 |
// use them in test environments or for limited-use tests -- just like they |
| 3402 |
// would in normal production cases. |
| 3403 |
// "BETA" - Beta is the point at which we are ready to open a release for any |
| 3404 |
// customer to use. There are no SLA or technical support obligations in a Beta |
| 3405 |
// release. Products will be complete from a feature perspective, but may have |
| 3406 |
// some open outstanding issues. Beta releases are suitable for limited |
| 3407 |
// production use cases. |
| 3408 |
// "GA" - GA features are open to all developers and are considered stable |
| 3409 |
// and fully qualified for production use. |
| 3410 |
// "DEPRECATED" - Deprecated features are scheduled to be shut down and |
| 3411 |
// removed. For more information, see the "Deprecation Policy" section of our |
| 3412 |
// [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud |
| 3413 |
// Platform Subject to the Deprecation |
| 3414 |
// Policy](https://cloud.google.com/terms/deprecation) documentation. |
| 3415 |
LaunchStage string `json:"launchStage,omitempty"` |
| 3416 |
// SamplePeriod: The sampling period of metric data points. For metrics which |
| 3417 |
// are written periodically, consecutive data points are stored at this time |
| 3418 |
// interval, excluding data loss due to errors. Metrics with a higher |
| 3419 |
// granularity have a smaller sampling period. |
| 3420 |
SamplePeriod string `json:"samplePeriod,omitempty"` |
| 3421 |
// TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the |
| 3422 |
// metric. |
| 3423 |
// |
| 3424 |
// Possible values: |
| 3425 |
// "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this |
| 3426 |
// default value. |
| 3427 |
// "PROJECT" - Scopes a metric to a project. |
| 3428 |
// "ORGANIZATION" - Scopes a metric to an organization. |
| 3429 |
// "FOLDER" - Scopes a metric to a folder. |
| 3430 |
TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"` |
| 3431 |
// ForceSendFields is a list of field names (e.g. "IngestDelay") to |
| 3432 |
// unconditionally include in API requests. By default, fields with empty or |
| 3433 |
// default values are omitted from API requests. See |
| 3434 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3435 |
// details. |
| 3436 |
ForceSendFields []string `json:"-"` |
| 3437 |
// NullFields is a list of field names (e.g. "IngestDelay") to include in API |
| 3438 |
// requests with the JSON null value. By default, fields with empty values are |
| 3439 |
// omitted from API requests. See |
| 3440 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3441 |
NullFields []string `json:"-"` |
| 3442 |
} |
| 3443 |
|
| 3444 |
func (s MetricDescriptorMetadata) MarshalJSON() ([]byte, error) { |
| 3445 |
type NoMethod MetricDescriptorMetadata |
| 3446 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3447 |
} |
| 3448 |
|
| 3449 |
// MetricRule: Bind API methods to metrics. Binding a method to a metric causes |
| 3450 |
// that metric's configured quota behaviors to apply to the method call. |
| 3451 |
type MetricRule struct { |
| 3452 |
// MetricCosts: Metrics to update when the selected methods are called, and the |
| 3453 |
// associated cost applied to each metric. The key of the map is the metric |
| 3454 |
// name, and the values are the amount increased for the metric against which |
| 3455 |
// the quota limits are defined. The value must not be negative. |
| 3456 |
MetricCosts map[string]string `json:"metricCosts,omitempty"` |
| 3457 |
// Selector: Selects the methods to which this rule applies. Refer to selector |
| 3458 |
// for syntax details. |
| 3459 |
Selector string `json:"selector,omitempty"` |
| 3460 |
// ForceSendFields is a list of field names (e.g. "MetricCosts") to |
| 3461 |
// unconditionally include in API requests. By default, fields with empty or |
| 3462 |
// default values are omitted from API requests. See |
| 3463 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3464 |
// details. |
| 3465 |
ForceSendFields []string `json:"-"` |
| 3466 |
// NullFields is a list of field names (e.g. "MetricCosts") to include in API |
| 3467 |
// requests with the JSON null value. By default, fields with empty values are |
| 3468 |
// omitted from API requests. See |
| 3469 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3470 |
NullFields []string `json:"-"` |
| 3471 |
} |
| 3472 |
|
| 3473 |
func (s MetricRule) MarshalJSON() ([]byte, error) { |
| 3474 |
type NoMethod MetricRule |
| 3475 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3476 |
} |
| 3477 |
|
| 3478 |
// Mixin: Declares an API Interface to be included in this interface. The |
| 3479 |
// including interface must redeclare all the methods from the included |
| 3480 |
// interface, but documentation and options are inherited as follows: - If |
| 3481 |
// after comment and whitespace stripping, the documentation string of the |
| 3482 |
// redeclared method is empty, it will be inherited from the original method. - |
| 3483 |
// Each annotation belonging to the service config (http, visibility) which is |
| 3484 |
// not set in the redeclared method will be inherited. - If an http annotation |
| 3485 |
// is inherited, the path pattern will be modified as follows. Any version |
| 3486 |
// prefix will be replaced by the version of the including interface plus the |
| 3487 |
// root path if specified. Example of a simple mixin: package google.acl.v1; |
| 3488 |
// service AccessControl { // Get the underlying ACL object. rpc |
| 3489 |
// GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = |
| 3490 |
// "/v1/{resource=**}:getAcl"; } } package google.storage.v2; service Storage { |
| 3491 |
// // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc |
| 3492 |
// GetData(GetDataRequest) returns (Data) { option (google.api.http).get = |
| 3493 |
// "/v2/{resource=**}"; } } Example of a mixin configuration: apis: - name: |
| 3494 |
// google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The |
| 3495 |
// mixin construct implies that all methods in `AccessControl` are also |
| 3496 |
// declared with same name and request/response types in `Storage`. A |
| 3497 |
// documentation generator or annotation processor will see the effective |
| 3498 |
// `Storage.GetAcl` method after inheriting documentation and annotations as |
| 3499 |
// follows: service Storage { // Get the underlying ACL object. rpc |
| 3500 |
// GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = |
| 3501 |
// "/v2/{resource=**}:getAcl"; } ... } Note how the version in the path pattern |
| 3502 |
// changed from `v1` to `v2`. If the `root` field in the mixin is specified, it |
| 3503 |
// should be a relative path under which inherited HTTP paths are placed. |
| 3504 |
// Example: apis: - name: google.storage.v2.Storage mixins: - name: |
| 3505 |
// google.acl.v1.AccessControl root: acls This implies the following inherited |
| 3506 |
// HTTP annotation: service Storage { // Get the underlying ACL object. rpc |
| 3507 |
// GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = |
| 3508 |
// "/v2/acls/{resource=**}:getAcl"; } ... } |
| 3509 |
type Mixin struct { |
| 3510 |
// Name: The fully qualified name of the interface which is included. |
| 3511 |
Name string `json:"name,omitempty"` |
| 3512 |
// Root: If non-empty specifies a path under which inherited HTTP paths are |
| 3513 |
// rooted. |
| 3514 |
Root string `json:"root,omitempty"` |
| 3515 |
// ForceSendFields is a list of field names (e.g. "Name") to unconditionally |
| 3516 |
// include in API requests. By default, fields with empty or default values are |
| 3517 |
// omitted from API requests. See |
| 3518 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3519 |
// details. |
| 3520 |
ForceSendFields []string `json:"-"` |
| 3521 |
// NullFields is a list of field names (e.g. "Name") to include in API requests |
| 3522 |
// with the JSON null value. By default, fields with empty values are omitted |
| 3523 |
// from API requests. See |
| 3524 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3525 |
NullFields []string `json:"-"` |
| 3526 |
} |
| 3527 |
|
| 3528 |
func (s Mixin) MarshalJSON() ([]byte, error) { |
| 3529 |
type NoMethod Mixin |
| 3530 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3531 |
} |
| 3532 |
|
| 3533 |
// MonitoredResourceDescriptor: An object that describes the schema of a |
| 3534 |
// MonitoredResource object using a type name and a set of labels. For example, |
| 3535 |
// the monitored resource descriptor for Google Compute Engine VM instances has |
| 3536 |
// a type of "gce_instance" and specifies the use of the labels |
| 3537 |
// "instance_id" and "zone" to identify particular VM instances. Different |
| 3538 |
// APIs can support different monitored resource types. APIs generally provide |
| 3539 |
// a `list` method that returns the monitored resource descriptors used by the |
| 3540 |
// API. |
| 3541 |
type MonitoredResourceDescriptor struct { |
| 3542 |
// Description: Optional. A detailed description of the monitored resource type |
| 3543 |
// that might be used in documentation. |
| 3544 |
Description string `json:"description,omitempty"` |
| 3545 |
// DisplayName: Optional. A concise name for the monitored resource type that |
| 3546 |
// might be displayed in user interfaces. It should be a Title Cased Noun |
| 3547 |
// Phrase, without any article or other determiners. For example, "Google |
| 3548 |
// Cloud SQL Database". |
| 3549 |
DisplayName string `json:"displayName,omitempty"` |
| 3550 |
// Labels: Required. A set of labels used to describe instances of this |
| 3551 |
// monitored resource type. For example, an individual Google Cloud SQL |
| 3552 |
// database is identified by values for the labels "database_id" and |
| 3553 |
// "zone". |
| 3554 |
Labels []*LabelDescriptor `json:"labels,omitempty"` |
| 3555 |
// LaunchStage: Optional. The launch stage of the monitored resource |
| 3556 |
// definition. |
| 3557 |
// |
| 3558 |
// Possible values: |
| 3559 |
// "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. |
| 3560 |
// "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use |
| 3561 |
// it. |
| 3562 |
// "PRELAUNCH" - Prelaunch features are hidden from users and are only |
| 3563 |
// visible internally. |
| 3564 |
// "EARLY_ACCESS" - Early Access features are limited to a closed group of |
| 3565 |
// testers. To use these features, you must sign up in advance and sign a |
| 3566 |
// Trusted Tester agreement (which includes confidentiality provisions). These |
| 3567 |
// features may be unstable, changed in backward-incompatible ways, and are not |
| 3568 |
// guaranteed to be released. |
| 3569 |
// "ALPHA" - Alpha is a limited availability test for releases before they |
| 3570 |
// are cleared for widespread use. By Alpha, all significant design issues are |
| 3571 |
// resolved and we are in the process of verifying functionality. Alpha |
| 3572 |
// customers need to apply for access, agree to applicable terms, and have |
| 3573 |
// their projects allowlisted. Alpha releases don't have to be feature |
| 3574 |
// complete, no SLAs are provided, and there are no technical support |
| 3575 |
// obligations, but they will be far enough along that customers can actually |
| 3576 |
// use them in test environments or for limited-use tests -- just like they |
| 3577 |
// would in normal production cases. |
| 3578 |
// "BETA" - Beta is the point at which we are ready to open a release for any |
| 3579 |
// customer to use. There are no SLA or technical support obligations in a Beta |
| 3580 |
// release. Products will be complete from a feature perspective, but may have |
| 3581 |
// some open outstanding issues. Beta releases are suitable for limited |
| 3582 |
// production use cases. |
| 3583 |
// "GA" - GA features are open to all developers and are considered stable |
| 3584 |
// and fully qualified for production use. |
| 3585 |
// "DEPRECATED" - Deprecated features are scheduled to be shut down and |
| 3586 |
// removed. For more information, see the "Deprecation Policy" section of our |
| 3587 |
// [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud |
| 3588 |
// Platform Subject to the Deprecation |
| 3589 |
// Policy](https://cloud.google.com/terms/deprecation) documentation. |
| 3590 |
LaunchStage string `json:"launchStage,omitempty"` |
| 3591 |
// Name: Optional. The resource name of the monitored resource descriptor: |
| 3592 |
// "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} |
| 3593 |
// is the value of the `type` field in this object and {project_id} is a |
| 3594 |
// project ID that provides API-specific context for accessing the type. APIs |
| 3595 |
// that do not use project information can use the resource name format |
| 3596 |
// "monitoredResourceDescriptors/{type}". |
| 3597 |
Name string `json:"name,omitempty"` |
| 3598 |
// Type: Required. The monitored resource type. For example, the type |
| 3599 |
// "cloudsql_database" represents databases in Google Cloud SQL. For a list |
| 3600 |
// of types, see Monitored resource types |
| 3601 |
// (https://cloud.google.com/monitoring/api/resources) and Logging resource |
| 3602 |
// types (https://cloud.google.com/logging/docs/api/v2/resource-list). |
| 3603 |
Type string `json:"type,omitempty"` |
| 3604 |
// ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) { |
| 3618 |
type NoMethod MonitoredResourceDescriptor |
| 3619 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3620 |
} |
| 3621 |
|
| 3622 |
// Monitoring: Monitoring configuration of the service. The example below shows |
| 3623 |
// how to configure monitored resources and metrics for monitoring. In the |
| 3624 |
// example, a monitored resource and two metrics are defined. The |
| 3625 |
// `library.googleapis.com/book/returned_count` metric is sent to both producer |
| 3626 |
// and consumer projects, whereas the `library.googleapis.com/book/num_overdue` |
| 3627 |
// metric is only sent to the consumer project. monitored_resources: - type: |
| 3628 |
// library.googleapis.com/Branch display_name: "Library Branch" description: "A |
| 3629 |
// branch of a library." launch_stage: GA labels: - key: resource_container |
| 3630 |
// description: "The Cloud container (ie. project id) for the Branch." - key: |
| 3631 |
// location description: "The location of the library branch." - key: branch_id |
| 3632 |
// description: "The id of the branch." metrics: - name: |
| 3633 |
// library.googleapis.com/book/returned_count display_name: "Books Returned" |
| 3634 |
// description: "The count of books that have been returned." launch_stage: GA |
| 3635 |
// metric_kind: DELTA value_type: INT64 unit: "1" labels: - key: customer_id |
| 3636 |
// description: "The id of the customer." - name: |
| 3637 |
// library.googleapis.com/book/num_overdue display_name: "Books Overdue" |
| 3638 |
// description: "The current number of overdue books." launch_stage: GA |
| 3639 |
// metric_kind: GAUGE value_type: INT64 unit: "1" labels: - key: customer_id |
| 3640 |
// description: "The id of the customer." monitoring: producer_destinations: - |
| 3641 |
// monitored_resource: library.googleapis.com/Branch metrics: - |
| 3642 |
// library.googleapis.com/book/returned_count consumer_destinations: - |
| 3643 |
// monitored_resource: library.googleapis.com/Branch metrics: - |
| 3644 |
// library.googleapis.com/book/returned_count - |
| 3645 |
// library.googleapis.com/book/num_overdue |
| 3646 |
type Monitoring struct { |
| 3647 |
// ConsumerDestinations: Monitoring configurations for sending metrics to the |
| 3648 |
// consumer project. There can be multiple consumer destinations. A monitored |
| 3649 |
// resource type may appear in multiple monitoring destinations if different |
| 3650 |
// aggregations are needed for different sets of metrics associated with that |
| 3651 |
// monitored resource type. A monitored resource and metric pair may only be |
| 3652 |
// used once in the Monitoring configuration. |
| 3653 |
ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"` |
| 3654 |
// ProducerDestinations: Monitoring configurations for sending metrics to the |
| 3655 |
// producer project. There can be multiple producer destinations. A monitored |
| 3656 |
// resource type may appear in multiple monitoring destinations if different |
| 3657 |
// aggregations are needed for different sets of metrics associated with that |
| 3658 |
// monitored resource type. A monitored resource and metric pair may only be |
| 3659 |
// used once in the Monitoring configuration. |
| 3660 |
ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"` |
| 3661 |
// ForceSendFields is a list of field names (e.g. "ConsumerDestinations") to |
| 3662 |
// unconditionally include in API requests. By default, fields with empty or |
| 3663 |
// default values are omitted from API requests. See |
| 3664 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3665 |
// details. |
| 3666 |
ForceSendFields []string `json:"-"` |
| 3667 |
// NullFields is a list of field names (e.g. "ConsumerDestinations") to include |
| 3668 |
// in API requests with the JSON null value. By default, fields with empty |
| 3669 |
// values are omitted from API requests. See |
| 3670 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3671 |
NullFields []string `json:"-"` |
| 3672 |
} |
| 3673 |
|
| 3674 |
func (s Monitoring) MarshalJSON() ([]byte, error) { |
| 3675 |
type NoMethod Monitoring |
| 3676 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3677 |
} |
| 3678 |
|
| 3679 |
// MonitoringDestination: Configuration of a specific monitoring destination |
| 3680 |
// (the producer project or the consumer project). |
| 3681 |
type MonitoringDestination struct { |
| 3682 |
// Metrics: Types of the metrics to report to this monitoring destination. Each |
| 3683 |
// type must be defined in Service.metrics section. |
| 3684 |
Metrics []string `json:"metrics,omitempty"` |
| 3685 |
// MonitoredResource: The monitored resource type. The type must be defined in |
| 3686 |
// Service.monitored_resources section. |
| 3687 |
MonitoredResource string `json:"monitoredResource,omitempty"` |
| 3688 |
// ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally |
| 3689 |
// include in API requests. By default, fields with empty or default values are |
| 3690 |
// omitted from API requests. See |
| 3691 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3692 |
// details. |
| 3693 |
ForceSendFields []string `json:"-"` |
| 3694 |
// NullFields is a list of field names (e.g. "Metrics") to include in API |
| 3695 |
// requests with the JSON null value. By default, fields with empty values are |
| 3696 |
// omitted from API requests. See |
| 3697 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3698 |
NullFields []string `json:"-"` |
| 3699 |
} |
| 3700 |
|
| 3701 |
func (s MonitoringDestination) MarshalJSON() ([]byte, error) { |
| 3702 |
type NoMethod MonitoringDestination |
| 3703 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3704 |
} |
| 3705 |
|
| 3706 |
// NodeSettings: Settings for Node client libraries. |
| 3707 |
type NodeSettings struct { |
| 3708 |
// Common: Some settings. |
| 3709 |
Common *CommonLanguageSettings `json:"common,omitempty"` |
| 3710 |
// ForceSendFields is a list of field names (e.g. "Common") to unconditionally |
| 3711 |
// include in API requests. By default, fields with empty or default values are |
| 3712 |
// omitted from API requests. See |
| 3713 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3714 |
// details. |
| 3715 |
ForceSendFields []string `json:"-"` |
| 3716 |
// NullFields is a list of field names (e.g. "Common") to include in API |
| 3717 |
// requests with the JSON null value. By default, fields with empty values are |
| 3718 |
// omitted from API requests. See |
| 3719 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3720 |
NullFields []string `json:"-"` |
| 3721 |
} |
| 3722 |
|
| 3723 |
func (s NodeSettings) MarshalJSON() ([]byte, error) { |
| 3724 |
type NoMethod NodeSettings |
| 3725 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3726 |
} |
| 3727 |
|
| 3728 |
// OAuthRequirements: OAuth scopes are a way to define data and permissions on |
| 3729 |
// data. For example, there are scopes defined for "Read-only access to Google |
| 3730 |
// Calendar" and "Access to Cloud Platform". Users can consent to a scope for |
| 3731 |
// an application, giving it permission to access that data on their behalf. |
| 3732 |
// OAuth scope specifications should be fairly coarse grained; a user will need |
| 3733 |
// to see and understand the text description of what your scope means. In most |
| 3734 |
// cases: use one or at most two OAuth scopes for an entire family of products. |
| 3735 |
// If your product has multiple APIs, you should probably be sharing the OAuth |
| 3736 |
// scope across all of those APIs. When you need finer grained OAuth consent |
| 3737 |
// screens: talk with your product management about how developers will use |
| 3738 |
// them in practice. Please note that even though each of the canonical scopes |
| 3739 |
// is enough for a request to be accepted and passed to the backend, a request |
| 3740 |
// can still fail due to the backend requiring additional scopes or |
| 3741 |
// permissions. |
| 3742 |
type OAuthRequirements struct { |
| 3743 |
// CanonicalScopes: The list of publicly documented OAuth scopes that are |
| 3744 |
// allowed access. An OAuth token containing any of these scopes will be |
| 3745 |
// accepted. Example: canonical_scopes: |
| 3746 |
// https://www.googleapis.com/auth/calendar, |
| 3747 |
// https://www.googleapis.com/auth/calendar.read |
| 3748 |
CanonicalScopes string `json:"canonicalScopes,omitempty"` |
| 3749 |
// ForceSendFields is a list of field names (e.g. "CanonicalScopes") to |
| 3750 |
// unconditionally include in API requests. By default, fields with empty or |
| 3751 |
// default values are omitted from API requests. See |
| 3752 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3753 |
// details. |
| 3754 |
ForceSendFields []string `json:"-"` |
| 3755 |
// NullFields is a list of field names (e.g. "CanonicalScopes") to include in |
| 3756 |
// API requests with the JSON null value. By default, fields with empty values |
| 3757 |
// are omitted from API requests. See |
| 3758 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3759 |
NullFields []string `json:"-"` |
| 3760 |
} |
| 3761 |
|
| 3762 |
func (s OAuthRequirements) MarshalJSON() ([]byte, error) { |
| 3763 |
type NoMethod OAuthRequirements |
| 3764 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3765 |
} |
| 3766 |
|
| 3767 |
// Operation: This resource represents a long-running operation that is the |
| 3768 |
// result of a network API call. |
| 3769 |
type Operation struct { |
| 3770 |
// Done: If the value is `false`, it means the operation is still in progress. |
| 3771 |
// If `true`, the operation is completed, and either `error` or `response` is |
| 3772 |
// available. |
| 3773 |
Done bool `json:"done,omitempty"` |
| 3774 |
// Error: The error result of the operation in case of failure or cancellation. |
| 3775 |
Error *Status `json:"error,omitempty"` |
| 3776 |
// Metadata: Service-specific metadata associated with the operation. It |
| 3777 |
// typically contains progress information and common metadata such as create |
| 3778 |
// time. Some services might not provide such metadata. Any method that returns |
| 3779 |
// a long-running operation should document the metadata type, if any. |
| 3780 |
Metadata googleapi.RawMessage `json:"metadata,omitempty"` |
| 3781 |
// Name: The server-assigned name, which is only unique within the same service |
| 3782 |
// that originally returns it. If you use the default HTTP mapping, the `name` |
| 3783 |
// should be a resource name ending with `operations/{unique_id}`. |
| 3784 |
Name string `json:"name,omitempty"` |
| 3785 |
// Response: The normal, successful response of the operation. If the original |
| 3786 |
// method returns no data on success, such as `Delete`, the response is |
| 3787 |
// `google.protobuf.Empty`. If the original method is standard |
| 3788 |
// `Get`/`Create`/`Update`, the response should be the resource. For other |
| 3789 |
// methods, the response should have the type `XxxResponse`, where `Xxx` is the |
| 3790 |
// original method name. For example, if the original method name is |
| 3791 |
// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| 3792 |
Response googleapi.RawMessage `json:"response,omitempty"` |
| 3793 |
|
| 3794 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3795 |
googleapi.ServerResponse `json:"-"` |
| 3796 |
// ForceSendFields is a list of field names (e.g. "Done") to unconditionally |
| 3797 |
// include in API requests. By default, fields with empty or default values are |
| 3798 |
// omitted from API requests. See |
| 3799 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3800 |
// details. |
| 3801 |
ForceSendFields []string `json:"-"` |
| 3802 |
// NullFields is a list of field names (e.g. "Done") to include in API requests |
| 3803 |
// with the JSON null value. By default, fields with empty values are omitted |
| 3804 |
// from API requests. See |
| 3805 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3806 |
NullFields []string `json:"-"` |
| 3807 |
} |
| 3808 |
|
| 3809 |
func (s Operation) MarshalJSON() ([]byte, error) { |
| 3810 |
type NoMethod Operation |
| 3811 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3812 |
} |
| 3813 |
|
| 3814 |
// Option: A protocol buffer option, which can be attached to a message, field, |
| 3815 |
// enumeration, etc. New usages of this message as an alternative to |
| 3816 |
// FileOptions, MessageOptions, FieldOptions, EnumOptions, EnumValueOptions, |
| 3817 |
// ServiceOptions, or MethodOptions are strongly discouraged. |
| 3818 |
type Option struct { |
| 3819 |
// Name: The option's name. For protobuf built-in options (options defined in |
| 3820 |
// descriptor.proto), this is the short name. For example, "map_entry". For |
| 3821 |
// custom options, it should be the fully-qualified name. For example, |
| 3822 |
// "google.api.http". |
| 3823 |
Name string `json:"name,omitempty"` |
| 3824 |
// Value: The option's value packed in an Any message. If the value is a |
| 3825 |
// primitive, the corresponding wrapper type defined in |
| 3826 |
// google/protobuf/wrappers.proto should be used. If the value is an enum, it |
| 3827 |
// should be stored as an int32 value using the google.protobuf.Int32Value |
| 3828 |
// type. |
| 3829 |
Value googleapi.RawMessage `json:"value,omitempty"` |
| 3830 |
// ForceSendFields is a list of field names (e.g. "Name") to unconditionally |
| 3831 |
// include in API requests. By default, fields with empty or default values are |
| 3832 |
// omitted from API requests. See |
| 3833 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3834 |
// details. |
| 3835 |
ForceSendFields []string `json:"-"` |
| 3836 |
// NullFields is a list of field names (e.g. "Name") to include in API requests |
| 3837 |
// with the JSON null value. By default, fields with empty values are omitted |
| 3838 |
// from API requests. See |
| 3839 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3840 |
NullFields []string `json:"-"` |
| 3841 |
} |
| 3842 |
|
| 3843 |
func (s Option) MarshalJSON() ([]byte, error) { |
| 3844 |
type NoMethod Option |
| 3845 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3846 |
} |
| 3847 |
|
| 3848 |
// Page: Represents a documentation page. A page can contain subpages to |
| 3849 |
// represent nested documentation set structure. |
| 3850 |
type Page struct { |
| 3851 |
// Content: The Markdown content of the page. You can use ```(== include {path} |
| 3852 |
// ==)``` to include content from a Markdown file. The content can be used to |
| 3853 |
// produce the documentation page such as HTML format page. |
| 3854 |
Content string `json:"content,omitempty"` |
| 3855 |
// Name: The name of the page. It will be used as an identity of the page to |
| 3856 |
// generate URI of the page, text of the link to this page in navigation, etc. |
| 3857 |
// The full page name (start from the root page name to this page concatenated |
| 3858 |
// with `.`) can be used as reference to the page in your documentation. For |
| 3859 |
// example: pages: - name: Tutorial content: (== include tutorial.md ==) |
| 3860 |
// subpages: - name: Java content: (== include tutorial_java.md ==) You can |
| 3861 |
// reference `Java` page using Markdown reference link syntax: `Java`. |
| 3862 |
Name string `json:"name,omitempty"` |
| 3863 |
// Subpages: Subpages of this page. The order of subpages specified here will |
| 3864 |
// be honored in the generated docset. |
| 3865 |
Subpages []*Page `json:"subpages,omitempty"` |
| 3866 |
// ForceSendFields is a list of field names (e.g. "Content") to unconditionally |
| 3867 |
// include in API requests. By default, fields with empty or default values are |
| 3868 |
// omitted from API requests. See |
| 3869 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3870 |
// details. |
| 3871 |
ForceSendFields []string `json:"-"` |
| 3872 |
// NullFields is a list of field names (e.g. "Content") to include in API |
| 3873 |
// requests with the JSON null value. By default, fields with empty values are |
| 3874 |
// omitted from API requests. See |
| 3875 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3876 |
NullFields []string `json:"-"` |
| 3877 |
} |
| 3878 |
|
| 3879 |
func (s Page) MarshalJSON() ([]byte, error) { |
| 3880 |
type NoMethod Page |
| 3881 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3882 |
} |
| 3883 |
|
| 3884 |
// PartialDeleteConnectionMetadata: Metadata provided through GetOperation |
| 3885 |
// request for the LRO generated by Partial Delete Connection API |
| 3886 |
type PartialDeleteConnectionMetadata struct { |
| 3887 |
} |
| 3888 |
|
| 3889 |
// PeeredDnsDomain: DNS domain suffix for which requests originating in the |
| 3890 |
// producer VPC network are resolved in the associated consumer VPC network. |
| 3891 |
type PeeredDnsDomain struct { |
| 3892 |
// DnsSuffix: The DNS domain name suffix e.g. `example.com.`. Cloud DNS |
| 3893 |
// requires that a DNS suffix ends with a trailing dot. |
| 3894 |
DnsSuffix string `json:"dnsSuffix,omitempty"` |
| 3895 |
// Name: Required. User assigned name for this resource. Must be unique within |
| 3896 |
// the consumer network. The name must be 1-63 characters long, must begin with |
| 3897 |
// a letter, end with a letter or digit, and only contain lowercase letters, |
| 3898 |
// digits or dashes. |
| 3899 |
Name string `json:"name,omitempty"` |
| 3900 |
// ForceSendFields is a list of field names (e.g. "DnsSuffix") to |
| 3901 |
// unconditionally include in API requests. By default, fields with empty or |
| 3902 |
// default values are omitted from API requests. See |
| 3903 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3904 |
// details. |
| 3905 |
ForceSendFields []string `json:"-"` |
| 3906 |
// NullFields is a list of field names (e.g. "DnsSuffix") to include in API |
| 3907 |
// requests with the JSON null value. By default, fields with empty values are |
| 3908 |
// omitted from API requests. See |
| 3909 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3910 |
NullFields []string `json:"-"` |
| 3911 |
} |
| 3912 |
|
| 3913 |
func (s PeeredDnsDomain) MarshalJSON() ([]byte, error) { |
| 3914 |
type NoMethod PeeredDnsDomain |
| 3915 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3916 |
} |
| 3917 |
|
| 3918 |
// PeeredDnsDomainMetadata: Metadata provided through GetOperation request for |
| 3919 |
// the LRO generated by CreatePeeredDnsDomain API. |
| 3920 |
type PeeredDnsDomainMetadata struct { |
| 3921 |
} |
| 3922 |
|
| 3923 |
// PhpSettings: Settings for Php client libraries. |
| 3924 |
type PhpSettings struct { |
| 3925 |
// Common: Some settings. |
| 3926 |
Common *CommonLanguageSettings `json:"common,omitempty"` |
| 3927 |
// LibraryPackage: The package name to use in Php. Clobbers the php_namespace |
| 3928 |
// option set in the protobuf. This should be used **only** by APIs who have |
| 3929 |
// already set the language_settings.php.package_name" field in gapic.yaml. API |
| 3930 |
// teams should use the protobuf php_namespace option where possible. Example |
| 3931 |
// of a YAML configuration:: publishing: library_settings: php_settings: |
| 3932 |
// library_package: Google\Cloud\PubSub\V1 |
| 3933 |
LibraryPackage string `json:"libraryPackage,omitempty"` |
| 3934 |
// ForceSendFields is a list of field names (e.g. "Common") to unconditionally |
| 3935 |
// include in API requests. By default, fields with empty or default values are |
| 3936 |
// omitted from API requests. See |
| 3937 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3938 |
// details. |
| 3939 |
ForceSendFields []string `json:"-"` |
| 3940 |
// NullFields is a list of field names (e.g. "Common") to include in API |
| 3941 |
// requests with the JSON null value. By default, fields with empty values are |
| 3942 |
// omitted from API requests. See |
| 3943 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3944 |
NullFields []string `json:"-"` |
| 3945 |
} |
| 3946 |
|
| 3947 |
func (s PhpSettings) MarshalJSON() ([]byte, error) { |
| 3948 |
type NoMethod PhpSettings |
| 3949 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3950 |
} |
| 3951 |
|
| 3952 |
// PolicyBinding: Grouping of IAM role and IAM member. |
| 3953 |
type PolicyBinding struct { |
| 3954 |
// Member: Required. Member to bind the role with. See |
| 3955 |
// /iam/docs/reference/rest/v1/Policy#Binding for how to format each member. |
| 3956 |
// Eg. - user:[email protected] - |
| 3957 |
// serviceAccount:[email protected] |
| 3958 |
Member string `json:"member,omitempty"` |
| 3959 |
// Role: Required. Role to apply. Only allowlisted roles can be used at the |
| 3960 |
// specified granularity. The role must be one of the following: - |
| 3961 |
// 'roles/container.hostServiceAgentUser' applied on the shared VPC host |
| 3962 |
// project - 'roles/compute.securityAdmin' applied on the shared VPC host |
| 3963 |
// project - 'roles/compute.networkAdmin' applied on the shared VPC host |
| 3964 |
// project - 'roles/tpu.xpnAgent' applied on the shared VPC host project - |
| 3965 |
// 'roles/dns.admin' applied on the shared VPC host project - |
| 3966 |
// 'roles/logging.admin' applied on the shared VPC host project - |
| 3967 |
// 'roles/monitoring.viewer' applied on the shared VPC host project - |
| 3968 |
// 'roles/servicemanagement.quotaViewer' applied on the shared VPC host project |
| 3969 |
Role string `json:"role,omitempty"` |
| 3970 |
// ForceSendFields is a list of field names (e.g. "Member") to unconditionally |
| 3971 |
// include in API requests. By default, fields with empty or default values are |
| 3972 |
// omitted from API requests. See |
| 3973 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3974 |
// details. |
| 3975 |
ForceSendFields []string `json:"-"` |
| 3976 |
// NullFields is a list of field names (e.g. "Member") to include in API |
| 3977 |
// requests with the JSON null value. By default, fields with empty values are |
| 3978 |
// omitted from API requests. See |
| 3979 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3980 |
NullFields []string `json:"-"` |
| 3981 |
} |
| 3982 |
|
| 3983 |
func (s PolicyBinding) MarshalJSON() ([]byte, error) { |
| 3984 |
type NoMethod PolicyBinding |
| 3985 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3986 |
} |
| 3987 |
|
| 3988 |
// Publishing: This message configures the settings for publishing Google Cloud |
| 3989 |
// Client libraries (https://cloud.google.com/apis/docs/cloud-client-libraries) |
| 3990 |
// generated from the service config. |
| 3991 |
type Publishing struct { |
| 3992 |
// ApiShortName: Used as a tracking tag when collecting data about the APIs |
| 3993 |
// developer relations artifacts like docs, packages delivered to package |
| 3994 |
// managers, etc. Example: "speech". |
| 3995 |
ApiShortName string `json:"apiShortName,omitempty"` |
| 3996 |
// CodeownerGithubTeams: GitHub teams to be added to CODEOWNERS in the |
| 3997 |
// directory in GitHub containing source code for the client libraries for this |
| 3998 |
// API. |
| 3999 |
CodeownerGithubTeams []string `json:"codeownerGithubTeams,omitempty"` |
| 4000 |
// DocTagPrefix: A prefix used in sample code when demarking regions to be |
| 4001 |
// included in documentation. |
| 4002 |
DocTagPrefix string `json:"docTagPrefix,omitempty"` |
| 4003 |
// DocumentationUri: Link to product home page. Example: |
| 4004 |
// https://cloud.google.com/asset-inventory/docs/overview |
| 4005 |
DocumentationUri string `json:"documentationUri,omitempty"` |
| 4006 |
// GithubLabel: GitHub label to apply to issues and pull requests opened for |
| 4007 |
// this API. |
| 4008 |
GithubLabel string `json:"githubLabel,omitempty"` |
| 4009 |
// LibrarySettings: Client library settings. If the same version string appears |
| 4010 |
// multiple times in this list, then the last one wins. Settings from earlier |
| 4011 |
// settings with the same version string are discarded. |
| 4012 |
LibrarySettings []*ClientLibrarySettings `json:"librarySettings,omitempty"` |
| 4013 |
// MethodSettings: A list of API method settings, e.g. the behavior for methods |
| 4014 |
// that use the long-running operation pattern. |
| 4015 |
MethodSettings []*MethodSettings `json:"methodSettings,omitempty"` |
| 4016 |
// NewIssueUri: Link to a *public* URI where users can report issues. Example: |
| 4017 |
// https://issuetracker.google.com/issues/new?component=190865&template=1161103 |
| 4018 |
NewIssueUri string `json:"newIssueUri,omitempty"` |
| 4019 |
// Organization: For whom the client library is being published. |
| 4020 |
// |
| 4021 |
// Possible values: |
| 4022 |
// "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" - Not useful. |
| 4023 |
// "CLOUD" - Google Cloud Platform Org. |
| 4024 |
// "ADS" - Ads (Advertising) Org. |
| 4025 |
// "PHOTOS" - Photos Org. |
| 4026 |
// "STREET_VIEW" - Street View Org. |
| 4027 |
// "SHOPPING" - Shopping Org. |
| 4028 |
// "GEO" - Geo Org. |
| 4029 |
// "GENERATIVE_AI" - Generative AI - https://developers.generativeai.google |
| 4030 |
// "HEALTH" - Health Org. |
| 4031 |
Organization string `json:"organization,omitempty"` |
| 4032 |
// ProtoReferenceDocumentationUri: Optional link to proto reference |
| 4033 |
// documentation. Example: |
| 4034 |
// https://cloud.google.com/pubsub/lite/docs/reference/rpc |
| 4035 |
ProtoReferenceDocumentationUri string `json:"protoReferenceDocumentationUri,omitempty"` |
| 4036 |
// RestReferenceDocumentationUri: Optional link to REST reference |
| 4037 |
// documentation. Example: |
| 4038 |
// https://cloud.google.com/pubsub/lite/docs/reference/rest |
| 4039 |
RestReferenceDocumentationUri string `json:"restReferenceDocumentationUri,omitempty"` |
| 4040 |
// ForceSendFields is a list of field names (e.g. "ApiShortName") to |
| 4041 |
// unconditionally include in API requests. By default, fields with empty or |
| 4042 |
// default values are omitted from API requests. See |
| 4043 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4044 |
// details. |
| 4045 |
ForceSendFields []string `json:"-"` |
| 4046 |
// NullFields is a list of field names (e.g. "ApiShortName") to include in API |
| 4047 |
// requests with the JSON null value. By default, fields with empty values are |
| 4048 |
// omitted from API requests. See |
| 4049 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4050 |
NullFields []string `json:"-"` |
| 4051 |
} |
| 4052 |
|
| 4053 |
func (s Publishing) MarshalJSON() ([]byte, error) { |
| 4054 |
type NoMethod Publishing |
| 4055 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4056 |
} |
| 4057 |
|
| 4058 |
// PythonSettings: Settings for Python client libraries. |
| 4059 |
type PythonSettings struct { |
| 4060 |
// Common: Some settings. |
| 4061 |
Common *CommonLanguageSettings `json:"common,omitempty"` |
| 4062 |
// ExperimentalFeatures: Experimental features to be included during client |
| 4063 |
// library generation. |
| 4064 |
ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,omitempty"` |
| 4065 |
// ForceSendFields is a list of field names (e.g. "Common") to unconditionally |
| 4066 |
// include in API requests. By default, fields with empty or default values are |
| 4067 |
// omitted from API requests. See |
| 4068 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4069 |
// details. |
| 4070 |
ForceSendFields []string `json:"-"` |
| 4071 |
// NullFields is a list of field names (e.g. "Common") to include in API |
| 4072 |
// requests with the JSON null value. By default, fields with empty values are |
| 4073 |
// omitted from API requests. See |
| 4074 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4075 |
NullFields []string `json:"-"` |
| 4076 |
} |
| 4077 |
|
| 4078 |
func (s PythonSettings) MarshalJSON() ([]byte, error) { |
| 4079 |
type NoMethod PythonSettings |
| 4080 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4081 |
} |
| 4082 |
|
| 4083 |
// Quota: Quota configuration helps to achieve fairness and budgeting in |
| 4084 |
// service usage. The metric based quota configuration works this way: - The |
| 4085 |
// service configuration defines a set of metrics. - For API calls, the |
| 4086 |
// quota.metric_rules maps methods to metrics with corresponding costs. - The |
| 4087 |
// quota.limits defines limits on the metrics, which will be used for quota |
| 4088 |
// checks at runtime. An example quota configuration in yaml format: quota: |
| 4089 |
// limits: - name: apiWriteQpsPerProject metric: |
| 4090 |
// library.googleapis.com/write_calls unit: "1/min/{project}" # rate limit for |
| 4091 |
// consumer projects values: STANDARD: 10000 (The metric rules bind all methods |
| 4092 |
// to the read_calls metric, except for the UpdateBook and DeleteBook methods. |
| 4093 |
// These two methods are mapped to the write_calls metric, with the UpdateBook |
| 4094 |
// method consuming at twice rate as the DeleteBook method.) metric_rules: - |
| 4095 |
// selector: "*" metric_costs: library.googleapis.com/read_calls: 1 - selector: |
| 4096 |
// google.example.library.v1.LibraryService.UpdateBook metric_costs: |
| 4097 |
// library.googleapis.com/write_calls: 2 - selector: |
| 4098 |
// google.example.library.v1.LibraryService.DeleteBook metric_costs: |
| 4099 |
// library.googleapis.com/write_calls: 1 Corresponding Metric definition: |
| 4100 |
// metrics: - name: library.googleapis.com/read_calls display_name: Read |
| 4101 |
// requests metric_kind: DELTA value_type: INT64 - name: |
| 4102 |
// library.googleapis.com/write_calls display_name: Write requests metric_kind: |
| 4103 |
// DELTA value_type: INT64 |
| 4104 |
type Quota struct { |
| 4105 |
// Limits: List of QuotaLimit definitions for the service. |
| 4106 |
Limits []*QuotaLimit `json:"limits,omitempty"` |
| 4107 |
// MetricRules: List of MetricRule definitions, each one mapping a selected |
| 4108 |
// method to one or more metrics. |
| 4109 |
MetricRules []*MetricRule `json:"metricRules,omitempty"` |
| 4110 |
// ForceSendFields is a list of field names (e.g. "Limits") to unconditionally |
| 4111 |
// include in API requests. By default, fields with empty or default values are |
| 4112 |
// omitted from API requests. See |
| 4113 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4114 |
// details. |
| 4115 |
ForceSendFields []string `json:"-"` |
| 4116 |
// NullFields is a list of field names (e.g. "Limits") to include in API |
| 4117 |
// requests with the JSON null value. By default, fields with empty values are |
| 4118 |
// omitted from API requests. See |
| 4119 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4120 |
NullFields []string `json:"-"` |
| 4121 |
} |
| 4122 |
|
| 4123 |
func (s Quota) MarshalJSON() ([]byte, error) { |
| 4124 |
type NoMethod Quota |
| 4125 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4126 |
} |
| 4127 |
|
| 4128 |
// QuotaLimit: `QuotaLimit` defines a specific limit that applies over a |
| 4129 |
// specified duration for a limit type. There can be at most one limit for a |
| 4130 |
// duration and limit type combination defined within a `QuotaGroup`. |
| 4131 |
type QuotaLimit struct { |
| 4132 |
// DefaultLimit: Default number of tokens that can be consumed during the |
| 4133 |
// specified duration. This is the number of tokens assigned when a client |
| 4134 |
// application developer activates the service for his/her project. Specifying |
| 4135 |
// a value of 0 will block all requests. This can be used if you are |
| 4136 |
// provisioning quota to selected consumers and blocking others. Similarly, a |
| 4137 |
// value of -1 will indicate an unlimited quota. No other negative values are |
| 4138 |
// allowed. Used by group-based quotas only. |
| 4139 |
DefaultLimit int64 `json:"defaultLimit,omitempty,string"` |
| 4140 |
// Description: Optional. User-visible, extended description for this quota |
| 4141 |
// limit. Should be used only when more context is needed to understand this |
| 4142 |
// limit than provided by the limit's display name (see: `display_name`). |
| 4143 |
Description string `json:"description,omitempty"` |
| 4144 |
// DisplayName: User-visible display name for this limit. Optional. If not set, |
| 4145 |
// the UI will provide a default display name based on the quota configuration. |
| 4146 |
// This field can be used to override the default display name generated from |
| 4147 |
// the configuration. |
| 4148 |
DisplayName string `json:"displayName,omitempty"` |
| 4149 |
// Duration: Duration of this limit in textual notation. Must be "100s" or |
| 4150 |
// "1d". Used by group-based quotas only. |
| 4151 |
Duration string `json:"duration,omitempty"` |
| 4152 |
// FreeTier: Free tier value displayed in the Developers Console for this |
| 4153 |
// limit. The free tier is the number of tokens that will be subtracted from |
| 4154 |
// the billed amount when billing is enabled. This field can only be set on a |
| 4155 |
// limit with duration "1d", in a billable group; it is invalid on any other |
| 4156 |
// limit. If this field is not set, it defaults to 0, indicating that there is |
| 4157 |
// no free tier for this service. Used by group-based quotas only. |
| 4158 |
FreeTier int64 `json:"freeTier,omitempty,string"` |
| 4159 |
// MaxLimit: Maximum number of tokens that can be consumed during the specified |
| 4160 |
// duration. Client application developers can override the default limit up to |
| 4161 |
// this maximum. If specified, this value cannot be set to a value less than |
| 4162 |
// the default limit. If not specified, it is set to the default limit. To |
| 4163 |
// allow clients to apply overrides with no upper bound, set this to -1, |
| 4164 |
// indicating unlimited maximum quota. Used by group-based quotas only. |
| 4165 |
MaxLimit int64 `json:"maxLimit,omitempty,string"` |
| 4166 |
// Metric: The name of the metric this quota limit applies to. The quota limits |
| 4167 |
// with the same metric will be checked together during runtime. The metric |
| 4168 |
// must be defined within the service config. |
| 4169 |
Metric string `json:"metric,omitempty"` |
| 4170 |
// Name: Name of the quota limit. The name must be provided, and it must be |
| 4171 |
// unique within the service. The name can only include alphanumeric characters |
| 4172 |
// as well as '-'. The maximum length of the limit name is 64 characters. |
| 4173 |
Name string `json:"name,omitempty"` |
| 4174 |
// Unit: Specify the unit of the quota limit. It uses the same syntax as |
| 4175 |
// MetricDescriptor.unit. The supported unit kinds are determined by the quota |
| 4176 |
// backend system. Here are some examples: * "1/min/{project}" for quota per |
| 4177 |
// minute per project. Note: the order of unit components is insignificant. The |
| 4178 |
// "1" at the beginning is required to follow the metric unit syntax. |
| 4179 |
Unit string `json:"unit,omitempty"` |
| 4180 |
// Values: Tiered limit values. You must specify this as a key:value pair, with |
| 4181 |
// an integer value that is the maximum number of requests allowed for the |
| 4182 |
// specified unit. Currently only STANDARD is supported. |
| 4183 |
Values map[string]string `json:"values,omitempty"` |
| 4184 |
// ForceSendFields is a list of field names (e.g. "DefaultLimit") to |
| 4185 |
// unconditionally include in API requests. By default, fields with empty or |
| 4186 |
// default values are omitted from API requests. See |
| 4187 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4188 |
// details. |
| 4189 |
ForceSendFields []string `json:"-"` |
| 4190 |
// NullFields is a list of field names (e.g. "DefaultLimit") to include in API |
| 4191 |
// requests with the JSON null value. By default, fields with empty values are |
| 4192 |
// omitted from API requests. See |
| 4193 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4194 |
NullFields []string `json:"-"` |
| 4195 |
} |
| 4196 |
|
| 4197 |
func (s QuotaLimit) MarshalJSON() ([]byte, error) { |
| 4198 |
type NoMethod QuotaLimit |
| 4199 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4200 |
} |
| 4201 |
|
| 4202 |
// Range: Represents a found unused range. |
| 4203 |
type Range struct { |
| 4204 |
// IpCidrRange: CIDR range in "10.x.x.x/y" format that is within the allocated |
| 4205 |
// ranges and currently unused. |
| 4206 |
IpCidrRange string `json:"ipCidrRange,omitempty"` |
| 4207 |
// Network: In the Shared VPC host project, the VPC network that's peered with |
| 4208 |
// the consumer network. For example: |
| 4209 |
// `projects/1234321/global/networks/host-network` |
| 4210 |
Network string `json:"network,omitempty"` |
| 4211 |
// ForceSendFields is a list of field names (e.g. "IpCidrRange") to |
| 4212 |
// unconditionally include in API requests. By default, fields with empty or |
| 4213 |
// default values are omitted from API requests. See |
| 4214 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4215 |
// details. |
| 4216 |
ForceSendFields []string `json:"-"` |
| 4217 |
// NullFields is a list of field names (e.g. "IpCidrRange") to include in API |
| 4218 |
// requests with the JSON null value. By default, fields with empty values are |
| 4219 |
// omitted from API requests. See |
| 4220 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4221 |
NullFields []string `json:"-"` |
| 4222 |
} |
| 4223 |
|
| 4224 |
func (s Range) MarshalJSON() ([]byte, error) { |
| 4225 |
type NoMethod Range |
| 4226 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4227 |
} |
| 4228 |
|
| 4229 |
// RangeReservation: Represents a range reservation. |
| 4230 |
type RangeReservation struct { |
| 4231 |
// IpPrefixLength: Required. The size of the desired subnet. Use usual CIDR |
| 4232 |
// range notation. For example, '29' to find unused x.x.x.x/29 CIDR range. The |
| 4233 |
// goal is to determine if one of the allocated ranges has enough free space |
| 4234 |
// for a subnet of the requested size. GCE disallows subnets with prefix_length |
| 4235 |
// > 29 |
| 4236 |
IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` |
| 4237 |
// RequestedRanges: Optional. The name of one or more allocated IP address |
| 4238 |
// ranges associated with this private service access connection. If no range |
| 4239 |
// names are provided all ranges associated with this connection will be |
| 4240 |
// considered. If a CIDR range with the specified IP prefix length is not |
| 4241 |
// available within these ranges the validation fails. |
| 4242 |
RequestedRanges []string `json:"requestedRanges,omitempty"` |
| 4243 |
// SecondaryRangeIpPrefixLengths: Optional. The size of the desired secondary |
| 4244 |
// ranges for the subnet. Use usual CIDR range notation. For example, '29' to |
| 4245 |
// find unused x.x.x.x/29 CIDR range. The goal is to determine that the |
| 4246 |
// allocated ranges have enough free space for all the requested secondary |
| 4247 |
// ranges. GCE disallows subnets with prefix_length > 29 |
| 4248 |
SecondaryRangeIpPrefixLengths []int64 `json:"secondaryRangeIpPrefixLengths,omitempty"` |
| 4249 |
// SubnetworkCandidates: Optional. List of subnetwork candidates to validate. |
| 4250 |
// The required input fields are `name`, `network`, and `region`. Subnetworks |
| 4251 |
// from this list which exist will be returned in the response with the |
| 4252 |
// `ip_cidr_range`, `secondary_ip_cider_ranges`, and `outside_allocation` |
| 4253 |
// fields set. |
| 4254 |
SubnetworkCandidates []*Subnetwork `json:"subnetworkCandidates,omitempty"` |
| 4255 |
// ForceSendFields is a list of field names (e.g. "IpPrefixLength") to |
| 4256 |
// unconditionally include in API requests. By default, fields with empty or |
| 4257 |
// default values are omitted from API requests. See |
| 4258 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4259 |
// details. |
| 4260 |
ForceSendFields []string `json:"-"` |
| 4261 |
// NullFields is a list of field names (e.g. "IpPrefixLength") to include in |
| 4262 |
// API requests with the JSON null value. By default, fields with empty values |
| 4263 |
// are omitted from API requests. See |
| 4264 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4265 |
NullFields []string `json:"-"` |
| 4266 |
} |
| 4267 |
|
| 4268 |
func (s RangeReservation) MarshalJSON() ([]byte, error) { |
| 4269 |
type NoMethod RangeReservation |
| 4270 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4271 |
} |
| 4272 |
|
| 4273 |
// RemoveDnsRecordSetMetadata: Metadata provided through GetOperation request |
| 4274 |
// for the LRO generated by RemoveDnsRecordSet API |
| 4275 |
type RemoveDnsRecordSetMetadata struct { |
| 4276 |
} |
| 4277 |
|
| 4278 |
// RemoveDnsRecordSetRequest: Request to remove a record set from a private |
| 4279 |
// managed DNS zone in the shared producer host project. The name, type, ttl, |
| 4280 |
// and data values must all exactly match an existing record set in the |
| 4281 |
// specified zone. |
| 4282 |
type RemoveDnsRecordSetRequest struct { |
| 4283 |
// ConsumerNetwork: Required. The network that the consumer is using to connect |
| 4284 |
// with services. Must be in the form of |
| 4285 |
// projects/{project}/global/networks/{network} {project} is the project |
| 4286 |
// number, as in '12345' {network} is the network name. |
| 4287 |
ConsumerNetwork string `json:"consumerNetwork,omitempty"` |
| 4288 |
// DnsRecordSet: Required. The DNS record set to remove. |
| 4289 |
DnsRecordSet *DnsRecordSet `json:"dnsRecordSet,omitempty"` |
| 4290 |
// Zone: Required. The name of the private DNS zone in the shared producer host |
| 4291 |
// project from which the record set will be removed. |
| 4292 |
Zone string `json:"zone,omitempty"` |
| 4293 |
// ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to |
| 4294 |
// unconditionally include in API requests. By default, fields with empty or |
| 4295 |
// default values are omitted from API requests. See |
| 4296 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4297 |
// details. |
| 4298 |
ForceSendFields []string `json:"-"` |
| 4299 |
// NullFields is a list of field names (e.g. "ConsumerNetwork") to include in |
| 4300 |
// API requests with the JSON null value. By default, fields with empty values |
| 4301 |
// are omitted from API requests. See |
| 4302 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4303 |
NullFields []string `json:"-"` |
| 4304 |
} |
| 4305 |
|
| 4306 |
func (s RemoveDnsRecordSetRequest) MarshalJSON() ([]byte, error) { |
| 4307 |
type NoMethod RemoveDnsRecordSetRequest |
| 4308 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4309 |
} |
| 4310 |
|
| 4311 |
// RemoveDnsRecordSetResponse: Blank message response type for |
| 4312 |
// RemoveDnsRecordSet API |
| 4313 |
type RemoveDnsRecordSetResponse struct { |
| 4314 |
} |
| 4315 |
|
| 4316 |
// RemoveDnsZoneMetadata: Metadata provided through GetOperation request for |
| 4317 |
// the LRO generated by RemoveDnsZone API |
| 4318 |
type RemoveDnsZoneMetadata struct { |
| 4319 |
} |
| 4320 |
|
| 4321 |
// RemoveDnsZoneRequest: Request to remove a private managed DNS zone in the |
| 4322 |
// shared producer host project and a matching DNS peering zone in the consumer |
| 4323 |
// project. |
| 4324 |
type RemoveDnsZoneRequest struct { |
| 4325 |
// ConsumerNetwork: Required. The network that the consumer is using to connect |
| 4326 |
// with services. Must be in the form of |
| 4327 |
// projects/{project}/global/networks/{network} {project} is the project |
| 4328 |
// number, as in '12345' {network} is the network name. |
| 4329 |
ConsumerNetwork string `json:"consumerNetwork,omitempty"` |
| 4330 |
// Name: Required. The name for both the private zone in the shared producer |
| 4331 |
// host project and the peering zone in the consumer project. |
| 4332 |
Name string `json:"name,omitempty"` |
| 4333 |
// ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to |
| 4334 |
// unconditionally include in API requests. By default, fields with empty or |
| 4335 |
// default values are omitted from API requests. See |
| 4336 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4337 |
// details. |
| 4338 |
ForceSendFields []string `json:"-"` |
| 4339 |
// NullFields is a list of field names (e.g. "ConsumerNetwork") to include in |
| 4340 |
// API requests with the JSON null value. By default, fields with empty values |
| 4341 |
// are omitted from API requests. See |
| 4342 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4343 |
NullFields []string `json:"-"` |
| 4344 |
} |
| 4345 |
|
| 4346 |
func (s RemoveDnsZoneRequest) MarshalJSON() ([]byte, error) { |
| 4347 |
type NoMethod RemoveDnsZoneRequest |
| 4348 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4349 |
} |
| 4350 |
|
| 4351 |
// RemoveDnsZoneResponse: Blank message response type for RemoveDnsZone API |
| 4352 |
type RemoveDnsZoneResponse struct { |
| 4353 |
} |
| 4354 |
|
| 4355 |
// Route: Represents a route that was created or discovered by a private access |
| 4356 |
// management service. |
| 4357 |
type Route struct { |
| 4358 |
// DestRange: Destination CIDR range that this route applies to. |
| 4359 |
DestRange string `json:"destRange,omitempty"` |
| 4360 |
// Name: Route name. See https://cloud.google.com/vpc/docs/routes |
| 4361 |
Name string `json:"name,omitempty"` |
| 4362 |
// Network: Fully-qualified URL of the VPC network in the producer host tenant |
| 4363 |
// project that this route applies to. For example: |
| 4364 |
// `projects/123456/global/networks/host-network` |
| 4365 |
Network string `json:"network,omitempty"` |
| 4366 |
// NextHopGateway: Fully-qualified URL of the gateway that should handle |
| 4367 |
// matching packets that this route applies to. For example: |
| 4368 |
// `projects/123456/global/gateways/default-internet-gateway` |
| 4369 |
NextHopGateway string `json:"nextHopGateway,omitempty"` |
| 4370 |
// ForceSendFields is a list of field names (e.g. "DestRange") to |
| 4371 |
// unconditionally include in API requests. By default, fields with empty or |
| 4372 |
// default values are omitted from API requests. See |
| 4373 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4374 |
// details. |
| 4375 |
ForceSendFields []string `json:"-"` |
| 4376 |
// NullFields is a list of field names (e.g. "DestRange") to include in API |
| 4377 |
// requests with the JSON null value. By default, fields with empty values are |
| 4378 |
// omitted from API requests. See |
| 4379 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4380 |
NullFields []string `json:"-"` |
| 4381 |
} |
| 4382 |
|
| 4383 |
func (s Route) MarshalJSON() ([]byte, error) { |
| 4384 |
type NoMethod Route |
| 4385 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4386 |
} |
| 4387 |
|
| 4388 |
// RubySettings: Settings for Ruby client libraries. |
| 4389 |
type RubySettings struct { |
| 4390 |
// Common: Some settings. |
| 4391 |
Common *CommonLanguageSettings `json:"common,omitempty"` |
| 4392 |
// ForceSendFields is a list of field names (e.g. "Common") to unconditionally |
| 4393 |
// include in API requests. By default, fields with empty or default values are |
| 4394 |
// omitted from API requests. See |
| 4395 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4396 |
// details. |
| 4397 |
ForceSendFields []string `json:"-"` |
| 4398 |
// NullFields is a list of field names (e.g. "Common") to include in API |
| 4399 |
// requests with the JSON null value. By default, fields with empty values are |
| 4400 |
// omitted from API requests. See |
| 4401 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4402 |
NullFields []string `json:"-"` |
| 4403 |
} |
| 4404 |
|
| 4405 |
func (s RubySettings) MarshalJSON() ([]byte, error) { |
| 4406 |
type NoMethod RubySettings |
| 4407 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4408 |
} |
| 4409 |
|
| 4410 |
// SearchRangeRequest: Request to search for an unused range within allocated |
| 4411 |
// ranges. |
| 4412 |
type SearchRangeRequest struct { |
| 4413 |
// IpPrefixLength: Required. The prefix length of the IP range. Use usual CIDR |
| 4414 |
// range notation. For example, '30' to find unused x.x.x.x/30 CIDR range. |
| 4415 |
// Actual range will be determined using allocated range for the consumer |
| 4416 |
// peered network and returned in the result. |
| 4417 |
IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` |
| 4418 |
// Network: Required. Network name in the consumer project. This network must |
| 4419 |
// have been already peered with a shared VPC network using CreateConnection |
| 4420 |
// method. Must be in a form 'projects/{project}/global/networks/{network}'. |
| 4421 |
// {project} is a project number, as in '12345' {network} is network name. |
| 4422 |
Network string `json:"network,omitempty"` |
| 4423 |
// ForceSendFields is a list of field names (e.g. "IpPrefixLength") to |
| 4424 |
// unconditionally include in API requests. By default, fields with empty or |
| 4425 |
// default values are omitted from API requests. See |
| 4426 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4427 |
// details. |
| 4428 |
ForceSendFields []string `json:"-"` |
| 4429 |
// NullFields is a list of field names (e.g. "IpPrefixLength") to include in |
| 4430 |
// API requests with the JSON null value. By default, fields with empty values |
| 4431 |
// are omitted from API requests. See |
| 4432 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4433 |
NullFields []string `json:"-"` |
| 4434 |
} |
| 4435 |
|
| 4436 |
func (s SearchRangeRequest) MarshalJSON() ([]byte, error) { |
| 4437 |
type NoMethod SearchRangeRequest |
| 4438 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4439 |
} |
| 4440 |
|
| 4441 |
type SecondaryIpRange struct { |
| 4442 |
// IpCidrRange: Secondary IP CIDR range in `x.x.x.x/y` format. |
| 4443 |
IpCidrRange string `json:"ipCidrRange,omitempty"` |
| 4444 |
// RangeName: Name of the secondary IP range. |
| 4445 |
RangeName string `json:"rangeName,omitempty"` |
| 4446 |
// ForceSendFields is a list of field names (e.g. "IpCidrRange") to |
| 4447 |
// unconditionally include in API requests. By default, fields with empty or |
| 4448 |
// default values are omitted from API requests. See |
| 4449 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4450 |
// details. |
| 4451 |
ForceSendFields []string `json:"-"` |
| 4452 |
// NullFields is a list of field names (e.g. "IpCidrRange") to include in API |
| 4453 |
// requests with the JSON null value. By default, fields with empty values are |
| 4454 |
// omitted from API requests. See |
| 4455 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4456 |
NullFields []string `json:"-"` |
| 4457 |
} |
| 4458 |
|
| 4459 |
func (s SecondaryIpRange) MarshalJSON() ([]byte, error) { |
| 4460 |
type NoMethod SecondaryIpRange |
| 4461 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4462 |
} |
| 4463 |
|
| 4464 |
type SecondaryIpRangeSpec struct { |
| 4465 |
// IpPrefixLength: Required. The prefix length of the secondary IP range. Use |
| 4466 |
// CIDR range notation, such as `30` to provision a secondary IP range with an |
| 4467 |
// `x.x.x.x/30` CIDR range. The IP address range is drawn from a pool of |
| 4468 |
// available ranges in the service consumer's allocated range. |
| 4469 |
IpPrefixLength int64 `json:"ipPrefixLength,omitempty"` |
| 4470 |
// OutsideAllocationPublicIpRange: Optional. Enable outside allocation using |
| 4471 |
// public IP addresses. Any public IP range may be specified. If this field is |
| 4472 |
// provided, we will not use customer reserved ranges for this secondary IP |
| 4473 |
// range. |
| 4474 |
OutsideAllocationPublicIpRange string `json:"outsideAllocationPublicIpRange,omitempty"` |
| 4475 |
// RangeName: Required. A name for the secondary IP range. The name must be |
| 4476 |
// 1-63 characters long, and comply with RFC1035. The name must be unique |
| 4477 |
// within the subnetwork. |
| 4478 |
RangeName string `json:"rangeName,omitempty"` |
| 4479 |
// RequestedAddress: Optional. The starting address of a range. The address |
| 4480 |
// must be a valid IPv4 address in the x.x.x.x format. This value combined with |
| 4481 |
// the IP prefix range is the CIDR range for the secondary IP range. The range |
| 4482 |
// must be within the allocated range that is assigned to the private |
| 4483 |
// connection. If the CIDR range isn't available, the call fails. |
| 4484 |
RequestedAddress string `json:"requestedAddress,omitempty"` |
| 4485 |
// ForceSendFields is a list of field names (e.g. "IpPrefixLength") to |
| 4486 |
// unconditionally include in API requests. By default, fields with empty or |
| 4487 |
// default values are omitted from API requests. See |
| 4488 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4489 |
// details. |
| 4490 |
ForceSendFields []string `json:"-"` |
| 4491 |
// NullFields is a list of field names (e.g. "IpPrefixLength") to include in |
| 4492 |
// API requests with the JSON null value. By default, fields with empty values |
| 4493 |
// are omitted from API requests. See |
| 4494 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4495 |
NullFields []string `json:"-"` |
| 4496 |
} |
| 4497 |
|
| 4498 |
func (s SecondaryIpRangeSpec) MarshalJSON() ([]byte, error) { |
| 4499 |
type NoMethod SecondaryIpRangeSpec |
| 4500 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4501 |
} |
| 4502 |
|
| 4503 |
// SelectiveGapicGeneration: This message is used to configure the generation |
| 4504 |
// of a subset of the RPCs in a service for client libraries. Note: This |
| 4505 |
// feature should not be used in most cases. |
| 4506 |
type SelectiveGapicGeneration struct { |
| 4507 |
// GenerateOmittedAsInternal: Setting this to true indicates to the client |
| 4508 |
// generators that methods that would be excluded from the generation should |
| 4509 |
// instead be generated in a way that indicates these methods should not be |
| 4510 |
// consumed by end users. How this is expressed is up to individual language |
| 4511 |
// implementations to decide. Some examples may be: added annotations, |
| 4512 |
// obfuscated identifiers, or other language idiomatic patterns. |
| 4513 |
GenerateOmittedAsInternal bool `json:"generateOmittedAsInternal,omitempty"` |
| 4514 |
// Methods: An allowlist of the fully qualified names of RPCs that should be |
| 4515 |
// included on public client surfaces. |
| 4516 |
Methods []string `json:"methods,omitempty"` |
| 4517 |
// ForceSendFields is a list of field names (e.g. "GenerateOmittedAsInternal") |
| 4518 |
// to unconditionally include in API requests. By default, fields with empty or |
| 4519 |
// default values are omitted from API requests. See |
| 4520 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4521 |
// details. |
| 4522 |
ForceSendFields []string `json:"-"` |
| 4523 |
// NullFields is a list of field names (e.g. "GenerateOmittedAsInternal") to |
| 4524 |
// include in API requests with the JSON null value. By default, fields with |
| 4525 |
// empty values are omitted from API requests. See |
| 4526 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4527 |
NullFields []string `json:"-"` |
| 4528 |
} |
| 4529 |
|
| 4530 |
func (s SelectiveGapicGeneration) MarshalJSON() ([]byte, error) { |
| 4531 |
type NoMethod SelectiveGapicGeneration |
| 4532 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4533 |
} |
| 4534 |
|
| 4535 |
// Service: `Service` is the root object of Google API service configuration |
| 4536 |
// (service config). It describes the basic information about a logical |
| 4537 |
// service, such as the service name and the user-facing title, and delegates |
| 4538 |
// other aspects to sub-sections. Each sub-section is either a proto message or |
| 4539 |
// a repeated proto message that configures a specific aspect, such as auth. |
| 4540 |
// For more information, see each proto message definition. Example: type: |
| 4541 |
// google.api.Service name: calendar.googleapis.com title: Google Calendar API |
| 4542 |
// apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: |
| 4543 |
// "google.calendar.v3.*" restriction: PREVIEW backend: rules: - selector: |
| 4544 |
// "google.calendar.v3.*" address: calendar.example.com authentication: |
| 4545 |
// providers: - id: google_calendar_auth jwks_uri: |
| 4546 |
// https://www.googleapis.com/oauth2/v1/certs issuer: |
| 4547 |
// https://securetoken.google.com rules: - selector: "*" requirements: |
| 4548 |
// provider_id: google_calendar_auth |
| 4549 |
type Service struct { |
| 4550 |
// Apis: A list of API interfaces exported by this service. Only the `name` |
| 4551 |
// field of the google.protobuf.Api needs to be provided by the configuration |
| 4552 |
// author, as the remaining fields will be derived from the IDL during the |
| 4553 |
// normalization process. It is an error to specify an API interface here which |
| 4554 |
// cannot be resolved against the associated IDL files. |
| 4555 |
Apis []*Api `json:"apis,omitempty"` |
| 4556 |
// Aspects: Configuration aspects. This is a repeated field to allow multiple |
| 4557 |
// aspects to be configured. The kind field in each ConfigAspect specifies the |
| 4558 |
// type of aspect. The spec field contains the configuration for that aspect. |
| 4559 |
// The schema for the spec field is defined by the backend service owners. |
| 4560 |
Aspects []*Aspect `json:"aspects,omitempty"` |
| 4561 |
// Authentication: Auth configuration. |
| 4562 |
Authentication *Authentication `json:"authentication,omitempty"` |
| 4563 |
// Backend: API backend configuration. |
| 4564 |
Backend *Backend `json:"backend,omitempty"` |
| 4565 |
// Billing: Billing configuration. |
| 4566 |
Billing *Billing `json:"billing,omitempty"` |
| 4567 |
// ConfigVersion: Obsolete. Do not use. This field has no semantic meaning. The |
| 4568 |
// service config compiler always sets this field to `3`. |
| 4569 |
ConfigVersion int64 `json:"configVersion,omitempty"` |
| 4570 |
// Context: Context configuration. |
| 4571 |
Context *Context `json:"context,omitempty"` |
| 4572 |
// Control: Configuration for the service control plane. |
| 4573 |
Control *Control `json:"control,omitempty"` |
| 4574 |
// CustomError: Custom error configuration. |
| 4575 |
CustomError *CustomError `json:"customError,omitempty"` |
| 4576 |
// Documentation: Additional API documentation. |
| 4577 |
Documentation *Documentation `json:"documentation,omitempty"` |
| 4578 |
// Endpoints: Configuration for network endpoints. If this is empty, then an |
| 4579 |
// endpoint with the same name as the service is automatically generated to |
| 4580 |
// service all defined APIs. |
| 4581 |
Endpoints []*Endpoint `json:"endpoints,omitempty"` |
| 4582 |
// Enums: A list of all enum types included in this API service. Enums |
| 4583 |
// referenced directly or indirectly by the `apis` are automatically included. |
| 4584 |
// Enums which are not referenced but shall be included should be listed here |
| 4585 |
// by name by the configuration author. Example: enums: - name: |
| 4586 |
// google.someapi.v1.SomeEnum |
| 4587 |
Enums []*Enum `json:"enums,omitempty"` |
| 4588 |
// Http: HTTP configuration. |
| 4589 |
Http *Http `json:"http,omitempty"` |
| 4590 |
// Id: A unique ID for a specific instance of this message, typically assigned |
| 4591 |
// by the client for tracking purpose. Must be no longer than 63 characters and |
| 4592 |
// only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the |
| 4593 |
// server may choose to generate one instead. |
| 4594 |
Id string `json:"id,omitempty"` |
| 4595 |
// Logging: Logging configuration. |
| 4596 |
Logging *Logging `json:"logging,omitempty"` |
| 4597 |
// Logs: Defines the logs used by this service. |
| 4598 |
Logs []*LogDescriptor `json:"logs,omitempty"` |
| 4599 |
// Metrics: Defines the metrics used by this service. |
| 4600 |
Metrics []*MetricDescriptor `json:"metrics,omitempty"` |
| 4601 |
// MonitoredResources: Defines the monitored resources used by this service. |
| 4602 |
// This is required by the `Service.monitoring` and `Service.logging` |
| 4603 |
// configurations. |
| 4604 |
MonitoredResources []*MonitoredResourceDescriptor `json:"monitoredResources,omitempty"` |
| 4605 |
// Monitoring: Monitoring configuration. |
| 4606 |
Monitoring *Monitoring `json:"monitoring,omitempty"` |
| 4607 |
// Name: The service name, which is a DNS-like logical identifier for the |
| 4608 |
// service, such as `calendar.googleapis.com`. The service name typically goes |
| 4609 |
// through DNS verification to make sure the owner of the service also owns the |
| 4610 |
// DNS name. |
| 4611 |
Name string `json:"name,omitempty"` |
| 4612 |
// ProducerProjectId: The Google project that owns this service. |
| 4613 |
ProducerProjectId string `json:"producerProjectId,omitempty"` |
| 4614 |
// Publishing: Settings for Google Cloud Client libraries |
| 4615 |
// (https://cloud.google.com/apis/docs/cloud-client-libraries) generated from |
| 4616 |
// APIs defined as protocol buffers. |
| 4617 |
Publishing *Publishing `json:"publishing,omitempty"` |
| 4618 |
// Quota: Quota configuration. |
| 4619 |
Quota *Quota `json:"quota,omitempty"` |
| 4620 |
// SourceInfo: Output only. The source information for this configuration if |
| 4621 |
// available. |
| 4622 |
SourceInfo *SourceInfo `json:"sourceInfo,omitempty"` |
| 4623 |
// SystemParameters: System parameter configuration. |
| 4624 |
SystemParameters *SystemParameters `json:"systemParameters,omitempty"` |
| 4625 |
// SystemTypes: A list of all proto message types included in this API service. |
| 4626 |
// It serves similar purpose as [google.api.Service.types], except that these |
| 4627 |
// types are not needed by user-defined APIs. Therefore, they will not show up |
| 4628 |
// in the generated discovery doc. This field should only be used to define |
| 4629 |
// system APIs in ESF. |
| 4630 |
SystemTypes []*Type `json:"systemTypes,omitempty"` |
| 4631 |
// Title: The product title for this service, it is the name displayed in |
| 4632 |
// Google Cloud Console. |
| 4633 |
Title string `json:"title,omitempty"` |
| 4634 |
// Types: A list of all proto message types included in this API service. Types |
| 4635 |
// referenced directly or indirectly by the `apis` are automatically included. |
| 4636 |
// Messages which are not referenced but shall be included, such as types used |
| 4637 |
// by the `google.protobuf.Any` type, should be listed here by name by the |
| 4638 |
// configuration author. Example: types: - name: google.protobuf.Int32 |
| 4639 |
Types []*Type `json:"types,omitempty"` |
| 4640 |
// Usage: Configuration controlling usage of this service. |
| 4641 |
Usage *Usage `json:"usage,omitempty"` |
| 4642 |
// ForceSendFields is a list of field names (e.g. "Apis") to unconditionally |
| 4643 |
// include in API requests. By default, fields with empty or default values are |
| 4644 |
// omitted from API requests. See |
| 4645 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4646 |
// details. |
| 4647 |
ForceSendFields []string `json:"-"` |
| 4648 |
// NullFields is a list of field names (e.g. "Apis") to include in API requests |
| 4649 |
// with the JSON null value. By default, fields with empty values are omitted |
| 4650 |
// from API requests. See |
| 4651 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4652 |
NullFields []string `json:"-"` |
| 4653 |
} |
| 4654 |
|
| 4655 |
func (s Service) MarshalJSON() ([]byte, error) { |
| 4656 |
type NoMethod Service |
| 4657 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4658 |
} |
| 4659 |
|
| 4660 |
// SourceContext: `SourceContext` represents information about the source of a |
| 4661 |
// protobuf element, like the file in which it is defined. |
| 4662 |
type SourceContext struct { |
| 4663 |
// FileName: The path-qualified name of the .proto file that contained the |
| 4664 |
// associated protobuf element. For example: |
| 4665 |
// "google/protobuf/source_context.proto". |
| 4666 |
FileName string `json:"fileName,omitempty"` |
| 4667 |
// ForceSendFields is a list of field names (e.g. "FileName") to |
| 4668 |
// unconditionally include in API requests. By default, fields with empty or |
| 4669 |
// default values are omitted from API requests. See |
| 4670 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4671 |
// details. |
| 4672 |
ForceSendFields []string `json:"-"` |
| 4673 |
// NullFields is a list of field names (e.g. "FileName") to include in API |
| 4674 |
// requests with the JSON null value. By default, fields with empty values are |
| 4675 |
// omitted from API requests. See |
| 4676 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4677 |
NullFields []string `json:"-"` |
| 4678 |
} |
| 4679 |
|
| 4680 |
func (s SourceContext) MarshalJSON() ([]byte, error) { |
| 4681 |
type NoMethod SourceContext |
| 4682 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4683 |
} |
| 4684 |
|
| 4685 |
// SourceInfo: Source information used to create a Service Config |
| 4686 |
type SourceInfo struct { |
| 4687 |
// SourceFiles: All files used during config generation. |
| 4688 |
SourceFiles []googleapi.RawMessage `json:"sourceFiles,omitempty"` |
| 4689 |
// ForceSendFields is a list of field names (e.g. "SourceFiles") to |
| 4690 |
// unconditionally include in API requests. By default, fields with empty or |
| 4691 |
// default values are omitted from API requests. See |
| 4692 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4693 |
// details. |
| 4694 |
ForceSendFields []string `json:"-"` |
| 4695 |
// NullFields is a list of field names (e.g. "SourceFiles") to include in API |
| 4696 |
// requests with the JSON null value. By default, fields with empty values are |
| 4697 |
// omitted from API requests. See |
| 4698 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4699 |
NullFields []string `json:"-"` |
| 4700 |
} |
| 4701 |
|
| 4702 |
func (s SourceInfo) MarshalJSON() ([]byte, error) { |
| 4703 |
type NoMethod SourceInfo |
| 4704 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4705 |
} |
| 4706 |
|
| 4707 |
// Status: The `Status` type defines a logical error model that is suitable for |
| 4708 |
// different programming environments, including REST APIs and RPC APIs. It is |
| 4709 |
// used by gRPC (https://github.com/grpc). Each `Status` message contains three |
| 4710 |
// pieces of data: error code, error message, and error details. You can find |
| 4711 |
// out more about this error model and how to work with it in the API Design |
| 4712 |
// Guide (https://cloud.google.com/apis/design/errors). |
| 4713 |
type Status struct { |
| 4714 |
// Code: The status code, which should be an enum value of google.rpc.Code. |
| 4715 |
Code int64 `json:"code,omitempty"` |
| 4716 |
// Details: A list of messages that carry the error details. There is a common |
| 4717 |
// set of message types for APIs to use. |
| 4718 |
Details []googleapi.RawMessage `json:"details,omitempty"` |
| 4719 |
// Message: A developer-facing error message, which should be in English. Any |
| 4720 |
// user-facing error message should be localized and sent in the |
| 4721 |
// google.rpc.Status.details field, or localized by the client. |
| 4722 |
Message string `json:"message,omitempty"` |
| 4723 |
// ForceSendFields is a list of field names (e.g. "Code") to unconditionally |
| 4724 |
// include in API requests. By default, fields with empty or default values are |
| 4725 |
// omitted from API requests. See |
| 4726 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4727 |
// details. |
| 4728 |
ForceSendFields []string `json:"-"` |
| 4729 |
// NullFields is a list of field names (e.g. "Code") to include in API requests |
| 4730 |
// with the JSON null value. By default, fields with empty values are omitted |
| 4731 |
// from API requests. See |
| 4732 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4733 |
NullFields []string `json:"-"` |
| 4734 |
} |
| 4735 |
|
| 4736 |
func (s Status) MarshalJSON() ([]byte, error) { |
| 4737 |
type NoMethod Status |
| 4738 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4739 |
} |
| 4740 |
|
| 4741 |
// Subnetwork: Represents a subnet that was created or discovered by a private |
| 4742 |
// access management service. |
| 4743 |
type Subnetwork struct { |
| 4744 |
// IpCidrRange: Subnetwork CIDR range in `10.x.x.x/y` format. |
| 4745 |
IpCidrRange string `json:"ipCidrRange,omitempty"` |
| 4746 |
// Name: Subnetwork name. See https://cloud.google.com/compute/docs/vpc/ |
| 4747 |
Name string `json:"name,omitempty"` |
| 4748 |
// Network: In the Shared VPC host project, the VPC network that's peered with |
| 4749 |
// the consumer network. For example: |
| 4750 |
// `projects/1234321/global/networks/host-network` |
| 4751 |
Network string `json:"network,omitempty"` |
| 4752 |
// OutsideAllocation: This is a discovered subnet that is not within the |
| 4753 |
// current consumer allocated ranges. |
| 4754 |
OutsideAllocation bool `json:"outsideAllocation,omitempty"` |
| 4755 |
// Region: GCP region where the subnetwork is located. |
| 4756 |
Region string `json:"region,omitempty"` |
| 4757 |
// SecondaryIpRanges: List of secondary IP ranges in this subnetwork. |
| 4758 |
SecondaryIpRanges []*SecondaryIpRange `json:"secondaryIpRanges,omitempty"` |
| 4759 |
// ForceSendFields is a list of field names (e.g. "IpCidrRange") to |
| 4760 |
// unconditionally include in API requests. By default, fields with empty or |
| 4761 |
// default values are omitted from API requests. See |
| 4762 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4763 |
// details. |
| 4764 |
ForceSendFields []string `json:"-"` |
| 4765 |
// NullFields is a list of field names (e.g. "IpCidrRange") to include in API |
| 4766 |
// requests with the JSON null value. By default, fields with empty values are |
| 4767 |
// omitted from API requests. See |
| 4768 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4769 |
NullFields []string `json:"-"` |
| 4770 |
} |
| 4771 |
|
| 4772 |
func (s Subnetwork) MarshalJSON() ([]byte, error) { |
| 4773 |
type NoMethod Subnetwork |
| 4774 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4775 |
} |
| 4776 |
|
| 4777 |
// SystemParameter: Define a parameter's name and location. The parameter may |
| 4778 |
// be passed as either an HTTP header or a URL query parameter, and if both are |
| 4779 |
// passed the behavior is implementation-dependent. |
| 4780 |
type SystemParameter struct { |
| 4781 |
// HttpHeader: Define the HTTP header name to use for the parameter. It is case |
| 4782 |
// insensitive. |
| 4783 |
HttpHeader string `json:"httpHeader,omitempty"` |
| 4784 |
// Name: Define the name of the parameter, such as "api_key" . It is case |
| 4785 |
// sensitive. |
| 4786 |
Name string `json:"name,omitempty"` |
| 4787 |
// UrlQueryParameter: Define the URL query parameter name to use for the |
| 4788 |
// parameter. It is case sensitive. |
| 4789 |
UrlQueryParameter string `json:"urlQueryParameter,omitempty"` |
| 4790 |
// ForceSendFields is a list of field names (e.g. "HttpHeader") to |
| 4791 |
// unconditionally include in API requests. By default, fields with empty or |
| 4792 |
// default values are omitted from API requests. See |
| 4793 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4794 |
// details. |
| 4795 |
ForceSendFields []string `json:"-"` |
| 4796 |
// NullFields is a list of field names (e.g. "HttpHeader") to include in API |
| 4797 |
// requests with the JSON null value. By default, fields with empty values are |
| 4798 |
// omitted from API requests. See |
| 4799 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4800 |
NullFields []string `json:"-"` |
| 4801 |
} |
| 4802 |
|
| 4803 |
func (s SystemParameter) MarshalJSON() ([]byte, error) { |
| 4804 |
type NoMethod SystemParameter |
| 4805 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4806 |
} |
| 4807 |
|
| 4808 |
// SystemParameterRule: Define a system parameter rule mapping system parameter |
| 4809 |
// definitions to methods. |
| 4810 |
type SystemParameterRule struct { |
| 4811 |
// Parameters: Define parameters. Multiple names may be defined for a |
| 4812 |
// parameter. For a given method call, only one of them should be used. If |
| 4813 |
// multiple names are used the behavior is implementation-dependent. If none of |
| 4814 |
// the specified names are present the behavior is parameter-dependent. |
| 4815 |
Parameters []*SystemParameter `json:"parameters,omitempty"` |
| 4816 |
// Selector: Selects the methods to which this rule applies. Use '*' to |
| 4817 |
// indicate all methods in all APIs. Refer to selector for syntax details. |
| 4818 |
Selector string `json:"selector,omitempty"` |
| 4819 |
// ForceSendFields is a list of field names (e.g. "Parameters") to |
| 4820 |
// unconditionally include in API requests. By default, fields with empty or |
| 4821 |
// default values are omitted from API requests. See |
| 4822 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4823 |
// details. |
| 4824 |
ForceSendFields []string `json:"-"` |
| 4825 |
// NullFields is a list of field names (e.g. "Parameters") to include in API |
| 4826 |
// requests with the JSON null value. By default, fields with empty values are |
| 4827 |
// omitted from API requests. See |
| 4828 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4829 |
NullFields []string `json:"-"` |
| 4830 |
} |
| 4831 |
|
| 4832 |
func (s SystemParameterRule) MarshalJSON() ([]byte, error) { |
| 4833 |
type NoMethod SystemParameterRule |
| 4834 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4835 |
} |
| 4836 |
|
| 4837 |
// SystemParameters: ### System parameter configuration A system parameter is a |
| 4838 |
// special kind of parameter defined by the API system, not by an individual |
| 4839 |
// API. It is typically mapped to an HTTP header and/or a URL query parameter. |
| 4840 |
// This configuration specifies which methods change the names of the system |
| 4841 |
// parameters. |
| 4842 |
type SystemParameters struct { |
| 4843 |
// Rules: Define system parameters. The parameters defined here will override |
| 4844 |
// the default parameters implemented by the system. If this field is missing |
| 4845 |
// from the service config, default system parameters will be used. Default |
| 4846 |
// system parameters and names is implementation-dependent. Example: define api |
| 4847 |
// key for all methods system_parameters rules: - selector: "*" parameters: - |
| 4848 |
// name: api_key url_query_parameter: api_key Example: define 2 api key names |
| 4849 |
// for a specific method. system_parameters rules: - selector: "/ListShelves" |
| 4850 |
// parameters: - name: api_key http_header: Api-Key1 - name: api_key |
| 4851 |
// http_header: Api-Key2 **NOTE:** All service configuration rules follow "last |
| 4852 |
// one wins" order. |
| 4853 |
Rules []*SystemParameterRule `json:"rules,omitempty"` |
| 4854 |
// ForceSendFields is a list of field names (e.g. "Rules") to unconditionally |
| 4855 |
// include in API requests. By default, fields with empty or default values are |
| 4856 |
// omitted from API requests. See |
| 4857 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4858 |
// details. |
| 4859 |
ForceSendFields []string `json:"-"` |
| 4860 |
// NullFields is a list of field names (e.g. "Rules") to include in API |
| 4861 |
// requests with the JSON null value. By default, fields with empty values are |
| 4862 |
// omitted from API requests. See |
| 4863 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4864 |
NullFields []string `json:"-"` |
| 4865 |
} |
| 4866 |
|
| 4867 |
func (s SystemParameters) MarshalJSON() ([]byte, error) { |
| 4868 |
type NoMethod SystemParameters |
| 4869 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4870 |
} |
| 4871 |
|
| 4872 |
// Type: A protocol buffer message type. New usages of this message as an |
| 4873 |
// alternative to DescriptorProto are strongly discouraged. This message does |
| 4874 |
// not reliability preserve all information necessary to model the schema and |
| 4875 |
// preserve semantics. Instead make use of FileDescriptorSet which preserves |
| 4876 |
// the necessary information. |
| 4877 |
type Type struct { |
| 4878 |
// Edition: The source edition string, only valid when syntax is |
| 4879 |
// SYNTAX_EDITIONS. |
| 4880 |
Edition string `json:"edition,omitempty"` |
| 4881 |
// Fields: The list of fields. |
| 4882 |
Fields []*Field `json:"fields,omitempty"` |
| 4883 |
// Name: The fully qualified message name. |
| 4884 |
Name string `json:"name,omitempty"` |
| 4885 |
// Oneofs: The list of types appearing in `oneof` definitions in this type. |
| 4886 |
Oneofs []string `json:"oneofs,omitempty"` |
| 4887 |
// Options: The protocol buffer options. |
| 4888 |
Options []*Option `json:"options,omitempty"` |
| 4889 |
// SourceContext: The source context. |
| 4890 |
SourceContext *SourceContext `json:"sourceContext,omitempty"` |
| 4891 |
// Syntax: The source syntax. |
| 4892 |
// |
| 4893 |
// Possible values: |
| 4894 |
// "SYNTAX_PROTO2" - Syntax `proto2`. |
| 4895 |
// "SYNTAX_PROTO3" - Syntax `proto3`. |
| 4896 |
// "SYNTAX_EDITIONS" - Syntax `editions`. |
| 4897 |
Syntax string `json:"syntax,omitempty"` |
| 4898 |
// ForceSendFields is a list of field names (e.g. "Edition") to unconditionally |
| 4899 |
// include in API requests. By default, fields with empty or default values are |
| 4900 |
// omitted from API requests. See |
| 4901 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4902 |
// details. |
| 4903 |
ForceSendFields []string `json:"-"` |
| 4904 |
// NullFields is a list of field names (e.g. "Edition") to include in API |
| 4905 |
// requests with the JSON null value. By default, fields with empty values are |
| 4906 |
// omitted from API requests. See |
| 4907 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4908 |
NullFields []string `json:"-"` |
| 4909 |
} |
| 4910 |
|
| 4911 |
func (s Type) MarshalJSON() ([]byte, error) { |
| 4912 |
type NoMethod Type |
| 4913 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4914 |
} |
| 4915 |
|
| 4916 |
// UpdateConsumerConfigRequest: Request to update the configuration of a |
| 4917 |
// service networking connection including the import/export of custom routes |
| 4918 |
// and subnetwork routes with public IP. |
| 4919 |
type UpdateConsumerConfigRequest struct { |
| 4920 |
// ConsumerConfig: Required. The updated peering config. |
| 4921 |
ConsumerConfig *ConsumerConfig `json:"consumerConfig,omitempty"` |
| 4922 |
// ForceSendFields is a list of field names (e.g. "ConsumerConfig") to |
| 4923 |
// unconditionally include in API requests. By default, fields with empty or |
| 4924 |
// default values are omitted from API requests. See |
| 4925 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4926 |
// details. |
| 4927 |
ForceSendFields []string `json:"-"` |
| 4928 |
// NullFields is a list of field names (e.g. "ConsumerConfig") to include in |
| 4929 |
// API requests with the JSON null value. By default, fields with empty values |
| 4930 |
// are omitted from API requests. See |
| 4931 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4932 |
NullFields []string `json:"-"` |
| 4933 |
} |
| 4934 |
|
| 4935 |
func (s UpdateConsumerConfigRequest) MarshalJSON() ([]byte, error) { |
| 4936 |
type NoMethod UpdateConsumerConfigRequest |
| 4937 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4938 |
} |
| 4939 |
|
| 4940 |
// UpdateDnsRecordSetMetadata: Metadata provided through GetOperation request |
| 4941 |
// for the LRO generated by UpdateDnsRecordSet API |
| 4942 |
type UpdateDnsRecordSetMetadata struct { |
| 4943 |
} |
| 4944 |
|
| 4945 |
// UpdateDnsRecordSetRequest: Request to update a record set from a private |
| 4946 |
// managed DNS zone in the shared producer host project. The name, type, ttl, |
| 4947 |
// and data values of the existing record set must all exactly match an |
| 4948 |
// existing record set in the specified zone. |
| 4949 |
type UpdateDnsRecordSetRequest struct { |
| 4950 |
// ConsumerNetwork: Required. The network that the consumer is using to connect |
| 4951 |
// with services. Must be in the form of |
| 4952 |
// projects/{project}/global/networks/{network} {project} is the project |
| 4953 |
// number, as in '12345' {network} is the network name. |
| 4954 |
ConsumerNetwork string `json:"consumerNetwork,omitempty"` |
| 4955 |
// ExistingDnsRecordSet: Required. The existing DNS record set to update. |
| 4956 |
ExistingDnsRecordSet *DnsRecordSet `json:"existingDnsRecordSet,omitempty"` |
| 4957 |
// NewDnsRecordSet: Required. The new values that the DNS record set should be |
| 4958 |
// updated to hold. |
| 4959 |
NewDnsRecordSet *DnsRecordSet `json:"newDnsRecordSet,omitempty"` |
| 4960 |
// Zone: Required. The name of the private DNS zone in the shared producer host |
| 4961 |
// project from which the record set will be removed. |
| 4962 |
Zone string `json:"zone,omitempty"` |
| 4963 |
// ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to |
| 4964 |
// unconditionally include in API requests. By default, fields with empty or |
| 4965 |
// default values are omitted from API requests. See |
| 4966 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4967 |
// details. |
| 4968 |
ForceSendFields []string `json:"-"` |
| 4969 |
// NullFields is a list of field names (e.g. "ConsumerNetwork") to include in |
| 4970 |
// API requests with the JSON null value. By default, fields with empty values |
| 4971 |
// are omitted from API requests. See |
| 4972 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4973 |
NullFields []string `json:"-"` |
| 4974 |
} |
| 4975 |
|
| 4976 |
func (s UpdateDnsRecordSetRequest) MarshalJSON() ([]byte, error) { |
| 4977 |
type NoMethod UpdateDnsRecordSetRequest |
| 4978 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4979 |
} |
| 4980 |
|
| 4981 |
// Usage: Configuration controlling usage of a service. |
| 4982 |
type Usage struct { |
| 4983 |
// ProducerNotificationChannel: The full resource name of a channel used for |
| 4984 |
// sending notifications to the service producer. Google Service Management |
| 4985 |
// currently only supports Google Cloud Pub/Sub |
| 4986 |
// (https://cloud.google.com/pubsub) as a notification channel. To use Google |
| 4987 |
// Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic |
| 4988 |
// that uses the Cloud Pub/Sub topic name format documented in |
| 4989 |
// https://cloud.google.com/pubsub/docs/overview. |
| 4990 |
ProducerNotificationChannel string `json:"producerNotificationChannel,omitempty"` |
| 4991 |
// Requirements: Requirements that must be satisfied before a consumer project |
| 4992 |
// can use the service. Each requirement is of the form /; for example |
| 4993 |
// 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of |
| 4994 |
// Service requirement must be included here. Google Cloud APIs must include |
| 4995 |
// "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include |
| 4996 |
// "serviceusage.googleapis.com/tos/universal". Additional ToS can be included |
| 4997 |
// based on the business needs. |
| 4998 |
Requirements []string `json:"requirements,omitempty"` |
| 4999 |
// Rules: A list of usage rules that apply to individual API methods. **NOTE:** |
| 5000 |
// All service configuration rules follow "last one wins" order. |
| 5001 |
Rules []*UsageRule `json:"rules,omitempty"` |
| 5002 |
// ForceSendFields is a list of field names (e.g. |
| 5003 |
// "ProducerNotificationChannel") to unconditionally include in API requests. |
| 5004 |
// By default, fields with empty or default values are omitted from API |
| 5005 |
// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields |
| 5006 |
// for more details. |
| 5007 |
ForceSendFields []string `json:"-"` |
| 5008 |
// NullFields is a list of field names (e.g. "ProducerNotificationChannel") to |
| 5009 |
// include in API requests with the JSON null value. By default, fields with |
| 5010 |
// empty values are omitted from API requests. See |
| 5011 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 5012 |
NullFields []string `json:"-"` |
| 5013 |
} |
| 5014 |
|
| 5015 |
func (s Usage) MarshalJSON() ([]byte, error) { |
| 5016 |
type NoMethod Usage |
| 5017 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 5018 |
} |
| 5019 |
|
| 5020 |
// UsageRule: Usage configuration rules for the service. |
| 5021 |
type UsageRule struct { |
| 5022 |
// AllowUnregisteredCalls: Use this rule to configure unregistered calls for |
| 5023 |
// the service. Unregistered calls are calls that do not contain consumer |
| 5024 |
// project identity. (Example: calls that do not contain an API key). WARNING: |
| 5025 |
// By default, API methods do not allow unregistered calls, and each method |
| 5026 |
// call must be identified by a consumer project identity. |
| 5027 |
AllowUnregisteredCalls bool `json:"allowUnregisteredCalls,omitempty"` |
| 5028 |
// Selector: Selects the methods to which this rule applies. Use '*' to |
| 5029 |
// indicate all methods in all APIs. Refer to selector for syntax details. |
| 5030 |
Selector string `json:"selector,omitempty"` |
| 5031 |
// SkipServiceControl: If true, the selected method should skip service control |
| 5032 |
// and the control plane features, such as quota and billing, will not be |
| 5033 |
// available. This flag is used by Google Cloud Endpoints to bypass checks for |
| 5034 |
// internal methods, such as service health check methods. |
| 5035 |
SkipServiceControl bool `json:"skipServiceControl,omitempty"` |
| 5036 |
// ForceSendFields is a list of field names (e.g. "AllowUnregisteredCalls") to |
| 5037 |
// unconditionally include in API requests. By default, fields with empty or |
| 5038 |
// default values are omitted from API requests. See |
| 5039 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 5040 |
// details. |
| 5041 |
ForceSendFields []string `json:"-"` |
| 5042 |
// NullFields is a list of field names (e.g. "AllowUnregisteredCalls") to |
| 5043 |
// include in API requests with the JSON null value. By default, fields with |
| 5044 |
// empty values are omitted from API requests. See |
| 5045 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 5046 |
NullFields []string `json:"-"` |
| 5047 |
} |
| 5048 |
|
| 5049 |
func (s UsageRule) MarshalJSON() ([]byte, error) { |
| 5050 |
type NoMethod UsageRule |
| 5051 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 5052 |
} |
| 5053 |
|
| 5054 |
type ValidateConsumerConfigRequest struct { |
| 5055 |
// CheckServiceNetworkingUsePermission: Optional. The IAM permission check |
| 5056 |
// determines whether the consumer project has 'servicenetworking.services.use' |
| 5057 |
// permission or not. |
| 5058 |
CheckServiceNetworkingUsePermission bool `json:"checkServiceNetworkingUsePermission,omitempty"` |
| 5059 |
// ConsumerNetwork: Required. The network that the consumer is using to connect |
| 5060 |
// with services. Must be in the form of |
| 5061 |
// projects/{project}/global/networks/{network} {project} is a project number, |
| 5062 |
// as in '12345' {network} is network name. |
| 5063 |
ConsumerNetwork string `json:"consumerNetwork,omitempty"` |
| 5064 |
// ConsumerProject: NETWORK_NOT_IN_CONSUMERS_PROJECT, |
| 5065 |
// NETWORK_NOT_IN_CONSUMERS_HOST_PROJECT, and HOST_PROJECT_NOT_FOUND are done |
| 5066 |
// when consumer_project is provided. |
| 5067 |
ConsumerProject *ConsumerProject `json:"consumerProject,omitempty"` |
| 5068 |
// RangeReservation: RANGES_EXHAUSTED, RANGES_NOT_RESERVED, and |
| 5069 |
// RANGES_DELETED_LATER are done when range_reservation is provided. |
| 5070 |
RangeReservation *RangeReservation `json:"rangeReservation,omitempty"` |
| 5071 |
// ValidateNetwork: The validations will be performed in the order listed in |
| 5072 |
// the ValidationError enum. The first failure will return. If a validation is |
| 5073 |
// not requested, then the next one will be performed. |
| 5074 |
// SERVICE_NETWORKING_NOT_ENABLED and NETWORK_NOT_PEERED checks are performed |
| 5075 |
// for all requests where validation is requested. NETWORK_NOT_FOUND and |
| 5076 |
// NETWORK_DISCONNECTED checks are done for requests that have validate_network |
| 5077 |
// set to true. |
| 5078 |
ValidateNetwork bool `json:"validateNetwork,omitempty"` |
| 5079 |
// ForceSendFields is a list of field names (e.g. |
| 5080 |
// "CheckServiceNetworkingUsePermission") to unconditionally include in API |
| 5081 |
// requests. By default, fields with empty or default values are omitted from |
| 5082 |
// API requests. See |
| 5083 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 5084 |
// details. |
| 5085 |
ForceSendFields []string `json:"-"` |
| 5086 |
// NullFields is a list of field names (e.g. |
| 5087 |
// "CheckServiceNetworkingUsePermission") to include in API requests with the |
| 5088 |
// JSON null value. By default, fields with empty values are omitted from API |
| 5089 |
// requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for |
| 5090 |
// more details. |
| 5091 |
NullFields []string `json:"-"` |
| 5092 |
} |
| 5093 |
|
| 5094 |
func (s ValidateConsumerConfigRequest) MarshalJSON() ([]byte, error) { |
| 5095 |
type NoMethod ValidateConsumerConfigRequest |
| 5096 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 5097 |
} |
| 5098 |
|
| 5099 |
type ValidateConsumerConfigResponse struct { |
| 5100 |
// ExistingSubnetworkCandidates: List of subnetwork candidates from the request |
| 5101 |
// which exist with the `ip_cidr_range`, `secondary_ip_cider_ranges`, and |
| 5102 |
// `outside_allocation` fields set. |
| 5103 |
ExistingSubnetworkCandidates []*Subnetwork `json:"existingSubnetworkCandidates,omitempty"` |
| 5104 |
// IsValid: Indicates whether all the requested validations passed. |
| 5105 |
IsValid bool `json:"isValid,omitempty"` |
| 5106 |
// ValidationError: The first validation which failed. |
| 5107 |
// |
| 5108 |
// Possible values: |
| 5109 |
// "VALIDATION_ERROR_UNSPECIFIED" |
| 5110 |
// "VALIDATION_NOT_REQUESTED" - In case none of the validations are |
| 5111 |
// requested. |
| 5112 |
// "SERVICE_NETWORKING_NOT_ENABLED" |
| 5113 |
// "NETWORK_NOT_FOUND" - The network provided by the consumer does not exist. |
| 5114 |
// "NETWORK_NOT_PEERED" - The network has not been peered with the producer |
| 5115 |
// org. |
| 5116 |
// "NETWORK_PEERING_DELETED" - The peering was created and later deleted. |
| 5117 |
// "NETWORK_NOT_IN_CONSUMERS_PROJECT" - The network is a regular VPC but the |
| 5118 |
// network is not in the consumer's project. |
| 5119 |
// "NETWORK_NOT_IN_CONSUMERS_HOST_PROJECT" - The consumer project is a |
| 5120 |
// service project, and network is a shared VPC, but the network is not in the |
| 5121 |
// host project of this consumer project. |
| 5122 |
// "HOST_PROJECT_NOT_FOUND" - The host project associated with the consumer |
| 5123 |
// project was not found. |
| 5124 |
// "CONSUMER_PROJECT_NOT_SERVICE_PROJECT" - The consumer project is not a |
| 5125 |
// service project for the specified host project. |
| 5126 |
// "RANGES_EXHAUSTED" - The reserved IP ranges do not have enough space to |
| 5127 |
// create a subnet of desired size. |
| 5128 |
// "RANGES_NOT_RESERVED" - The IP ranges were not reserved. |
| 5129 |
// "RANGES_DELETED_LATER" - The IP ranges were reserved but deleted later. |
| 5130 |
// "COMPUTE_API_NOT_ENABLED" - The consumer project does not have the compute |
| 5131 |
// api enabled. |
| 5132 |
// "USE_PERMISSION_NOT_FOUND" - The consumer project does not have the |
| 5133 |
// permission from the host project. |
| 5134 |
// "SN_SERVICE_AGENT_PERMISSION_DENIED_ON_CONSUMER_PROJECT" - The SN service |
| 5135 |
// agent {[email protected]} does not have |
| 5136 |
// the SN service agent role on the consumer project. |
| 5137 |
ValidationError string `json:"validationError,omitempty"` |
| 5138 |
|
| 5139 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 5140 |
googleapi.ServerResponse `json:"-"` |
| 5141 |
// ForceSendFields is a list of field names (e.g. |
| 5142 |
// "ExistingSubnetworkCandidates") to unconditionally include in API requests. |
| 5143 |
// By default, fields with empty or default values are omitted from API |
| 5144 |
// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields |
| 5145 |
// for more details. |
| 5146 |
ForceSendFields []string `json:"-"` |
| 5147 |
// NullFields is a list of field names (e.g. "ExistingSubnetworkCandidates") to |
| 5148 |
// include in API requests with the JSON null value. By default, fields with |
| 5149 |
// empty values are omitted from API requests. See |
| 5150 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 5151 |
NullFields []string `json:"-"` |
| 5152 |
} |
| 5153 |
|
| 5154 |
func (s ValidateConsumerConfigResponse) MarshalJSON() ([]byte, error) { |
| 5155 |
type NoMethod ValidateConsumerConfigResponse |
| 5156 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 5157 |
} |
| 5158 |
|
| 5159 |
// VpcServiceControls: Response for the get VPC Service Controls request. |
| 5160 |
type VpcServiceControls struct { |
| 5161 |
// Enabled: Output only. Indicates whether the VPC Service Controls are enabled |
| 5162 |
// or disabled for the connection. If the consumer called the |
| 5163 |
// EnableVpcServiceControls method, then this is true. If the consumer called |
| 5164 |
// DisableVpcServiceControls, then this is false. The default is false. |
| 5165 |
Enabled bool `json:"enabled,omitempty"` |
| 5166 |
|
| 5167 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 5168 |
googleapi.ServerResponse `json:"-"` |
| 5169 |
// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally |
| 5170 |
// include in API requests. By default, fields with empty or default values are |
| 5171 |
// omitted from API requests. See |
| 5172 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 5173 |
// details. |
| 5174 |
ForceSendFields []string `json:"-"` |
| 5175 |
// NullFields is a list of field names (e.g. "Enabled") to include in API |
| 5176 |
// requests with the JSON null value. By default, fields with empty values are |
| 5177 |
// omitted from API requests. See |
| 5178 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 5179 |
NullFields []string `json:"-"` |
| 5180 |
} |
| 5181 |
|
| 5182 |
func (s VpcServiceControls) MarshalJSON() ([]byte, error) { |
| 5183 |
type NoMethod VpcServiceControls |
| 5184 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 5185 |
} |
| 5186 |
|
| 5187 |
type OperationsCancelCall struct { |
| 5188 |
s *APIService |
| 5189 |
name string |
| 5190 |
canceloperationrequest *CancelOperationRequest |
| 5191 |
urlParams_ gensupport.URLParams |
| 5192 |
ctx_ context.Context |
| 5193 |
header_ http.Header |
| 5194 |
} |
| 5195 |
|
| 5196 |
// Cancel: Starts asynchronous cancellation on a long-running operation. The |
| 5197 |
// server makes a best effort to cancel the operation, but success is not |
| 5198 |
// guaranteed. If the server doesn't support this method, it returns |
| 5199 |
// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or |
| 5200 |
// other methods to check whether the cancellation succeeded or whether the |
| 5201 |
// operation completed despite cancellation. On successful cancellation, the |
| 5202 |
// operation is not deleted; instead, it becomes an operation with an |
| 5203 |
// Operation.error value with a google.rpc.Status.code of `1`, corresponding to |
| 5204 |
// `Code.CANCELLED`. |
| 5205 |
// |
| 5206 |
// - name: The name of the operation resource to be cancelled. |
| 5207 |
func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall { |
| 5208 |
c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5209 |
c.name = name |
| 5210 |
c.canceloperationrequest = canceloperationrequest |
| 5211 |
return c |
| 5212 |
} |
| 5213 |
|
| 5214 |
// Fields allows partial responses to be retrieved. See |
| 5215 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5216 |
// details. |
| 5217 |
func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall { |
| 5218 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5219 |
return c |
| 5220 |
} |
| 5221 |
|
| 5222 |
// Context sets the context to be used in this call's Do method. |
| 5223 |
func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall { |
| 5224 |
c.ctx_ = ctx |
| 5225 |
return c |
| 5226 |
} |
| 5227 |
|
| 5228 |
// Header returns a http.Header that can be modified by the caller to add |
| 5229 |
// headers to the request. |
| 5230 |
func (c *OperationsCancelCall) Header() http.Header { |
| 5231 |
if c.header_ == nil { |
| 5232 |
c.header_ = make(http.Header) |
| 5233 |
} |
| 5234 |
return c.header_ |
| 5235 |
} |
| 5236 |
|
| 5237 |
func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) { |
| 5238 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 5239 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest) |
| 5240 |
if err != nil { |
| 5241 |
return nil, err |
| 5242 |
} |
| 5243 |
c.urlParams_.Set("alt", alt) |
| 5244 |
c.urlParams_.Set("prettyPrint", "false") |
| 5245 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") |
| 5246 |
urls += "?" + c.urlParams_.Encode() |
| 5247 |
req, err := http.NewRequest("POST", urls, body) |
| 5248 |
if err != nil { |
| 5249 |
return nil, err |
| 5250 |
} |
| 5251 |
req.Header = reqHeaders |
| 5252 |
googleapi.Expand(req.URL, map[string]string{ |
| 5253 |
"name": c.name, |
| 5254 |
}) |
| 5255 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 5256 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5257 |
} |
| 5258 |
|
| 5259 |
// Do executes the "servicenetworking.operations.cancel" call. |
| 5260 |
// Any non-2xx status code is an error. Response headers are in either |
| 5261 |
// *Empty.ServerResponse.Header or (if a response was returned at all) in |
| 5262 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 5263 |
// whether the returned error was because http.StatusNotModified was returned. |
| 5264 |
func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| 5265 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5266 |
res, err := c.doRequest("json") |
| 5267 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5268 |
if res.Body != nil { |
| 5269 |
res.Body.Close() |
| 5270 |
} |
| 5271 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5272 |
Code: res.StatusCode, |
| 5273 |
Header: res.Header, |
| 5274 |
}) |
| 5275 |
} |
| 5276 |
if err != nil { |
| 5277 |
return nil, err |
| 5278 |
} |
| 5279 |
defer googleapi.CloseBody(res) |
| 5280 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5281 |
return nil, gensupport.WrapError(err) |
| 5282 |
} |
| 5283 |
ret := &Empty{ |
| 5284 |
ServerResponse: googleapi.ServerResponse{ |
| 5285 |
Header: res.Header, |
| 5286 |
HTTPStatusCode: res.StatusCode, |
| 5287 |
}, |
| 5288 |
} |
| 5289 |
target := &ret |
| 5290 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5291 |
if err != nil { |
| 5292 |
return nil, err |
| 5293 |
} |
| 5294 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.operations.cancel", "response", internallog.HTTPResponse(res, b)) |
| 5295 |
return ret, nil |
| 5296 |
} |
| 5297 |
|
| 5298 |
type OperationsDeleteCall struct { |
| 5299 |
s *APIService |
| 5300 |
name string |
| 5301 |
urlParams_ gensupport.URLParams |
| 5302 |
ctx_ context.Context |
| 5303 |
header_ http.Header |
| 5304 |
} |
| 5305 |
|
| 5306 |
// Delete: Deletes a long-running operation. This method indicates that the |
| 5307 |
// client is no longer interested in the operation result. It does not cancel |
| 5308 |
// the operation. If the server doesn't support this method, it returns |
| 5309 |
// `google.rpc.Code.UNIMPLEMENTED`. |
| 5310 |
// |
| 5311 |
// - name: The name of the operation resource to be deleted. |
| 5312 |
func (r *OperationsService) Delete(name string) *OperationsDeleteCall { |
| 5313 |
c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5314 |
c.name = name |
| 5315 |
return c |
| 5316 |
} |
| 5317 |
|
| 5318 |
// Fields allows partial responses to be retrieved. See |
| 5319 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5320 |
// details. |
| 5321 |
func (c *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall { |
| 5322 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5323 |
return c |
| 5324 |
} |
| 5325 |
|
| 5326 |
// Context sets the context to be used in this call's Do method. |
| 5327 |
func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall { |
| 5328 |
c.ctx_ = ctx |
| 5329 |
return c |
| 5330 |
} |
| 5331 |
|
| 5332 |
// Header returns a http.Header that can be modified by the caller to add |
| 5333 |
// headers to the request. |
| 5334 |
func (c *OperationsDeleteCall) Header() http.Header { |
| 5335 |
if c.header_ == nil { |
| 5336 |
c.header_ = make(http.Header) |
| 5337 |
} |
| 5338 |
return c.header_ |
| 5339 |
} |
| 5340 |
|
| 5341 |
func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) { |
| 5342 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 5343 |
c.urlParams_.Set("alt", alt) |
| 5344 |
c.urlParams_.Set("prettyPrint", "false") |
| 5345 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 5346 |
urls += "?" + c.urlParams_.Encode() |
| 5347 |
req, err := http.NewRequest("DELETE", urls, nil) |
| 5348 |
if err != nil { |
| 5349 |
return nil, err |
| 5350 |
} |
| 5351 |
req.Header = reqHeaders |
| 5352 |
googleapi.Expand(req.URL, map[string]string{ |
| 5353 |
"name": c.name, |
| 5354 |
}) |
| 5355 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.operations.delete", "request", internallog.HTTPRequest(req, nil)) |
| 5356 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5357 |
} |
| 5358 |
|
| 5359 |
// Do executes the "servicenetworking.operations.delete" call. |
| 5360 |
// Any non-2xx status code is an error. Response headers are in either |
| 5361 |
// *Empty.ServerResponse.Header or (if a response was returned at all) in |
| 5362 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 5363 |
// whether the returned error was because http.StatusNotModified was returned. |
| 5364 |
func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| 5365 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5366 |
res, err := c.doRequest("json") |
| 5367 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5368 |
if res.Body != nil { |
| 5369 |
res.Body.Close() |
| 5370 |
} |
| 5371 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5372 |
Code: res.StatusCode, |
| 5373 |
Header: res.Header, |
| 5374 |
}) |
| 5375 |
} |
| 5376 |
if err != nil { |
| 5377 |
return nil, err |
| 5378 |
} |
| 5379 |
defer googleapi.CloseBody(res) |
| 5380 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5381 |
return nil, gensupport.WrapError(err) |
| 5382 |
} |
| 5383 |
ret := &Empty{ |
| 5384 |
ServerResponse: googleapi.ServerResponse{ |
| 5385 |
Header: res.Header, |
| 5386 |
HTTPStatusCode: res.StatusCode, |
| 5387 |
}, |
| 5388 |
} |
| 5389 |
target := &ret |
| 5390 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5391 |
if err != nil { |
| 5392 |
return nil, err |
| 5393 |
} |
| 5394 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.operations.delete", "response", internallog.HTTPResponse(res, b)) |
| 5395 |
return ret, nil |
| 5396 |
} |
| 5397 |
|
| 5398 |
type OperationsGetCall struct { |
| 5399 |
s *APIService |
| 5400 |
name string |
| 5401 |
urlParams_ gensupport.URLParams |
| 5402 |
ifNoneMatch_ string |
| 5403 |
ctx_ context.Context |
| 5404 |
header_ http.Header |
| 5405 |
} |
| 5406 |
|
| 5407 |
// Get: Gets the latest state of a long-running operation. Clients can use this |
| 5408 |
// method to poll the operation result at intervals as recommended by the API |
| 5409 |
// service. |
| 5410 |
// |
| 5411 |
// - name: The name of the operation resource. |
| 5412 |
func (r *OperationsService) Get(name string) *OperationsGetCall { |
| 5413 |
c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5414 |
c.name = name |
| 5415 |
return c |
| 5416 |
} |
| 5417 |
|
| 5418 |
// Fields allows partial responses to be retrieved. See |
| 5419 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5420 |
// details. |
| 5421 |
func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { |
| 5422 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5423 |
return c |
| 5424 |
} |
| 5425 |
|
| 5426 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 5427 |
// object's ETag matches the given value. This is useful for getting updates |
| 5428 |
// only after the object has changed since the last request. |
| 5429 |
func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { |
| 5430 |
c.ifNoneMatch_ = entityTag |
| 5431 |
return c |
| 5432 |
} |
| 5433 |
|
| 5434 |
// Context sets the context to be used in this call's Do method. |
| 5435 |
func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { |
| 5436 |
c.ctx_ = ctx |
| 5437 |
return c |
| 5438 |
} |
| 5439 |
|
| 5440 |
// Header returns a http.Header that can be modified by the caller to add |
| 5441 |
// headers to the request. |
| 5442 |
func (c *OperationsGetCall) Header() http.Header { |
| 5443 |
if c.header_ == nil { |
| 5444 |
c.header_ = make(http.Header) |
| 5445 |
} |
| 5446 |
return c.header_ |
| 5447 |
} |
| 5448 |
|
| 5449 |
func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { |
| 5450 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 5451 |
if c.ifNoneMatch_ != "" { |
| 5452 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 5453 |
} |
| 5454 |
c.urlParams_.Set("alt", alt) |
| 5455 |
c.urlParams_.Set("prettyPrint", "false") |
| 5456 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 5457 |
urls += "?" + c.urlParams_.Encode() |
| 5458 |
req, err := http.NewRequest("GET", urls, nil) |
| 5459 |
if err != nil { |
| 5460 |
return nil, err |
| 5461 |
} |
| 5462 |
req.Header = reqHeaders |
| 5463 |
googleapi.Expand(req.URL, map[string]string{ |
| 5464 |
"name": c.name, |
| 5465 |
}) |
| 5466 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.operations.get", "request", internallog.HTTPRequest(req, nil)) |
| 5467 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5468 |
} |
| 5469 |
|
| 5470 |
// Do executes the "servicenetworking.operations.get" call. |
| 5471 |
// Any non-2xx status code is an error. Response headers are in either |
| 5472 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 5473 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 5474 |
// whether the returned error was because http.StatusNotModified was returned. |
| 5475 |
func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 5476 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5477 |
res, err := c.doRequest("json") |
| 5478 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5479 |
if res.Body != nil { |
| 5480 |
res.Body.Close() |
| 5481 |
} |
| 5482 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5483 |
Code: res.StatusCode, |
| 5484 |
Header: res.Header, |
| 5485 |
}) |
| 5486 |
} |
| 5487 |
if err != nil { |
| 5488 |
return nil, err |
| 5489 |
} |
| 5490 |
defer googleapi.CloseBody(res) |
| 5491 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5492 |
return nil, gensupport.WrapError(err) |
| 5493 |
} |
| 5494 |
ret := &Operation{ |
| 5495 |
ServerResponse: googleapi.ServerResponse{ |
| 5496 |
Header: res.Header, |
| 5497 |
HTTPStatusCode: res.StatusCode, |
| 5498 |
}, |
| 5499 |
} |
| 5500 |
target := &ret |
| 5501 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5502 |
if err != nil { |
| 5503 |
return nil, err |
| 5504 |
} |
| 5505 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.operations.get", "response", internallog.HTTPResponse(res, b)) |
| 5506 |
return ret, nil |
| 5507 |
} |
| 5508 |
|
| 5509 |
type OperationsListCall struct { |
| 5510 |
s *APIService |
| 5511 |
name string |
| 5512 |
urlParams_ gensupport.URLParams |
| 5513 |
ifNoneMatch_ string |
| 5514 |
ctx_ context.Context |
| 5515 |
header_ http.Header |
| 5516 |
} |
| 5517 |
|
| 5518 |
// List: Lists operations that match the specified filter in the request. If |
| 5519 |
// the server doesn't support this method, it returns `UNIMPLEMENTED`. |
| 5520 |
// |
| 5521 |
// - name: The name of the operation's parent resource. |
| 5522 |
func (r *OperationsService) List(name string) *OperationsListCall { |
| 5523 |
c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5524 |
c.name = name |
| 5525 |
return c |
| 5526 |
} |
| 5527 |
|
| 5528 |
// Filter sets the optional parameter "filter": The standard list filter. |
| 5529 |
func (c *OperationsListCall) Filter(filter string) *OperationsListCall { |
| 5530 |
c.urlParams_.Set("filter", filter) |
| 5531 |
return c |
| 5532 |
} |
| 5533 |
|
| 5534 |
// PageSize sets the optional parameter "pageSize": The standard list page |
| 5535 |
// size. |
| 5536 |
func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { |
| 5537 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 5538 |
return c |
| 5539 |
} |
| 5540 |
|
| 5541 |
// PageToken sets the optional parameter "pageToken": The standard list page |
| 5542 |
// token. |
| 5543 |
func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { |
| 5544 |
c.urlParams_.Set("pageToken", pageToken) |
| 5545 |
return c |
| 5546 |
} |
| 5547 |
|
| 5548 |
// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": |
| 5549 |
// When set to `true`, operations that are reachable are returned as normal, |
| 5550 |
// and those that are unreachable are returned in the |
| 5551 |
// ListOperationsResponse.unreachable field. This can only be `true` when |
| 5552 |
// reading across collections. For example, when `parent` is set to |
| 5553 |
// "projects/example/locations/-". This field is not supported by default and |
| 5554 |
// will result in an `UNIMPLEMENTED` error if set unless explicitly documented |
| 5555 |
// otherwise in service or product specific documentation. |
| 5556 |
func (c *OperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *OperationsListCall { |
| 5557 |
c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) |
| 5558 |
return c |
| 5559 |
} |
| 5560 |
|
| 5561 |
// Fields allows partial responses to be retrieved. See |
| 5562 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5563 |
// details. |
| 5564 |
func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { |
| 5565 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5566 |
return c |
| 5567 |
} |
| 5568 |
|
| 5569 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 5570 |
// object's ETag matches the given value. This is useful for getting updates |
| 5571 |
// only after the object has changed since the last request. |
| 5572 |
func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { |
| 5573 |
c.ifNoneMatch_ = entityTag |
| 5574 |
return c |
| 5575 |
} |
| 5576 |
|
| 5577 |
// Context sets the context to be used in this call's Do method. |
| 5578 |
func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { |
| 5579 |
c.ctx_ = ctx |
| 5580 |
return c |
| 5581 |
} |
| 5582 |
|
| 5583 |
// Header returns a http.Header that can be modified by the caller to add |
| 5584 |
// headers to the request. |
| 5585 |
func (c *OperationsListCall) Header() http.Header { |
| 5586 |
if c.header_ == nil { |
| 5587 |
c.header_ = make(http.Header) |
| 5588 |
} |
| 5589 |
return c.header_ |
| 5590 |
} |
| 5591 |
|
| 5592 |
func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { |
| 5593 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 5594 |
if c.ifNoneMatch_ != "" { |
| 5595 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 5596 |
} |
| 5597 |
c.urlParams_.Set("alt", alt) |
| 5598 |
c.urlParams_.Set("prettyPrint", "false") |
| 5599 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 5600 |
urls += "?" + c.urlParams_.Encode() |
| 5601 |
req, err := http.NewRequest("GET", urls, nil) |
| 5602 |
if err != nil { |
| 5603 |
return nil, err |
| 5604 |
} |
| 5605 |
req.Header = reqHeaders |
| 5606 |
googleapi.Expand(req.URL, map[string]string{ |
| 5607 |
"name": c.name, |
| 5608 |
}) |
| 5609 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.operations.list", "request", internallog.HTTPRequest(req, nil)) |
| 5610 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5611 |
} |
| 5612 |
|
| 5613 |
// Do executes the "servicenetworking.operations.list" call. |
| 5614 |
// Any non-2xx status code is an error. Response headers are in either |
| 5615 |
// *ListOperationsResponse.ServerResponse.Header or (if a response was returned |
| 5616 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 5617 |
// check whether the returned error was because http.StatusNotModified was |
| 5618 |
// returned. |
| 5619 |
func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { |
| 5620 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5621 |
res, err := c.doRequest("json") |
| 5622 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5623 |
if res.Body != nil { |
| 5624 |
res.Body.Close() |
| 5625 |
} |
| 5626 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5627 |
Code: res.StatusCode, |
| 5628 |
Header: res.Header, |
| 5629 |
}) |
| 5630 |
} |
| 5631 |
if err != nil { |
| 5632 |
return nil, err |
| 5633 |
} |
| 5634 |
defer googleapi.CloseBody(res) |
| 5635 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5636 |
return nil, gensupport.WrapError(err) |
| 5637 |
} |
| 5638 |
ret := &ListOperationsResponse{ |
| 5639 |
ServerResponse: googleapi.ServerResponse{ |
| 5640 |
Header: res.Header, |
| 5641 |
HTTPStatusCode: res.StatusCode, |
| 5642 |
}, |
| 5643 |
} |
| 5644 |
target := &ret |
| 5645 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5646 |
if err != nil { |
| 5647 |
return nil, err |
| 5648 |
} |
| 5649 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.operations.list", "response", internallog.HTTPResponse(res, b)) |
| 5650 |
return ret, nil |
| 5651 |
} |
| 5652 |
|
| 5653 |
// Pages invokes f for each page of results. |
| 5654 |
// A non-nil error returned from f will halt the iteration. |
| 5655 |
// The provided context supersedes any context provided to the Context method. |
| 5656 |
func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { |
| 5657 |
c.ctx_ = ctx |
| 5658 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 5659 |
for { |
| 5660 |
x, err := c.Do() |
| 5661 |
if err != nil { |
| 5662 |
return err |
| 5663 |
} |
| 5664 |
if err := f(x); err != nil { |
| 5665 |
return err |
| 5666 |
} |
| 5667 |
if x.NextPageToken == "" { |
| 5668 |
return nil |
| 5669 |
} |
| 5670 |
c.PageToken(x.NextPageToken) |
| 5671 |
} |
| 5672 |
} |
| 5673 |
|
| 5674 |
type ServicesAddSubnetworkCall struct { |
| 5675 |
s *APIService |
| 5676 |
parent string |
| 5677 |
addsubnetworkrequest *AddSubnetworkRequest |
| 5678 |
urlParams_ gensupport.URLParams |
| 5679 |
ctx_ context.Context |
| 5680 |
header_ http.Header |
| 5681 |
} |
| 5682 |
|
| 5683 |
// AddSubnetwork: For service producers, provisions a new subnet in a peered |
| 5684 |
// service's shared VPC network in the requested region and with the requested |
| 5685 |
// size that's expressed as a CIDR range (number of leading bits of ipV4 |
| 5686 |
// network mask). The method checks against the assigned allocated ranges to |
| 5687 |
// find a non-conflicting IP address range. The method will reuse a subnet if |
| 5688 |
// subsequent calls contain the same subnet name, region, and prefix length. |
| 5689 |
// This method will make producer's tenant project to be a shared VPC service |
| 5690 |
// project as needed. |
| 5691 |
// |
| 5692 |
// - parent: A tenant project in the service producer organization, in the |
| 5693 |
// following format: services/{service}/{collection-id}/{resource-id}. |
| 5694 |
// {collection-id} is the cloud resource collection type that represents the |
| 5695 |
// tenant project. Only `projects` are supported. {resource-id} is the tenant |
| 5696 |
// project numeric id, such as `123456`. {service} the name of the peering |
| 5697 |
// service, such as `service-peering.example.com`. This service must already |
| 5698 |
// be enabled in the service consumer's project. |
| 5699 |
func (r *ServicesService) AddSubnetwork(parent string, addsubnetworkrequest *AddSubnetworkRequest) *ServicesAddSubnetworkCall { |
| 5700 |
c := &ServicesAddSubnetworkCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5701 |
c.parent = parent |
| 5702 |
c.addsubnetworkrequest = addsubnetworkrequest |
| 5703 |
return c |
| 5704 |
} |
| 5705 |
|
| 5706 |
// Fields allows partial responses to be retrieved. See |
| 5707 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5708 |
// details. |
| 5709 |
func (c *ServicesAddSubnetworkCall) Fields(s ...googleapi.Field) *ServicesAddSubnetworkCall { |
| 5710 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5711 |
return c |
| 5712 |
} |
| 5713 |
|
| 5714 |
// Context sets the context to be used in this call's Do method. |
| 5715 |
func (c *ServicesAddSubnetworkCall) Context(ctx context.Context) *ServicesAddSubnetworkCall { |
| 5716 |
c.ctx_ = ctx |
| 5717 |
return c |
| 5718 |
} |
| 5719 |
|
| 5720 |
// Header returns a http.Header that can be modified by the caller to add |
| 5721 |
// headers to the request. |
| 5722 |
func (c *ServicesAddSubnetworkCall) Header() http.Header { |
| 5723 |
if c.header_ == nil { |
| 5724 |
c.header_ = make(http.Header) |
| 5725 |
} |
| 5726 |
return c.header_ |
| 5727 |
} |
| 5728 |
|
| 5729 |
func (c *ServicesAddSubnetworkCall) doRequest(alt string) (*http.Response, error) { |
| 5730 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 5731 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.addsubnetworkrequest) |
| 5732 |
if err != nil { |
| 5733 |
return nil, err |
| 5734 |
} |
| 5735 |
c.urlParams_.Set("alt", alt) |
| 5736 |
c.urlParams_.Set("prettyPrint", "false") |
| 5737 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:addSubnetwork") |
| 5738 |
urls += "?" + c.urlParams_.Encode() |
| 5739 |
req, err := http.NewRequest("POST", urls, body) |
| 5740 |
if err != nil { |
| 5741 |
return nil, err |
| 5742 |
} |
| 5743 |
req.Header = reqHeaders |
| 5744 |
googleapi.Expand(req.URL, map[string]string{ |
| 5745 |
"parent": c.parent, |
| 5746 |
}) |
| 5747 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.addSubnetwork", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 5748 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5749 |
} |
| 5750 |
|
| 5751 |
// Do executes the "servicenetworking.services.addSubnetwork" call. |
| 5752 |
// Any non-2xx status code is an error. Response headers are in either |
| 5753 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 5754 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 5755 |
// whether the returned error was because http.StatusNotModified was returned. |
| 5756 |
func (c *ServicesAddSubnetworkCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 5757 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5758 |
res, err := c.doRequest("json") |
| 5759 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5760 |
if res.Body != nil { |
| 5761 |
res.Body.Close() |
| 5762 |
} |
| 5763 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5764 |
Code: res.StatusCode, |
| 5765 |
Header: res.Header, |
| 5766 |
}) |
| 5767 |
} |
| 5768 |
if err != nil { |
| 5769 |
return nil, err |
| 5770 |
} |
| 5771 |
defer googleapi.CloseBody(res) |
| 5772 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5773 |
return nil, gensupport.WrapError(err) |
| 5774 |
} |
| 5775 |
ret := &Operation{ |
| 5776 |
ServerResponse: googleapi.ServerResponse{ |
| 5777 |
Header: res.Header, |
| 5778 |
HTTPStatusCode: res.StatusCode, |
| 5779 |
}, |
| 5780 |
} |
| 5781 |
target := &ret |
| 5782 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5783 |
if err != nil { |
| 5784 |
return nil, err |
| 5785 |
} |
| 5786 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.addSubnetwork", "response", internallog.HTTPResponse(res, b)) |
| 5787 |
return ret, nil |
| 5788 |
} |
| 5789 |
|
| 5790 |
type ServicesDisableVpcServiceControlsCall struct { |
| 5791 |
s *APIService |
| 5792 |
parent string |
| 5793 |
disablevpcservicecontrolsrequest *DisableVpcServiceControlsRequest |
| 5794 |
urlParams_ gensupport.URLParams |
| 5795 |
ctx_ context.Context |
| 5796 |
header_ http.Header |
| 5797 |
} |
| 5798 |
|
| 5799 |
// DisableVpcServiceControls: Disables VPC service controls for a connection. |
| 5800 |
// |
| 5801 |
// - parent: The service that is managing peering connectivity for a service |
| 5802 |
// producer's organization. For Google services that support this |
| 5803 |
// functionality, this value is `services/servicenetworking.googleapis.com`. |
| 5804 |
func (r *ServicesService) DisableVpcServiceControls(parent string, disablevpcservicecontrolsrequest *DisableVpcServiceControlsRequest) *ServicesDisableVpcServiceControlsCall { |
| 5805 |
c := &ServicesDisableVpcServiceControlsCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5806 |
c.parent = parent |
| 5807 |
c.disablevpcservicecontrolsrequest = disablevpcservicecontrolsrequest |
| 5808 |
return c |
| 5809 |
} |
| 5810 |
|
| 5811 |
// Fields allows partial responses to be retrieved. See |
| 5812 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5813 |
// details. |
| 5814 |
func (c *ServicesDisableVpcServiceControlsCall) Fields(s ...googleapi.Field) *ServicesDisableVpcServiceControlsCall { |
| 5815 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5816 |
return c |
| 5817 |
} |
| 5818 |
|
| 5819 |
// Context sets the context to be used in this call's Do method. |
| 5820 |
func (c *ServicesDisableVpcServiceControlsCall) Context(ctx context.Context) *ServicesDisableVpcServiceControlsCall { |
| 5821 |
c.ctx_ = ctx |
| 5822 |
return c |
| 5823 |
} |
| 5824 |
|
| 5825 |
// Header returns a http.Header that can be modified by the caller to add |
| 5826 |
// headers to the request. |
| 5827 |
func (c *ServicesDisableVpcServiceControlsCall) Header() http.Header { |
| 5828 |
if c.header_ == nil { |
| 5829 |
c.header_ = make(http.Header) |
| 5830 |
} |
| 5831 |
return c.header_ |
| 5832 |
} |
| 5833 |
|
| 5834 |
func (c *ServicesDisableVpcServiceControlsCall) doRequest(alt string) (*http.Response, error) { |
| 5835 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 5836 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disablevpcservicecontrolsrequest) |
| 5837 |
if err != nil { |
| 5838 |
return nil, err |
| 5839 |
} |
| 5840 |
c.urlParams_.Set("alt", alt) |
| 5841 |
c.urlParams_.Set("prettyPrint", "false") |
| 5842 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:disableVpcServiceControls") |
| 5843 |
urls += "?" + c.urlParams_.Encode() |
| 5844 |
req, err := http.NewRequest("PATCH", urls, body) |
| 5845 |
if err != nil { |
| 5846 |
return nil, err |
| 5847 |
} |
| 5848 |
req.Header = reqHeaders |
| 5849 |
googleapi.Expand(req.URL, map[string]string{ |
| 5850 |
"parent": c.parent, |
| 5851 |
}) |
| 5852 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.disableVpcServiceControls", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 5853 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5854 |
} |
| 5855 |
|
| 5856 |
// Do executes the "servicenetworking.services.disableVpcServiceControls" call. |
| 5857 |
// Any non-2xx status code is an error. Response headers are in either |
| 5858 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 5859 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 5860 |
// whether the returned error was because http.StatusNotModified was returned. |
| 5861 |
func (c *ServicesDisableVpcServiceControlsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 5862 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5863 |
res, err := c.doRequest("json") |
| 5864 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5865 |
if res.Body != nil { |
| 5866 |
res.Body.Close() |
| 5867 |
} |
| 5868 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5869 |
Code: res.StatusCode, |
| 5870 |
Header: res.Header, |
| 5871 |
}) |
| 5872 |
} |
| 5873 |
if err != nil { |
| 5874 |
return nil, err |
| 5875 |
} |
| 5876 |
defer googleapi.CloseBody(res) |
| 5877 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5878 |
return nil, gensupport.WrapError(err) |
| 5879 |
} |
| 5880 |
ret := &Operation{ |
| 5881 |
ServerResponse: googleapi.ServerResponse{ |
| 5882 |
Header: res.Header, |
| 5883 |
HTTPStatusCode: res.StatusCode, |
| 5884 |
}, |
| 5885 |
} |
| 5886 |
target := &ret |
| 5887 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5888 |
if err != nil { |
| 5889 |
return nil, err |
| 5890 |
} |
| 5891 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.disableVpcServiceControls", "response", internallog.HTTPResponse(res, b)) |
| 5892 |
return ret, nil |
| 5893 |
} |
| 5894 |
|
| 5895 |
type ServicesEnableVpcServiceControlsCall struct { |
| 5896 |
s *APIService |
| 5897 |
parent string |
| 5898 |
enablevpcservicecontrolsrequest *EnableVpcServiceControlsRequest |
| 5899 |
urlParams_ gensupport.URLParams |
| 5900 |
ctx_ context.Context |
| 5901 |
header_ http.Header |
| 5902 |
} |
| 5903 |
|
| 5904 |
// EnableVpcServiceControls: Enables VPC service controls for a connection. |
| 5905 |
// |
| 5906 |
// - parent: The service that is managing peering connectivity for a service |
| 5907 |
// producer's organization. For Google services that support this |
| 5908 |
// functionality, this value is `services/servicenetworking.googleapis.com`. |
| 5909 |
func (r *ServicesService) EnableVpcServiceControls(parent string, enablevpcservicecontrolsrequest *EnableVpcServiceControlsRequest) *ServicesEnableVpcServiceControlsCall { |
| 5910 |
c := &ServicesEnableVpcServiceControlsCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5911 |
c.parent = parent |
| 5912 |
c.enablevpcservicecontrolsrequest = enablevpcservicecontrolsrequest |
| 5913 |
return c |
| 5914 |
} |
| 5915 |
|
| 5916 |
// Fields allows partial responses to be retrieved. See |
| 5917 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5918 |
// details. |
| 5919 |
func (c *ServicesEnableVpcServiceControlsCall) Fields(s ...googleapi.Field) *ServicesEnableVpcServiceControlsCall { |
| 5920 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5921 |
return c |
| 5922 |
} |
| 5923 |
|
| 5924 |
// Context sets the context to be used in this call's Do method. |
| 5925 |
func (c *ServicesEnableVpcServiceControlsCall) Context(ctx context.Context) *ServicesEnableVpcServiceControlsCall { |
| 5926 |
c.ctx_ = ctx |
| 5927 |
return c |
| 5928 |
} |
| 5929 |
|
| 5930 |
// Header returns a http.Header that can be modified by the caller to add |
| 5931 |
// headers to the request. |
| 5932 |
func (c *ServicesEnableVpcServiceControlsCall) Header() http.Header { |
| 5933 |
if c.header_ == nil { |
| 5934 |
c.header_ = make(http.Header) |
| 5935 |
} |
| 5936 |
return c.header_ |
| 5937 |
} |
| 5938 |
|
| 5939 |
func (c *ServicesEnableVpcServiceControlsCall) doRequest(alt string) (*http.Response, error) { |
| 5940 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 5941 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.enablevpcservicecontrolsrequest) |
| 5942 |
if err != nil { |
| 5943 |
return nil, err |
| 5944 |
} |
| 5945 |
c.urlParams_.Set("alt", alt) |
| 5946 |
c.urlParams_.Set("prettyPrint", "false") |
| 5947 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:enableVpcServiceControls") |
| 5948 |
urls += "?" + c.urlParams_.Encode() |
| 5949 |
req, err := http.NewRequest("PATCH", urls, body) |
| 5950 |
if err != nil { |
| 5951 |
return nil, err |
| 5952 |
} |
| 5953 |
req.Header = reqHeaders |
| 5954 |
googleapi.Expand(req.URL, map[string]string{ |
| 5955 |
"parent": c.parent, |
| 5956 |
}) |
| 5957 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.enableVpcServiceControls", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 5958 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5959 |
} |
| 5960 |
|
| 5961 |
// Do executes the "servicenetworking.services.enableVpcServiceControls" call. |
| 5962 |
// Any non-2xx status code is an error. Response headers are in either |
| 5963 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 5964 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 5965 |
// whether the returned error was because http.StatusNotModified was returned. |
| 5966 |
func (c *ServicesEnableVpcServiceControlsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 5967 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5968 |
res, err := c.doRequest("json") |
| 5969 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5970 |
if res.Body != nil { |
| 5971 |
res.Body.Close() |
| 5972 |
} |
| 5973 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5974 |
Code: res.StatusCode, |
| 5975 |
Header: res.Header, |
| 5976 |
}) |
| 5977 |
} |
| 5978 |
if err != nil { |
| 5979 |
return nil, err |
| 5980 |
} |
| 5981 |
defer googleapi.CloseBody(res) |
| 5982 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5983 |
return nil, gensupport.WrapError(err) |
| 5984 |
} |
| 5985 |
ret := &Operation{ |
| 5986 |
ServerResponse: googleapi.ServerResponse{ |
| 5987 |
Header: res.Header, |
| 5988 |
HTTPStatusCode: res.StatusCode, |
| 5989 |
}, |
| 5990 |
} |
| 5991 |
target := &ret |
| 5992 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5993 |
if err != nil { |
| 5994 |
return nil, err |
| 5995 |
} |
| 5996 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.enableVpcServiceControls", "response", internallog.HTTPResponse(res, b)) |
| 5997 |
return ret, nil |
| 5998 |
} |
| 5999 |
|
| 6000 |
type ServicesSearchRangeCall struct { |
| 6001 |
s *APIService |
| 6002 |
parent string |
| 6003 |
searchrangerequest *SearchRangeRequest |
| 6004 |
urlParams_ gensupport.URLParams |
| 6005 |
ctx_ context.Context |
| 6006 |
header_ http.Header |
| 6007 |
} |
| 6008 |
|
| 6009 |
// SearchRange: Service producers can use this method to find a currently |
| 6010 |
// unused range within consumer allocated ranges. This returned range is not |
| 6011 |
// reserved, and not guaranteed to remain unused. It will validate previously |
| 6012 |
// provided allocated ranges, find non-conflicting sub-range of requested size |
| 6013 |
// (expressed in number of leading bits of ipv4 network mask, as in CIDR range |
| 6014 |
// notation). |
| 6015 |
// |
| 6016 |
// - parent: This is in a form services/{service}. {service} the name of the |
| 6017 |
// private access management service, for example |
| 6018 |
// 'service-peering.example.com'. |
| 6019 |
func (r *ServicesService) SearchRange(parent string, searchrangerequest *SearchRangeRequest) *ServicesSearchRangeCall { |
| 6020 |
c := &ServicesSearchRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6021 |
c.parent = parent |
| 6022 |
c.searchrangerequest = searchrangerequest |
| 6023 |
return c |
| 6024 |
} |
| 6025 |
|
| 6026 |
// Fields allows partial responses to be retrieved. See |
| 6027 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6028 |
// details. |
| 6029 |
func (c *ServicesSearchRangeCall) Fields(s ...googleapi.Field) *ServicesSearchRangeCall { |
| 6030 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6031 |
return c |
| 6032 |
} |
| 6033 |
|
| 6034 |
// Context sets the context to be used in this call's Do method. |
| 6035 |
func (c *ServicesSearchRangeCall) Context(ctx context.Context) *ServicesSearchRangeCall { |
| 6036 |
c.ctx_ = ctx |
| 6037 |
return c |
| 6038 |
} |
| 6039 |
|
| 6040 |
// Header returns a http.Header that can be modified by the caller to add |
| 6041 |
// headers to the request. |
| 6042 |
func (c *ServicesSearchRangeCall) Header() http.Header { |
| 6043 |
if c.header_ == nil { |
| 6044 |
c.header_ = make(http.Header) |
| 6045 |
} |
| 6046 |
return c.header_ |
| 6047 |
} |
| 6048 |
|
| 6049 |
func (c *ServicesSearchRangeCall) doRequest(alt string) (*http.Response, error) { |
| 6050 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6051 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.searchrangerequest) |
| 6052 |
if err != nil { |
| 6053 |
return nil, err |
| 6054 |
} |
| 6055 |
c.urlParams_.Set("alt", alt) |
| 6056 |
c.urlParams_.Set("prettyPrint", "false") |
| 6057 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:searchRange") |
| 6058 |
urls += "?" + c.urlParams_.Encode() |
| 6059 |
req, err := http.NewRequest("POST", urls, body) |
| 6060 |
if err != nil { |
| 6061 |
return nil, err |
| 6062 |
} |
| 6063 |
req.Header = reqHeaders |
| 6064 |
googleapi.Expand(req.URL, map[string]string{ |
| 6065 |
"parent": c.parent, |
| 6066 |
}) |
| 6067 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.searchRange", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6068 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6069 |
} |
| 6070 |
|
| 6071 |
// Do executes the "servicenetworking.services.searchRange" call. |
| 6072 |
// Any non-2xx status code is an error. Response headers are in either |
| 6073 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 6074 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6075 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6076 |
func (c *ServicesSearchRangeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 6077 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6078 |
res, err := c.doRequest("json") |
| 6079 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6080 |
if res.Body != nil { |
| 6081 |
res.Body.Close() |
| 6082 |
} |
| 6083 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6084 |
Code: res.StatusCode, |
| 6085 |
Header: res.Header, |
| 6086 |
}) |
| 6087 |
} |
| 6088 |
if err != nil { |
| 6089 |
return nil, err |
| 6090 |
} |
| 6091 |
defer googleapi.CloseBody(res) |
| 6092 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6093 |
return nil, gensupport.WrapError(err) |
| 6094 |
} |
| 6095 |
ret := &Operation{ |
| 6096 |
ServerResponse: googleapi.ServerResponse{ |
| 6097 |
Header: res.Header, |
| 6098 |
HTTPStatusCode: res.StatusCode, |
| 6099 |
}, |
| 6100 |
} |
| 6101 |
target := &ret |
| 6102 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6103 |
if err != nil { |
| 6104 |
return nil, err |
| 6105 |
} |
| 6106 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.searchRange", "response", internallog.HTTPResponse(res, b)) |
| 6107 |
return ret, nil |
| 6108 |
} |
| 6109 |
|
| 6110 |
type ServicesValidateCall struct { |
| 6111 |
s *APIService |
| 6112 |
parent string |
| 6113 |
validateconsumerconfigrequest *ValidateConsumerConfigRequest |
| 6114 |
urlParams_ gensupport.URLParams |
| 6115 |
ctx_ context.Context |
| 6116 |
header_ http.Header |
| 6117 |
} |
| 6118 |
|
| 6119 |
// Validate: Service producers use this method to validate if the consumer |
| 6120 |
// provided network, project and requested range are valid. This allows them to |
| 6121 |
// use a fail-fast mechanism for consumer requests, and not have to wait for |
| 6122 |
// AddSubnetwork operation completion to determine if user request is invalid. |
| 6123 |
// |
| 6124 |
// - parent: This is in a form services/{service} where {service} is the name |
| 6125 |
// of the private access management service. For example |
| 6126 |
// 'service-peering.example.com'. |
| 6127 |
func (r *ServicesService) Validate(parent string, validateconsumerconfigrequest *ValidateConsumerConfigRequest) *ServicesValidateCall { |
| 6128 |
c := &ServicesValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6129 |
c.parent = parent |
| 6130 |
c.validateconsumerconfigrequest = validateconsumerconfigrequest |
| 6131 |
return c |
| 6132 |
} |
| 6133 |
|
| 6134 |
// Fields allows partial responses to be retrieved. See |
| 6135 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6136 |
// details. |
| 6137 |
func (c *ServicesValidateCall) Fields(s ...googleapi.Field) *ServicesValidateCall { |
| 6138 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6139 |
return c |
| 6140 |
} |
| 6141 |
|
| 6142 |
// Context sets the context to be used in this call's Do method. |
| 6143 |
func (c *ServicesValidateCall) Context(ctx context.Context) *ServicesValidateCall { |
| 6144 |
c.ctx_ = ctx |
| 6145 |
return c |
| 6146 |
} |
| 6147 |
|
| 6148 |
// Header returns a http.Header that can be modified by the caller to add |
| 6149 |
// headers to the request. |
| 6150 |
func (c *ServicesValidateCall) Header() http.Header { |
| 6151 |
if c.header_ == nil { |
| 6152 |
c.header_ = make(http.Header) |
| 6153 |
} |
| 6154 |
return c.header_ |
| 6155 |
} |
| 6156 |
|
| 6157 |
func (c *ServicesValidateCall) doRequest(alt string) (*http.Response, error) { |
| 6158 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6159 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.validateconsumerconfigrequest) |
| 6160 |
if err != nil { |
| 6161 |
return nil, err |
| 6162 |
} |
| 6163 |
c.urlParams_.Set("alt", alt) |
| 6164 |
c.urlParams_.Set("prettyPrint", "false") |
| 6165 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:validate") |
| 6166 |
urls += "?" + c.urlParams_.Encode() |
| 6167 |
req, err := http.NewRequest("POST", urls, body) |
| 6168 |
if err != nil { |
| 6169 |
return nil, err |
| 6170 |
} |
| 6171 |
req.Header = reqHeaders |
| 6172 |
googleapi.Expand(req.URL, map[string]string{ |
| 6173 |
"parent": c.parent, |
| 6174 |
}) |
| 6175 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.validate", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6176 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6177 |
} |
| 6178 |
|
| 6179 |
// Do executes the "servicenetworking.services.validate" call. |
| 6180 |
// Any non-2xx status code is an error. Response headers are in either |
| 6181 |
// *ValidateConsumerConfigResponse.ServerResponse.Header or (if a response was |
| 6182 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 6183 |
// googleapi.IsNotModified to check whether the returned error was because |
| 6184 |
// http.StatusNotModified was returned. |
| 6185 |
func (c *ServicesValidateCall) Do(opts ...googleapi.CallOption) (*ValidateConsumerConfigResponse, error) { |
| 6186 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6187 |
res, err := c.doRequest("json") |
| 6188 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6189 |
if res.Body != nil { |
| 6190 |
res.Body.Close() |
| 6191 |
} |
| 6192 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6193 |
Code: res.StatusCode, |
| 6194 |
Header: res.Header, |
| 6195 |
}) |
| 6196 |
} |
| 6197 |
if err != nil { |
| 6198 |
return nil, err |
| 6199 |
} |
| 6200 |
defer googleapi.CloseBody(res) |
| 6201 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6202 |
return nil, gensupport.WrapError(err) |
| 6203 |
} |
| 6204 |
ret := &ValidateConsumerConfigResponse{ |
| 6205 |
ServerResponse: googleapi.ServerResponse{ |
| 6206 |
Header: res.Header, |
| 6207 |
HTTPStatusCode: res.StatusCode, |
| 6208 |
}, |
| 6209 |
} |
| 6210 |
target := &ret |
| 6211 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6212 |
if err != nil { |
| 6213 |
return nil, err |
| 6214 |
} |
| 6215 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.validate", "response", internallog.HTTPResponse(res, b)) |
| 6216 |
return ret, nil |
| 6217 |
} |
| 6218 |
|
| 6219 |
type ServicesConnectionsCreateCall struct { |
| 6220 |
s *APIService |
| 6221 |
parent string |
| 6222 |
connection *Connection |
| 6223 |
urlParams_ gensupport.URLParams |
| 6224 |
ctx_ context.Context |
| 6225 |
header_ http.Header |
| 6226 |
} |
| 6227 |
|
| 6228 |
// Create: Creates a private connection that establishes a VPC Network Peering |
| 6229 |
// connection to a VPC network in the service producer's organization. The |
| 6230 |
// administrator of the service consumer's VPC network invokes this method. The |
| 6231 |
// administrator must assign one or more allocated IP ranges for provisioning |
| 6232 |
// subnetworks in the service producer's VPC network. This connection is used |
| 6233 |
// for all supported services in the service producer's organization, so it |
| 6234 |
// only needs to be invoked once. |
| 6235 |
// |
| 6236 |
// - parent: The service that is managing peering connectivity for a service |
| 6237 |
// producer's organization. For Google services that support this |
| 6238 |
// functionality, this value is `services/servicenetworking.googleapis.com`. |
| 6239 |
func (r *ServicesConnectionsService) Create(parent string, connection *Connection) *ServicesConnectionsCreateCall { |
| 6240 |
c := &ServicesConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6241 |
c.parent = parent |
| 6242 |
c.connection = connection |
| 6243 |
return c |
| 6244 |
} |
| 6245 |
|
| 6246 |
// Fields allows partial responses to be retrieved. See |
| 6247 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6248 |
// details. |
| 6249 |
func (c *ServicesConnectionsCreateCall) Fields(s ...googleapi.Field) *ServicesConnectionsCreateCall { |
| 6250 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6251 |
return c |
| 6252 |
} |
| 6253 |
|
| 6254 |
// Context sets the context to be used in this call's Do method. |
| 6255 |
func (c *ServicesConnectionsCreateCall) Context(ctx context.Context) *ServicesConnectionsCreateCall { |
| 6256 |
c.ctx_ = ctx |
| 6257 |
return c |
| 6258 |
} |
| 6259 |
|
| 6260 |
// Header returns a http.Header that can be modified by the caller to add |
| 6261 |
// headers to the request. |
| 6262 |
func (c *ServicesConnectionsCreateCall) Header() http.Header { |
| 6263 |
if c.header_ == nil { |
| 6264 |
c.header_ = make(http.Header) |
| 6265 |
} |
| 6266 |
return c.header_ |
| 6267 |
} |
| 6268 |
|
| 6269 |
func (c *ServicesConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { |
| 6270 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6271 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.connection) |
| 6272 |
if err != nil { |
| 6273 |
return nil, err |
| 6274 |
} |
| 6275 |
c.urlParams_.Set("alt", alt) |
| 6276 |
c.urlParams_.Set("prettyPrint", "false") |
| 6277 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections") |
| 6278 |
urls += "?" + c.urlParams_.Encode() |
| 6279 |
req, err := http.NewRequest("POST", urls, body) |
| 6280 |
if err != nil { |
| 6281 |
return nil, err |
| 6282 |
} |
| 6283 |
req.Header = reqHeaders |
| 6284 |
googleapi.Expand(req.URL, map[string]string{ |
| 6285 |
"parent": c.parent, |
| 6286 |
}) |
| 6287 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6288 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6289 |
} |
| 6290 |
|
| 6291 |
// Do executes the "servicenetworking.services.connections.create" call. |
| 6292 |
// Any non-2xx status code is an error. Response headers are in either |
| 6293 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 6294 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6295 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6296 |
func (c *ServicesConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 6297 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6298 |
res, err := c.doRequest("json") |
| 6299 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6300 |
if res.Body != nil { |
| 6301 |
res.Body.Close() |
| 6302 |
} |
| 6303 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6304 |
Code: res.StatusCode, |
| 6305 |
Header: res.Header, |
| 6306 |
}) |
| 6307 |
} |
| 6308 |
if err != nil { |
| 6309 |
return nil, err |
| 6310 |
} |
| 6311 |
defer googleapi.CloseBody(res) |
| 6312 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6313 |
return nil, gensupport.WrapError(err) |
| 6314 |
} |
| 6315 |
ret := &Operation{ |
| 6316 |
ServerResponse: googleapi.ServerResponse{ |
| 6317 |
Header: res.Header, |
| 6318 |
HTTPStatusCode: res.StatusCode, |
| 6319 |
}, |
| 6320 |
} |
| 6321 |
target := &ret |
| 6322 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6323 |
if err != nil { |
| 6324 |
return nil, err |
| 6325 |
} |
| 6326 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.create", "response", internallog.HTTPResponse(res, b)) |
| 6327 |
return ret, nil |
| 6328 |
} |
| 6329 |
|
| 6330 |
type ServicesConnectionsDeleteConnectionCall struct { |
| 6331 |
s *APIService |
| 6332 |
name string |
| 6333 |
deleteconnectionrequest *DeleteConnectionRequest |
| 6334 |
urlParams_ gensupport.URLParams |
| 6335 |
ctx_ context.Context |
| 6336 |
header_ http.Header |
| 6337 |
} |
| 6338 |
|
| 6339 |
// DeleteConnection: Deletes a private service access connection. |
| 6340 |
// |
| 6341 |
// - name: The private service connection that connects to a service producer |
| 6342 |
// organization. The name includes both the private service name and the VPC |
| 6343 |
// network peering name in the format of |
| 6344 |
// `services/{peering_service_name}/connections/{vpc_peering_name}`. For |
| 6345 |
// Google services that support this functionality, this is |
| 6346 |
// `services/servicenetworking.googleapis.com/connections/servicenetworking-go |
| 6347 |
// ogleapis-com`. |
| 6348 |
func (r *ServicesConnectionsService) DeleteConnection(name string, deleteconnectionrequest *DeleteConnectionRequest) *ServicesConnectionsDeleteConnectionCall { |
| 6349 |
c := &ServicesConnectionsDeleteConnectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6350 |
c.name = name |
| 6351 |
c.deleteconnectionrequest = deleteconnectionrequest |
| 6352 |
return c |
| 6353 |
} |
| 6354 |
|
| 6355 |
// Fields allows partial responses to be retrieved. See |
| 6356 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6357 |
// details. |
| 6358 |
func (c *ServicesConnectionsDeleteConnectionCall) Fields(s ...googleapi.Field) *ServicesConnectionsDeleteConnectionCall { |
| 6359 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6360 |
return c |
| 6361 |
} |
| 6362 |
|
| 6363 |
// Context sets the context to be used in this call's Do method. |
| 6364 |
func (c *ServicesConnectionsDeleteConnectionCall) Context(ctx context.Context) *ServicesConnectionsDeleteConnectionCall { |
| 6365 |
c.ctx_ = ctx |
| 6366 |
return c |
| 6367 |
} |
| 6368 |
|
| 6369 |
// Header returns a http.Header that can be modified by the caller to add |
| 6370 |
// headers to the request. |
| 6371 |
func (c *ServicesConnectionsDeleteConnectionCall) Header() http.Header { |
| 6372 |
if c.header_ == nil { |
| 6373 |
c.header_ = make(http.Header) |
| 6374 |
} |
| 6375 |
return c.header_ |
| 6376 |
} |
| 6377 |
|
| 6378 |
func (c *ServicesConnectionsDeleteConnectionCall) doRequest(alt string) (*http.Response, error) { |
| 6379 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6380 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.deleteconnectionrequest) |
| 6381 |
if err != nil { |
| 6382 |
return nil, err |
| 6383 |
} |
| 6384 |
c.urlParams_.Set("alt", alt) |
| 6385 |
c.urlParams_.Set("prettyPrint", "false") |
| 6386 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 6387 |
urls += "?" + c.urlParams_.Encode() |
| 6388 |
req, err := http.NewRequest("POST", urls, body) |
| 6389 |
if err != nil { |
| 6390 |
return nil, err |
| 6391 |
} |
| 6392 |
req.Header = reqHeaders |
| 6393 |
googleapi.Expand(req.URL, map[string]string{ |
| 6394 |
"name": c.name, |
| 6395 |
}) |
| 6396 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.deleteConnection", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6397 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6398 |
} |
| 6399 |
|
| 6400 |
// Do executes the "servicenetworking.services.connections.deleteConnection" call. |
| 6401 |
// Any non-2xx status code is an error. Response headers are in either |
| 6402 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 6403 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6404 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6405 |
func (c *ServicesConnectionsDeleteConnectionCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 6406 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6407 |
res, err := c.doRequest("json") |
| 6408 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6409 |
if res.Body != nil { |
| 6410 |
res.Body.Close() |
| 6411 |
} |
| 6412 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6413 |
Code: res.StatusCode, |
| 6414 |
Header: res.Header, |
| 6415 |
}) |
| 6416 |
} |
| 6417 |
if err != nil { |
| 6418 |
return nil, err |
| 6419 |
} |
| 6420 |
defer googleapi.CloseBody(res) |
| 6421 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6422 |
return nil, gensupport.WrapError(err) |
| 6423 |
} |
| 6424 |
ret := &Operation{ |
| 6425 |
ServerResponse: googleapi.ServerResponse{ |
| 6426 |
Header: res.Header, |
| 6427 |
HTTPStatusCode: res.StatusCode, |
| 6428 |
}, |
| 6429 |
} |
| 6430 |
target := &ret |
| 6431 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6432 |
if err != nil { |
| 6433 |
return nil, err |
| 6434 |
} |
| 6435 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.deleteConnection", "response", internallog.HTTPResponse(res, b)) |
| 6436 |
return ret, nil |
| 6437 |
} |
| 6438 |
|
| 6439 |
type ServicesConnectionsListCall struct { |
| 6440 |
s *APIService |
| 6441 |
parent string |
| 6442 |
urlParams_ gensupport.URLParams |
| 6443 |
ifNoneMatch_ string |
| 6444 |
ctx_ context.Context |
| 6445 |
header_ http.Header |
| 6446 |
} |
| 6447 |
|
| 6448 |
// List: List the private connections that are configured in a service |
| 6449 |
// consumer's VPC network. |
| 6450 |
// |
| 6451 |
// - parent: The service that is managing peering connectivity for a service |
| 6452 |
// producer's organization. For Google services that support this |
| 6453 |
// functionality, this value is `services/servicenetworking.googleapis.com`. |
| 6454 |
// If you specify `services/-` as the parameter value, all configured peering |
| 6455 |
// services are listed. |
| 6456 |
func (r *ServicesConnectionsService) List(parent string) *ServicesConnectionsListCall { |
| 6457 |
c := &ServicesConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6458 |
c.parent = parent |
| 6459 |
return c |
| 6460 |
} |
| 6461 |
|
| 6462 |
// Network sets the optional parameter "network": Required. The name of service |
| 6463 |
// consumer's VPC network that's connected with service producer network |
| 6464 |
// through a private connection. The network name must be in the following |
| 6465 |
// format: `projects/{project}/global/networks/{network}`. {project} is a |
| 6466 |
// project number, such as in `12345` that includes the VPC service consumer's |
| 6467 |
// VPC network. {network} is the name of the service consumer's VPC network. |
| 6468 |
func (c *ServicesConnectionsListCall) Network(network string) *ServicesConnectionsListCall { |
| 6469 |
c.urlParams_.Set("network", network) |
| 6470 |
return c |
| 6471 |
} |
| 6472 |
|
| 6473 |
// Fields allows partial responses to be retrieved. See |
| 6474 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6475 |
// details. |
| 6476 |
func (c *ServicesConnectionsListCall) Fields(s ...googleapi.Field) *ServicesConnectionsListCall { |
| 6477 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6478 |
return c |
| 6479 |
} |
| 6480 |
|
| 6481 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 6482 |
// object's ETag matches the given value. This is useful for getting updates |
| 6483 |
// only after the object has changed since the last request. |
| 6484 |
func (c *ServicesConnectionsListCall) IfNoneMatch(entityTag string) *ServicesConnectionsListCall { |
| 6485 |
c.ifNoneMatch_ = entityTag |
| 6486 |
return c |
| 6487 |
} |
| 6488 |
|
| 6489 |
// Context sets the context to be used in this call's Do method. |
| 6490 |
func (c *ServicesConnectionsListCall) Context(ctx context.Context) *ServicesConnectionsListCall { |
| 6491 |
c.ctx_ = ctx |
| 6492 |
return c |
| 6493 |
} |
| 6494 |
|
| 6495 |
// Header returns a http.Header that can be modified by the caller to add |
| 6496 |
// headers to the request. |
| 6497 |
func (c *ServicesConnectionsListCall) Header() http.Header { |
| 6498 |
if c.header_ == nil { |
| 6499 |
c.header_ = make(http.Header) |
| 6500 |
} |
| 6501 |
return c.header_ |
| 6502 |
} |
| 6503 |
|
| 6504 |
func (c *ServicesConnectionsListCall) doRequest(alt string) (*http.Response, error) { |
| 6505 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 6506 |
if c.ifNoneMatch_ != "" { |
| 6507 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 6508 |
} |
| 6509 |
c.urlParams_.Set("alt", alt) |
| 6510 |
c.urlParams_.Set("prettyPrint", "false") |
| 6511 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections") |
| 6512 |
urls += "?" + c.urlParams_.Encode() |
| 6513 |
req, err := http.NewRequest("GET", urls, nil) |
| 6514 |
if err != nil { |
| 6515 |
return nil, err |
| 6516 |
} |
| 6517 |
req.Header = reqHeaders |
| 6518 |
googleapi.Expand(req.URL, map[string]string{ |
| 6519 |
"parent": c.parent, |
| 6520 |
}) |
| 6521 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.list", "request", internallog.HTTPRequest(req, nil)) |
| 6522 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6523 |
} |
| 6524 |
|
| 6525 |
// Do executes the "servicenetworking.services.connections.list" call. |
| 6526 |
// Any non-2xx status code is an error. Response headers are in either |
| 6527 |
// *ListConnectionsResponse.ServerResponse.Header or (if a response was |
| 6528 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 6529 |
// googleapi.IsNotModified to check whether the returned error was because |
| 6530 |
// http.StatusNotModified was returned. |
| 6531 |
func (c *ServicesConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) { |
| 6532 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6533 |
res, err := c.doRequest("json") |
| 6534 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6535 |
if res.Body != nil { |
| 6536 |
res.Body.Close() |
| 6537 |
} |
| 6538 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6539 |
Code: res.StatusCode, |
| 6540 |
Header: res.Header, |
| 6541 |
}) |
| 6542 |
} |
| 6543 |
if err != nil { |
| 6544 |
return nil, err |
| 6545 |
} |
| 6546 |
defer googleapi.CloseBody(res) |
| 6547 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6548 |
return nil, gensupport.WrapError(err) |
| 6549 |
} |
| 6550 |
ret := &ListConnectionsResponse{ |
| 6551 |
ServerResponse: googleapi.ServerResponse{ |
| 6552 |
Header: res.Header, |
| 6553 |
HTTPStatusCode: res.StatusCode, |
| 6554 |
}, |
| 6555 |
} |
| 6556 |
target := &ret |
| 6557 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6558 |
if err != nil { |
| 6559 |
return nil, err |
| 6560 |
} |
| 6561 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.list", "response", internallog.HTTPResponse(res, b)) |
| 6562 |
return ret, nil |
| 6563 |
} |
| 6564 |
|
| 6565 |
type ServicesConnectionsPatchCall struct { |
| 6566 |
s *APIService |
| 6567 |
name string |
| 6568 |
connection *Connection |
| 6569 |
urlParams_ gensupport.URLParams |
| 6570 |
ctx_ context.Context |
| 6571 |
header_ http.Header |
| 6572 |
} |
| 6573 |
|
| 6574 |
// Patch: Updates the allocated ranges that are assigned to a connection. |
| 6575 |
// |
| 6576 |
// - name: The private service connection that connects to a service producer |
| 6577 |
// organization. The name includes both the private service name and the VPC |
| 6578 |
// network peering name in the format of |
| 6579 |
// `services/{peering_service_name}/connections/{vpc_peering_name}`. For |
| 6580 |
// Google services that support this functionality, this is |
| 6581 |
// `services/servicenetworking.googleapis.com/connections/servicenetworking-go |
| 6582 |
// ogleapis-com`. |
| 6583 |
func (r *ServicesConnectionsService) Patch(name string, connection *Connection) *ServicesConnectionsPatchCall { |
| 6584 |
c := &ServicesConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6585 |
c.name = name |
| 6586 |
c.connection = connection |
| 6587 |
return c |
| 6588 |
} |
| 6589 |
|
| 6590 |
// Force sets the optional parameter "force": If a previously defined allocated |
| 6591 |
// range is removed, force flag must be set to true. |
| 6592 |
func (c *ServicesConnectionsPatchCall) Force(force bool) *ServicesConnectionsPatchCall { |
| 6593 |
c.urlParams_.Set("force", fmt.Sprint(force)) |
| 6594 |
return c |
| 6595 |
} |
| 6596 |
|
| 6597 |
// UpdateMask sets the optional parameter "updateMask": The update mask. If |
| 6598 |
// this is omitted, it defaults to "*". You can only update the listed peering |
| 6599 |
// ranges. |
| 6600 |
func (c *ServicesConnectionsPatchCall) UpdateMask(updateMask string) *ServicesConnectionsPatchCall { |
| 6601 |
c.urlParams_.Set("updateMask", updateMask) |
| 6602 |
return c |
| 6603 |
} |
| 6604 |
|
| 6605 |
// Fields allows partial responses to be retrieved. See |
| 6606 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6607 |
// details. |
| 6608 |
func (c *ServicesConnectionsPatchCall) Fields(s ...googleapi.Field) *ServicesConnectionsPatchCall { |
| 6609 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6610 |
return c |
| 6611 |
} |
| 6612 |
|
| 6613 |
// Context sets the context to be used in this call's Do method. |
| 6614 |
func (c *ServicesConnectionsPatchCall) Context(ctx context.Context) *ServicesConnectionsPatchCall { |
| 6615 |
c.ctx_ = ctx |
| 6616 |
return c |
| 6617 |
} |
| 6618 |
|
| 6619 |
// Header returns a http.Header that can be modified by the caller to add |
| 6620 |
// headers to the request. |
| 6621 |
func (c *ServicesConnectionsPatchCall) Header() http.Header { |
| 6622 |
if c.header_ == nil { |
| 6623 |
c.header_ = make(http.Header) |
| 6624 |
} |
| 6625 |
return c.header_ |
| 6626 |
} |
| 6627 |
|
| 6628 |
func (c *ServicesConnectionsPatchCall) doRequest(alt string) (*http.Response, error) { |
| 6629 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6630 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.connection) |
| 6631 |
if err != nil { |
| 6632 |
return nil, err |
| 6633 |
} |
| 6634 |
c.urlParams_.Set("alt", alt) |
| 6635 |
c.urlParams_.Set("prettyPrint", "false") |
| 6636 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 6637 |
urls += "?" + c.urlParams_.Encode() |
| 6638 |
req, err := http.NewRequest("PATCH", urls, body) |
| 6639 |
if err != nil { |
| 6640 |
return nil, err |
| 6641 |
} |
| 6642 |
req.Header = reqHeaders |
| 6643 |
googleapi.Expand(req.URL, map[string]string{ |
| 6644 |
"name": c.name, |
| 6645 |
}) |
| 6646 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.patch", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6647 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6648 |
} |
| 6649 |
|
| 6650 |
// Do executes the "servicenetworking.services.connections.patch" call. |
| 6651 |
// Any non-2xx status code is an error. Response headers are in either |
| 6652 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 6653 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6654 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6655 |
func (c *ServicesConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 6656 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6657 |
res, err := c.doRequest("json") |
| 6658 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6659 |
if res.Body != nil { |
| 6660 |
res.Body.Close() |
| 6661 |
} |
| 6662 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6663 |
Code: res.StatusCode, |
| 6664 |
Header: res.Header, |
| 6665 |
}) |
| 6666 |
} |
| 6667 |
if err != nil { |
| 6668 |
return nil, err |
| 6669 |
} |
| 6670 |
defer googleapi.CloseBody(res) |
| 6671 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6672 |
return nil, gensupport.WrapError(err) |
| 6673 |
} |
| 6674 |
ret := &Operation{ |
| 6675 |
ServerResponse: googleapi.ServerResponse{ |
| 6676 |
Header: res.Header, |
| 6677 |
HTTPStatusCode: res.StatusCode, |
| 6678 |
}, |
| 6679 |
} |
| 6680 |
target := &ret |
| 6681 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6682 |
if err != nil { |
| 6683 |
return nil, err |
| 6684 |
} |
| 6685 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.connections.patch", "response", internallog.HTTPResponse(res, b)) |
| 6686 |
return ret, nil |
| 6687 |
} |
| 6688 |
|
| 6689 |
type ServicesDnsRecordSetsAddCall struct { |
| 6690 |
s *APIService |
| 6691 |
parent string |
| 6692 |
adddnsrecordsetrequest *AddDnsRecordSetRequest |
| 6693 |
urlParams_ gensupport.URLParams |
| 6694 |
ctx_ context.Context |
| 6695 |
header_ http.Header |
| 6696 |
} |
| 6697 |
|
| 6698 |
// Add: Service producers can use this method to add DNS record sets to private |
| 6699 |
// DNS zones in the shared producer host project. |
| 6700 |
// |
| 6701 |
// - parent: The service that is managing peering connectivity for a service |
| 6702 |
// producer's organization. For Google services that support this |
| 6703 |
// functionality, this value is `services/servicenetworking.googleapis.com`. |
| 6704 |
func (r *ServicesDnsRecordSetsService) Add(parent string, adddnsrecordsetrequest *AddDnsRecordSetRequest) *ServicesDnsRecordSetsAddCall { |
| 6705 |
c := &ServicesDnsRecordSetsAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6706 |
c.parent = parent |
| 6707 |
c.adddnsrecordsetrequest = adddnsrecordsetrequest |
| 6708 |
return c |
| 6709 |
} |
| 6710 |
|
| 6711 |
// Fields allows partial responses to be retrieved. See |
| 6712 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6713 |
// details. |
| 6714 |
func (c *ServicesDnsRecordSetsAddCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsAddCall { |
| 6715 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6716 |
return c |
| 6717 |
} |
| 6718 |
|
| 6719 |
// Context sets the context to be used in this call's Do method. |
| 6720 |
func (c *ServicesDnsRecordSetsAddCall) Context(ctx context.Context) *ServicesDnsRecordSetsAddCall { |
| 6721 |
c.ctx_ = ctx |
| 6722 |
return c |
| 6723 |
} |
| 6724 |
|
| 6725 |
// Header returns a http.Header that can be modified by the caller to add |
| 6726 |
// headers to the request. |
| 6727 |
func (c *ServicesDnsRecordSetsAddCall) Header() http.Header { |
| 6728 |
if c.header_ == nil { |
| 6729 |
c.header_ = make(http.Header) |
| 6730 |
} |
| 6731 |
return c.header_ |
| 6732 |
} |
| 6733 |
|
| 6734 |
func (c *ServicesDnsRecordSetsAddCall) doRequest(alt string) (*http.Response, error) { |
| 6735 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6736 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.adddnsrecordsetrequest) |
| 6737 |
if err != nil { |
| 6738 |
return nil, err |
| 6739 |
} |
| 6740 |
c.urlParams_.Set("alt", alt) |
| 6741 |
c.urlParams_.Set("prettyPrint", "false") |
| 6742 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:add") |
| 6743 |
urls += "?" + c.urlParams_.Encode() |
| 6744 |
req, err := http.NewRequest("POST", urls, body) |
| 6745 |
if err != nil { |
| 6746 |
return nil, err |
| 6747 |
} |
| 6748 |
req.Header = reqHeaders |
| 6749 |
googleapi.Expand(req.URL, map[string]string{ |
| 6750 |
"parent": c.parent, |
| 6751 |
}) |
| 6752 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.add", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6753 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6754 |
} |
| 6755 |
|
| 6756 |
// Do executes the "servicenetworking.services.dnsRecordSets.add" call. |
| 6757 |
// Any non-2xx status code is an error. Response headers are in either |
| 6758 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 6759 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6760 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6761 |
func (c *ServicesDnsRecordSetsAddCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 6762 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6763 |
res, err := c.doRequest("json") |
| 6764 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6765 |
if res.Body != nil { |
| 6766 |
res.Body.Close() |
| 6767 |
} |
| 6768 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6769 |
Code: res.StatusCode, |
| 6770 |
Header: res.Header, |
| 6771 |
}) |
| 6772 |
} |
| 6773 |
if err != nil { |
| 6774 |
return nil, err |
| 6775 |
} |
| 6776 |
defer googleapi.CloseBody(res) |
| 6777 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6778 |
return nil, gensupport.WrapError(err) |
| 6779 |
} |
| 6780 |
ret := &Operation{ |
| 6781 |
ServerResponse: googleapi.ServerResponse{ |
| 6782 |
Header: res.Header, |
| 6783 |
HTTPStatusCode: res.StatusCode, |
| 6784 |
}, |
| 6785 |
} |
| 6786 |
target := &ret |
| 6787 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6788 |
if err != nil { |
| 6789 |
return nil, err |
| 6790 |
} |
| 6791 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.add", "response", internallog.HTTPResponse(res, b)) |
| 6792 |
return ret, nil |
| 6793 |
} |
| 6794 |
|
| 6795 |
type ServicesDnsRecordSetsGetCall struct { |
| 6796 |
s *APIService |
| 6797 |
parent string |
| 6798 |
urlParams_ gensupport.URLParams |
| 6799 |
ifNoneMatch_ string |
| 6800 |
ctx_ context.Context |
| 6801 |
header_ http.Header |
| 6802 |
} |
| 6803 |
|
| 6804 |
// Get: Producers can use this method to retrieve information about the DNS |
| 6805 |
// record set added to the private zone inside the shared tenant host project |
| 6806 |
// associated with a consumer network. |
| 6807 |
// |
| 6808 |
// - parent: Parent resource identifying the connection which owns this |
| 6809 |
// collection of DNS zones in the format services/{service}. |
| 6810 |
func (r *ServicesDnsRecordSetsService) Get(parent string) *ServicesDnsRecordSetsGetCall { |
| 6811 |
c := &ServicesDnsRecordSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6812 |
c.parent = parent |
| 6813 |
return c |
| 6814 |
} |
| 6815 |
|
| 6816 |
// ConsumerNetwork sets the optional parameter "consumerNetwork": Required. The |
| 6817 |
// consumer network containing the record set. Must be in the form of |
| 6818 |
// projects/{project}/global/networks/{network} |
| 6819 |
func (c *ServicesDnsRecordSetsGetCall) ConsumerNetwork(consumerNetwork string) *ServicesDnsRecordSetsGetCall { |
| 6820 |
c.urlParams_.Set("consumerNetwork", consumerNetwork) |
| 6821 |
return c |
| 6822 |
} |
| 6823 |
|
| 6824 |
// Domain sets the optional parameter "domain": Required. The domain name of |
| 6825 |
// the zone containing the recordset. |
| 6826 |
func (c *ServicesDnsRecordSetsGetCall) Domain(domain string) *ServicesDnsRecordSetsGetCall { |
| 6827 |
c.urlParams_.Set("domain", domain) |
| 6828 |
return c |
| 6829 |
} |
| 6830 |
|
| 6831 |
// Type sets the optional parameter "type": Required. RecordSet Type eg. |
| 6832 |
// type='A'. See the list of Supported DNS Types |
| 6833 |
// (https://cloud.google.com/dns/records/json-record). |
| 6834 |
func (c *ServicesDnsRecordSetsGetCall) Type(type_ string) *ServicesDnsRecordSetsGetCall { |
| 6835 |
c.urlParams_.Set("type", type_) |
| 6836 |
return c |
| 6837 |
} |
| 6838 |
|
| 6839 |
// Zone sets the optional parameter "zone": Required. The name of the zone |
| 6840 |
// containing the record set. |
| 6841 |
func (c *ServicesDnsRecordSetsGetCall) Zone(zone string) *ServicesDnsRecordSetsGetCall { |
| 6842 |
c.urlParams_.Set("zone", zone) |
| 6843 |
return c |
| 6844 |
} |
| 6845 |
|
| 6846 |
// Fields allows partial responses to be retrieved. See |
| 6847 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6848 |
// details. |
| 6849 |
func (c *ServicesDnsRecordSetsGetCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsGetCall { |
| 6850 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6851 |
return c |
| 6852 |
} |
| 6853 |
|
| 6854 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 6855 |
// object's ETag matches the given value. This is useful for getting updates |
| 6856 |
// only after the object has changed since the last request. |
| 6857 |
func (c *ServicesDnsRecordSetsGetCall) IfNoneMatch(entityTag string) *ServicesDnsRecordSetsGetCall { |
| 6858 |
c.ifNoneMatch_ = entityTag |
| 6859 |
return c |
| 6860 |
} |
| 6861 |
|
| 6862 |
// Context sets the context to be used in this call's Do method. |
| 6863 |
func (c *ServicesDnsRecordSetsGetCall) Context(ctx context.Context) *ServicesDnsRecordSetsGetCall { |
| 6864 |
c.ctx_ = ctx |
| 6865 |
return c |
| 6866 |
} |
| 6867 |
|
| 6868 |
// Header returns a http.Header that can be modified by the caller to add |
| 6869 |
// headers to the request. |
| 6870 |
func (c *ServicesDnsRecordSetsGetCall) Header() http.Header { |
| 6871 |
if c.header_ == nil { |
| 6872 |
c.header_ = make(http.Header) |
| 6873 |
} |
| 6874 |
return c.header_ |
| 6875 |
} |
| 6876 |
|
| 6877 |
func (c *ServicesDnsRecordSetsGetCall) doRequest(alt string) (*http.Response, error) { |
| 6878 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 6879 |
if c.ifNoneMatch_ != "" { |
| 6880 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 6881 |
} |
| 6882 |
c.urlParams_.Set("alt", alt) |
| 6883 |
c.urlParams_.Set("prettyPrint", "false") |
| 6884 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:get") |
| 6885 |
urls += "?" + c.urlParams_.Encode() |
| 6886 |
req, err := http.NewRequest("GET", urls, nil) |
| 6887 |
if err != nil { |
| 6888 |
return nil, err |
| 6889 |
} |
| 6890 |
req.Header = reqHeaders |
| 6891 |
googleapi.Expand(req.URL, map[string]string{ |
| 6892 |
"parent": c.parent, |
| 6893 |
}) |
| 6894 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.get", "request", internallog.HTTPRequest(req, nil)) |
| 6895 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6896 |
} |
| 6897 |
|
| 6898 |
// Do executes the "servicenetworking.services.dnsRecordSets.get" call. |
| 6899 |
// Any non-2xx status code is an error. Response headers are in either |
| 6900 |
// *DnsRecordSet.ServerResponse.Header or (if a response was returned at all) |
| 6901 |
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6902 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6903 |
func (c *ServicesDnsRecordSetsGetCall) Do(opts ...googleapi.CallOption) (*DnsRecordSet, error) { |
| 6904 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6905 |
res, err := c.doRequest("json") |
| 6906 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6907 |
if res.Body != nil { |
| 6908 |
res.Body.Close() |
| 6909 |
} |
| 6910 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6911 |
Code: res.StatusCode, |
| 6912 |
Header: res.Header, |
| 6913 |
}) |
| 6914 |
} |
| 6915 |
if err != nil { |
| 6916 |
return nil, err |
| 6917 |
} |
| 6918 |
defer googleapi.CloseBody(res) |
| 6919 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6920 |
return nil, gensupport.WrapError(err) |
| 6921 |
} |
| 6922 |
ret := &DnsRecordSet{ |
| 6923 |
ServerResponse: googleapi.ServerResponse{ |
| 6924 |
Header: res.Header, |
| 6925 |
HTTPStatusCode: res.StatusCode, |
| 6926 |
}, |
| 6927 |
} |
| 6928 |
target := &ret |
| 6929 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6930 |
if err != nil { |
| 6931 |
return nil, err |
| 6932 |
} |
| 6933 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.get", "response", internallog.HTTPResponse(res, b)) |
| 6934 |
return ret, nil |
| 6935 |
} |
| 6936 |
|
| 6937 |
type ServicesDnsRecordSetsListCall struct { |
| 6938 |
s *APIService |
| 6939 |
parent string |
| 6940 |
urlParams_ gensupport.URLParams |
| 6941 |
ifNoneMatch_ string |
| 6942 |
ctx_ context.Context |
| 6943 |
header_ http.Header |
| 6944 |
} |
| 6945 |
|
| 6946 |
// List: Producers can use this method to retrieve a list of available DNS |
| 6947 |
// RecordSets available inside the private zone on the tenant host project |
| 6948 |
// accessible from their network. |
| 6949 |
// |
| 6950 |
// - parent: The service that is managing peering connectivity for a service |
| 6951 |
// producer's organization. For Google services that support this |
| 6952 |
// functionality, this value is `services/servicenetworking.googleapis.com`. |
| 6953 |
func (r *ServicesDnsRecordSetsService) List(parent string) *ServicesDnsRecordSetsListCall { |
| 6954 |
c := &ServicesDnsRecordSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6955 |
c.parent = parent |
| 6956 |
return c |
| 6957 |
} |
| 6958 |
|
| 6959 |
// ConsumerNetwork sets the optional parameter "consumerNetwork": Required. The |
| 6960 |
// network that the consumer is using to connect with services. Must be in the |
| 6961 |
// form of projects/{project}/global/networks/{network} {project} is the |
| 6962 |
// project number, as in '12345' {network} is the network name. |
| 6963 |
func (c *ServicesDnsRecordSetsListCall) ConsumerNetwork(consumerNetwork string) *ServicesDnsRecordSetsListCall { |
| 6964 |
c.urlParams_.Set("consumerNetwork", consumerNetwork) |
| 6965 |
return c |
| 6966 |
} |
| 6967 |
|
| 6968 |
// Zone sets the optional parameter "zone": Required. The name of the private |
| 6969 |
// DNS zone in the shared producer host project from which the record set will |
| 6970 |
// be removed. |
| 6971 |
func (c *ServicesDnsRecordSetsListCall) Zone(zone string) *ServicesDnsRecordSetsListCall { |
| 6972 |
c.urlParams_.Set("zone", zone) |
| 6973 |
return c |
| 6974 |
} |
| 6975 |
|
| 6976 |
// Fields allows partial responses to be retrieved. See |
| 6977 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6978 |
// details. |
| 6979 |
func (c *ServicesDnsRecordSetsListCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsListCall { |
| 6980 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6981 |
return c |
| 6982 |
} |
| 6983 |
|
| 6984 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 6985 |
// object's ETag matches the given value. This is useful for getting updates |
| 6986 |
// only after the object has changed since the last request. |
| 6987 |
func (c *ServicesDnsRecordSetsListCall) IfNoneMatch(entityTag string) *ServicesDnsRecordSetsListCall { |
| 6988 |
c.ifNoneMatch_ = entityTag |
| 6989 |
return c |
| 6990 |
} |
| 6991 |
|
| 6992 |
// Context sets the context to be used in this call's Do method. |
| 6993 |
func (c *ServicesDnsRecordSetsListCall) Context(ctx context.Context) *ServicesDnsRecordSetsListCall { |
| 6994 |
c.ctx_ = ctx |
| 6995 |
return c |
| 6996 |
} |
| 6997 |
|
| 6998 |
// Header returns a http.Header that can be modified by the caller to add |
| 6999 |
// headers to the request. |
| 7000 |
func (c *ServicesDnsRecordSetsListCall) Header() http.Header { |
| 7001 |
if c.header_ == nil { |
| 7002 |
c.header_ = make(http.Header) |
| 7003 |
} |
| 7004 |
return c.header_ |
| 7005 |
} |
| 7006 |
|
| 7007 |
func (c *ServicesDnsRecordSetsListCall) doRequest(alt string) (*http.Response, error) { |
| 7008 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 7009 |
if c.ifNoneMatch_ != "" { |
| 7010 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 7011 |
} |
| 7012 |
c.urlParams_.Set("alt", alt) |
| 7013 |
c.urlParams_.Set("prettyPrint", "false") |
| 7014 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:list") |
| 7015 |
urls += "?" + c.urlParams_.Encode() |
| 7016 |
req, err := http.NewRequest("GET", urls, nil) |
| 7017 |
if err != nil { |
| 7018 |
return nil, err |
| 7019 |
} |
| 7020 |
req.Header = reqHeaders |
| 7021 |
googleapi.Expand(req.URL, map[string]string{ |
| 7022 |
"parent": c.parent, |
| 7023 |
}) |
| 7024 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.list", "request", internallog.HTTPRequest(req, nil)) |
| 7025 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7026 |
} |
| 7027 |
|
| 7028 |
// Do executes the "servicenetworking.services.dnsRecordSets.list" call. |
| 7029 |
// Any non-2xx status code is an error. Response headers are in either |
| 7030 |
// *ListDnsRecordSetsResponse.ServerResponse.Header or (if a response was |
| 7031 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 7032 |
// googleapi.IsNotModified to check whether the returned error was because |
| 7033 |
// http.StatusNotModified was returned. |
| 7034 |
func (c *ServicesDnsRecordSetsListCall) Do(opts ...googleapi.CallOption) (*ListDnsRecordSetsResponse, error) { |
| 7035 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7036 |
res, err := c.doRequest("json") |
| 7037 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7038 |
if res.Body != nil { |
| 7039 |
res.Body.Close() |
| 7040 |
} |
| 7041 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7042 |
Code: res.StatusCode, |
| 7043 |
Header: res.Header, |
| 7044 |
}) |
| 7045 |
} |
| 7046 |
if err != nil { |
| 7047 |
return nil, err |
| 7048 |
} |
| 7049 |
defer googleapi.CloseBody(res) |
| 7050 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7051 |
return nil, gensupport.WrapError(err) |
| 7052 |
} |
| 7053 |
ret := &ListDnsRecordSetsResponse{ |
| 7054 |
ServerResponse: googleapi.ServerResponse{ |
| 7055 |
Header: res.Header, |
| 7056 |
HTTPStatusCode: res.StatusCode, |
| 7057 |
}, |
| 7058 |
} |
| 7059 |
target := &ret |
| 7060 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7061 |
if err != nil { |
| 7062 |
return nil, err |
| 7063 |
} |
| 7064 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.list", "response", internallog.HTTPResponse(res, b)) |
| 7065 |
return ret, nil |
| 7066 |
} |
| 7067 |
|
| 7068 |
type ServicesDnsRecordSetsRemoveCall struct { |
| 7069 |
s *APIService |
| 7070 |
parent string |
| 7071 |
removednsrecordsetrequest *RemoveDnsRecordSetRequest |
| 7072 |
urlParams_ gensupport.URLParams |
| 7073 |
ctx_ context.Context |
| 7074 |
header_ http.Header |
| 7075 |
} |
| 7076 |
|
| 7077 |
// Remove: Service producers can use this method to remove DNS record sets from |
| 7078 |
// private DNS zones in the shared producer host project. |
| 7079 |
// |
| 7080 |
// - parent: The service that is managing peering connectivity for a service |
| 7081 |
// producer's organization. For Google services that support this |
| 7082 |
// functionality, this value is `services/servicenetworking.googleapis.com`. |
| 7083 |
func (r *ServicesDnsRecordSetsService) Remove(parent string, removednsrecordsetrequest *RemoveDnsRecordSetRequest) *ServicesDnsRecordSetsRemoveCall { |
| 7084 |
c := &ServicesDnsRecordSetsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7085 |
c.parent = parent |
| 7086 |
c.removednsrecordsetrequest = removednsrecordsetrequest |
| 7087 |
return c |
| 7088 |
} |
| 7089 |
|
| 7090 |
// Fields allows partial responses to be retrieved. See |
| 7091 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7092 |
// details. |
| 7093 |
func (c *ServicesDnsRecordSetsRemoveCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsRemoveCall { |
| 7094 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7095 |
return c |
| 7096 |
} |
| 7097 |
|
| 7098 |
// Context sets the context to be used in this call's Do method. |
| 7099 |
func (c *ServicesDnsRecordSetsRemoveCall) Context(ctx context.Context) *ServicesDnsRecordSetsRemoveCall { |
| 7100 |
c.ctx_ = ctx |
| 7101 |
return c |
| 7102 |
} |
| 7103 |
|
| 7104 |
// Header returns a http.Header that can be modified by the caller to add |
| 7105 |
// headers to the request. |
| 7106 |
func (c *ServicesDnsRecordSetsRemoveCall) Header() http.Header { |
| 7107 |
if c.header_ == nil { |
| 7108 |
c.header_ = make(http.Header) |
| 7109 |
} |
| 7110 |
return c.header_ |
| 7111 |
} |
| 7112 |
|
| 7113 |
func (c *ServicesDnsRecordSetsRemoveCall) doRequest(alt string) (*http.Response, error) { |
| 7114 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 7115 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.removednsrecordsetrequest) |
| 7116 |
if err != nil { |
| 7117 |
return nil, err |
| 7118 |
} |
| 7119 |
c.urlParams_.Set("alt", alt) |
| 7120 |
c.urlParams_.Set("prettyPrint", "false") |
| 7121 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:remove") |
| 7122 |
urls += "?" + c.urlParams_.Encode() |
| 7123 |
req, err := http.NewRequest("POST", urls, body) |
| 7124 |
if err != nil { |
| 7125 |
return nil, err |
| 7126 |
} |
| 7127 |
req.Header = reqHeaders |
| 7128 |
googleapi.Expand(req.URL, map[string]string{ |
| 7129 |
"parent": c.parent, |
| 7130 |
}) |
| 7131 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.remove", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 7132 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7133 |
} |
| 7134 |
|
| 7135 |
// Do executes the "servicenetworking.services.dnsRecordSets.remove" call. |
| 7136 |
// Any non-2xx status code is an error. Response headers are in either |
| 7137 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 7138 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 7139 |
// whether the returned error was because http.StatusNotModified was returned. |
| 7140 |
func (c *ServicesDnsRecordSetsRemoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 7141 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7142 |
res, err := c.doRequest("json") |
| 7143 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7144 |
if res.Body != nil { |
| 7145 |
res.Body.Close() |
| 7146 |
} |
| 7147 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7148 |
Code: res.StatusCode, |
| 7149 |
Header: res.Header, |
| 7150 |
}) |
| 7151 |
} |
| 7152 |
if err != nil { |
| 7153 |
return nil, err |
| 7154 |
} |
| 7155 |
defer googleapi.CloseBody(res) |
| 7156 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7157 |
return nil, gensupport.WrapError(err) |
| 7158 |
} |
| 7159 |
ret := &Operation{ |
| 7160 |
ServerResponse: googleapi.ServerResponse{ |
| 7161 |
Header: res.Header, |
| 7162 |
HTTPStatusCode: res.StatusCode, |
| 7163 |
}, |
| 7164 |
} |
| 7165 |
target := &ret |
| 7166 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7167 |
if err != nil { |
| 7168 |
return nil, err |
| 7169 |
} |
| 7170 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.remove", "response", internallog.HTTPResponse(res, b)) |
| 7171 |
return ret, nil |
| 7172 |
} |
| 7173 |
|
| 7174 |
type ServicesDnsRecordSetsUpdateCall struct { |
| 7175 |
s *APIService |
| 7176 |
parent string |
| 7177 |
updatednsrecordsetrequest *UpdateDnsRecordSetRequest |
| 7178 |
urlParams_ gensupport.URLParams |
| 7179 |
ctx_ context.Context |
| 7180 |
header_ http.Header |
| 7181 |
} |
| 7182 |
|
| 7183 |
// Update: Service producers can use this method to update DNS record sets from |
| 7184 |
// private DNS zones in the shared producer host project. |
| 7185 |
// |
| 7186 |
// - parent: The service that is managing peering connectivity for a service |
| 7187 |
// producer's organization. For Google services that support this |
| 7188 |
// functionality, this value is `services/servicenetworking.googleapis.com`. |
| 7189 |
func (r *ServicesDnsRecordSetsService) Update(parent string, updatednsrecordsetrequest *UpdateDnsRecordSetRequest) *ServicesDnsRecordSetsUpdateCall { |
| 7190 |
c := &ServicesDnsRecordSetsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7191 |
c.parent = parent |
| 7192 |
c.updatednsrecordsetrequest = updatednsrecordsetrequest |
| 7193 |
return c |
| 7194 |
} |
| 7195 |
|
| 7196 |
// Fields allows partial responses to be retrieved. See |
| 7197 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7198 |
// details. |
| 7199 |
func (c *ServicesDnsRecordSetsUpdateCall) Fields(s ...googleapi.Field) *ServicesDnsRecordSetsUpdateCall { |
| 7200 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7201 |
return c |
| 7202 |
} |
| 7203 |
|
| 7204 |
// Context sets the context to be used in this call's Do method. |
| 7205 |
func (c *ServicesDnsRecordSetsUpdateCall) Context(ctx context.Context) *ServicesDnsRecordSetsUpdateCall { |
| 7206 |
c.ctx_ = ctx |
| 7207 |
return c |
| 7208 |
} |
| 7209 |
|
| 7210 |
// Header returns a http.Header that can be modified by the caller to add |
| 7211 |
// headers to the request. |
| 7212 |
func (c *ServicesDnsRecordSetsUpdateCall) Header() http.Header { |
| 7213 |
if c.header_ == nil { |
| 7214 |
c.header_ = make(http.Header) |
| 7215 |
} |
| 7216 |
return c.header_ |
| 7217 |
} |
| 7218 |
|
| 7219 |
func (c *ServicesDnsRecordSetsUpdateCall) doRequest(alt string) (*http.Response, error) { |
| 7220 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 7221 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updatednsrecordsetrequest) |
| 7222 |
if err != nil { |
| 7223 |
return nil, err |
| 7224 |
} |
| 7225 |
c.urlParams_.Set("alt", alt) |
| 7226 |
c.urlParams_.Set("prettyPrint", "false") |
| 7227 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsRecordSets:update") |
| 7228 |
urls += "?" + c.urlParams_.Encode() |
| 7229 |
req, err := http.NewRequest("POST", urls, body) |
| 7230 |
if err != nil { |
| 7231 |
return nil, err |
| 7232 |
} |
| 7233 |
req.Header = reqHeaders |
| 7234 |
googleapi.Expand(req.URL, map[string]string{ |
| 7235 |
"parent": c.parent, |
| 7236 |
}) |
| 7237 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.update", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 7238 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7239 |
} |
| 7240 |
|
| 7241 |
// Do executes the "servicenetworking.services.dnsRecordSets.update" call. |
| 7242 |
// Any non-2xx status code is an error. Response headers are in either |
| 7243 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 7244 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 7245 |
// whether the returned error was because http.StatusNotModified was returned. |
| 7246 |
func (c *ServicesDnsRecordSetsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 7247 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7248 |
res, err := c.doRequest("json") |
| 7249 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7250 |
if res.Body != nil { |
| 7251 |
res.Body.Close() |
| 7252 |
} |
| 7253 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7254 |
Code: res.StatusCode, |
| 7255 |
Header: res.Header, |
| 7256 |
}) |
| 7257 |
} |
| 7258 |
if err != nil { |
| 7259 |
return nil, err |
| 7260 |
} |
| 7261 |
defer googleapi.CloseBody(res) |
| 7262 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7263 |
return nil, gensupport.WrapError(err) |
| 7264 |
} |
| 7265 |
ret := &Operation{ |
| 7266 |
ServerResponse: googleapi.ServerResponse{ |
| 7267 |
Header: res.Header, |
| 7268 |
HTTPStatusCode: res.StatusCode, |
| 7269 |
}, |
| 7270 |
} |
| 7271 |
target := &ret |
| 7272 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7273 |
if err != nil { |
| 7274 |
return nil, err |
| 7275 |
} |
| 7276 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsRecordSets.update", "response", internallog.HTTPResponse(res, b)) |
| 7277 |
return ret, nil |
| 7278 |
} |
| 7279 |
|
| 7280 |
type ServicesDnsZonesAddCall struct { |
| 7281 |
s *APIService |
| 7282 |
parent string |
| 7283 |
adddnszonerequest *AddDnsZoneRequest |
| 7284 |
urlParams_ gensupport.URLParams |
| 7285 |
ctx_ context.Context |
| 7286 |
header_ http.Header |
| 7287 |
} |
| 7288 |
|
| 7289 |
// Add: Service producers can use this method to add private DNS zones in the |
| 7290 |
// shared producer host project and matching peering zones in the consumer |
| 7291 |
// project. |
| 7292 |
// |
| 7293 |
// - parent: The service that is managing peering connectivity for a service |
| 7294 |
// producer's organization. For Google services that support this |
| 7295 |
// functionality, this value is `services/servicenetworking.googleapis.com`. |
| 7296 |
func (r *ServicesDnsZonesService) Add(parent string, adddnszonerequest *AddDnsZoneRequest) *ServicesDnsZonesAddCall { |
| 7297 |
c := &ServicesDnsZonesAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7298 |
c.parent = parent |
| 7299 |
c.adddnszonerequest = adddnszonerequest |
| 7300 |
return c |
| 7301 |
} |
| 7302 |
|
| 7303 |
// Fields allows partial responses to be retrieved. See |
| 7304 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7305 |
// details. |
| 7306 |
func (c *ServicesDnsZonesAddCall) Fields(s ...googleapi.Field) *ServicesDnsZonesAddCall { |
| 7307 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7308 |
return c |
| 7309 |
} |
| 7310 |
|
| 7311 |
// Context sets the context to be used in this call's Do method. |
| 7312 |
func (c *ServicesDnsZonesAddCall) Context(ctx context.Context) *ServicesDnsZonesAddCall { |
| 7313 |
c.ctx_ = ctx |
| 7314 |
return c |
| 7315 |
} |
| 7316 |
|
| 7317 |
// Header returns a http.Header that can be modified by the caller to add |
| 7318 |
// headers to the request. |
| 7319 |
func (c *ServicesDnsZonesAddCall) Header() http.Header { |
| 7320 |
if c.header_ == nil { |
| 7321 |
c.header_ = make(http.Header) |
| 7322 |
} |
| 7323 |
return c.header_ |
| 7324 |
} |
| 7325 |
|
| 7326 |
func (c *ServicesDnsZonesAddCall) doRequest(alt string) (*http.Response, error) { |
| 7327 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 7328 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.adddnszonerequest) |
| 7329 |
if err != nil { |
| 7330 |
return nil, err |
| 7331 |
} |
| 7332 |
c.urlParams_.Set("alt", alt) |
| 7333 |
c.urlParams_.Set("prettyPrint", "false") |
| 7334 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsZones:add") |
| 7335 |
urls += "?" + c.urlParams_.Encode() |
| 7336 |
req, err := http.NewRequest("POST", urls, body) |
| 7337 |
if err != nil { |
| 7338 |
return nil, err |
| 7339 |
} |
| 7340 |
req.Header = reqHeaders |
| 7341 |
googleapi.Expand(req.URL, map[string]string{ |
| 7342 |
"parent": c.parent, |
| 7343 |
}) |
| 7344 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsZones.add", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 7345 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7346 |
} |
| 7347 |
|
| 7348 |
// Do executes the "servicenetworking.services.dnsZones.add" call. |
| 7349 |
// Any non-2xx status code is an error. Response headers are in either |
| 7350 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 7351 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 7352 |
// whether the returned error was because http.StatusNotModified was returned. |
| 7353 |
func (c *ServicesDnsZonesAddCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 7354 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7355 |
res, err := c.doRequest("json") |
| 7356 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7357 |
if res.Body != nil { |
| 7358 |
res.Body.Close() |
| 7359 |
} |
| 7360 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7361 |
Code: res.StatusCode, |
| 7362 |
Header: res.Header, |
| 7363 |
}) |
| 7364 |
} |
| 7365 |
if err != nil { |
| 7366 |
return nil, err |
| 7367 |
} |
| 7368 |
defer googleapi.CloseBody(res) |
| 7369 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7370 |
return nil, gensupport.WrapError(err) |
| 7371 |
} |
| 7372 |
ret := &Operation{ |
| 7373 |
ServerResponse: googleapi.ServerResponse{ |
| 7374 |
Header: res.Header, |
| 7375 |
HTTPStatusCode: res.StatusCode, |
| 7376 |
}, |
| 7377 |
} |
| 7378 |
target := &ret |
| 7379 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7380 |
if err != nil { |
| 7381 |
return nil, err |
| 7382 |
} |
| 7383 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsZones.add", "response", internallog.HTTPResponse(res, b)) |
| 7384 |
return ret, nil |
| 7385 |
} |
| 7386 |
|
| 7387 |
type ServicesDnsZonesRemoveCall struct { |
| 7388 |
s *APIService |
| 7389 |
parent string |
| 7390 |
removednszonerequest *RemoveDnsZoneRequest |
| 7391 |
urlParams_ gensupport.URLParams |
| 7392 |
ctx_ context.Context |
| 7393 |
header_ http.Header |
| 7394 |
} |
| 7395 |
|
| 7396 |
// Remove: Service producers can use this method to remove private DNS zones in |
| 7397 |
// the shared producer host project and matching peering zones in the consumer |
| 7398 |
// project. |
| 7399 |
// |
| 7400 |
// - parent: The service that is managing peering connectivity for a service |
| 7401 |
// producer's organization. For Google services that support this |
| 7402 |
// functionality, this value is `services/servicenetworking.googleapis.com`. |
| 7403 |
func (r *ServicesDnsZonesService) Remove(parent string, removednszonerequest *RemoveDnsZoneRequest) *ServicesDnsZonesRemoveCall { |
| 7404 |
c := &ServicesDnsZonesRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7405 |
c.parent = parent |
| 7406 |
c.removednszonerequest = removednszonerequest |
| 7407 |
return c |
| 7408 |
} |
| 7409 |
|
| 7410 |
// Fields allows partial responses to be retrieved. See |
| 7411 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7412 |
// details. |
| 7413 |
func (c *ServicesDnsZonesRemoveCall) Fields(s ...googleapi.Field) *ServicesDnsZonesRemoveCall { |
| 7414 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7415 |
return c |
| 7416 |
} |
| 7417 |
|
| 7418 |
// Context sets the context to be used in this call's Do method. |
| 7419 |
func (c *ServicesDnsZonesRemoveCall) Context(ctx context.Context) *ServicesDnsZonesRemoveCall { |
| 7420 |
c.ctx_ = ctx |
| 7421 |
return c |
| 7422 |
} |
| 7423 |
|
| 7424 |
// Header returns a http.Header that can be modified by the caller to add |
| 7425 |
// headers to the request. |
| 7426 |
func (c *ServicesDnsZonesRemoveCall) Header() http.Header { |
| 7427 |
if c.header_ == nil { |
| 7428 |
c.header_ = make(http.Header) |
| 7429 |
} |
| 7430 |
return c.header_ |
| 7431 |
} |
| 7432 |
|
| 7433 |
func (c *ServicesDnsZonesRemoveCall) doRequest(alt string) (*http.Response, error) { |
| 7434 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 7435 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.removednszonerequest) |
| 7436 |
if err != nil { |
| 7437 |
return nil, err |
| 7438 |
} |
| 7439 |
c.urlParams_.Set("alt", alt) |
| 7440 |
c.urlParams_.Set("prettyPrint", "false") |
| 7441 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsZones:remove") |
| 7442 |
urls += "?" + c.urlParams_.Encode() |
| 7443 |
req, err := http.NewRequest("POST", urls, body) |
| 7444 |
if err != nil { |
| 7445 |
return nil, err |
| 7446 |
} |
| 7447 |
req.Header = reqHeaders |
| 7448 |
googleapi.Expand(req.URL, map[string]string{ |
| 7449 |
"parent": c.parent, |
| 7450 |
}) |
| 7451 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsZones.remove", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 7452 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7453 |
} |
| 7454 |
|
| 7455 |
// Do executes the "servicenetworking.services.dnsZones.remove" call. |
| 7456 |
// Any non-2xx status code is an error. Response headers are in either |
| 7457 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 7458 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 7459 |
// whether the returned error was because http.StatusNotModified was returned. |
| 7460 |
func (c *ServicesDnsZonesRemoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 7461 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7462 |
res, err := c.doRequest("json") |
| 7463 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7464 |
if res.Body != nil { |
| 7465 |
res.Body.Close() |
| 7466 |
} |
| 7467 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7468 |
Code: res.StatusCode, |
| 7469 |
Header: res.Header, |
| 7470 |
}) |
| 7471 |
} |
| 7472 |
if err != nil { |
| 7473 |
return nil, err |
| 7474 |
} |
| 7475 |
defer googleapi.CloseBody(res) |
| 7476 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7477 |
return nil, gensupport.WrapError(err) |
| 7478 |
} |
| 7479 |
ret := &Operation{ |
| 7480 |
ServerResponse: googleapi.ServerResponse{ |
| 7481 |
Header: res.Header, |
| 7482 |
HTTPStatusCode: res.StatusCode, |
| 7483 |
}, |
| 7484 |
} |
| 7485 |
target := &ret |
| 7486 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7487 |
if err != nil { |
| 7488 |
return nil, err |
| 7489 |
} |
| 7490 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.dnsZones.remove", "response", internallog.HTTPResponse(res, b)) |
| 7491 |
return ret, nil |
| 7492 |
} |
| 7493 |
|
| 7494 |
type ServicesProjectsGlobalNetworksGetCall struct { |
| 7495 |
s *APIService |
| 7496 |
name string |
| 7497 |
urlParams_ gensupport.URLParams |
| 7498 |
ifNoneMatch_ string |
| 7499 |
ctx_ context.Context |
| 7500 |
header_ http.Header |
| 7501 |
} |
| 7502 |
|
| 7503 |
// Get: Service producers use this method to get the configuration of their |
| 7504 |
// connection including the import/export of custom routes and subnetwork |
| 7505 |
// routes with public IP. |
| 7506 |
// |
| 7507 |
// - name: Name of the consumer config to retrieve in the format: |
| 7508 |
// `services/{service}/projects/{project}/global/networks/{network}`. |
| 7509 |
// {service} is the peering service that is managing connectivity for the |
| 7510 |
// service producer's organization. For Google services that support this |
| 7511 |
// functionality, this value is `servicenetworking.googleapis.com`. {project} |
| 7512 |
// is a project number e.g. `12345` that contains the service consumer's VPC |
| 7513 |
// network. {network} is the name of the service consumer's VPC network. |
| 7514 |
func (r *ServicesProjectsGlobalNetworksService) Get(name string) *ServicesProjectsGlobalNetworksGetCall { |
| 7515 |
c := &ServicesProjectsGlobalNetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7516 |
c.name = name |
| 7517 |
return c |
| 7518 |
} |
| 7519 |
|
| 7520 |
// IncludeUsedIpRanges sets the optional parameter "includeUsedIpRanges": When |
| 7521 |
// true, include the used IP ranges as part of the GetConsumerConfig output. |
| 7522 |
// This includes routes created inside the service networking network, consumer |
| 7523 |
// network, peers of the consumer network, and reserved ranges inside the |
| 7524 |
// service networking network. By default, this is false |
| 7525 |
func (c *ServicesProjectsGlobalNetworksGetCall) IncludeUsedIpRanges(includeUsedIpRanges bool) *ServicesProjectsGlobalNetworksGetCall { |
| 7526 |
c.urlParams_.Set("includeUsedIpRanges", fmt.Sprint(includeUsedIpRanges)) |
| 7527 |
return c |
| 7528 |
} |
| 7529 |
|
| 7530 |
// Fields allows partial responses to be retrieved. See |
| 7531 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7532 |
// details. |
| 7533 |
func (c *ServicesProjectsGlobalNetworksGetCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksGetCall { |
| 7534 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7535 |
return c |
| 7536 |
} |
| 7537 |
|
| 7538 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 7539 |
// object's ETag matches the given value. This is useful for getting updates |
| 7540 |
// only after the object has changed since the last request. |
| 7541 |
func (c *ServicesProjectsGlobalNetworksGetCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksGetCall { |
| 7542 |
c.ifNoneMatch_ = entityTag |
| 7543 |
return c |
| 7544 |
} |
| 7545 |
|
| 7546 |
// Context sets the context to be used in this call's Do method. |
| 7547 |
func (c *ServicesProjectsGlobalNetworksGetCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksGetCall { |
| 7548 |
c.ctx_ = ctx |
| 7549 |
return c |
| 7550 |
} |
| 7551 |
|
| 7552 |
// Header returns a http.Header that can be modified by the caller to add |
| 7553 |
// headers to the request. |
| 7554 |
func (c *ServicesProjectsGlobalNetworksGetCall) Header() http.Header { |
| 7555 |
if c.header_ == nil { |
| 7556 |
c.header_ = make(http.Header) |
| 7557 |
} |
| 7558 |
return c.header_ |
| 7559 |
} |
| 7560 |
|
| 7561 |
func (c *ServicesProjectsGlobalNetworksGetCall) doRequest(alt string) (*http.Response, error) { |
| 7562 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 7563 |
if c.ifNoneMatch_ != "" { |
| 7564 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 7565 |
} |
| 7566 |
c.urlParams_.Set("alt", alt) |
| 7567 |
c.urlParams_.Set("prettyPrint", "false") |
| 7568 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 7569 |
urls += "?" + c.urlParams_.Encode() |
| 7570 |
req, err := http.NewRequest("GET", urls, nil) |
| 7571 |
if err != nil { |
| 7572 |
return nil, err |
| 7573 |
} |
| 7574 |
req.Header = reqHeaders |
| 7575 |
googleapi.Expand(req.URL, map[string]string{ |
| 7576 |
"name": c.name, |
| 7577 |
}) |
| 7578 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.get", "request", internallog.HTTPRequest(req, nil)) |
| 7579 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7580 |
} |
| 7581 |
|
| 7582 |
// Do executes the "servicenetworking.services.projects.global.networks.get" call. |
| 7583 |
// Any non-2xx status code is an error. Response headers are in either |
| 7584 |
// *ConsumerConfig.ServerResponse.Header or (if a response was returned at all) |
| 7585 |
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 7586 |
// whether the returned error was because http.StatusNotModified was returned. |
| 7587 |
func (c *ServicesProjectsGlobalNetworksGetCall) Do(opts ...googleapi.CallOption) (*ConsumerConfig, error) { |
| 7588 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7589 |
res, err := c.doRequest("json") |
| 7590 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7591 |
if res.Body != nil { |
| 7592 |
res.Body.Close() |
| 7593 |
} |
| 7594 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7595 |
Code: res.StatusCode, |
| 7596 |
Header: res.Header, |
| 7597 |
}) |
| 7598 |
} |
| 7599 |
if err != nil { |
| 7600 |
return nil, err |
| 7601 |
} |
| 7602 |
defer googleapi.CloseBody(res) |
| 7603 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7604 |
return nil, gensupport.WrapError(err) |
| 7605 |
} |
| 7606 |
ret := &ConsumerConfig{ |
| 7607 |
ServerResponse: googleapi.ServerResponse{ |
| 7608 |
Header: res.Header, |
| 7609 |
HTTPStatusCode: res.StatusCode, |
| 7610 |
}, |
| 7611 |
} |
| 7612 |
target := &ret |
| 7613 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7614 |
if err != nil { |
| 7615 |
return nil, err |
| 7616 |
} |
| 7617 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.get", "response", internallog.HTTPResponse(res, b)) |
| 7618 |
return ret, nil |
| 7619 |
} |
| 7620 |
|
| 7621 |
type ServicesProjectsGlobalNetworksGetVpcServiceControlsCall struct { |
| 7622 |
s *APIService |
| 7623 |
name string |
| 7624 |
urlParams_ gensupport.URLParams |
| 7625 |
ifNoneMatch_ string |
| 7626 |
ctx_ context.Context |
| 7627 |
header_ http.Header |
| 7628 |
} |
| 7629 |
|
| 7630 |
// GetVpcServiceControls: Consumers use this method to find out the state of |
| 7631 |
// VPC Service Controls. The controls could be enabled or disabled for a |
| 7632 |
// connection. |
| 7633 |
// |
| 7634 |
// - name: Name of the VPC Service Controls config to retrieve in the format: |
| 7635 |
// `services/{service}/projects/{project}/global/networks/{network}`. |
| 7636 |
// {service} is the peering service that is managing connectivity for the |
| 7637 |
// service producer's organization. For Google services that support this |
| 7638 |
// functionality, this value is `servicenetworking.googleapis.com`. {project} |
| 7639 |
// is a project number e.g. `12345` that contains the service consumer's VPC |
| 7640 |
// network. {network} is the name of the service consumer's VPC network. |
| 7641 |
func (r *ServicesProjectsGlobalNetworksService) GetVpcServiceControls(name string) *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall { |
| 7642 |
c := &ServicesProjectsGlobalNetworksGetVpcServiceControlsCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7643 |
c.name = name |
| 7644 |
return c |
| 7645 |
} |
| 7646 |
|
| 7647 |
// Fields allows partial responses to be retrieved. See |
| 7648 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7649 |
// details. |
| 7650 |
func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall { |
| 7651 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7652 |
return c |
| 7653 |
} |
| 7654 |
|
| 7655 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 7656 |
// object's ETag matches the given value. This is useful for getting updates |
| 7657 |
// only after the object has changed since the last request. |
| 7658 |
func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall { |
| 7659 |
c.ifNoneMatch_ = entityTag |
| 7660 |
return c |
| 7661 |
} |
| 7662 |
|
| 7663 |
// Context sets the context to be used in this call's Do method. |
| 7664 |
func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall { |
| 7665 |
c.ctx_ = ctx |
| 7666 |
return c |
| 7667 |
} |
| 7668 |
|
| 7669 |
// Header returns a http.Header that can be modified by the caller to add |
| 7670 |
// headers to the request. |
| 7671 |
func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) Header() http.Header { |
| 7672 |
if c.header_ == nil { |
| 7673 |
c.header_ = make(http.Header) |
| 7674 |
} |
| 7675 |
return c.header_ |
| 7676 |
} |
| 7677 |
|
| 7678 |
func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) doRequest(alt string) (*http.Response, error) { |
| 7679 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 7680 |
if c.ifNoneMatch_ != "" { |
| 7681 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 7682 |
} |
| 7683 |
c.urlParams_.Set("alt", alt) |
| 7684 |
c.urlParams_.Set("prettyPrint", "false") |
| 7685 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/vpcServiceControls") |
| 7686 |
urls += "?" + c.urlParams_.Encode() |
| 7687 |
req, err := http.NewRequest("GET", urls, nil) |
| 7688 |
if err != nil { |
| 7689 |
return nil, err |
| 7690 |
} |
| 7691 |
req.Header = reqHeaders |
| 7692 |
googleapi.Expand(req.URL, map[string]string{ |
| 7693 |
"name": c.name, |
| 7694 |
}) |
| 7695 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.getVpcServiceControls", "request", internallog.HTTPRequest(req, nil)) |
| 7696 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7697 |
} |
| 7698 |
|
| 7699 |
// Do executes the "servicenetworking.services.projects.global.networks.getVpcServiceControls" call. |
| 7700 |
// Any non-2xx status code is an error. Response headers are in either |
| 7701 |
// *VpcServiceControls.ServerResponse.Header or (if a response was returned at |
| 7702 |
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 7703 |
// check whether the returned error was because http.StatusNotModified was |
| 7704 |
// returned. |
| 7705 |
func (c *ServicesProjectsGlobalNetworksGetVpcServiceControlsCall) Do(opts ...googleapi.CallOption) (*VpcServiceControls, error) { |
| 7706 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7707 |
res, err := c.doRequest("json") |
| 7708 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7709 |
if res.Body != nil { |
| 7710 |
res.Body.Close() |
| 7711 |
} |
| 7712 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7713 |
Code: res.StatusCode, |
| 7714 |
Header: res.Header, |
| 7715 |
}) |
| 7716 |
} |
| 7717 |
if err != nil { |
| 7718 |
return nil, err |
| 7719 |
} |
| 7720 |
defer googleapi.CloseBody(res) |
| 7721 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7722 |
return nil, gensupport.WrapError(err) |
| 7723 |
} |
| 7724 |
ret := &VpcServiceControls{ |
| 7725 |
ServerResponse: googleapi.ServerResponse{ |
| 7726 |
Header: res.Header, |
| 7727 |
HTTPStatusCode: res.StatusCode, |
| 7728 |
}, |
| 7729 |
} |
| 7730 |
target := &ret |
| 7731 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7732 |
if err != nil { |
| 7733 |
return nil, err |
| 7734 |
} |
| 7735 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.getVpcServiceControls", "response", internallog.HTTPResponse(res, b)) |
| 7736 |
return ret, nil |
| 7737 |
} |
| 7738 |
|
| 7739 |
type ServicesProjectsGlobalNetworksUpdateConsumerConfigCall struct { |
| 7740 |
s *APIService |
| 7741 |
parent string |
| 7742 |
updateconsumerconfigrequest *UpdateConsumerConfigRequest |
| 7743 |
urlParams_ gensupport.URLParams |
| 7744 |
ctx_ context.Context |
| 7745 |
header_ http.Header |
| 7746 |
} |
| 7747 |
|
| 7748 |
// UpdateConsumerConfig: Service producers use this method to update the |
| 7749 |
// configuration of their connection including the import/export of custom |
| 7750 |
// routes and subnetwork routes with public IP. |
| 7751 |
// |
| 7752 |
// - parent: Parent resource identifying the connection for which the consumer |
| 7753 |
// config is being updated in the format: |
| 7754 |
// `services/{service}/projects/{project}/global/networks/{network}` |
| 7755 |
// {service} is the peering service that is managing connectivity for the |
| 7756 |
// service producer's organization. For Google services that support this |
| 7757 |
// functionality, this value is `servicenetworking.googleapis.com`. {project} |
| 7758 |
// is the number of the project that contains the service consumer's VPC |
| 7759 |
// network e.g. `12345`. {network} is the name of the service consumer's VPC |
| 7760 |
// network. |
| 7761 |
func (r *ServicesProjectsGlobalNetworksService) UpdateConsumerConfig(parent string, updateconsumerconfigrequest *UpdateConsumerConfigRequest) *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall { |
| 7762 |
c := &ServicesProjectsGlobalNetworksUpdateConsumerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7763 |
c.parent = parent |
| 7764 |
c.updateconsumerconfigrequest = updateconsumerconfigrequest |
| 7765 |
return c |
| 7766 |
} |
| 7767 |
|
| 7768 |
// Fields allows partial responses to be retrieved. See |
| 7769 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7770 |
// details. |
| 7771 |
func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall { |
| 7772 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7773 |
return c |
| 7774 |
} |
| 7775 |
|
| 7776 |
// Context sets the context to be used in this call's Do method. |
| 7777 |
func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall { |
| 7778 |
c.ctx_ = ctx |
| 7779 |
return c |
| 7780 |
} |
| 7781 |
|
| 7782 |
// Header returns a http.Header that can be modified by the caller to add |
| 7783 |
// headers to the request. |
| 7784 |
func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Header() http.Header { |
| 7785 |
if c.header_ == nil { |
| 7786 |
c.header_ = make(http.Header) |
| 7787 |
} |
| 7788 |
return c.header_ |
| 7789 |
} |
| 7790 |
|
| 7791 |
func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) doRequest(alt string) (*http.Response, error) { |
| 7792 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 7793 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updateconsumerconfigrequest) |
| 7794 |
if err != nil { |
| 7795 |
return nil, err |
| 7796 |
} |
| 7797 |
c.urlParams_.Set("alt", alt) |
| 7798 |
c.urlParams_.Set("prettyPrint", "false") |
| 7799 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:updateConsumerConfig") |
| 7800 |
urls += "?" + c.urlParams_.Encode() |
| 7801 |
req, err := http.NewRequest("PATCH", urls, body) |
| 7802 |
if err != nil { |
| 7803 |
return nil, err |
| 7804 |
} |
| 7805 |
req.Header = reqHeaders |
| 7806 |
googleapi.Expand(req.URL, map[string]string{ |
| 7807 |
"parent": c.parent, |
| 7808 |
}) |
| 7809 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.updateConsumerConfig", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 7810 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7811 |
} |
| 7812 |
|
| 7813 |
// Do executes the "servicenetworking.services.projects.global.networks.updateConsumerConfig" call. |
| 7814 |
// Any non-2xx status code is an error. Response headers are in either |
| 7815 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 7816 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 7817 |
// whether the returned error was because http.StatusNotModified was returned. |
| 7818 |
func (c *ServicesProjectsGlobalNetworksUpdateConsumerConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 7819 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7820 |
res, err := c.doRequest("json") |
| 7821 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7822 |
if res.Body != nil { |
| 7823 |
res.Body.Close() |
| 7824 |
} |
| 7825 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7826 |
Code: res.StatusCode, |
| 7827 |
Header: res.Header, |
| 7828 |
}) |
| 7829 |
} |
| 7830 |
if err != nil { |
| 7831 |
return nil, err |
| 7832 |
} |
| 7833 |
defer googleapi.CloseBody(res) |
| 7834 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7835 |
return nil, gensupport.WrapError(err) |
| 7836 |
} |
| 7837 |
ret := &Operation{ |
| 7838 |
ServerResponse: googleapi.ServerResponse{ |
| 7839 |
Header: res.Header, |
| 7840 |
HTTPStatusCode: res.StatusCode, |
| 7841 |
}, |
| 7842 |
} |
| 7843 |
target := &ret |
| 7844 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7845 |
if err != nil { |
| 7846 |
return nil, err |
| 7847 |
} |
| 7848 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.updateConsumerConfig", "response", internallog.HTTPResponse(res, b)) |
| 7849 |
return ret, nil |
| 7850 |
} |
| 7851 |
|
| 7852 |
type ServicesProjectsGlobalNetworksDnsZonesGetCall struct { |
| 7853 |
s *APIService |
| 7854 |
name string |
| 7855 |
urlParams_ gensupport.URLParams |
| 7856 |
ifNoneMatch_ string |
| 7857 |
ctx_ context.Context |
| 7858 |
header_ http.Header |
| 7859 |
} |
| 7860 |
|
| 7861 |
// Get: Service producers can use this method to retrieve a DNS zone in the |
| 7862 |
// shared producer host project and the matching peering zones in consumer |
| 7863 |
// project |
| 7864 |
// |
| 7865 |
// - name: The network that the consumer is using to connect with services. |
| 7866 |
// Must be in the form of |
| 7867 |
// services/{service}/projects/{project}/global/networks/{network}/dnsZones/{z |
| 7868 |
// oneName} Where {service} is the peering service that is managing |
| 7869 |
// connectivity for the service producer's organization. For Google services |
| 7870 |
// that support this {project} is the project number, as in '12345' {network} |
| 7871 |
// is the network name. {zoneName} is the DNS zone name. |
| 7872 |
func (r *ServicesProjectsGlobalNetworksDnsZonesService) Get(name string) *ServicesProjectsGlobalNetworksDnsZonesGetCall { |
| 7873 |
c := &ServicesProjectsGlobalNetworksDnsZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7874 |
c.name = name |
| 7875 |
return c |
| 7876 |
} |
| 7877 |
|
| 7878 |
// Fields allows partial responses to be retrieved. See |
| 7879 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7880 |
// details. |
| 7881 |
func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksDnsZonesGetCall { |
| 7882 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7883 |
return c |
| 7884 |
} |
| 7885 |
|
| 7886 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 7887 |
// object's ETag matches the given value. This is useful for getting updates |
| 7888 |
// only after the object has changed since the last request. |
| 7889 |
func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksDnsZonesGetCall { |
| 7890 |
c.ifNoneMatch_ = entityTag |
| 7891 |
return c |
| 7892 |
} |
| 7893 |
|
| 7894 |
// Context sets the context to be used in this call's Do method. |
| 7895 |
func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksDnsZonesGetCall { |
| 7896 |
c.ctx_ = ctx |
| 7897 |
return c |
| 7898 |
} |
| 7899 |
|
| 7900 |
// Header returns a http.Header that can be modified by the caller to add |
| 7901 |
// headers to the request. |
| 7902 |
func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) Header() http.Header { |
| 7903 |
if c.header_ == nil { |
| 7904 |
c.header_ = make(http.Header) |
| 7905 |
} |
| 7906 |
return c.header_ |
| 7907 |
} |
| 7908 |
|
| 7909 |
func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) doRequest(alt string) (*http.Response, error) { |
| 7910 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 7911 |
if c.ifNoneMatch_ != "" { |
| 7912 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 7913 |
} |
| 7914 |
c.urlParams_.Set("alt", alt) |
| 7915 |
c.urlParams_.Set("prettyPrint", "false") |
| 7916 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 7917 |
urls += "?" + c.urlParams_.Encode() |
| 7918 |
req, err := http.NewRequest("GET", urls, nil) |
| 7919 |
if err != nil { |
| 7920 |
return nil, err |
| 7921 |
} |
| 7922 |
req.Header = reqHeaders |
| 7923 |
googleapi.Expand(req.URL, map[string]string{ |
| 7924 |
"name": c.name, |
| 7925 |
}) |
| 7926 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.dnsZones.get", "request", internallog.HTTPRequest(req, nil)) |
| 7927 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7928 |
} |
| 7929 |
|
| 7930 |
// Do executes the "servicenetworking.services.projects.global.networks.dnsZones.get" call. |
| 7931 |
// Any non-2xx status code is an error. Response headers are in either |
| 7932 |
// *GetDnsZoneResponse.ServerResponse.Header or (if a response was returned at |
| 7933 |
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 7934 |
// check whether the returned error was because http.StatusNotModified was |
| 7935 |
// returned. |
| 7936 |
func (c *ServicesProjectsGlobalNetworksDnsZonesGetCall) Do(opts ...googleapi.CallOption) (*GetDnsZoneResponse, error) { |
| 7937 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7938 |
res, err := c.doRequest("json") |
| 7939 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7940 |
if res.Body != nil { |
| 7941 |
res.Body.Close() |
| 7942 |
} |
| 7943 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7944 |
Code: res.StatusCode, |
| 7945 |
Header: res.Header, |
| 7946 |
}) |
| 7947 |
} |
| 7948 |
if err != nil { |
| 7949 |
return nil, err |
| 7950 |
} |
| 7951 |
defer googleapi.CloseBody(res) |
| 7952 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7953 |
return nil, gensupport.WrapError(err) |
| 7954 |
} |
| 7955 |
ret := &GetDnsZoneResponse{ |
| 7956 |
ServerResponse: googleapi.ServerResponse{ |
| 7957 |
Header: res.Header, |
| 7958 |
HTTPStatusCode: res.StatusCode, |
| 7959 |
}, |
| 7960 |
} |
| 7961 |
target := &ret |
| 7962 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7963 |
if err != nil { |
| 7964 |
return nil, err |
| 7965 |
} |
| 7966 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.dnsZones.get", "response", internallog.HTTPResponse(res, b)) |
| 7967 |
return ret, nil |
| 7968 |
} |
| 7969 |
|
| 7970 |
type ServicesProjectsGlobalNetworksDnsZonesListCall struct { |
| 7971 |
s *APIService |
| 7972 |
parent string |
| 7973 |
urlParams_ gensupport.URLParams |
| 7974 |
ifNoneMatch_ string |
| 7975 |
ctx_ context.Context |
| 7976 |
header_ http.Header |
| 7977 |
} |
| 7978 |
|
| 7979 |
// List: * Service producers can use this method to retrieve a list of |
| 7980 |
// available DNS zones in the shared producer host project and the matching |
| 7981 |
// peering zones in the consumer project. * |
| 7982 |
// |
| 7983 |
// - parent: Parent resource identifying the connection which owns this |
| 7984 |
// collection of DNS zones in the format |
| 7985 |
// services/{service}/projects/{project}/global/networks/{network} Service: |
| 7986 |
// The service that is managing connectivity for the service producer's |
| 7987 |
// organization. For Google services that support this functionality, this |
| 7988 |
// value is `servicenetworking.googleapis.com`. Projects: the consumer |
| 7989 |
// project containing the consumer network. Network: The consumer network |
| 7990 |
// accessible from the tenant project. |
| 7991 |
func (r *ServicesProjectsGlobalNetworksDnsZonesService) List(parent string) *ServicesProjectsGlobalNetworksDnsZonesListCall { |
| 7992 |
c := &ServicesProjectsGlobalNetworksDnsZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7993 |
c.parent = parent |
| 7994 |
return c |
| 7995 |
} |
| 7996 |
|
| 7997 |
// Fields allows partial responses to be retrieved. See |
| 7998 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7999 |
// details. |
| 8000 |
func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksDnsZonesListCall { |
| 8001 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8002 |
return c |
| 8003 |
} |
| 8004 |
|
| 8005 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 8006 |
// object's ETag matches the given value. This is useful for getting updates |
| 8007 |
// only after the object has changed since the last request. |
| 8008 |
func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksDnsZonesListCall { |
| 8009 |
c.ifNoneMatch_ = entityTag |
| 8010 |
return c |
| 8011 |
} |
| 8012 |
|
| 8013 |
// Context sets the context to be used in this call's Do method. |
| 8014 |
func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksDnsZonesListCall { |
| 8015 |
c.ctx_ = ctx |
| 8016 |
return c |
| 8017 |
} |
| 8018 |
|
| 8019 |
// Header returns a http.Header that can be modified by the caller to add |
| 8020 |
// headers to the request. |
| 8021 |
func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) Header() http.Header { |
| 8022 |
if c.header_ == nil { |
| 8023 |
c.header_ = make(http.Header) |
| 8024 |
} |
| 8025 |
return c.header_ |
| 8026 |
} |
| 8027 |
|
| 8028 |
func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) doRequest(alt string) (*http.Response, error) { |
| 8029 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 8030 |
if c.ifNoneMatch_ != "" { |
| 8031 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 8032 |
} |
| 8033 |
c.urlParams_.Set("alt", alt) |
| 8034 |
c.urlParams_.Set("prettyPrint", "false") |
| 8035 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsZones:list") |
| 8036 |
urls += "?" + c.urlParams_.Encode() |
| 8037 |
req, err := http.NewRequest("GET", urls, nil) |
| 8038 |
if err != nil { |
| 8039 |
return nil, err |
| 8040 |
} |
| 8041 |
req.Header = reqHeaders |
| 8042 |
googleapi.Expand(req.URL, map[string]string{ |
| 8043 |
"parent": c.parent, |
| 8044 |
}) |
| 8045 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.dnsZones.list", "request", internallog.HTTPRequest(req, nil)) |
| 8046 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8047 |
} |
| 8048 |
|
| 8049 |
// Do executes the "servicenetworking.services.projects.global.networks.dnsZones.list" call. |
| 8050 |
// Any non-2xx status code is an error. Response headers are in either |
| 8051 |
// *ListDnsZonesResponse.ServerResponse.Header or (if a response was returned |
| 8052 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 8053 |
// check whether the returned error was because http.StatusNotModified was |
| 8054 |
// returned. |
| 8055 |
func (c *ServicesProjectsGlobalNetworksDnsZonesListCall) Do(opts ...googleapi.CallOption) (*ListDnsZonesResponse, error) { |
| 8056 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8057 |
res, err := c.doRequest("json") |
| 8058 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8059 |
if res.Body != nil { |
| 8060 |
res.Body.Close() |
| 8061 |
} |
| 8062 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8063 |
Code: res.StatusCode, |
| 8064 |
Header: res.Header, |
| 8065 |
}) |
| 8066 |
} |
| 8067 |
if err != nil { |
| 8068 |
return nil, err |
| 8069 |
} |
| 8070 |
defer googleapi.CloseBody(res) |
| 8071 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8072 |
return nil, gensupport.WrapError(err) |
| 8073 |
} |
| 8074 |
ret := &ListDnsZonesResponse{ |
| 8075 |
ServerResponse: googleapi.ServerResponse{ |
| 8076 |
Header: res.Header, |
| 8077 |
HTTPStatusCode: res.StatusCode, |
| 8078 |
}, |
| 8079 |
} |
| 8080 |
target := &ret |
| 8081 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8082 |
if err != nil { |
| 8083 |
return nil, err |
| 8084 |
} |
| 8085 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.dnsZones.list", "response", internallog.HTTPResponse(res, b)) |
| 8086 |
return ret, nil |
| 8087 |
} |
| 8088 |
|
| 8089 |
type ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall struct { |
| 8090 |
s *APIService |
| 8091 |
parent string |
| 8092 |
peereddnsdomain *PeeredDnsDomain |
| 8093 |
urlParams_ gensupport.URLParams |
| 8094 |
ctx_ context.Context |
| 8095 |
header_ http.Header |
| 8096 |
} |
| 8097 |
|
| 8098 |
// Create: Creates a peered DNS domain which sends requests for records in |
| 8099 |
// given namespace originating in the service producer VPC network to the |
| 8100 |
// consumer VPC network to be resolved. |
| 8101 |
// |
| 8102 |
// - parent: Parent resource identifying the connection for which the peered |
| 8103 |
// DNS domain will be created in the format: |
| 8104 |
// `services/{service}/projects/{project}/global/networks/{network}` |
| 8105 |
// {service} is the peering service that is managing connectivity for the |
| 8106 |
// service producer's organization. For Google services that support this |
| 8107 |
// functionality, this value is `servicenetworking.googleapis.com`. {project} |
| 8108 |
// is the number of the project that contains the service consumer's VPC |
| 8109 |
// network e.g. `12345`. {network} is the name of the service consumer's VPC |
| 8110 |
// network. |
| 8111 |
func (r *ServicesProjectsGlobalNetworksPeeredDnsDomainsService) Create(parent string, peereddnsdomain *PeeredDnsDomain) *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall { |
| 8112 |
c := &ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8113 |
c.parent = parent |
| 8114 |
c.peereddnsdomain = peereddnsdomain |
| 8115 |
return c |
| 8116 |
} |
| 8117 |
|
| 8118 |
// Fields allows partial responses to be retrieved. See |
| 8119 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8120 |
// details. |
| 8121 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall { |
| 8122 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8123 |
return c |
| 8124 |
} |
| 8125 |
|
| 8126 |
// Context sets the context to be used in this call's Do method. |
| 8127 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall { |
| 8128 |
c.ctx_ = ctx |
| 8129 |
return c |
| 8130 |
} |
| 8131 |
|
| 8132 |
// Header returns a http.Header that can be modified by the caller to add |
| 8133 |
// headers to the request. |
| 8134 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Header() http.Header { |
| 8135 |
if c.header_ == nil { |
| 8136 |
c.header_ = make(http.Header) |
| 8137 |
} |
| 8138 |
return c.header_ |
| 8139 |
} |
| 8140 |
|
| 8141 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) doRequest(alt string) (*http.Response, error) { |
| 8142 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 8143 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.peereddnsdomain) |
| 8144 |
if err != nil { |
| 8145 |
return nil, err |
| 8146 |
} |
| 8147 |
c.urlParams_.Set("alt", alt) |
| 8148 |
c.urlParams_.Set("prettyPrint", "false") |
| 8149 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/peeredDnsDomains") |
| 8150 |
urls += "?" + c.urlParams_.Encode() |
| 8151 |
req, err := http.NewRequest("POST", urls, body) |
| 8152 |
if err != nil { |
| 8153 |
return nil, err |
| 8154 |
} |
| 8155 |
req.Header = reqHeaders |
| 8156 |
googleapi.Expand(req.URL, map[string]string{ |
| 8157 |
"parent": c.parent, |
| 8158 |
}) |
| 8159 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 8160 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8161 |
} |
| 8162 |
|
| 8163 |
// Do executes the "servicenetworking.services.projects.global.networks.peeredDnsDomains.create" call. |
| 8164 |
// Any non-2xx status code is an error. Response headers are in either |
| 8165 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 8166 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 8167 |
// whether the returned error was because http.StatusNotModified was returned. |
| 8168 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 8169 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8170 |
res, err := c.doRequest("json") |
| 8171 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8172 |
if res.Body != nil { |
| 8173 |
res.Body.Close() |
| 8174 |
} |
| 8175 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8176 |
Code: res.StatusCode, |
| 8177 |
Header: res.Header, |
| 8178 |
}) |
| 8179 |
} |
| 8180 |
if err != nil { |
| 8181 |
return nil, err |
| 8182 |
} |
| 8183 |
defer googleapi.CloseBody(res) |
| 8184 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8185 |
return nil, gensupport.WrapError(err) |
| 8186 |
} |
| 8187 |
ret := &Operation{ |
| 8188 |
ServerResponse: googleapi.ServerResponse{ |
| 8189 |
Header: res.Header, |
| 8190 |
HTTPStatusCode: res.StatusCode, |
| 8191 |
}, |
| 8192 |
} |
| 8193 |
target := &ret |
| 8194 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8195 |
if err != nil { |
| 8196 |
return nil, err |
| 8197 |
} |
| 8198 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.create", "response", internallog.HTTPResponse(res, b)) |
| 8199 |
return ret, nil |
| 8200 |
} |
| 8201 |
|
| 8202 |
type ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall struct { |
| 8203 |
s *APIService |
| 8204 |
name string |
| 8205 |
urlParams_ gensupport.URLParams |
| 8206 |
ctx_ context.Context |
| 8207 |
header_ http.Header |
| 8208 |
} |
| 8209 |
|
| 8210 |
// Delete: Deletes a peered DNS domain. |
| 8211 |
// |
| 8212 |
// - name: The name of the peered DNS domain to delete in the format: |
| 8213 |
// `services/{service}/projects/{project}/global/networks/{network}/peeredDnsD |
| 8214 |
// omains/{name}`. {service} is the peering service that is managing |
| 8215 |
// connectivity for the service producer's organization. For Google services |
| 8216 |
// that support this functionality, this value is |
| 8217 |
// `servicenetworking.googleapis.com`. {project} is the number of the project |
| 8218 |
// that contains the service consumer's VPC network e.g. `12345`. {network} |
| 8219 |
// is the name of the service consumer's VPC network. {name} is the name of |
| 8220 |
// the peered DNS domain. |
| 8221 |
func (r *ServicesProjectsGlobalNetworksPeeredDnsDomainsService) Delete(name string) *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall { |
| 8222 |
c := &ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8223 |
c.name = name |
| 8224 |
return c |
| 8225 |
} |
| 8226 |
|
| 8227 |
// Fields allows partial responses to be retrieved. See |
| 8228 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8229 |
// details. |
| 8230 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall { |
| 8231 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8232 |
return c |
| 8233 |
} |
| 8234 |
|
| 8235 |
// Context sets the context to be used in this call's Do method. |
| 8236 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall { |
| 8237 |
c.ctx_ = ctx |
| 8238 |
return c |
| 8239 |
} |
| 8240 |
|
| 8241 |
// Header returns a http.Header that can be modified by the caller to add |
| 8242 |
// headers to the request. |
| 8243 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Header() http.Header { |
| 8244 |
if c.header_ == nil { |
| 8245 |
c.header_ = make(http.Header) |
| 8246 |
} |
| 8247 |
return c.header_ |
| 8248 |
} |
| 8249 |
|
| 8250 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) doRequest(alt string) (*http.Response, error) { |
| 8251 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 8252 |
c.urlParams_.Set("alt", alt) |
| 8253 |
c.urlParams_.Set("prettyPrint", "false") |
| 8254 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 8255 |
urls += "?" + c.urlParams_.Encode() |
| 8256 |
req, err := http.NewRequest("DELETE", urls, nil) |
| 8257 |
if err != nil { |
| 8258 |
return nil, err |
| 8259 |
} |
| 8260 |
req.Header = reqHeaders |
| 8261 |
googleapi.Expand(req.URL, map[string]string{ |
| 8262 |
"name": c.name, |
| 8263 |
}) |
| 8264 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.delete", "request", internallog.HTTPRequest(req, nil)) |
| 8265 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8266 |
} |
| 8267 |
|
| 8268 |
// Do executes the "servicenetworking.services.projects.global.networks.peeredDnsDomains.delete" call. |
| 8269 |
// Any non-2xx status code is an error. Response headers are in either |
| 8270 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 8271 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 8272 |
// whether the returned error was because http.StatusNotModified was returned. |
| 8273 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 8274 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8275 |
res, err := c.doRequest("json") |
| 8276 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8277 |
if res.Body != nil { |
| 8278 |
res.Body.Close() |
| 8279 |
} |
| 8280 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8281 |
Code: res.StatusCode, |
| 8282 |
Header: res.Header, |
| 8283 |
}) |
| 8284 |
} |
| 8285 |
if err != nil { |
| 8286 |
return nil, err |
| 8287 |
} |
| 8288 |
defer googleapi.CloseBody(res) |
| 8289 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8290 |
return nil, gensupport.WrapError(err) |
| 8291 |
} |
| 8292 |
ret := &Operation{ |
| 8293 |
ServerResponse: googleapi.ServerResponse{ |
| 8294 |
Header: res.Header, |
| 8295 |
HTTPStatusCode: res.StatusCode, |
| 8296 |
}, |
| 8297 |
} |
| 8298 |
target := &ret |
| 8299 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8300 |
if err != nil { |
| 8301 |
return nil, err |
| 8302 |
} |
| 8303 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.delete", "response", internallog.HTTPResponse(res, b)) |
| 8304 |
return ret, nil |
| 8305 |
} |
| 8306 |
|
| 8307 |
type ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall struct { |
| 8308 |
s *APIService |
| 8309 |
parent string |
| 8310 |
urlParams_ gensupport.URLParams |
| 8311 |
ifNoneMatch_ string |
| 8312 |
ctx_ context.Context |
| 8313 |
header_ http.Header |
| 8314 |
} |
| 8315 |
|
| 8316 |
// List: Lists peered DNS domains for a connection. |
| 8317 |
// |
| 8318 |
// - parent: Parent resource identifying the connection which owns this |
| 8319 |
// collection of peered DNS domains in the format: |
| 8320 |
// `services/{service}/projects/{project}/global/networks/{network}`. |
| 8321 |
// {service} is the peering service that is managing connectivity for the |
| 8322 |
// service producer's organization. For Google services that support this |
| 8323 |
// functionality, this value is `servicenetworking.googleapis.com`. {project} |
| 8324 |
// is a project number e.g. `12345` that contains the service consumer's VPC |
| 8325 |
// network. {network} is the name of the service consumer's VPC network. |
| 8326 |
func (r *ServicesProjectsGlobalNetworksPeeredDnsDomainsService) List(parent string) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { |
| 8327 |
c := &ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8328 |
c.parent = parent |
| 8329 |
return c |
| 8330 |
} |
| 8331 |
|
| 8332 |
// Fields allows partial responses to be retrieved. See |
| 8333 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8334 |
// details. |
| 8335 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Fields(s ...googleapi.Field) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { |
| 8336 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8337 |
return c |
| 8338 |
} |
| 8339 |
|
| 8340 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 8341 |
// object's ETag matches the given value. This is useful for getting updates |
| 8342 |
// only after the object has changed since the last request. |
| 8343 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) IfNoneMatch(entityTag string) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { |
| 8344 |
c.ifNoneMatch_ = entityTag |
| 8345 |
return c |
| 8346 |
} |
| 8347 |
|
| 8348 |
// Context sets the context to be used in this call's Do method. |
| 8349 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Context(ctx context.Context) *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall { |
| 8350 |
c.ctx_ = ctx |
| 8351 |
return c |
| 8352 |
} |
| 8353 |
|
| 8354 |
// Header returns a http.Header that can be modified by the caller to add |
| 8355 |
// headers to the request. |
| 8356 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Header() http.Header { |
| 8357 |
if c.header_ == nil { |
| 8358 |
c.header_ = make(http.Header) |
| 8359 |
} |
| 8360 |
return c.header_ |
| 8361 |
} |
| 8362 |
|
| 8363 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) doRequest(alt string) (*http.Response, error) { |
| 8364 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 8365 |
if c.ifNoneMatch_ != "" { |
| 8366 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 8367 |
} |
| 8368 |
c.urlParams_.Set("alt", alt) |
| 8369 |
c.urlParams_.Set("prettyPrint", "false") |
| 8370 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/peeredDnsDomains") |
| 8371 |
urls += "?" + c.urlParams_.Encode() |
| 8372 |
req, err := http.NewRequest("GET", urls, nil) |
| 8373 |
if err != nil { |
| 8374 |
return nil, err |
| 8375 |
} |
| 8376 |
req.Header = reqHeaders |
| 8377 |
googleapi.Expand(req.URL, map[string]string{ |
| 8378 |
"parent": c.parent, |
| 8379 |
}) |
| 8380 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.list", "request", internallog.HTTPRequest(req, nil)) |
| 8381 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8382 |
} |
| 8383 |
|
| 8384 |
// Do executes the "servicenetworking.services.projects.global.networks.peeredDnsDomains.list" call. |
| 8385 |
// Any non-2xx status code is an error. Response headers are in either |
| 8386 |
// *ListPeeredDnsDomainsResponse.ServerResponse.Header or (if a response was |
| 8387 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 8388 |
// googleapi.IsNotModified to check whether the returned error was because |
| 8389 |
// http.StatusNotModified was returned. |
| 8390 |
func (c *ServicesProjectsGlobalNetworksPeeredDnsDomainsListCall) Do(opts ...googleapi.CallOption) (*ListPeeredDnsDomainsResponse, error) { |
| 8391 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8392 |
res, err := c.doRequest("json") |
| 8393 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8394 |
if res.Body != nil { |
| 8395 |
res.Body.Close() |
| 8396 |
} |
| 8397 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8398 |
Code: res.StatusCode, |
| 8399 |
Header: res.Header, |
| 8400 |
}) |
| 8401 |
} |
| 8402 |
if err != nil { |
| 8403 |
return nil, err |
| 8404 |
} |
| 8405 |
defer googleapi.CloseBody(res) |
| 8406 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8407 |
return nil, gensupport.WrapError(err) |
| 8408 |
} |
| 8409 |
ret := &ListPeeredDnsDomainsResponse{ |
| 8410 |
ServerResponse: googleapi.ServerResponse{ |
| 8411 |
Header: res.Header, |
| 8412 |
HTTPStatusCode: res.StatusCode, |
| 8413 |
}, |
| 8414 |
} |
| 8415 |
target := &ret |
| 8416 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8417 |
if err != nil { |
| 8418 |
return nil, err |
| 8419 |
} |
| 8420 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.projects.global.networks.peeredDnsDomains.list", "response", internallog.HTTPResponse(res, b)) |
| 8421 |
return ret, nil |
| 8422 |
} |
| 8423 |
|
| 8424 |
type ServicesRolesAddCall struct { |
| 8425 |
s *APIService |
| 8426 |
parent string |
| 8427 |
addrolesrequest *AddRolesRequest |
| 8428 |
urlParams_ gensupport.URLParams |
| 8429 |
ctx_ context.Context |
| 8430 |
header_ http.Header |
| 8431 |
} |
| 8432 |
|
| 8433 |
// Add: Service producers can use this method to add roles in the shared VPC |
| 8434 |
// host project. Each role is bound to the provided member. Each role must be |
| 8435 |
// selected from within an allowlisted set of roles. Each role is applied at |
| 8436 |
// only the granularity specified in the allowlist. |
| 8437 |
// |
| 8438 |
// - parent: This is in a form services/{service} where {service} is the name |
| 8439 |
// of the private access management service. For example |
| 8440 |
// 'service-peering.example.com'. |
| 8441 |
func (r *ServicesRolesService) Add(parent string, addrolesrequest *AddRolesRequest) *ServicesRolesAddCall { |
| 8442 |
c := &ServicesRolesAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8443 |
c.parent = parent |
| 8444 |
c.addrolesrequest = addrolesrequest |
| 8445 |
return c |
| 8446 |
} |
| 8447 |
|
| 8448 |
// Fields allows partial responses to be retrieved. See |
| 8449 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8450 |
// details. |
| 8451 |
func (c *ServicesRolesAddCall) Fields(s ...googleapi.Field) *ServicesRolesAddCall { |
| 8452 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8453 |
return c |
| 8454 |
} |
| 8455 |
|
| 8456 |
// Context sets the context to be used in this call's Do method. |
| 8457 |
func (c *ServicesRolesAddCall) Context(ctx context.Context) *ServicesRolesAddCall { |
| 8458 |
c.ctx_ = ctx |
| 8459 |
return c |
| 8460 |
} |
| 8461 |
|
| 8462 |
// Header returns a http.Header that can be modified by the caller to add |
| 8463 |
// headers to the request. |
| 8464 |
func (c *ServicesRolesAddCall) Header() http.Header { |
| 8465 |
if c.header_ == nil { |
| 8466 |
c.header_ = make(http.Header) |
| 8467 |
} |
| 8468 |
return c.header_ |
| 8469 |
} |
| 8470 |
|
| 8471 |
func (c *ServicesRolesAddCall) doRequest(alt string) (*http.Response, error) { |
| 8472 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 8473 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.addrolesrequest) |
| 8474 |
if err != nil { |
| 8475 |
return nil, err |
| 8476 |
} |
| 8477 |
c.urlParams_.Set("alt", alt) |
| 8478 |
c.urlParams_.Set("prettyPrint", "false") |
| 8479 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/roles:add") |
| 8480 |
urls += "?" + c.urlParams_.Encode() |
| 8481 |
req, err := http.NewRequest("POST", urls, body) |
| 8482 |
if err != nil { |
| 8483 |
return nil, err |
| 8484 |
} |
| 8485 |
req.Header = reqHeaders |
| 8486 |
googleapi.Expand(req.URL, map[string]string{ |
| 8487 |
"parent": c.parent, |
| 8488 |
}) |
| 8489 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "servicenetworking.services.roles.add", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 8490 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8491 |
} |
| 8492 |
|
| 8493 |
// Do executes the "servicenetworking.services.roles.add" call. |
| 8494 |
// Any non-2xx status code is an error. Response headers are in either |
| 8495 |
// *Operation.ServerResponse.Header or (if a response was returned at all) in |
| 8496 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 8497 |
// whether the returned error was because http.StatusNotModified was returned. |
| 8498 |
func (c *ServicesRolesAddCall) Do(opts ...googleapi.CallOption) (*Operation, error) { |
| 8499 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8500 |
res, err := c.doRequest("json") |
| 8501 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8502 |
if res.Body != nil { |
| 8503 |
res.Body.Close() |
| 8504 |
} |
| 8505 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8506 |
Code: res.StatusCode, |
| 8507 |
Header: res.Header, |
| 8508 |
}) |
| 8509 |
} |
| 8510 |
if err != nil { |
| 8511 |
return nil, err |
| 8512 |
} |
| 8513 |
defer googleapi.CloseBody(res) |
| 8514 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8515 |
return nil, gensupport.WrapError(err) |
| 8516 |
} |
| 8517 |
ret := &Operation{ |
| 8518 |
ServerResponse: googleapi.ServerResponse{ |
| 8519 |
Header: res.Header, |
| 8520 |
HTTPStatusCode: res.StatusCode, |
| 8521 |
}, |
| 8522 |
} |
| 8523 |
target := &ret |
| 8524 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8525 |
if err != nil { |
| 8526 |
return nil, err |
| 8527 |
} |
| 8528 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "servicenetworking.services.roles.add", "response", internallog.HTTPResponse(res, b)) |
| 8529 |
return ret, nil |
| 8530 |
} |