1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package servicenetworking provides access to the Service Networking API.
8//
9// For product documentation, see: https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/servicenetworking/v1beta"
16//   ...
17//   ctx := context.Background()
18//   servicenetworkingService, err := servicenetworking.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithScopes(servicenetworking.ServiceManagementScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package servicenetworking // import "google.golang.org/api/servicenetworking/v1beta"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	htransport "google.golang.org/api/transport/http"
60)
61
62// Always reference these packages, just in case the auto-generated code
63// below doesn't.
64var _ = bytes.NewBuffer
65var _ = strconv.Itoa
66var _ = fmt.Sprintf
67var _ = json.NewDecoder
68var _ = io.Copy
69var _ = url.Parse
70var _ = gensupport.MarshalJSON
71var _ = googleapi.Version
72var _ = errors.New
73var _ = strings.Replace
74var _ = context.Canceled
75
76const apiId = "servicenetworking:v1beta"
77const apiName = "servicenetworking"
78const apiVersion = "v1beta"
79const basePath = "https://servicenetworking.googleapis.com/"
80
81// OAuth2 scopes used by this API.
82const (
83	// View and manage your data across Google Cloud Platform services
84	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
85
86	// Manage your Google API service configuration
87	ServiceManagementScope = "https://www.googleapis.com/auth/service.management"
88)
89
90// NewService creates a new APIService.
91func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) {
92	scopesOption := option.WithScopes(
93		"https://www.googleapis.com/auth/cloud-platform",
94		"https://www.googleapis.com/auth/service.management",
95	)
96	// NOTE: prepend, so we don't override user-specified scopes.
97	opts = append([]option.ClientOption{scopesOption}, opts...)
98	client, endpoint, err := htransport.NewClient(ctx, opts...)
99	if err != nil {
100		return nil, err
101	}
102	s, err := New(client)
103	if err != nil {
104		return nil, err
105	}
106	if endpoint != "" {
107		s.BasePath = endpoint
108	}
109	return s, nil
110}
111
112// New creates a new APIService. It uses the provided http.Client for requests.
113//
114// Deprecated: please use NewService instead.
115// To provide a custom HTTP client, use option.WithHTTPClient.
116// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
117func New(client *http.Client) (*APIService, error) {
118	if client == nil {
119		return nil, errors.New("client is nil")
120	}
121	s := &APIService{client: client, BasePath: basePath}
122	s.Operations = NewOperationsService(s)
123	s.Services = NewServicesService(s)
124	return s, nil
125}
126
127type APIService struct {
128	client    *http.Client
129	BasePath  string // API endpoint base URL
130	UserAgent string // optional additional User-Agent fragment
131
132	Operations *OperationsService
133
134	Services *ServicesService
135}
136
137func (s *APIService) userAgent() string {
138	if s.UserAgent == "" {
139		return googleapi.UserAgent
140	}
141	return googleapi.UserAgent + " " + s.UserAgent
142}
143
144func NewOperationsService(s *APIService) *OperationsService {
145	rs := &OperationsService{s: s}
146	return rs
147}
148
149type OperationsService struct {
150	s *APIService
151}
152
153func NewServicesService(s *APIService) *ServicesService {
154	rs := &ServicesService{s: s}
155	rs.Connections = NewServicesConnectionsService(s)
156	return rs
157}
158
159type ServicesService struct {
160	s *APIService
161
162	Connections *ServicesConnectionsService
163}
164
165func NewServicesConnectionsService(s *APIService) *ServicesConnectionsService {
166	rs := &ServicesConnectionsService{s: s}
167	return rs
168}
169
170type ServicesConnectionsService struct {
171	s *APIService
172}
173
174// AddSubnetworkRequest: Request to create a subnetwork in a previously
175// peered service network.
176type AddSubnetworkRequest struct {
177	// Consumer: Required. A resource that represents the service consumer,
178	// such as
179	// `projects/123456`. The project number can be different from the
180	// value in the consumer network parameter. For example, the network
181	// might be
182	// part of a Shared VPC network. In those cases, Service Networking
183	// validates
184	// that this resource belongs to that Shared VPC.
185	Consumer string `json:"consumer,omitempty"`
186
187	// ConsumerNetwork: Required. The name of the service consumer's VPC
188	// network. The network
189	// must have an existing private connection that was provisioned through
190	// the
191	// connections.create method. The name must be in the following
192	// format:
193	// `projects/{project}/global/networks/{network}`, where {project}
194	// is a project number, such as `12345`. {network} is the name of a
195	// VPC network in the project.
196	ConsumerNetwork string `json:"consumerNetwork,omitempty"`
197
198	// Description: An optional description of the subnet.
199	Description string `json:"description,omitempty"`
200
201	// IpPrefixLength: Required. The prefix length of the subnet's IP
202	// address range.  Use CIDR
203	// range notation, such as `30` to provision a subnet with
204	// an
205	// `x.x.x.x/30` CIDR range. The IP address range is drawn from a
206	// pool of available ranges in the service consumer's allocated range.
207	IpPrefixLength int64 `json:"ipPrefixLength,omitempty"`
208
209	// Region: Required. The name of a
210	// [region](/compute/docs/regions-zones)
211	// for the subnet, such `europe-west1`.
212	Region string `json:"region,omitempty"`
213
214	// RequestedAddress: Optional. The starting address of a range. The
215	// address must be a valid
216	// IPv4 address in the x.x.x.x format. This value combined with the IP
217	// prefix
218	// range is the CIDR range for the subnet. The range must be within
219	// the
220	// allocated range that is assigned to the private connection. If the
221	// CIDR
222	// range isn't available, the call fails.
223	RequestedAddress string `json:"requestedAddress,omitempty"`
224
225	// Subnetwork: Required. A name for the new subnet. For information
226	// about the naming
227	// requirements, see
228	// [subnetwork](/compute/docs/reference/rest/v1/subnetworks)
229	// in the Compute API documentation.
230	Subnetwork string `json:"subnetwork,omitempty"`
231
232	// SubnetworkUsers: A list of members that are granted the
233	// `compute.networkUser`
234	// role on the subnet.
235	SubnetworkUsers []string `json:"subnetworkUsers,omitempty"`
236
237	// ForceSendFields is a list of field names (e.g. "Consumer") to
238	// unconditionally include in API requests. By default, fields with
239	// empty values are omitted from API requests. However, any non-pointer,
240	// non-interface field appearing in ForceSendFields will be sent to the
241	// server regardless of whether the field is empty or not. This may be
242	// used to include empty fields in Patch requests.
243	ForceSendFields []string `json:"-"`
244
245	// NullFields is a list of field names (e.g. "Consumer") to include in
246	// API requests with the JSON null value. By default, fields with empty
247	// values are omitted from API requests. However, any field with an
248	// empty value appearing in NullFields will be sent to the server as
249	// null. It is an error if a field in this list has a non-empty value.
250	// This may be used to include null fields in Patch requests.
251	NullFields []string `json:"-"`
252}
253
254func (s *AddSubnetworkRequest) MarshalJSON() ([]byte, error) {
255	type NoMethod AddSubnetworkRequest
256	raw := NoMethod(*s)
257	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
258}
259
260// Api: Api is a light-weight descriptor for an API
261// Interface.
262//
263// Interfaces are also described as "protocol buffer services" in some
264// contexts,
265// such as by the "service" keyword in a .proto file, but they are
266// different
267// from API Services, which represent a concrete implementation of an
268// interface
269// as opposed to simply a description of methods and bindings. They are
270// also
271// sometimes simply referred to as "APIs" in other contexts, such as the
272// name of
273// this message itself. See
274// https://cloud.google.com/apis/design/glossary for
275// detailed terminology.
276type Api struct {
277	// Methods: The methods of this interface, in unspecified order.
278	Methods []*Method `json:"methods,omitempty"`
279
280	// Mixins: Included interfaces. See Mixin.
281	Mixins []*Mixin `json:"mixins,omitempty"`
282
283	// Name: The fully qualified name of this interface, including package
284	// name
285	// followed by the interface's simple name.
286	Name string `json:"name,omitempty"`
287
288	// Options: Any metadata attached to the interface.
289	Options []*Option `json:"options,omitempty"`
290
291	// SourceContext: Source context for the protocol buffer service
292	// represented by this
293	// message.
294	SourceContext *SourceContext `json:"sourceContext,omitempty"`
295
296	// Syntax: The source syntax of the service.
297	//
298	// Possible values:
299	//   "SYNTAX_PROTO2" - Syntax `proto2`.
300	//   "SYNTAX_PROTO3" - Syntax `proto3`.
301	Syntax string `json:"syntax,omitempty"`
302
303	// Version: A version string for this interface. If specified, must have
304	// the form
305	// `major-version.minor-version`, as in `1.10`. If the minor version
306	// is
307	// omitted, it defaults to zero. If the entire version field is empty,
308	// the
309	// major version is derived from the package name, as outlined below. If
310	// the
311	// field is not empty, the version in the package name will be verified
312	// to be
313	// consistent with what is provided here.
314	//
315	// The versioning schema uses [semantic
316	// versioning](http://semver.org) where the major version
317	// number
318	// indicates a breaking change and the minor version an
319	// additive,
320	// non-breaking change. Both version numbers are signals to users
321	// what to expect from different versions, and should be
322	// carefully
323	// chosen based on the product plan.
324	//
325	// The major version is also reflected in the package name of
326	// the
327	// interface, which must end in `v<major-version>`, as
328	// in
329	// `google.feature.v1`. For major versions 0 and 1, the suffix can
330	// be omitted. Zero major versions must only be used for
331	// experimental, non-GA interfaces.
332	//
333	Version string `json:"version,omitempty"`
334
335	// ForceSendFields is a list of field names (e.g. "Methods") to
336	// unconditionally include in API requests. By default, fields with
337	// empty values are omitted from API requests. However, any non-pointer,
338	// non-interface field appearing in ForceSendFields will be sent to the
339	// server regardless of whether the field is empty or not. This may be
340	// used to include empty fields in Patch requests.
341	ForceSendFields []string `json:"-"`
342
343	// NullFields is a list of field names (e.g. "Methods") to include in
344	// API requests with the JSON null value. By default, fields with empty
345	// values are omitted from API requests. However, any field with an
346	// empty value appearing in NullFields will be sent to the server as
347	// null. It is an error if a field in this list has a non-empty value.
348	// This may be used to include null fields in Patch requests.
349	NullFields []string `json:"-"`
350}
351
352func (s *Api) MarshalJSON() ([]byte, error) {
353	type NoMethod Api
354	raw := NoMethod(*s)
355	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
356}
357
358// AuthProvider: Configuration for an authentication provider, including
359// support for
360// [JSON Web
361// Token
362// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-tok
363// en-32).
364type AuthProvider struct {
365	// Audiences: The list of
366	// JWT
367	// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
368	// token-32#section-4.1.3).
369	// that are allowed to access. A JWT containing any of these audiences
370	// will
371	// be accepted. When this setting is absent, only JWTs with
372	// audience
373	// "https://Service_name/API_name"
374	// will be accepted. For example, if no audiences are in the
375	// setting,
376	// LibraryService API will only accept JWTs with the following
377	// audience
378	// "https://library-example.googleapis.com/google.example.librar
379	// y.v1.LibraryService".
380	//
381	// Example:
382	//
383	//     audiences: bookstore_android.apps.googleusercontent.com,
384	//                bookstore_web.apps.googleusercontent.com
385	Audiences string `json:"audiences,omitempty"`
386
387	// AuthorizationUrl: Redirect URL if JWT token is required but not
388	// present or is expired.
389	// Implement authorizationUrl of securityDefinitions in OpenAPI spec.
390	AuthorizationUrl string `json:"authorizationUrl,omitempty"`
391
392	// Id: The unique identifier of the auth provider. It will be referred
393	// to by
394	// `AuthRequirement.provider_id`.
395	//
396	// Example: "bookstore_auth".
397	Id string `json:"id,omitempty"`
398
399	// Issuer: Identifies the principal that issued the JWT.
400	// See
401	// https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#sec
402	// tion-4.1.1
403	// Usually a URL or an email address.
404	//
405	// Example: https://securetoken.google.com
406	// Example: 1234567-compute@developer.gserviceaccount.com
407	Issuer string `json:"issuer,omitempty"`
408
409	// JwksUri: URL of the provider's public key set to validate signature
410	// of the JWT.
411	// See
412	// [OpenID
413	// Discovery](https://openid.net/specs/openid-connect-discove
414	// ry-1_0.html#ProviderMetadata).
415	// Optional if the key set document:
416	//  - can be retrieved from
417	//    [OpenID
418	//
419	// Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
420	// of
421	//    the issuer.
422	//  - can be inferred from the email domain of the issuer (e.g. a
423	// Google
424	//  service account).
425	//
426	// Example: https://www.googleapis.com/oauth2/v1/certs
427	JwksUri string `json:"jwksUri,omitempty"`
428
429	// ForceSendFields is a list of field names (e.g. "Audiences") to
430	// unconditionally include in API requests. By default, fields with
431	// empty values are omitted from API requests. However, any non-pointer,
432	// non-interface field appearing in ForceSendFields will be sent to the
433	// server regardless of whether the field is empty or not. This may be
434	// used to include empty fields in Patch requests.
435	ForceSendFields []string `json:"-"`
436
437	// NullFields is a list of field names (e.g. "Audiences") to include in
438	// API requests with the JSON null value. By default, fields with empty
439	// values are omitted from API requests. However, any field with an
440	// empty value appearing in NullFields will be sent to the server as
441	// null. It is an error if a field in this list has a non-empty value.
442	// This may be used to include null fields in Patch requests.
443	NullFields []string `json:"-"`
444}
445
446func (s *AuthProvider) MarshalJSON() ([]byte, error) {
447	type NoMethod AuthProvider
448	raw := NoMethod(*s)
449	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
450}
451
452// AuthRequirement: User-defined authentication requirements, including
453// support for
454// [JSON Web
455// Token
456// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-tok
457// en-32).
458type AuthRequirement struct {
459	// Audiences: NOTE: This will be deprecated soon, once
460	// AuthProvider.audiences is
461	// implemented and accepted in all the runtime components.
462	//
463	// The list of
464	// JWT
465	// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
466	// token-32#section-4.1.3).
467	// that are allowed to access. A JWT containing any of these audiences
468	// will
469	// be accepted. When this setting is absent, only JWTs with
470	// audience
471	// "https://Service_name/API_name"
472	// will be accepted. For example, if no audiences are in the
473	// setting,
474	// LibraryService API will only accept JWTs with the following
475	// audience
476	// "https://library-example.googleapis.com/google.example.librar
477	// y.v1.LibraryService".
478	//
479	// Example:
480	//
481	//     audiences: bookstore_android.apps.googleusercontent.com,
482	//                bookstore_web.apps.googleusercontent.com
483	Audiences string `json:"audiences,omitempty"`
484
485	// ProviderId: id from authentication provider.
486	//
487	// Example:
488	//
489	//     provider_id: bookstore_auth
490	ProviderId string `json:"providerId,omitempty"`
491
492	// ForceSendFields is a list of field names (e.g. "Audiences") to
493	// unconditionally include in API requests. By default, fields with
494	// empty values are omitted from API requests. However, any non-pointer,
495	// non-interface field appearing in ForceSendFields will be sent to the
496	// server regardless of whether the field is empty or not. This may be
497	// used to include empty fields in Patch requests.
498	ForceSendFields []string `json:"-"`
499
500	// NullFields is a list of field names (e.g. "Audiences") to include in
501	// API requests with the JSON null value. By default, fields with empty
502	// values are omitted from API requests. However, any field with an
503	// empty value appearing in NullFields will be sent to the server as
504	// null. It is an error if a field in this list has a non-empty value.
505	// This may be used to include null fields in Patch requests.
506	NullFields []string `json:"-"`
507}
508
509func (s *AuthRequirement) MarshalJSON() ([]byte, error) {
510	type NoMethod AuthRequirement
511	raw := NoMethod(*s)
512	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
513}
514
515// Authentication: `Authentication` defines the authentication
516// configuration for an API.
517//
518// Example for an API targeted for external use:
519//
520//     name: calendar.googleapis.com
521//     authentication:
522//       providers:
523//       - id: google_calendar_auth
524//         jwks_uri: https://www.googleapis.com/oauth2/v1/certs
525//         issuer: https://securetoken.google.com
526//       rules:
527//       - selector: "*"
528//         requirements:
529//           provider_id: google_calendar_auth
530type Authentication struct {
531	// Providers: Defines a set of authentication providers that a service
532	// supports.
533	Providers []*AuthProvider `json:"providers,omitempty"`
534
535	// Rules: A list of authentication rules that apply to individual API
536	// methods.
537	//
538	// **NOTE:** All service configuration rules follow "last one wins"
539	// order.
540	Rules []*AuthenticationRule `json:"rules,omitempty"`
541
542	// ForceSendFields is a list of field names (e.g. "Providers") to
543	// unconditionally include in API requests. By default, fields with
544	// empty values are omitted from API requests. However, any non-pointer,
545	// non-interface field appearing in ForceSendFields will be sent to the
546	// server regardless of whether the field is empty or not. This may be
547	// used to include empty fields in Patch requests.
548	ForceSendFields []string `json:"-"`
549
550	// NullFields is a list of field names (e.g. "Providers") to include in
551	// API requests with the JSON null value. By default, fields with empty
552	// values are omitted from API requests. However, any field with an
553	// empty value appearing in NullFields will be sent to the server as
554	// null. It is an error if a field in this list has a non-empty value.
555	// This may be used to include null fields in Patch requests.
556	NullFields []string `json:"-"`
557}
558
559func (s *Authentication) MarshalJSON() ([]byte, error) {
560	type NoMethod Authentication
561	raw := NoMethod(*s)
562	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
563}
564
565// AuthenticationRule: Authentication rules for the service.
566//
567// By default, if a method has any authentication requirements, every
568// request
569// must include a valid credential matching one of the
570// requirements.
571// It's an error to include more than one kind of credential in a
572// single
573// request.
574//
575// If a method doesn't have any auth requirements, request credentials
576// will be
577// ignored.
578type AuthenticationRule struct {
579	// AllowWithoutCredential: If true, the service accepts API keys without
580	// any other credential.
581	AllowWithoutCredential bool `json:"allowWithoutCredential,omitempty"`
582
583	// Oauth: The requirements for OAuth credentials.
584	Oauth *OAuthRequirements `json:"oauth,omitempty"`
585
586	// Requirements: Requirements for additional authentication providers.
587	Requirements []*AuthRequirement `json:"requirements,omitempty"`
588
589	// Selector: Selects the methods to which this rule applies.
590	//
591	// Refer to selector for syntax details.
592	Selector string `json:"selector,omitempty"`
593
594	// ForceSendFields is a list of field names (e.g.
595	// "AllowWithoutCredential") to unconditionally include in API requests.
596	// By default, fields with empty values are omitted from API requests.
597	// However, any non-pointer, non-interface field appearing in
598	// ForceSendFields will be sent to the server regardless of whether the
599	// field is empty or not. This may be used to include empty fields in
600	// Patch requests.
601	ForceSendFields []string `json:"-"`
602
603	// NullFields is a list of field names (e.g. "AllowWithoutCredential")
604	// to include in API requests with the JSON null value. By default,
605	// fields with empty values are omitted from API requests. However, any
606	// field with an empty value appearing in NullFields will be sent to the
607	// server as null. It is an error if a field in this list has a
608	// non-empty value. This may be used to include null fields in Patch
609	// requests.
610	NullFields []string `json:"-"`
611}
612
613func (s *AuthenticationRule) MarshalJSON() ([]byte, error) {
614	type NoMethod AuthenticationRule
615	raw := NoMethod(*s)
616	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
617}
618
619// Backend: `Backend` defines the backend configuration for a service.
620type Backend struct {
621	// Rules: A list of API backend rules that apply to individual API
622	// methods.
623	//
624	// **NOTE:** All service configuration rules follow "last one wins"
625	// order.
626	Rules []*BackendRule `json:"rules,omitempty"`
627
628	// ForceSendFields is a list of field names (e.g. "Rules") to
629	// unconditionally include in API requests. By default, fields with
630	// empty values are omitted from API requests. However, any non-pointer,
631	// non-interface field appearing in ForceSendFields will be sent to the
632	// server regardless of whether the field is empty or not. This may be
633	// used to include empty fields in Patch requests.
634	ForceSendFields []string `json:"-"`
635
636	// NullFields is a list of field names (e.g. "Rules") to include in API
637	// requests with the JSON null value. By default, fields with empty
638	// values are omitted from API requests. However, any field with an
639	// empty value appearing in NullFields will be sent to the server as
640	// null. It is an error if a field in this list has a non-empty value.
641	// This may be used to include null fields in Patch requests.
642	NullFields []string `json:"-"`
643}
644
645func (s *Backend) MarshalJSON() ([]byte, error) {
646	type NoMethod Backend
647	raw := NoMethod(*s)
648	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
649}
650
651// BackendRule: A backend rule provides configuration for an individual
652// API element.
653type BackendRule struct {
654	// Address: The address of the API backend.
655	Address string `json:"address,omitempty"`
656
657	// Deadline: The number of seconds to wait for a response from a
658	// request.  The default
659	// deadline for gRPC is infinite (no deadline) and HTTP requests is 5
660	// seconds.
661	Deadline float64 `json:"deadline,omitempty"`
662
663	// DisableAuth: When disable_auth is false,  a JWT ID token will be
664	// generated with the
665	// value from BackendRule.address as jwt_audience, overrode to the
666	// HTTP
667	// "Authorization" request header and sent to the backend.
668	//
669	// When disable_auth is true, a JWT ID token won't be generated and
670	// the
671	// original "Authorization" HTTP header will be preserved. If the header
672	// is
673	// used to carry the original token and is expected by the backend,
674	// this
675	// field must be set to true to preserve the header.
676	DisableAuth bool `json:"disableAuth,omitempty"`
677
678	// JwtAudience: The JWT audience is used when generating a JWT ID token
679	// for the backend.
680	// This ID token will be added in the HTTP "authorization" header, and
681	// sent
682	// to the backend.
683	JwtAudience string `json:"jwtAudience,omitempty"`
684
685	// MinDeadline: Minimum deadline in seconds needed for this method.
686	// Calls having deadline
687	// value lower than this will be rejected.
688	MinDeadline float64 `json:"minDeadline,omitempty"`
689
690	// OperationDeadline: The number of seconds to wait for the completion
691	// of a long running
692	// operation. The default is no deadline.
693	OperationDeadline float64 `json:"operationDeadline,omitempty"`
694
695	// Possible values:
696	//   "PATH_TRANSLATION_UNSPECIFIED"
697	//   "CONSTANT_ADDRESS" - Use the backend address as-is, with no
698	// modification to the path. If the
699	// URL pattern contains variables, the variable names and values will
700	// be
701	// appended to the query string. If a query string parameter and a
702	// URL
703	// pattern variable have the same name, this may result in duplicate
704	// keys in
705	// the query string.
706	//
707	// # Examples
708	//
709	// Given the following operation config:
710	//
711	//     Method path:        /api/company/{cid}/user/{uid}
712	//     Backend address:
713	// https://example.cloudfunctions.net/getUser
714	//
715	// Requests to the following request paths will call the backend at
716	// the
717	// translated path:
718	//
719	//     Request path: /api/company/widgetworks/user/johndoe
720	//     Translated:
721	//
722	// https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
723	//
724	//     Request path: /api/company/widgetworks/user/johndoe?timezone=EST
725	//     Translated:
726	//
727	// https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
728	//   "APPEND_PATH_TO_ADDRESS" - The request path will be appended to the
729	// backend address.
730	//
731	// # Examples
732	//
733	// Given the following operation config:
734	//
735	//     Method path:        /api/company/{cid}/user/{uid}
736	//     Backend address:    https://example.appspot.com
737	//
738	// Requests to the following request paths will call the backend at
739	// the
740	// translated path:
741	//
742	//     Request path: /api/company/widgetworks/user/johndoe
743	//     Translated:
744	//
745	// https://example.appspot.com/api/company/widgetworks/user/johndoe
746	//
747	//     Request path: /api/company/widgetworks/user/johndoe?timezone=EST
748	//     Translated:
749	//
750	// https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
751	PathTranslation string `json:"pathTranslation,omitempty"`
752
753	// Selector: Selects the methods to which this rule applies.
754	//
755	// Refer to selector for syntax details.
756	Selector string `json:"selector,omitempty"`
757
758	// ForceSendFields is a list of field names (e.g. "Address") to
759	// unconditionally include in API requests. By default, fields with
760	// empty values are omitted from API requests. However, any non-pointer,
761	// non-interface field appearing in ForceSendFields will be sent to the
762	// server regardless of whether the field is empty or not. This may be
763	// used to include empty fields in Patch requests.
764	ForceSendFields []string `json:"-"`
765
766	// NullFields is a list of field names (e.g. "Address") to include in
767	// API requests with the JSON null value. By default, fields with empty
768	// values are omitted from API requests. However, any field with an
769	// empty value appearing in NullFields will be sent to the server as
770	// null. It is an error if a field in this list has a non-empty value.
771	// This may be used to include null fields in Patch requests.
772	NullFields []string `json:"-"`
773}
774
775func (s *BackendRule) MarshalJSON() ([]byte, error) {
776	type NoMethod BackendRule
777	raw := NoMethod(*s)
778	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
779}
780
781func (s *BackendRule) UnmarshalJSON(data []byte) error {
782	type NoMethod BackendRule
783	var s1 struct {
784		Deadline          gensupport.JSONFloat64 `json:"deadline"`
785		MinDeadline       gensupport.JSONFloat64 `json:"minDeadline"`
786		OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"`
787		*NoMethod
788	}
789	s1.NoMethod = (*NoMethod)(s)
790	if err := json.Unmarshal(data, &s1); err != nil {
791		return err
792	}
793	s.Deadline = float64(s1.Deadline)
794	s.MinDeadline = float64(s1.MinDeadline)
795	s.OperationDeadline = float64(s1.OperationDeadline)
796	return nil
797}
798
799// Billing: Billing related configuration of the service.
800//
801// The following example shows how to configure monitored resources and
802// metrics
803// for billing:
804//
805//     monitored_resources:
806//     - type: library.googleapis.com/branch
807//       labels:
808//       - key: /city
809//         description: The city where the library branch is located
810// in.
811//       - key: /name
812//         description: The name of the branch.
813//     metrics:
814//     - name: library.googleapis.com/book/borrowed_count
815//       metric_kind: DELTA
816//       value_type: INT64
817//     billing:
818//       consumer_destinations:
819//       - monitored_resource: library.googleapis.com/branch
820//         metrics:
821//         - library.googleapis.com/book/borrowed_count
822type Billing struct {
823	// ConsumerDestinations: Billing configurations for sending metrics to
824	// the consumer project.
825	// There can be multiple consumer destinations per service, each one
826	// must have
827	// a different monitored resource type. A metric can be used in at
828	// most
829	// one consumer destination.
830	ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"`
831
832	// ForceSendFields is a list of field names (e.g.
833	// "ConsumerDestinations") to unconditionally include in API requests.
834	// By default, fields with empty values are omitted from API requests.
835	// However, any non-pointer, non-interface field appearing in
836	// ForceSendFields will be sent to the server regardless of whether the
837	// field is empty or not. This may be used to include empty fields in
838	// Patch requests.
839	ForceSendFields []string `json:"-"`
840
841	// NullFields is a list of field names (e.g. "ConsumerDestinations") to
842	// include in API requests with the JSON null value. By default, fields
843	// with empty values are omitted from API requests. However, any field
844	// with an empty value appearing in NullFields will be sent to the
845	// server as null. It is an error if a field in this list has a
846	// non-empty value. This may be used to include null fields in Patch
847	// requests.
848	NullFields []string `json:"-"`
849}
850
851func (s *Billing) MarshalJSON() ([]byte, error) {
852	type NoMethod Billing
853	raw := NoMethod(*s)
854	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
855}
856
857// BillingDestination: Configuration of a specific billing destination
858// (Currently only support
859// bill against consumer project).
860type BillingDestination struct {
861	// Metrics: Names of the metrics to report to this billing
862	// destination.
863	// Each name must be defined in Service.metrics section.
864	Metrics []string `json:"metrics,omitempty"`
865
866	// MonitoredResource: The monitored resource type. The type must be
867	// defined in
868	// Service.monitored_resources section.
869	MonitoredResource string `json:"monitoredResource,omitempty"`
870
871	// ForceSendFields is a list of field names (e.g. "Metrics") to
872	// unconditionally include in API requests. By default, fields with
873	// empty values are omitted from API requests. However, any non-pointer,
874	// non-interface field appearing in ForceSendFields will be sent to the
875	// server regardless of whether the field is empty or not. This may be
876	// used to include empty fields in Patch requests.
877	ForceSendFields []string `json:"-"`
878
879	// NullFields is a list of field names (e.g. "Metrics") to include in
880	// API requests with the JSON null value. By default, fields with empty
881	// values are omitted from API requests. However, any field with an
882	// empty value appearing in NullFields will be sent to the server as
883	// null. It is an error if a field in this list has a non-empty value.
884	// This may be used to include null fields in Patch requests.
885	NullFields []string `json:"-"`
886}
887
888func (s *BillingDestination) MarshalJSON() ([]byte, error) {
889	type NoMethod BillingDestination
890	raw := NoMethod(*s)
891	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
892}
893
894// Connection: Represents a private connection resource. A private
895// connection is implemented
896// as a VPC Network Peering connection between a service producer's VPC
897// network
898// and a service consumer's VPC network.
899type Connection struct {
900	// Network: The name of service consumer's VPC network that's connected
901	// with service
902	// producer network, in the following
903	// format:
904	// `projects/{project}/global/networks/{network}`.
905	// `{project}` is a project number, such as in `12345` that includes
906	// the VPC service consumer's VPC network. `{network}` is the name of
907	// the
908	// service consumer's VPC network.
909	Network string `json:"network,omitempty"`
910
911	// Peering: Output only. The name of the VPC Network Peering connection
912	// that was created by the
913	// service producer.
914	Peering string `json:"peering,omitempty"`
915
916	// ReservedPeeringRanges: The name of one or more allocated IP address
917	// ranges for this service
918	// producer of type `PEERING`.
919	// Note that invoking this method with a different range when connection
920	// is
921	// already established will not modify already provisioned
922	// service
923	// producer subnetworks.
924	ReservedPeeringRanges []string `json:"reservedPeeringRanges,omitempty"`
925
926	// Service: Output only. The name of the peering service that's
927	// associated with this connection, in
928	// the following format: `services/{service name}`.
929	Service string `json:"service,omitempty"`
930
931	// ForceSendFields is a list of field names (e.g. "Network") to
932	// unconditionally include in API requests. By default, fields with
933	// empty values are omitted from API requests. However, any non-pointer,
934	// non-interface field appearing in ForceSendFields will be sent to the
935	// server regardless of whether the field is empty or not. This may be
936	// used to include empty fields in Patch requests.
937	ForceSendFields []string `json:"-"`
938
939	// NullFields is a list of field names (e.g. "Network") to include in
940	// API requests with the JSON null value. By default, fields with empty
941	// values are omitted from API requests. However, any field with an
942	// empty value appearing in NullFields will be sent to the server as
943	// null. It is an error if a field in this list has a non-empty value.
944	// This may be used to include null fields in Patch requests.
945	NullFields []string `json:"-"`
946}
947
948func (s *Connection) MarshalJSON() ([]byte, error) {
949	type NoMethod Connection
950	raw := NoMethod(*s)
951	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
952}
953
954// Context: `Context` defines which contexts an API
955// requests.
956//
957// Example:
958//
959//     context:
960//       rules:
961//       - selector: "*"
962//         requested:
963//         - google.rpc.context.ProjectContext
964//         - google.rpc.context.OriginContext
965//
966// The above specifies that all methods in the API
967// request
968// `google.rpc.context.ProjectContext`
969// and
970// `google.rpc.context.OriginContext`.
971//
972// Available context types are defined in
973// package
974// `google.rpc.context`.
975//
976// This also provides mechanism to whitelist any protobuf message
977// extension that
978// can be sent in grpc metadata using
979// “x-goog-ext-<extension_id>-bin”
980// and
981// “x-goog-ext-<extension_id>-jspb” format. For example, list any
982// service
983// specific protobuf types that can appear in grpc metadata as follows
984// in your
985// yaml file:
986//
987// Example:
988//
989//     context:
990//       rules:
991//        - selector:
992// "google.example.library.v1.LibraryService.CreateBook"
993//          allowed_request_extensions:
994//          - google.foo.v1.NewExtension
995//          allowed_response_extensions:
996//          - google.foo.v1.NewExtension
997//
998// You can also specify extension ID instead of fully qualified
999// extension name
1000// here.
1001type Context struct {
1002	// Rules: A list of RPC context rules that apply to individual API
1003	// methods.
1004	//
1005	// **NOTE:** All service configuration rules follow "last one wins"
1006	// order.
1007	Rules []*ContextRule `json:"rules,omitempty"`
1008
1009	// ForceSendFields is a list of field names (e.g. "Rules") to
1010	// unconditionally include in API requests. By default, fields with
1011	// empty values are omitted from API requests. However, any non-pointer,
1012	// non-interface field appearing in ForceSendFields will be sent to the
1013	// server regardless of whether the field is empty or not. This may be
1014	// used to include empty fields in Patch requests.
1015	ForceSendFields []string `json:"-"`
1016
1017	// NullFields is a list of field names (e.g. "Rules") to include in API
1018	// requests with the JSON null value. By default, fields with empty
1019	// values are omitted from API requests. However, any field with an
1020	// empty value appearing in NullFields will be sent to the server as
1021	// null. It is an error if a field in this list has a non-empty value.
1022	// This may be used to include null fields in Patch requests.
1023	NullFields []string `json:"-"`
1024}
1025
1026func (s *Context) MarshalJSON() ([]byte, error) {
1027	type NoMethod Context
1028	raw := NoMethod(*s)
1029	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1030}
1031
1032// ContextRule: A context rule provides information about the context
1033// for an individual API
1034// element.
1035type ContextRule struct {
1036	// AllowedRequestExtensions: A list of full type names or extension IDs
1037	// of extensions allowed in grpc
1038	// side channel from client to backend.
1039	AllowedRequestExtensions []string `json:"allowedRequestExtensions,omitempty"`
1040
1041	// AllowedResponseExtensions: A list of full type names or extension IDs
1042	// of extensions allowed in grpc
1043	// side channel from backend to client.
1044	AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"`
1045
1046	// Provided: A list of full type names of provided contexts.
1047	Provided []string `json:"provided,omitempty"`
1048
1049	// Requested: A list of full type names of requested contexts.
1050	Requested []string `json:"requested,omitempty"`
1051
1052	// Selector: Selects the methods to which this rule applies.
1053	//
1054	// Refer to selector for syntax details.
1055	Selector string `json:"selector,omitempty"`
1056
1057	// ForceSendFields is a list of field names (e.g.
1058	// "AllowedRequestExtensions") to unconditionally include in API
1059	// requests. By default, fields with empty values are omitted from API
1060	// requests. However, any non-pointer, non-interface field appearing in
1061	// ForceSendFields will be sent to the server regardless of whether the
1062	// field is empty or not. This may be used to include empty fields in
1063	// Patch requests.
1064	ForceSendFields []string `json:"-"`
1065
1066	// NullFields is a list of field names (e.g. "AllowedRequestExtensions")
1067	// to include in API requests with the JSON null value. By default,
1068	// fields with empty values are omitted from API requests. However, any
1069	// field with an empty value appearing in NullFields will be sent to the
1070	// server as null. It is an error if a field in this list has a
1071	// non-empty value. This may be used to include null fields in Patch
1072	// requests.
1073	NullFields []string `json:"-"`
1074}
1075
1076func (s *ContextRule) MarshalJSON() ([]byte, error) {
1077	type NoMethod ContextRule
1078	raw := NoMethod(*s)
1079	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1080}
1081
1082// Control: Selects and configures the service controller used by the
1083// service.  The
1084// service controller handles features like abuse, quota, billing,
1085// logging,
1086// monitoring, etc.
1087type Control struct {
1088	// Environment: The service control environment to use. If empty, no
1089	// control plane
1090	// feature (like quota and billing) will be enabled.
1091	Environment string `json:"environment,omitempty"`
1092
1093	// ForceSendFields is a list of field names (e.g. "Environment") to
1094	// unconditionally include in API requests. By default, fields with
1095	// empty values are omitted from API requests. However, any non-pointer,
1096	// non-interface field appearing in ForceSendFields will be sent to the
1097	// server regardless of whether the field is empty or not. This may be
1098	// used to include empty fields in Patch requests.
1099	ForceSendFields []string `json:"-"`
1100
1101	// NullFields is a list of field names (e.g. "Environment") to include
1102	// in API requests with the JSON null value. By default, fields with
1103	// empty values are omitted from API requests. However, any field with
1104	// an empty value appearing in NullFields will be sent to the server as
1105	// null. It is an error if a field in this list has a non-empty value.
1106	// This may be used to include null fields in Patch requests.
1107	NullFields []string `json:"-"`
1108}
1109
1110func (s *Control) MarshalJSON() ([]byte, error) {
1111	type NoMethod Control
1112	raw := NoMethod(*s)
1113	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1114}
1115
1116// CustomError: Customize service error responses.  For example, list
1117// any service
1118// specific protobuf types that can appear in error detail lists
1119// of
1120// error responses.
1121//
1122// Example:
1123//
1124//     custom_error:
1125//       types:
1126//       - google.foo.v1.CustomError
1127//       - google.foo.v1.AnotherError
1128type CustomError struct {
1129	// Rules: The list of custom error rules that apply to individual API
1130	// messages.
1131	//
1132	// **NOTE:** All service configuration rules follow "last one wins"
1133	// order.
1134	Rules []*CustomErrorRule `json:"rules,omitempty"`
1135
1136	// Types: The list of custom error detail types, e.g.
1137	// 'google.foo.v1.CustomError'.
1138	Types []string `json:"types,omitempty"`
1139
1140	// ForceSendFields is a list of field names (e.g. "Rules") to
1141	// unconditionally include in API requests. By default, fields with
1142	// empty values are omitted from API requests. However, any non-pointer,
1143	// non-interface field appearing in ForceSendFields will be sent to the
1144	// server regardless of whether the field is empty or not. This may be
1145	// used to include empty fields in Patch requests.
1146	ForceSendFields []string `json:"-"`
1147
1148	// NullFields is a list of field names (e.g. "Rules") to include in API
1149	// requests with the JSON null value. By default, fields with empty
1150	// values are omitted from API requests. However, any field with an
1151	// empty value appearing in NullFields will be sent to the server as
1152	// null. It is an error if a field in this list has a non-empty value.
1153	// This may be used to include null fields in Patch requests.
1154	NullFields []string `json:"-"`
1155}
1156
1157func (s *CustomError) MarshalJSON() ([]byte, error) {
1158	type NoMethod CustomError
1159	raw := NoMethod(*s)
1160	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1161}
1162
1163// CustomErrorRule: A custom error rule.
1164type CustomErrorRule struct {
1165	// IsErrorType: Mark this message as possible payload in error response.
1166	//  Otherwise,
1167	// objects of this type will be filtered when they appear in error
1168	// payload.
1169	IsErrorType bool `json:"isErrorType,omitempty"`
1170
1171	// Selector: Selects messages to which this rule applies.
1172	//
1173	// Refer to selector for syntax details.
1174	Selector string `json:"selector,omitempty"`
1175
1176	// ForceSendFields is a list of field names (e.g. "IsErrorType") to
1177	// unconditionally include in API requests. By default, fields with
1178	// empty values are omitted from API requests. However, any non-pointer,
1179	// non-interface field appearing in ForceSendFields will be sent to the
1180	// server regardless of whether the field is empty or not. This may be
1181	// used to include empty fields in Patch requests.
1182	ForceSendFields []string `json:"-"`
1183
1184	// NullFields is a list of field names (e.g. "IsErrorType") to include
1185	// in API requests with the JSON null value. By default, fields with
1186	// empty values are omitted from API requests. However, any field with
1187	// an empty value appearing in NullFields will be sent to the server as
1188	// null. It is an error if a field in this list has a non-empty value.
1189	// This may be used to include null fields in Patch requests.
1190	NullFields []string `json:"-"`
1191}
1192
1193func (s *CustomErrorRule) MarshalJSON() ([]byte, error) {
1194	type NoMethod CustomErrorRule
1195	raw := NoMethod(*s)
1196	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1197}
1198
1199// CustomHttpPattern: A custom pattern is used for defining custom HTTP
1200// verb.
1201type CustomHttpPattern struct {
1202	// Kind: The name of this custom HTTP verb.
1203	Kind string `json:"kind,omitempty"`
1204
1205	// Path: The path matched by this custom verb.
1206	Path string `json:"path,omitempty"`
1207
1208	// ForceSendFields is a list of field names (e.g. "Kind") to
1209	// unconditionally include in API requests. By default, fields with
1210	// empty values are omitted from API requests. However, any non-pointer,
1211	// non-interface field appearing in ForceSendFields will be sent to the
1212	// server regardless of whether the field is empty or not. This may be
1213	// used to include empty fields in Patch requests.
1214	ForceSendFields []string `json:"-"`
1215
1216	// NullFields is a list of field names (e.g. "Kind") to include in API
1217	// requests with the JSON null value. By default, fields with empty
1218	// values are omitted from API requests. However, any field with an
1219	// empty value appearing in NullFields will be sent to the server as
1220	// null. It is an error if a field in this list has a non-empty value.
1221	// This may be used to include null fields in Patch requests.
1222	NullFields []string `json:"-"`
1223}
1224
1225func (s *CustomHttpPattern) MarshalJSON() ([]byte, error) {
1226	type NoMethod CustomHttpPattern
1227	raw := NoMethod(*s)
1228	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1229}
1230
1231// Documentation: `Documentation` provides the information for
1232// describing a service.
1233//
1234// Example:
1235// <pre><code>documentation:
1236//   summary: >
1237//     The Google Calendar API gives access
1238//     to most calendar features.
1239//   pages:
1240//   - name: Overview
1241//     content: &#40;== include google/foo/overview.md ==&#41;
1242//   - name: Tutorial
1243//     content: &#40;== include google/foo/tutorial.md ==&#41;
1244//     subpages;
1245//     - name: Java
1246//       content: &#40;== include google/foo/tutorial_java.md ==&#41;
1247//   rules:
1248//   - selector: google.calendar.Calendar.Get
1249//     description: >
1250//       ...
1251//   - selector: google.calendar.Calendar.Put
1252//     description: >
1253//       ...
1254// </code></pre>
1255// Documentation is provided in markdown syntax. In addition to
1256// standard markdown features, definition lists, tables and fenced
1257// code blocks are supported. Section headers can be provided and
1258// are
1259// interpreted relative to the section nesting of the context where
1260// a documentation fragment is embedded.
1261//
1262// Documentation from the IDL is merged with documentation defined
1263// via the config at normalization time, where documentation provided
1264// by config rules overrides IDL provided.
1265//
1266// A number of constructs specific to the API platform are supported
1267// in documentation text.
1268//
1269// In order to reference a proto element, the following
1270// notation can be
1271// used:
1272// <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>
1273// T
1274// o override the display text used for the link, this can be
1275// used:
1276// <pre><code>&#91;display
1277// text]&#91;fully.qualified.proto.name]</code></pre>
1278// Text can be excluded from doc using the following
1279// notation:
1280// <pre><code>&#40;-- internal comment --&#41;</code></pre>
1281//
1282// A few directives are available in documentation. Note that
1283// directives must appear on a single line to be properly
1284// identified. The `include` directive includes a markdown file from
1285// an external source:
1286// <pre><code>&#40;== include path/to/file ==&#41;</code></pre>
1287// The `resource_for` directive marks a message to be the resource of
1288// a collection in REST view. If it is not specified, tools attempt
1289// to infer the resource from the operations in a
1290// collection:
1291// <pre><code>&#40;== resource_for v1.shelves.books
1292// ==&#41;</code></pre>
1293// The directive `suppress_warning` does not directly affect
1294// documentation
1295// and is documented together with service config validation.
1296type Documentation struct {
1297	// DocumentationRootUrl: The URL to the root of documentation.
1298	DocumentationRootUrl string `json:"documentationRootUrl,omitempty"`
1299
1300	// Overview: Declares a single overview page. For
1301	// example:
1302	// <pre><code>documentation:
1303	//   summary: ...
1304	//   overview: &#40;== include overview.md ==&#41;
1305	// </code></pre>
1306	// This is a shortcut for the following declaration (using pages
1307	// style):
1308	// <pre><code>documentation:
1309	//   summary: ...
1310	//   pages:
1311	//   - name: Overview
1312	//     content: &#40;== include overview.md ==&#41;
1313	// </code></pre>
1314	// Note: you cannot specify both `overview` field and `pages` field.
1315	Overview string `json:"overview,omitempty"`
1316
1317	// Pages: The top level pages for the documentation set.
1318	Pages []*Page `json:"pages,omitempty"`
1319
1320	// Rules: A list of documentation rules that apply to individual API
1321	// elements.
1322	//
1323	// **NOTE:** All service configuration rules follow "last one wins"
1324	// order.
1325	Rules []*DocumentationRule `json:"rules,omitempty"`
1326
1327	// ServiceRootUrl: Specifies the service root url if the default one
1328	// (the service name
1329	// from the yaml file) is not suitable. This can be seen in any
1330	// fully
1331	// specified service urls as well as sections that show a base that
1332	// other
1333	// urls are relative to.
1334	ServiceRootUrl string `json:"serviceRootUrl,omitempty"`
1335
1336	// Summary: A short summary of what the service does. Can only be
1337	// provided by
1338	// plain text.
1339	Summary string `json:"summary,omitempty"`
1340
1341	// ForceSendFields is a list of field names (e.g.
1342	// "DocumentationRootUrl") to unconditionally include in API requests.
1343	// By default, fields with empty values are omitted from API requests.
1344	// However, any non-pointer, non-interface field appearing in
1345	// ForceSendFields will be sent to the server regardless of whether the
1346	// field is empty or not. This may be used to include empty fields in
1347	// Patch requests.
1348	ForceSendFields []string `json:"-"`
1349
1350	// NullFields is a list of field names (e.g. "DocumentationRootUrl") to
1351	// include in API requests with the JSON null value. By default, fields
1352	// with empty values are omitted from API requests. However, any field
1353	// with an empty value appearing in NullFields will be sent to the
1354	// server as null. It is an error if a field in this list has a
1355	// non-empty value. This may be used to include null fields in Patch
1356	// requests.
1357	NullFields []string `json:"-"`
1358}
1359
1360func (s *Documentation) MarshalJSON() ([]byte, error) {
1361	type NoMethod Documentation
1362	raw := NoMethod(*s)
1363	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1364}
1365
1366// DocumentationRule: A documentation rule provides information about
1367// individual API elements.
1368type DocumentationRule struct {
1369	// DeprecationDescription: Deprecation description of the selected
1370	// element(s). It can be provided if
1371	// an element is marked as `deprecated`.
1372	DeprecationDescription string `json:"deprecationDescription,omitempty"`
1373
1374	// Description: Description of the selected API(s).
1375	Description string `json:"description,omitempty"`
1376
1377	// Selector: The selector is a comma-separated list of patterns. Each
1378	// pattern is a
1379	// qualified name of the element which may end in "*", indicating a
1380	// wildcard.
1381	// Wildcards are only allowed at the end and for a whole component of
1382	// the
1383	// qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar".
1384	// A
1385	// wildcard will match one or more components. To specify a default for
1386	// all
1387	// applicable elements, the whole pattern "*" is used.
1388	Selector string `json:"selector,omitempty"`
1389
1390	// ForceSendFields is a list of field names (e.g.
1391	// "DeprecationDescription") to unconditionally include in API requests.
1392	// By default, fields with empty values are omitted from API requests.
1393	// However, any non-pointer, non-interface field appearing in
1394	// ForceSendFields will be sent to the server regardless of whether the
1395	// field is empty or not. This may be used to include empty fields in
1396	// Patch requests.
1397	ForceSendFields []string `json:"-"`
1398
1399	// NullFields is a list of field names (e.g. "DeprecationDescription")
1400	// to include in API requests with the JSON null value. By default,
1401	// fields with empty values are omitted from API requests. However, any
1402	// field with an empty value appearing in NullFields will be sent to the
1403	// server as null. It is an error if a field in this list has a
1404	// non-empty value. This may be used to include null fields in Patch
1405	// requests.
1406	NullFields []string `json:"-"`
1407}
1408
1409func (s *DocumentationRule) MarshalJSON() ([]byte, error) {
1410	type NoMethod DocumentationRule
1411	raw := NoMethod(*s)
1412	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1413}
1414
1415// Endpoint: `Endpoint` describes a network endpoint that serves a set
1416// of APIs.
1417// A service may expose any number of endpoints, and all endpoints share
1418// the
1419// same service configuration, such as quota configuration and
1420// monitoring
1421// configuration.
1422//
1423// Example service configuration:
1424//
1425//     name: library-example.googleapis.com
1426//     endpoints:
1427//       # Below entry makes 'google.example.library.v1.Library'
1428//       # API be served from endpoint address
1429// library-example.googleapis.com.
1430//       # It also allows HTTP OPTIONS calls to be passed to the
1431// backend, for
1432//       # it to decide whether the subsequent cross-origin request is
1433//       # allowed to proceed.
1434//     - name: library-example.googleapis.com
1435//       allow_cors: true
1436type Endpoint struct {
1437	// Aliases: DEPRECATED: This field is no longer supported. Instead of
1438	// using aliases,
1439	// please specify multiple google.api.Endpoint for each of the
1440	// intended
1441	// aliases.
1442	//
1443	// Additional names that this endpoint will be hosted on.
1444	Aliases []string `json:"aliases,omitempty"`
1445
1446	// AllowCors:
1447	// Allowing
1448	// [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sh
1449	// aring), aka
1450	// cross-domain traffic, would allow the backends served from this
1451	// endpoint to
1452	// receive and respond to HTTP OPTIONS requests. The response will be
1453	// used by
1454	// the browser to determine whether the subsequent cross-origin request
1455	// is
1456	// allowed to proceed.
1457	AllowCors bool `json:"allowCors,omitempty"`
1458
1459	// Features: The list of features enabled on this endpoint.
1460	Features []string `json:"features,omitempty"`
1461
1462	// Name: The canonical name of this endpoint.
1463	Name string `json:"name,omitempty"`
1464
1465	// Target: The specification of an Internet routable address of API
1466	// frontend that will
1467	// handle requests to this
1468	// [API
1469	// Endpoint](https://cloud.google.com/apis/design/glossary). It should
1470	// be
1471	// either a valid IPv4 address or a fully-qualified domain name. For
1472	// example,
1473	// "8.8.8.8" or "myservice.appspot.com".
1474	Target string `json:"target,omitempty"`
1475
1476	// ForceSendFields is a list of field names (e.g. "Aliases") to
1477	// unconditionally include in API requests. By default, fields with
1478	// empty values are omitted from API requests. However, any non-pointer,
1479	// non-interface field appearing in ForceSendFields will be sent to the
1480	// server regardless of whether the field is empty or not. This may be
1481	// used to include empty fields in Patch requests.
1482	ForceSendFields []string `json:"-"`
1483
1484	// NullFields is a list of field names (e.g. "Aliases") to include in
1485	// API requests with the JSON null value. By default, fields with empty
1486	// values are omitted from API requests. However, any field with an
1487	// empty value appearing in NullFields will be sent to the server as
1488	// null. It is an error if a field in this list has a non-empty value.
1489	// This may be used to include null fields in Patch requests.
1490	NullFields []string `json:"-"`
1491}
1492
1493func (s *Endpoint) MarshalJSON() ([]byte, error) {
1494	type NoMethod Endpoint
1495	raw := NoMethod(*s)
1496	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1497}
1498
1499// Enum: Enum type definition.
1500type Enum struct {
1501	// Enumvalue: Enum value definitions.
1502	Enumvalue []*EnumValue `json:"enumvalue,omitempty"`
1503
1504	// Name: Enum type name.
1505	Name string `json:"name,omitempty"`
1506
1507	// Options: Protocol buffer options.
1508	Options []*Option `json:"options,omitempty"`
1509
1510	// SourceContext: The source context.
1511	SourceContext *SourceContext `json:"sourceContext,omitempty"`
1512
1513	// Syntax: The source syntax.
1514	//
1515	// Possible values:
1516	//   "SYNTAX_PROTO2" - Syntax `proto2`.
1517	//   "SYNTAX_PROTO3" - Syntax `proto3`.
1518	Syntax string `json:"syntax,omitempty"`
1519
1520	// ForceSendFields is a list of field names (e.g. "Enumvalue") to
1521	// unconditionally include in API requests. By default, fields with
1522	// empty values are omitted from API requests. However, any non-pointer,
1523	// non-interface field appearing in ForceSendFields will be sent to the
1524	// server regardless of whether the field is empty or not. This may be
1525	// used to include empty fields in Patch requests.
1526	ForceSendFields []string `json:"-"`
1527
1528	// NullFields is a list of field names (e.g. "Enumvalue") to include in
1529	// API requests with the JSON null value. By default, fields with empty
1530	// values are omitted from API requests. However, any field with an
1531	// empty value appearing in NullFields will be sent to the server as
1532	// null. It is an error if a field in this list has a non-empty value.
1533	// This may be used to include null fields in Patch requests.
1534	NullFields []string `json:"-"`
1535}
1536
1537func (s *Enum) MarshalJSON() ([]byte, error) {
1538	type NoMethod Enum
1539	raw := NoMethod(*s)
1540	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1541}
1542
1543// EnumValue: Enum value definition.
1544type EnumValue struct {
1545	// Name: Enum value name.
1546	Name string `json:"name,omitempty"`
1547
1548	// Number: Enum value number.
1549	Number int64 `json:"number,omitempty"`
1550
1551	// Options: Protocol buffer options.
1552	Options []*Option `json:"options,omitempty"`
1553
1554	// ForceSendFields is a list of field names (e.g. "Name") to
1555	// unconditionally include in API requests. By default, fields with
1556	// empty values are omitted from API requests. However, any non-pointer,
1557	// non-interface field appearing in ForceSendFields will be sent to the
1558	// server regardless of whether the field is empty or not. This may be
1559	// used to include empty fields in Patch requests.
1560	ForceSendFields []string `json:"-"`
1561
1562	// NullFields is a list of field names (e.g. "Name") to include in API
1563	// requests with the JSON null value. By default, fields with empty
1564	// values are omitted from API requests. However, any field with an
1565	// empty value appearing in NullFields will be sent to the server as
1566	// null. It is an error if a field in this list has a non-empty value.
1567	// This may be used to include null fields in Patch requests.
1568	NullFields []string `json:"-"`
1569}
1570
1571func (s *EnumValue) MarshalJSON() ([]byte, error) {
1572	type NoMethod EnumValue
1573	raw := NoMethod(*s)
1574	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1575}
1576
1577// Field: A single field of a message type.
1578type Field struct {
1579	// Cardinality: The field cardinality.
1580	//
1581	// Possible values:
1582	//   "CARDINALITY_UNKNOWN" - For fields with unknown cardinality.
1583	//   "CARDINALITY_OPTIONAL" - For optional fields.
1584	//   "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only.
1585	//   "CARDINALITY_REPEATED" - For repeated fields.
1586	Cardinality string `json:"cardinality,omitempty"`
1587
1588	// DefaultValue: The string value of the default value of this field.
1589	// Proto2 syntax only.
1590	DefaultValue string `json:"defaultValue,omitempty"`
1591
1592	// JsonName: The field JSON name.
1593	JsonName string `json:"jsonName,omitempty"`
1594
1595	// Kind: The field type.
1596	//
1597	// Possible values:
1598	//   "TYPE_UNKNOWN" - Field type unknown.
1599	//   "TYPE_DOUBLE" - Field type double.
1600	//   "TYPE_FLOAT" - Field type float.
1601	//   "TYPE_INT64" - Field type int64.
1602	//   "TYPE_UINT64" - Field type uint64.
1603	//   "TYPE_INT32" - Field type int32.
1604	//   "TYPE_FIXED64" - Field type fixed64.
1605	//   "TYPE_FIXED32" - Field type fixed32.
1606	//   "TYPE_BOOL" - Field type bool.
1607	//   "TYPE_STRING" - Field type string.
1608	//   "TYPE_GROUP" - Field type group. Proto2 syntax only, and
1609	// deprecated.
1610	//   "TYPE_MESSAGE" - Field type message.
1611	//   "TYPE_BYTES" - Field type bytes.
1612	//   "TYPE_UINT32" - Field type uint32.
1613	//   "TYPE_ENUM" - Field type enum.
1614	//   "TYPE_SFIXED32" - Field type sfixed32.
1615	//   "TYPE_SFIXED64" - Field type sfixed64.
1616	//   "TYPE_SINT32" - Field type sint32.
1617	//   "TYPE_SINT64" - Field type sint64.
1618	Kind string `json:"kind,omitempty"`
1619
1620	// Name: The field name.
1621	Name string `json:"name,omitempty"`
1622
1623	// Number: The field number.
1624	Number int64 `json:"number,omitempty"`
1625
1626	// OneofIndex: The index of the field type in `Type.oneofs`, for message
1627	// or enumeration
1628	// types. The first type has index 1; zero means the type is not in the
1629	// list.
1630	OneofIndex int64 `json:"oneofIndex,omitempty"`
1631
1632	// Options: The protocol buffer options.
1633	Options []*Option `json:"options,omitempty"`
1634
1635	// Packed: Whether to use alternative packed wire representation.
1636	Packed bool `json:"packed,omitempty"`
1637
1638	// TypeUrl: The field type URL, without the scheme, for message or
1639	// enumeration
1640	// types. Example: "type.googleapis.com/google.protobuf.Timestamp".
1641	TypeUrl string `json:"typeUrl,omitempty"`
1642
1643	// ForceSendFields is a list of field names (e.g. "Cardinality") to
1644	// unconditionally include in API requests. By default, fields with
1645	// empty values are omitted from API requests. However, any non-pointer,
1646	// non-interface field appearing in ForceSendFields will be sent to the
1647	// server regardless of whether the field is empty or not. This may be
1648	// used to include empty fields in Patch requests.
1649	ForceSendFields []string `json:"-"`
1650
1651	// NullFields is a list of field names (e.g. "Cardinality") to include
1652	// in API requests with the JSON null value. By default, fields with
1653	// empty values are omitted from API requests. However, any field with
1654	// an empty value appearing in NullFields will be sent to the server as
1655	// null. It is an error if a field in this list has a non-empty value.
1656	// This may be used to include null fields in Patch requests.
1657	NullFields []string `json:"-"`
1658}
1659
1660func (s *Field) MarshalJSON() ([]byte, error) {
1661	type NoMethod Field
1662	raw := NoMethod(*s)
1663	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1664}
1665
1666// GoogleCloudServicenetworkingV1betaSubnetwork: Represents a subnet
1667// that was created or discovered by a private access
1668// management service.
1669type GoogleCloudServicenetworkingV1betaSubnetwork struct {
1670	// IpCidrRange: Subnetwork CIDR range in `10.x.x.x/y` format.
1671	IpCidrRange string `json:"ipCidrRange,omitempty"`
1672
1673	// Name: Subnetwork name.
1674	// See https://cloud.google.com/compute/docs/vpc/
1675	Name string `json:"name,omitempty"`
1676
1677	// Network: In the Shared VPC host project, the VPC network that's
1678	// peered with the
1679	// consumer network. For
1680	// example:
1681	// `projects/1234321/global/networks/host-network`
1682	Network string `json:"network,omitempty"`
1683
1684	// OutsideAllocation: This is a discovered subnet that is not within the
1685	// current consumer
1686	// allocated ranges.
1687	OutsideAllocation bool `json:"outsideAllocation,omitempty"`
1688
1689	// ForceSendFields is a list of field names (e.g. "IpCidrRange") to
1690	// unconditionally include in API requests. By default, fields with
1691	// empty values are omitted from API requests. However, any non-pointer,
1692	// non-interface field appearing in ForceSendFields will be sent to the
1693	// server regardless of whether the field is empty or not. This may be
1694	// used to include empty fields in Patch requests.
1695	ForceSendFields []string `json:"-"`
1696
1697	// NullFields is a list of field names (e.g. "IpCidrRange") to include
1698	// in API requests with the JSON null value. By default, fields with
1699	// empty values are omitted from API requests. However, any field with
1700	// an empty value appearing in NullFields will be sent to the server as
1701	// null. It is an error if a field in this list has a non-empty value.
1702	// This may be used to include null fields in Patch requests.
1703	NullFields []string `json:"-"`
1704}
1705
1706func (s *GoogleCloudServicenetworkingV1betaSubnetwork) MarshalJSON() ([]byte, error) {
1707	type NoMethod GoogleCloudServicenetworkingV1betaSubnetwork
1708	raw := NoMethod(*s)
1709	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1710}
1711
1712// Http: Defines the HTTP configuration for an API service. It contains
1713// a list of
1714// HttpRule, each specifying the mapping of an RPC method
1715// to one or more HTTP REST API methods.
1716type Http struct {
1717	// FullyDecodeReservedExpansion: When set to true, URL path parameters
1718	// will be fully URI-decoded except in
1719	// cases of single segment matches in reserved expansion, where "%2F"
1720	// will be
1721	// left encoded.
1722	//
1723	// The default behavior is to not decode RFC 6570 reserved characters in
1724	// multi
1725	// segment matches.
1726	FullyDecodeReservedExpansion bool `json:"fullyDecodeReservedExpansion,omitempty"`
1727
1728	// Rules: A list of HTTP configuration rules that apply to individual
1729	// API methods.
1730	//
1731	// **NOTE:** All service configuration rules follow "last one wins"
1732	// order.
1733	Rules []*HttpRule `json:"rules,omitempty"`
1734
1735	// ForceSendFields is a list of field names (e.g.
1736	// "FullyDecodeReservedExpansion") to unconditionally include in API
1737	// requests. By default, fields with empty values are omitted from API
1738	// requests. However, any non-pointer, non-interface field appearing in
1739	// ForceSendFields will be sent to the server regardless of whether the
1740	// field is empty or not. This may be used to include empty fields in
1741	// Patch requests.
1742	ForceSendFields []string `json:"-"`
1743
1744	// NullFields is a list of field names (e.g.
1745	// "FullyDecodeReservedExpansion") to include in API requests with the
1746	// JSON null value. By default, fields with empty values are omitted
1747	// from API requests. However, any field with an empty value appearing
1748	// in NullFields will be sent to the server as null. It is an error if a
1749	// field in this list has a non-empty value. This may be used to include
1750	// null fields in Patch requests.
1751	NullFields []string `json:"-"`
1752}
1753
1754func (s *Http) MarshalJSON() ([]byte, error) {
1755	type NoMethod Http
1756	raw := NoMethod(*s)
1757	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1758}
1759
1760// HttpRule: # gRPC Transcoding
1761//
1762// gRPC Transcoding is a feature for mapping between a gRPC method and
1763// one or
1764// more HTTP REST endpoints. It allows developers to build a single API
1765// service
1766// that supports both gRPC APIs and REST APIs. Many systems, including
1767// [Google
1768// APIs](https://github.com/googleapis/googleapis),
1769// [Cloud Endpoints](https://cloud.google.com/endpoints),
1770// [gRPC
1771// Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
1772// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this
1773// feature
1774// and use it for large scale production services.
1775//
1776// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping
1777// specifies
1778// how different portions of the gRPC request message are mapped to the
1779// URL
1780// path, URL query parameters, and HTTP request body. It also controls
1781// how the
1782// gRPC response message is mapped to the HTTP response body. `HttpRule`
1783// is
1784// typically specified as an `google.api.http` annotation on the gRPC
1785// method.
1786//
1787// Each mapping specifies a URL path template and an HTTP method. The
1788// path
1789// template may refer to one or more fields in the gRPC request message,
1790// as long
1791// as each field is a non-repeated field with a primitive (non-message)
1792// type.
1793// The path template controls how fields of the request message are
1794// mapped to
1795// the URL path.
1796//
1797// Example:
1798//
1799//     service Messaging {
1800//       rpc GetMessage(GetMessageRequest) returns (Message) {
1801//         option (google.api.http) = {
1802//             get: "/v1/{name=messages/*}"
1803//         };
1804//       }
1805//     }
1806//     message GetMessageRequest {
1807//       string name = 1; // Mapped to URL path.
1808//     }
1809//     message Message {
1810//       string text = 1; // The resource content.
1811//     }
1812//
1813// This enables an HTTP REST to gRPC mapping as below:
1814//
1815// HTTP | gRPC
1816// -----|-----
1817// `GET /v1/messages/123456`  | `GetMessage(name:
1818// "messages/123456")`
1819//
1820// Any fields in the request message which are not bound by the path
1821// template
1822// automatically become HTTP query parameters if there is no HTTP
1823// request body.
1824// For example:
1825//
1826//     service Messaging {
1827//       rpc GetMessage(GetMessageRequest) returns (Message) {
1828//         option (google.api.http) = {
1829//             get:"/v1/messages/{message_id}"
1830//         };
1831//       }
1832//     }
1833//     message GetMessageRequest {
1834//       message SubMessage {
1835//         string subfield = 1;
1836//       }
1837//       string message_id = 1; // Mapped to URL path.
1838//       int64 revision = 2;    // Mapped to URL query parameter
1839// `revision`.
1840//       SubMessage sub = 3;    // Mapped to URL query parameter
1841// `sub.subfield`.
1842//     }
1843//
1844// This enables a HTTP JSON to RPC mapping as below:
1845//
1846// HTTP | gRPC
1847// -----|-----
1848// `GET /v1/messages/123456?revision=2&sub.subfield=foo`
1849// |
1850// `GetMessage(message_id: "123456" revision: 2 sub:
1851// SubMessage(subfield:
1852// "foo"))`
1853//
1854// Note that fields which are mapped to URL query parameters must have
1855// a
1856// primitive type or a repeated primitive type or a non-repeated message
1857// type.
1858// In the case of a repeated type, the parameter can be repeated in the
1859// URL
1860// as `...?param=A&param=B`. In the case of a message type, each field
1861// of the
1862// message is mapped to a separate parameter, such
1863// as
1864// `...?foo.a=A&foo.b=B&foo.c=C`.
1865//
1866// For HTTP methods that allow a request body, the `body`
1867// field
1868// specifies the mapping. Consider a REST update method on the
1869// message resource collection:
1870//
1871//     service Messaging {
1872//       rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
1873//         option (google.api.http) = {
1874//           patch: "/v1/messages/{message_id}"
1875//           body: "message"
1876//         };
1877//       }
1878//     }
1879//     message UpdateMessageRequest {
1880//       string message_id = 1; // mapped to the URL
1881//       Message message = 2;   // mapped to the body
1882//     }
1883//
1884// The following HTTP JSON to RPC mapping is enabled, where
1885// the
1886// representation of the JSON in the request body is determined
1887// by
1888// protos JSON encoding:
1889//
1890// HTTP | gRPC
1891// -----|-----
1892// `PATCH /v1/messages/123456 { "text": "Hi!" }` |
1893// `UpdateMessage(message_id:
1894// "123456" message { text: "Hi!" })`
1895//
1896// The special name `*` can be used in the body mapping to define
1897// that
1898// every field not bound by the path template should be mapped to
1899// the
1900// request body.  This enables the following alternative definition
1901// of
1902// the update method:
1903//
1904//     service Messaging {
1905//       rpc UpdateMessage(Message) returns (Message) {
1906//         option (google.api.http) = {
1907//           patch: "/v1/messages/{message_id}"
1908//           body: "*"
1909//         };
1910//       }
1911//     }
1912//     message Message {
1913//       string message_id = 1;
1914//       string text = 2;
1915//     }
1916//
1917//
1918// The following HTTP JSON to RPC mapping is enabled:
1919//
1920// HTTP | gRPC
1921// -----|-----
1922// `PATCH /v1/messages/123456 { "text": "Hi!" }` |
1923// `UpdateMessage(message_id:
1924// "123456" text: "Hi!")`
1925//
1926// Note that when using `*` in the body mapping, it is not possible
1927// to
1928// have HTTP parameters, as all fields not bound by the path end in
1929// the body. This makes this option more rarely used in practice
1930// when
1931// defining REST APIs. The common usage of `*` is in custom
1932// methods
1933// which don't use the URL at all for transferring data.
1934//
1935// It is possible to define multiple HTTP methods for one RPC by
1936// using
1937// the `additional_bindings` option. Example:
1938//
1939//     service Messaging {
1940//       rpc GetMessage(GetMessageRequest) returns (Message) {
1941//         option (google.api.http) = {
1942//           get: "/v1/messages/{message_id}"
1943//           additional_bindings {
1944//             get: "/v1/users/{user_id}/messages/{message_id}"
1945//           }
1946//         };
1947//       }
1948//     }
1949//     message GetMessageRequest {
1950//       string message_id = 1;
1951//       string user_id = 2;
1952//     }
1953//
1954// This enables the following two alternative HTTP JSON to RPC
1955// mappings:
1956//
1957// HTTP | gRPC
1958// -----|-----
1959// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
1960// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me"
1961// message_id:
1962// "123456")`
1963//
1964// ## Rules for HTTP mapping
1965//
1966// 1. Leaf request fields (recursive expansion nested messages in the
1967// request
1968//    message) are classified into three categories:
1969//    - Fields referred by the path template. They are passed via the
1970// URL path.
1971//    - Fields referred by the HttpRule.body. They are passed via the
1972// HTTP
1973//      request body.
1974//    - All other fields are passed via the URL query parameters, and
1975// the
1976//      parameter name is the field path in the request message. A
1977// repeated
1978//      field can be represented as multiple query parameters under the
1979// same
1980//      name.
1981//  2. If HttpRule.body is "*", there is no URL query parameter, all
1982// fields
1983//     are passed via URL path and HTTP request body.
1984//  3. If HttpRule.body is omitted, there is no HTTP request body, all
1985//     fields are passed via URL path and URL query parameters.
1986//
1987// ### Path template syntax
1988//
1989//     Template = "/" Segments [ Verb ] ;
1990//     Segments = Segment { "/" Segment } ;
1991//     Segment  = "*" | "**" | LITERAL | Variable ;
1992//     Variable = "{" FieldPath [ "=" Segments ] "}" ;
1993//     FieldPath = IDENT { "." IDENT } ;
1994//     Verb     = ":" LITERAL ;
1995//
1996// The syntax `*` matches a single URL path segment. The syntax `**`
1997// matches
1998// zero or more URL path segments, which must be the last part of the
1999// URL path
2000// except the `Verb`.
2001//
2002// The syntax `Variable` matches part of the URL path as specified by
2003// its
2004// template. A variable template must not contain other variables. If a
2005// variable
2006// matches a single path segment, its template may be omitted, e.g.
2007// `{var}`
2008// is equivalent to `{var=*}`.
2009//
2010// The syntax `LITERAL` matches literal text in the URL path. If the
2011// `LITERAL`
2012// contains any reserved character, such characters should be
2013// percent-encoded
2014// before the matching.
2015//
2016// If a variable contains exactly one path segment, such as "{var}"
2017// or
2018// "{var=*}", when such a variable is expanded into a URL path on the
2019// client
2020// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded.
2021// The
2022// server side does the reverse decoding. Such variables show up in
2023// the
2024// [Discovery
2025// Document](https://developers.google.com/discovery/v1/re
2026// ference/apis) as
2027// `{var}`.
2028//
2029// If a variable contains multiple path segments, such as
2030// "{var=foo/*}"
2031// or "{var=**}", when such a variable is expanded into a URL path on
2032// the
2033// client side, all characters except `[-_.~/0-9a-zA-Z]` are
2034// percent-encoded.
2035// The server side does the reverse decoding, except "%2F" and "%2f" are
2036// left
2037// unchanged. Such variables show up in
2038// the
2039// [Discovery
2040// Document](https://developers.google.com/discovery/v1/re
2041// ference/apis) as
2042// `{+var}`.
2043//
2044// ## Using gRPC API Service Configuration
2045//
2046// gRPC API Service Configuration (service config) is a configuration
2047// language
2048// for configuring a gRPC service to become a user-facing product.
2049// The
2050// service config is simply the YAML representation of the
2051// `google.api.Service`
2052// proto message.
2053//
2054// As an alternative to annotating your proto file, you can configure
2055// gRPC
2056// transcoding in your service config YAML files. You do this by
2057// specifying a
2058// `HttpRule` that maps the gRPC method to a REST endpoint, achieving
2059// the same
2060// effect as the proto annotation. This can be particularly useful if
2061// you
2062// have a proto that is reused in multiple services. Note that any
2063// transcoding
2064// specified in the service config will override any matching
2065// transcoding
2066// configuration in the proto.
2067//
2068// Example:
2069//
2070//     http:
2071//       rules:
2072//         # Selects a gRPC method and applies HttpRule to it.
2073//         - selector: example.v1.Messaging.GetMessage
2074//           get: /v1/messages/{message_id}/{sub.subfield}
2075//
2076// ## Special notes
2077//
2078// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints,
2079// the
2080// proto to JSON conversion must follow the
2081// [proto3
2082// specification](https://developers.google.com/protocol-buffers/
2083// docs/proto3#json).
2084//
2085// While the single segment variable follows the semantics of
2086// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple
2087// String
2088// Expansion, the multi segment variable **does not** follow RFC 6570
2089// Section
2090// 3.2.3 Reserved Expansion. The reason is that the Reserved
2091// Expansion
2092// does not expand special characters like `?` and `#`, which would
2093// lead
2094// to invalid URLs. As the result, gRPC Transcoding uses a custom
2095// encoding
2096// for multi segment variables.
2097//
2098// The path variables **must not** refer to any repeated or mapped
2099// field,
2100// because client libraries are not capable of handling such variable
2101// expansion.
2102//
2103// The path variables **must not** capture the leading "/" character.
2104// The reason
2105// is that the most common use case "{var}" does not capture the leading
2106// "/"
2107// character. For consistency, all path variables must share the same
2108// behavior.
2109//
2110// Repeated message fields must not be mapped to URL query parameters,
2111// because
2112// no client library can support such complicated mapping.
2113//
2114// If an API needs to use a JSON array for request or response body, it
2115// can map
2116// the request or response body to a repeated field. However, some
2117// gRPC
2118// Transcoding implementations may not support this feature.
2119type HttpRule struct {
2120	// AdditionalBindings: Additional HTTP bindings for the selector. Nested
2121	// bindings must
2122	// not contain an `additional_bindings` field themselves (that is,
2123	// the nesting may only be one level deep).
2124	AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"`
2125
2126	// Body: The name of the request field whose value is mapped to the HTTP
2127	// request
2128	// body, or `*` for mapping all request fields not captured by the
2129	// path
2130	// pattern to the HTTP body, or omitted for not having any HTTP request
2131	// body.
2132	//
2133	// NOTE: the referred field must be present at the top-level of the
2134	// request
2135	// message type.
2136	Body string `json:"body,omitempty"`
2137
2138	// Custom: The custom pattern is used for specifying an HTTP method that
2139	// is not
2140	// included in the `pattern` field, such as HEAD, or "*" to leave
2141	// the
2142	// HTTP method unspecified for this rule. The wild-card rule is
2143	// useful
2144	// for services that provide content to Web (HTML) clients.
2145	Custom *CustomHttpPattern `json:"custom,omitempty"`
2146
2147	// Delete: Maps to HTTP DELETE. Used for deleting a resource.
2148	Delete string `json:"delete,omitempty"`
2149
2150	// Get: Maps to HTTP GET. Used for listing and getting information
2151	// about
2152	// resources.
2153	Get string `json:"get,omitempty"`
2154
2155	// Patch: Maps to HTTP PATCH. Used for updating a resource.
2156	Patch string `json:"patch,omitempty"`
2157
2158	// Post: Maps to HTTP POST. Used for creating a resource or performing
2159	// an action.
2160	Post string `json:"post,omitempty"`
2161
2162	// Put: Maps to HTTP PUT. Used for replacing a resource.
2163	Put string `json:"put,omitempty"`
2164
2165	// ResponseBody: Optional. The name of the response field whose value is
2166	// mapped to the HTTP
2167	// response body. When omitted, the entire response message will be
2168	// used
2169	// as the HTTP response body.
2170	//
2171	// NOTE: The referred field must be present at the top-level of the
2172	// response
2173	// message type.
2174	ResponseBody string `json:"responseBody,omitempty"`
2175
2176	// Selector: Selects a method to which this rule applies.
2177	//
2178	// Refer to selector for syntax details.
2179	Selector string `json:"selector,omitempty"`
2180
2181	// ForceSendFields is a list of field names (e.g. "AdditionalBindings")
2182	// to unconditionally include in API requests. By default, fields with
2183	// empty values are omitted from API requests. However, any non-pointer,
2184	// non-interface field appearing in ForceSendFields will be sent to the
2185	// server regardless of whether the field is empty or not. This may be
2186	// used to include empty fields in Patch requests.
2187	ForceSendFields []string `json:"-"`
2188
2189	// NullFields is a list of field names (e.g. "AdditionalBindings") to
2190	// include in API requests with the JSON null value. By default, fields
2191	// with empty values are omitted from API requests. However, any field
2192	// with an empty value appearing in NullFields will be sent to the
2193	// server as null. It is an error if a field in this list has a
2194	// non-empty value. This may be used to include null fields in Patch
2195	// requests.
2196	NullFields []string `json:"-"`
2197}
2198
2199func (s *HttpRule) MarshalJSON() ([]byte, error) {
2200	type NoMethod HttpRule
2201	raw := NoMethod(*s)
2202	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2203}
2204
2205// LabelDescriptor: A description of a label.
2206type LabelDescriptor struct {
2207	// Description: A human-readable description for the label.
2208	Description string `json:"description,omitempty"`
2209
2210	// Key: The label key.
2211	Key string `json:"key,omitempty"`
2212
2213	// ValueType: The type of data that can be assigned to the label.
2214	//
2215	// Possible values:
2216	//   "STRING" - A variable-length string. This is the default.
2217	//   "BOOL" - Boolean; true or false.
2218	//   "INT64" - A 64-bit signed integer.
2219	ValueType string `json:"valueType,omitempty"`
2220
2221	// ForceSendFields is a list of field names (e.g. "Description") to
2222	// unconditionally include in API requests. By default, fields with
2223	// empty values are omitted from API requests. However, any non-pointer,
2224	// non-interface field appearing in ForceSendFields will be sent to the
2225	// server regardless of whether the field is empty or not. This may be
2226	// used to include empty fields in Patch requests.
2227	ForceSendFields []string `json:"-"`
2228
2229	// NullFields is a list of field names (e.g. "Description") to include
2230	// in API requests with the JSON null value. By default, fields with
2231	// empty values are omitted from API requests. However, any field with
2232	// an empty value appearing in NullFields will be sent to the server as
2233	// null. It is an error if a field in this list has a non-empty value.
2234	// This may be used to include null fields in Patch requests.
2235	NullFields []string `json:"-"`
2236}
2237
2238func (s *LabelDescriptor) MarshalJSON() ([]byte, error) {
2239	type NoMethod LabelDescriptor
2240	raw := NoMethod(*s)
2241	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2242}
2243
2244// ListConnectionsResponse: ListConnectionsResponse is the response to
2245// list peering states for the
2246// given service and consumer project.
2247type ListConnectionsResponse struct {
2248	// Connections: The list of Connections.
2249	Connections []*Connection `json:"connections,omitempty"`
2250
2251	// ServerResponse contains the HTTP response code and headers from the
2252	// server.
2253	googleapi.ServerResponse `json:"-"`
2254
2255	// ForceSendFields is a list of field names (e.g. "Connections") to
2256	// unconditionally include in API requests. By default, fields with
2257	// empty values are omitted from API requests. However, any non-pointer,
2258	// non-interface field appearing in ForceSendFields will be sent to the
2259	// server regardless of whether the field is empty or not. This may be
2260	// used to include empty fields in Patch requests.
2261	ForceSendFields []string `json:"-"`
2262
2263	// NullFields is a list of field names (e.g. "Connections") to include
2264	// in API requests with the JSON null value. By default, fields with
2265	// empty values are omitted from API requests. However, any field with
2266	// an empty value appearing in NullFields will be sent to the server as
2267	// null. It is an error if a field in this list has a non-empty value.
2268	// This may be used to include null fields in Patch requests.
2269	NullFields []string `json:"-"`
2270}
2271
2272func (s *ListConnectionsResponse) MarshalJSON() ([]byte, error) {
2273	type NoMethod ListConnectionsResponse
2274	raw := NoMethod(*s)
2275	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2276}
2277
2278// LogDescriptor: A description of a log type. Example in YAML format:
2279//
2280//     - name: library.googleapis.com/activity_history
2281//       description: The history of borrowing and returning library
2282// items.
2283//       display_name: Activity
2284//       labels:
2285//       - key: /customer_id
2286//         description: Identifier of a library customer
2287type LogDescriptor struct {
2288	// Description: A human-readable description of this log. This
2289	// information appears in
2290	// the documentation and can contain details.
2291	Description string `json:"description,omitempty"`
2292
2293	// DisplayName: The human-readable name for this log. This information
2294	// appears on
2295	// the user interface and should be concise.
2296	DisplayName string `json:"displayName,omitempty"`
2297
2298	// Labels: The set of labels that are available to describe a specific
2299	// log entry.
2300	// Runtime requests that contain labels not specified here
2301	// are
2302	// considered invalid.
2303	Labels []*LabelDescriptor `json:"labels,omitempty"`
2304
2305	// Name: The name of the log. It must be less than 512 characters long
2306	// and can
2307	// include the following characters: upper- and lower-case
2308	// alphanumeric
2309	// characters [A-Za-z0-9], and punctuation characters including
2310	// slash, underscore, hyphen, period [/_-.].
2311	Name string `json:"name,omitempty"`
2312
2313	// ForceSendFields is a list of field names (e.g. "Description") to
2314	// unconditionally include in API requests. By default, fields with
2315	// empty values are omitted from API requests. However, any non-pointer,
2316	// non-interface field appearing in ForceSendFields will be sent to the
2317	// server regardless of whether the field is empty or not. This may be
2318	// used to include empty fields in Patch requests.
2319	ForceSendFields []string `json:"-"`
2320
2321	// NullFields is a list of field names (e.g. "Description") to include
2322	// in API requests with the JSON null value. By default, fields with
2323	// empty values are omitted from API requests. However, any field with
2324	// an empty value appearing in NullFields will be sent to the server as
2325	// null. It is an error if a field in this list has a non-empty value.
2326	// This may be used to include null fields in Patch requests.
2327	NullFields []string `json:"-"`
2328}
2329
2330func (s *LogDescriptor) MarshalJSON() ([]byte, error) {
2331	type NoMethod LogDescriptor
2332	raw := NoMethod(*s)
2333	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2334}
2335
2336// Logging: Logging configuration of the service.
2337//
2338// The following example shows how to configure logs to be sent to
2339// the
2340// producer and consumer projects. In the example, the
2341// `activity_history`
2342// log is sent to both the producer and consumer projects, whereas
2343// the
2344// `purchase_history` log is only sent to the producer project.
2345//
2346//     monitored_resources:
2347//     - type: library.googleapis.com/branch
2348//       labels:
2349//       - key: /city
2350//         description: The city where the library branch is located
2351// in.
2352//       - key: /name
2353//         description: The name of the branch.
2354//     logs:
2355//     - name: activity_history
2356//       labels:
2357//       - key: /customer_id
2358//     - name: purchase_history
2359//     logging:
2360//       producer_destinations:
2361//       - monitored_resource: library.googleapis.com/branch
2362//         logs:
2363//         - activity_history
2364//         - purchase_history
2365//       consumer_destinations:
2366//       - monitored_resource: library.googleapis.com/branch
2367//         logs:
2368//         - activity_history
2369type Logging struct {
2370	// ConsumerDestinations: Logging configurations for sending logs to the
2371	// consumer project.
2372	// There can be multiple consumer destinations, each one must have
2373	// a
2374	// different monitored resource type. A log can be used in at most
2375	// one consumer destination.
2376	ConsumerDestinations []*LoggingDestination `json:"consumerDestinations,omitempty"`
2377
2378	// ProducerDestinations: Logging configurations for sending logs to the
2379	// producer project.
2380	// There can be multiple producer destinations, each one must have
2381	// a
2382	// different monitored resource type. A log can be used in at most
2383	// one producer destination.
2384	ProducerDestinations []*LoggingDestination `json:"producerDestinations,omitempty"`
2385
2386	// ForceSendFields is a list of field names (e.g.
2387	// "ConsumerDestinations") to unconditionally include in API requests.
2388	// By default, fields with empty values are omitted from API requests.
2389	// However, any non-pointer, non-interface field appearing in
2390	// ForceSendFields will be sent to the server regardless of whether the
2391	// field is empty or not. This may be used to include empty fields in
2392	// Patch requests.
2393	ForceSendFields []string `json:"-"`
2394
2395	// NullFields is a list of field names (e.g. "ConsumerDestinations") to
2396	// include in API requests with the JSON null value. By default, fields
2397	// with empty values are omitted from API requests. However, any field
2398	// with an empty value appearing in NullFields will be sent to the
2399	// server as null. It is an error if a field in this list has a
2400	// non-empty value. This may be used to include null fields in Patch
2401	// requests.
2402	NullFields []string `json:"-"`
2403}
2404
2405func (s *Logging) MarshalJSON() ([]byte, error) {
2406	type NoMethod Logging
2407	raw := NoMethod(*s)
2408	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2409}
2410
2411// LoggingDestination: Configuration of a specific logging destination
2412// (the producer project
2413// or the consumer project).
2414type LoggingDestination struct {
2415	// Logs: Names of the logs to be sent to this destination. Each name
2416	// must
2417	// be defined in the Service.logs section. If the log name is
2418	// not a domain scoped name, it will be automatically prefixed with
2419	// the service name followed by "/".
2420	Logs []string `json:"logs,omitempty"`
2421
2422	// MonitoredResource: The monitored resource type. The type must be
2423	// defined in the
2424	// Service.monitored_resources section.
2425	MonitoredResource string `json:"monitoredResource,omitempty"`
2426
2427	// ForceSendFields is a list of field names (e.g. "Logs") to
2428	// unconditionally include in API requests. By default, fields with
2429	// empty values are omitted from API requests. However, any non-pointer,
2430	// non-interface field appearing in ForceSendFields will be sent to the
2431	// server regardless of whether the field is empty or not. This may be
2432	// used to include empty fields in Patch requests.
2433	ForceSendFields []string `json:"-"`
2434
2435	// NullFields is a list of field names (e.g. "Logs") to include in API
2436	// requests with the JSON null value. By default, fields with empty
2437	// values are omitted from API requests. However, any field with an
2438	// empty value appearing in NullFields will be sent to the server as
2439	// null. It is an error if a field in this list has a non-empty value.
2440	// This may be used to include null fields in Patch requests.
2441	NullFields []string `json:"-"`
2442}
2443
2444func (s *LoggingDestination) MarshalJSON() ([]byte, error) {
2445	type NoMethod LoggingDestination
2446	raw := NoMethod(*s)
2447	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2448}
2449
2450// Method: Method represents a method of an API interface.
2451type Method struct {
2452	// Name: The simple name of this method.
2453	Name string `json:"name,omitempty"`
2454
2455	// Options: Any metadata attached to the method.
2456	Options []*Option `json:"options,omitempty"`
2457
2458	// RequestStreaming: If true, the request is streamed.
2459	RequestStreaming bool `json:"requestStreaming,omitempty"`
2460
2461	// RequestTypeUrl: A URL of the input message type.
2462	RequestTypeUrl string `json:"requestTypeUrl,omitempty"`
2463
2464	// ResponseStreaming: If true, the response is streamed.
2465	ResponseStreaming bool `json:"responseStreaming,omitempty"`
2466
2467	// ResponseTypeUrl: The URL of the output message type.
2468	ResponseTypeUrl string `json:"responseTypeUrl,omitempty"`
2469
2470	// Syntax: The source syntax of this method.
2471	//
2472	// Possible values:
2473	//   "SYNTAX_PROTO2" - Syntax `proto2`.
2474	//   "SYNTAX_PROTO3" - Syntax `proto3`.
2475	Syntax string `json:"syntax,omitempty"`
2476
2477	// ForceSendFields is a list of field names (e.g. "Name") to
2478	// unconditionally include in API requests. By default, fields with
2479	// empty values are omitted from API requests. However, any non-pointer,
2480	// non-interface field appearing in ForceSendFields will be sent to the
2481	// server regardless of whether the field is empty or not. This may be
2482	// used to include empty fields in Patch requests.
2483	ForceSendFields []string `json:"-"`
2484
2485	// NullFields is a list of field names (e.g. "Name") to include in API
2486	// requests with the JSON null value. By default, fields with empty
2487	// values are omitted from API requests. However, any field with an
2488	// empty value appearing in NullFields will be sent to the server as
2489	// null. It is an error if a field in this list has a non-empty value.
2490	// This may be used to include null fields in Patch requests.
2491	NullFields []string `json:"-"`
2492}
2493
2494func (s *Method) MarshalJSON() ([]byte, error) {
2495	type NoMethod Method
2496	raw := NoMethod(*s)
2497	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2498}
2499
2500// MetricDescriptor: Defines a metric type and its schema. Once a metric
2501// descriptor is created,
2502// deleting or altering it stops data collection and makes the metric
2503// type's
2504// existing data unusable.
2505type MetricDescriptor struct {
2506	// Description: A detailed description of the metric, which can be used
2507	// in documentation.
2508	Description string `json:"description,omitempty"`
2509
2510	// DisplayName: A concise name for the metric, which can be displayed in
2511	// user interfaces.
2512	// Use sentence case without an ending period, for example "Request
2513	// count".
2514	// This field is optional but it is recommended to be set for any
2515	// metrics
2516	// associated with user-visible concepts, such as Quota.
2517	DisplayName string `json:"displayName,omitempty"`
2518
2519	// Labels: The set of labels that can be used to describe a
2520	// specific
2521	// instance of this metric type. For example,
2522	// the
2523	// `appengine.googleapis.com/http/server/response_latencies` metric
2524	// type has a label for the HTTP response code, `response_code`, so
2525	// you can look at latencies for successful responses or just
2526	// for responses that failed.
2527	Labels []*LabelDescriptor `json:"labels,omitempty"`
2528
2529	// LaunchStage: Optional. The launch stage of the metric definition.
2530	//
2531	// Possible values:
2532	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2533	//   "EARLY_ACCESS" - Early Access features are limited to a closed
2534	// group of testers. To use
2535	// these features, you must sign up in advance and sign a Trusted
2536	// Tester
2537	// agreement (which includes confidentiality provisions). These features
2538	// may
2539	// be unstable, changed in backward-incompatible ways, and are
2540	// not
2541	// guaranteed to be released.
2542	//   "ALPHA" - Alpha is a limited availability test for releases before
2543	// they are cleared
2544	// for widespread use. By Alpha, all significant design issues are
2545	// resolved
2546	// and we are in the process of verifying functionality. Alpha
2547	// customers
2548	// need to apply for access, agree to applicable terms, and have
2549	// their
2550	// projects whitelisted. Alpha releases don’t have to be feature
2551	// complete,
2552	// no SLAs are provided, and there are no technical support obligations,
2553	// but
2554	// they will be far enough along that customers can actually use them
2555	// in
2556	// test environments or for limited-use tests -- just like they would
2557	// in
2558	// normal production cases.
2559	//   "BETA" - Beta is the point at which we are ready to open a release
2560	// for any
2561	// customer to use. There are no SLA or technical support obligations in
2562	// a
2563	// Beta release. Products will be complete from a feature perspective,
2564	// but
2565	// may have some open outstanding issues. Beta releases are suitable
2566	// for
2567	// limited production use cases.
2568	//   "GA" - GA features are open to all developers and are considered
2569	// stable and
2570	// fully qualified for production use.
2571	//   "DEPRECATED" - Deprecated features are scheduled to be shut down
2572	// and removed. For more
2573	// information, see the “Deprecation Policy” section of our [Terms
2574	// of
2575	// Service](https://cloud.google.com/terms/)
2576	// and the [Google Cloud Platform Subject to the
2577	// Deprecation
2578	// Policy](https://cloud.google.com/terms/deprecation) documentation.
2579	LaunchStage string `json:"launchStage,omitempty"`
2580
2581	// Metadata: Optional. Metadata which can be used to guide usage of the
2582	// metric.
2583	Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"`
2584
2585	// MetricKind: Whether the metric records instantaneous values, changes
2586	// to a value, etc.
2587	// Some combinations of `metric_kind` and `value_type` might not be
2588	// supported.
2589	//
2590	// Possible values:
2591	//   "METRIC_KIND_UNSPECIFIED" - Do not use this default value.
2592	//   "GAUGE" - An instantaneous measurement of a value.
2593	//   "DELTA" - The change in a value during a time interval.
2594	//   "CUMULATIVE" - A value accumulated over a time interval.
2595	// Cumulative
2596	// measurements in a time series should have the same start time
2597	// and increasing end times, until an event resets the cumulative
2598	// value to zero and sets a new start time for the following
2599	// points.
2600	MetricKind string `json:"metricKind,omitempty"`
2601
2602	// MonitoredResourceTypes: Read-only. If present, then a time
2603	// series, which is identified partially by
2604	// a metric type and a MonitoredResourceDescriptor, that is
2605	// associated
2606	// with this metric type can only be associated with one of the
2607	// monitored
2608	// resource types listed here.
2609	MonitoredResourceTypes []string `json:"monitoredResourceTypes,omitempty"`
2610
2611	// Name: The resource name of the metric descriptor.
2612	Name string `json:"name,omitempty"`
2613
2614	// Type: The metric type, including its DNS name prefix. The type is
2615	// not
2616	// URL-encoded.  All user-defined metric types have the DNS
2617	// name
2618	// `custom.googleapis.com` or `external.googleapis.com`.  Metric types
2619	// should
2620	// use a natural hierarchical grouping. For example:
2621	//
2622	//     "custom.googleapis.com/invoice/paid/amount"
2623	//     "external.googleapis.com/prometheus/up"
2624	//     "appengine.googleapis.com/http/server/response_latencies"
2625	Type string `json:"type,omitempty"`
2626
2627	// Unit: * `Ki`    kibi    (2^10)
2628	// * `Mi`    mebi    (2^20)
2629	// * `Gi`    gibi    (2^30)
2630	// * `Ti`    tebi    (2^40)
2631	// * `Pi`    pebi    (2^50)
2632	//
2633	// **Grammar**
2634	//
2635	// The grammar also includes these connectors:
2636	//
2637	// * `/`    division or ratio (as an infix operator). For examples,
2638	//          `kBy/{email}` or `MiBy/10ms` (although you should almost
2639	// never
2640	//          have `/s` in a metric `unit`; rates should always be
2641	// computed at
2642	//          query time from the underlying cumulative or delta value).
2643	// * `.`    multiplication or composition (as an infix operator). For
2644	//          examples, `GBy.d` or `k{watt}.h`.
2645	//
2646	// The grammar for a unit is as follows:
2647	//
2648	//     Expression = Component { "." Component } { "/" Component } ;
2649	//
2650	//     Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
2651	//               | Annotation
2652	//               | "1"
2653	//               ;
2654	//
2655	//     Annotation = "{" NAME "}" ;
2656	//
2657	// Notes:
2658	//
2659	// * `Annotation` is just a comment if it follows a `UNIT`. If the
2660	// annotation
2661	//    is used alone, then the unit is equivalent to `1`. For examples,
2662	//    `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
2663	// * `NAME` is a sequence of non-blank printable ASCII characters not
2664	//    containing `{` or `}`.
2665	// * `1` represents a unitary [dimensionless
2666	//    unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1,
2667	// such
2668	//    as in `1/s`. It is typically used when none of the basic units
2669	// are
2670	//    appropriate. For example, "new users per day" can be represented
2671	// as
2672	//    `1/d` or `{new-users}/d` (and a metric value `5` would mean "5
2673	// new
2674	//    users). Alternatively, "thousands of page views per day" would be
2675	//    represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a
2676	// metric
2677	//    value of `5.3` would mean "5300 page views per day").
2678	// * `%` represents dimensionless value of 1/100, and annotates values
2679	// giving
2680	//    a percentage (so the metric values are typically in the range of
2681	// 0..100,
2682	//    and a metric value `3` means "3 percent").
2683	// * `10^2.%` indicates a metric contains a ratio, typically in the
2684	// range
2685	//    0..1, that will be multiplied by 100 and displayed as a
2686	// percentage
2687	//    (so a metric value `0.03` means "3 percent").
2688	Unit string `json:"unit,omitempty"`
2689
2690	// ValueType: Whether the measurement is an integer, a floating-point
2691	// number, etc.
2692	// Some combinations of `metric_kind` and `value_type` might not be
2693	// supported.
2694	//
2695	// Possible values:
2696	//   "VALUE_TYPE_UNSPECIFIED" - Do not use this default value.
2697	//   "BOOL" - The value is a boolean.
2698	// This value type can be used only if the metric kind is `GAUGE`.
2699	//   "INT64" - The value is a signed 64-bit integer.
2700	//   "DOUBLE" - The value is a double precision floating point number.
2701	//   "STRING" - The value is a text string.
2702	// This value type can be used only if the metric kind is `GAUGE`.
2703	//   "DISTRIBUTION" - The value is a `Distribution`.
2704	//   "MONEY" - The value is money.
2705	ValueType string `json:"valueType,omitempty"`
2706
2707	// ForceSendFields is a list of field names (e.g. "Description") to
2708	// unconditionally include in API requests. By default, fields with
2709	// empty values are omitted from API requests. However, any non-pointer,
2710	// non-interface field appearing in ForceSendFields will be sent to the
2711	// server regardless of whether the field is empty or not. This may be
2712	// used to include empty fields in Patch requests.
2713	ForceSendFields []string `json:"-"`
2714
2715	// NullFields is a list of field names (e.g. "Description") to include
2716	// in API requests with the JSON null value. By default, fields with
2717	// empty values are omitted from API requests. However, any field with
2718	// an empty value appearing in NullFields will be sent to the server as
2719	// null. It is an error if a field in this list has a non-empty value.
2720	// This may be used to include null fields in Patch requests.
2721	NullFields []string `json:"-"`
2722}
2723
2724func (s *MetricDescriptor) MarshalJSON() ([]byte, error) {
2725	type NoMethod MetricDescriptor
2726	raw := NoMethod(*s)
2727	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2728}
2729
2730// MetricDescriptorMetadata: Additional annotations that can be used to
2731// guide the usage of a metric.
2732type MetricDescriptorMetadata struct {
2733	// IngestDelay: The delay of data points caused by ingestion. Data
2734	// points older than this
2735	// age are guaranteed to be ingested and available to be read,
2736	// excluding
2737	// data loss due to errors.
2738	IngestDelay string `json:"ingestDelay,omitempty"`
2739
2740	// LaunchStage: Deprecated. Must use the MetricDescriptor.launch_stage
2741	// instead.
2742	//
2743	// Possible values:
2744	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
2745	//   "EARLY_ACCESS" - Early Access features are limited to a closed
2746	// group of testers. To use
2747	// these features, you must sign up in advance and sign a Trusted
2748	// Tester
2749	// agreement (which includes confidentiality provisions). These features
2750	// may
2751	// be unstable, changed in backward-incompatible ways, and are
2752	// not
2753	// guaranteed to be released.
2754	//   "ALPHA" - Alpha is a limited availability test for releases before
2755	// they are cleared
2756	// for widespread use. By Alpha, all significant design issues are
2757	// resolved
2758	// and we are in the process of verifying functionality. Alpha
2759	// customers
2760	// need to apply for access, agree to applicable terms, and have
2761	// their
2762	// projects whitelisted. Alpha releases don’t have to be feature
2763	// complete,
2764	// no SLAs are provided, and there are no technical support obligations,
2765	// but
2766	// they will be far enough along that customers can actually use them
2767	// in
2768	// test environments or for limited-use tests -- just like they would
2769	// in
2770	// normal production cases.
2771	//   "BETA" - Beta is the point at which we are ready to open a release
2772	// for any
2773	// customer to use. There are no SLA or technical support obligations in
2774	// a
2775	// Beta release. Products will be complete from a feature perspective,
2776	// but
2777	// may have some open outstanding issues. Beta releases are suitable
2778	// for
2779	// limited production use cases.
2780	//   "GA" - GA features are open to all developers and are considered
2781	// stable and
2782	// fully qualified for production use.
2783	//   "DEPRECATED" - Deprecated features are scheduled to be shut down
2784	// and removed. For more
2785	// information, see the “Deprecation Policy” section of our [Terms
2786	// of
2787	// Service](https://cloud.google.com/terms/)
2788	// and the [Google Cloud Platform Subject to the
2789	// Deprecation
2790	// Policy](https://cloud.google.com/terms/deprecation) documentation.
2791	LaunchStage string `json:"launchStage,omitempty"`
2792
2793	// SamplePeriod: The sampling period of metric data points. For metrics
2794	// which are written
2795	// periodically, consecutive data points are stored at this time
2796	// interval,
2797	// excluding data loss due to errors. Metrics with a higher granularity
2798	// have
2799	// a smaller sampling period.
2800	SamplePeriod string `json:"samplePeriod,omitempty"`
2801
2802	// ForceSendFields is a list of field names (e.g. "IngestDelay") to
2803	// unconditionally include in API requests. By default, fields with
2804	// empty values are omitted from API requests. However, any non-pointer,
2805	// non-interface field appearing in ForceSendFields will be sent to the
2806	// server regardless of whether the field is empty or not. This may be
2807	// used to include empty fields in Patch requests.
2808	ForceSendFields []string `json:"-"`
2809
2810	// NullFields is a list of field names (e.g. "IngestDelay") to include
2811	// in API requests with the JSON null value. By default, fields with
2812	// empty values are omitted from API requests. However, any field with
2813	// an empty value appearing in NullFields will be sent to the server as
2814	// null. It is an error if a field in this list has a non-empty value.
2815	// This may be used to include null fields in Patch requests.
2816	NullFields []string `json:"-"`
2817}
2818
2819func (s *MetricDescriptorMetadata) MarshalJSON() ([]byte, error) {
2820	type NoMethod MetricDescriptorMetadata
2821	raw := NoMethod(*s)
2822	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2823}
2824
2825// MetricRule: Bind API methods to metrics. Binding a method to a metric
2826// causes that
2827// metric's configured quota behaviors to apply to the method call.
2828type MetricRule struct {
2829	// MetricCosts: Metrics to update when the selected methods are called,
2830	// and the associated
2831	// cost applied to each metric.
2832	//
2833	// The key of the map is the metric name, and the values are the
2834	// amount
2835	// increased for the metric against which the quota limits are
2836	// defined.
2837	// The value must not be negative.
2838	MetricCosts map[string]string `json:"metricCosts,omitempty"`
2839
2840	// Selector: Selects the methods to which this rule applies.
2841	//
2842	// Refer to selector for syntax details.
2843	Selector string `json:"selector,omitempty"`
2844
2845	// ForceSendFields is a list of field names (e.g. "MetricCosts") to
2846	// unconditionally include in API requests. By default, fields with
2847	// empty values are omitted from API requests. However, any non-pointer,
2848	// non-interface field appearing in ForceSendFields will be sent to the
2849	// server regardless of whether the field is empty or not. This may be
2850	// used to include empty fields in Patch requests.
2851	ForceSendFields []string `json:"-"`
2852
2853	// NullFields is a list of field names (e.g. "MetricCosts") to include
2854	// in API requests with the JSON null value. By default, fields with
2855	// empty values are omitted from API requests. However, any field with
2856	// an empty value appearing in NullFields will be sent to the server as
2857	// null. It is an error if a field in this list has a non-empty value.
2858	// This may be used to include null fields in Patch requests.
2859	NullFields []string `json:"-"`
2860}
2861
2862func (s *MetricRule) MarshalJSON() ([]byte, error) {
2863	type NoMethod MetricRule
2864	raw := NoMethod(*s)
2865	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2866}
2867
2868// Mixin: Declares an API Interface to be included in this interface.
2869// The including
2870// interface must redeclare all the methods from the included interface,
2871// but
2872// documentation and options are inherited as follows:
2873//
2874// - If after comment and whitespace stripping, the documentation
2875//   string of the redeclared method is empty, it will be inherited
2876//   from the original method.
2877//
2878// - Each annotation belonging to the service config (http,
2879//   visibility) which is not set in the redeclared method will be
2880//   inherited.
2881//
2882// - If an http annotation is inherited, the path pattern will be
2883//   modified as follows. Any version prefix will be replaced by the
2884//   version of the including interface plus the root path if
2885//   specified.
2886//
2887// Example of a simple mixin:
2888//
2889//     package google.acl.v1;
2890//     service AccessControl {
2891//       // Get the underlying ACL object.
2892//       rpc GetAcl(GetAclRequest) returns (Acl) {
2893//         option (google.api.http).get = "/v1/{resource=**}:getAcl";
2894//       }
2895//     }
2896//
2897//     package google.storage.v2;
2898//     service Storage {
2899//       //       rpc GetAcl(GetAclRequest) returns (Acl);
2900//
2901//       // Get a data record.
2902//       rpc GetData(GetDataRequest) returns (Data) {
2903//         option (google.api.http).get = "/v2/{resource=**}";
2904//       }
2905//     }
2906//
2907// Example of a mixin configuration:
2908//
2909//     apis:
2910//     - name: google.storage.v2.Storage
2911//       mixins:
2912//       - name: google.acl.v1.AccessControl
2913//
2914// The mixin construct implies that all methods in `AccessControl`
2915// are
2916// also declared with same name and request/response types in
2917// `Storage`. A documentation generator or annotation processor will
2918// see the effective `Storage.GetAcl` method after
2919// inherting
2920// documentation and annotations as follows:
2921//
2922//     service Storage {
2923//       // Get the underlying ACL object.
2924//       rpc GetAcl(GetAclRequest) returns (Acl) {
2925//         option (google.api.http).get = "/v2/{resource=**}:getAcl";
2926//       }
2927//       ...
2928//     }
2929//
2930// Note how the version in the path pattern changed from `v1` to
2931// `v2`.
2932//
2933// If the `root` field in the mixin is specified, it should be
2934// a
2935// relative path under which inherited HTTP paths are placed. Example:
2936//
2937//     apis:
2938//     - name: google.storage.v2.Storage
2939//       mixins:
2940//       - name: google.acl.v1.AccessControl
2941//         root: acls
2942//
2943// This implies the following inherited HTTP annotation:
2944//
2945//     service Storage {
2946//       // Get the underlying ACL object.
2947//       rpc GetAcl(GetAclRequest) returns (Acl) {
2948//         option (google.api.http).get =
2949// "/v2/acls/{resource=**}:getAcl";
2950//       }
2951//       ...
2952//     }
2953type Mixin struct {
2954	// Name: The fully qualified name of the interface which is included.
2955	Name string `json:"name,omitempty"`
2956
2957	// Root: If non-empty specifies a path under which inherited HTTP
2958	// paths
2959	// are rooted.
2960	Root string `json:"root,omitempty"`
2961
2962	// ForceSendFields is a list of field names (e.g. "Name") to
2963	// unconditionally include in API requests. By default, fields with
2964	// empty values are omitted from API requests. However, any non-pointer,
2965	// non-interface field appearing in ForceSendFields will be sent to the
2966	// server regardless of whether the field is empty or not. This may be
2967	// used to include empty fields in Patch requests.
2968	ForceSendFields []string `json:"-"`
2969
2970	// NullFields is a list of field names (e.g. "Name") to include in API
2971	// requests with the JSON null value. By default, fields with empty
2972	// values are omitted from API requests. However, any field with an
2973	// empty value appearing in NullFields will be sent to the server as
2974	// null. It is an error if a field in this list has a non-empty value.
2975	// This may be used to include null fields in Patch requests.
2976	NullFields []string `json:"-"`
2977}
2978
2979func (s *Mixin) MarshalJSON() ([]byte, error) {
2980	type NoMethod Mixin
2981	raw := NoMethod(*s)
2982	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2983}
2984
2985// MonitoredResourceDescriptor: An object that describes the schema of a
2986// MonitoredResource object using a
2987// type name and a set of labels.  For example, the monitored
2988// resource
2989// descriptor for Google Compute Engine VM instances has a type
2990// of
2991// "gce_instance" and specifies the use of the labels "instance_id"
2992// and
2993// "zone" to identify particular VM instances.
2994//
2995// Different APIs can support different monitored resource types. APIs
2996// generally
2997// provide a `list` method that returns the monitored resource
2998// descriptors used
2999// by the API.
3000type MonitoredResourceDescriptor struct {
3001	// Description: Optional. A detailed description of the monitored
3002	// resource type that might
3003	// be used in documentation.
3004	Description string `json:"description,omitempty"`
3005
3006	// DisplayName: Optional. A concise name for the monitored resource type
3007	// that might be
3008	// displayed in user interfaces. It should be a Title Cased Noun
3009	// Phrase,
3010	// without any article or other determiners. For example,
3011	// "Google Cloud SQL Database".
3012	DisplayName string `json:"displayName,omitempty"`
3013
3014	// Labels: Required. A set of labels used to describe instances of this
3015	// monitored
3016	// resource type. For example, an individual Google Cloud SQL database
3017	// is
3018	// identified by values for the labels "database_id" and "zone".
3019	Labels []*LabelDescriptor `json:"labels,omitempty"`
3020
3021	// LaunchStage: Optional. The launch stage of the monitored resource
3022	// definition.
3023	//
3024	// Possible values:
3025	//   "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
3026	//   "EARLY_ACCESS" - Early Access features are limited to a closed
3027	// group of testers. To use
3028	// these features, you must sign up in advance and sign a Trusted
3029	// Tester
3030	// agreement (which includes confidentiality provisions). These features
3031	// may
3032	// be unstable, changed in backward-incompatible ways, and are
3033	// not
3034	// guaranteed to be released.
3035	//   "ALPHA" - Alpha is a limited availability test for releases before
3036	// they are cleared
3037	// for widespread use. By Alpha, all significant design issues are
3038	// resolved
3039	// and we are in the process of verifying functionality. Alpha
3040	// customers
3041	// need to apply for access, agree to applicable terms, and have
3042	// their
3043	// projects whitelisted. Alpha releases don’t have to be feature
3044	// complete,
3045	// no SLAs are provided, and there are no technical support obligations,
3046	// but
3047	// they will be far enough along that customers can actually use them
3048	// in
3049	// test environments or for limited-use tests -- just like they would
3050	// in
3051	// normal production cases.
3052	//   "BETA" - Beta is the point at which we are ready to open a release
3053	// for any
3054	// customer to use. There are no SLA or technical support obligations in
3055	// a
3056	// Beta release. Products will be complete from a feature perspective,
3057	// but
3058	// may have some open outstanding issues. Beta releases are suitable
3059	// for
3060	// limited production use cases.
3061	//   "GA" - GA features are open to all developers and are considered
3062	// stable and
3063	// fully qualified for production use.
3064	//   "DEPRECATED" - Deprecated features are scheduled to be shut down
3065	// and removed. For more
3066	// information, see the “Deprecation Policy” section of our [Terms
3067	// of
3068	// Service](https://cloud.google.com/terms/)
3069	// and the [Google Cloud Platform Subject to the
3070	// Deprecation
3071	// Policy](https://cloud.google.com/terms/deprecation) documentation.
3072	LaunchStage string `json:"launchStage,omitempty"`
3073
3074	// Name: Optional. The resource name of the monitored resource
3075	// descriptor:
3076	// "projects/{project_id}/monitoredResourceDescriptors/{type
3077	// }" where
3078	// {type} is the value of the `type` field in this object
3079	// and
3080	// {project_id} is a project ID that provides API-specific context
3081	// for
3082	// accessing the type.  APIs that do not use project information can use
3083	// the
3084	// resource name format "monitoredResourceDescriptors/{type}".
3085	Name string `json:"name,omitempty"`
3086
3087	// Type: Required. The monitored resource type. For example, the
3088	// type
3089	// "cloudsql_database" represents databases in Google Cloud SQL.
3090	// The maximum length of this value is 256 characters.
3091	Type string `json:"type,omitempty"`
3092
3093	// ForceSendFields is a list of field names (e.g. "Description") to
3094	// unconditionally include in API requests. By default, fields with
3095	// empty values are omitted from API requests. However, any non-pointer,
3096	// non-interface field appearing in ForceSendFields will be sent to the
3097	// server regardless of whether the field is empty or not. This may be
3098	// used to include empty fields in Patch requests.
3099	ForceSendFields []string `json:"-"`
3100
3101	// NullFields is a list of field names (e.g. "Description") to include
3102	// in API requests with the JSON null value. By default, fields with
3103	// empty values are omitted from API requests. However, any field with
3104	// an empty value appearing in NullFields will be sent to the server as
3105	// null. It is an error if a field in this list has a non-empty value.
3106	// This may be used to include null fields in Patch requests.
3107	NullFields []string `json:"-"`
3108}
3109
3110func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
3111	type NoMethod MonitoredResourceDescriptor
3112	raw := NoMethod(*s)
3113	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3114}
3115
3116// Monitoring: Monitoring configuration of the service.
3117//
3118// The example below shows how to configure monitored resources and
3119// metrics
3120// for monitoring. In the example, a monitored resource and two metrics
3121// are
3122// defined. The `library.googleapis.com/book/returned_count` metric is
3123// sent
3124// to both producer and consumer projects, whereas
3125// the
3126// `library.googleapis.com/book/overdue_count` metric is only sent to
3127// the
3128// consumer project.
3129//
3130//     monitored_resources:
3131//     - type: library.googleapis.com/branch
3132//       labels:
3133//       - key: /city
3134//         description: The city where the library branch is located
3135// in.
3136//       - key: /name
3137//         description: The name of the branch.
3138//     metrics:
3139//     - name: library.googleapis.com/book/returned_count
3140//       metric_kind: DELTA
3141//       value_type: INT64
3142//       labels:
3143//       - key: /customer_id
3144//     - name: library.googleapis.com/book/overdue_count
3145//       metric_kind: GAUGE
3146//       value_type: INT64
3147//       labels:
3148//       - key: /customer_id
3149//     monitoring:
3150//       producer_destinations:
3151//       - monitored_resource: library.googleapis.com/branch
3152//         metrics:
3153//         - library.googleapis.com/book/returned_count
3154//       consumer_destinations:
3155//       - monitored_resource: library.googleapis.com/branch
3156//         metrics:
3157//         - library.googleapis.com/book/returned_count
3158//         - library.googleapis.com/book/overdue_count
3159type Monitoring struct {
3160	// ConsumerDestinations: Monitoring configurations for sending metrics
3161	// to the consumer project.
3162	// There can be multiple consumer destinations. A monitored resouce type
3163	// may
3164	// appear in multiple monitoring destinations if different aggregations
3165	// are
3166	// needed for different sets of metrics associated with that
3167	// monitored
3168	// resource type. A monitored resource and metric pair may only be used
3169	// once
3170	// in the Monitoring configuration.
3171	ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"`
3172
3173	// ProducerDestinations: Monitoring configurations for sending metrics
3174	// to the producer project.
3175	// There can be multiple producer destinations. A monitored resouce type
3176	// may
3177	// appear in multiple monitoring destinations if different aggregations
3178	// are
3179	// needed for different sets of metrics associated with that
3180	// monitored
3181	// resource type. A monitored resource and metric pair may only be used
3182	// once
3183	// in the Monitoring configuration.
3184	ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"`
3185
3186	// ForceSendFields is a list of field names (e.g.
3187	// "ConsumerDestinations") to unconditionally include in API requests.
3188	// By default, fields with empty values are omitted from API requests.
3189	// However, any non-pointer, non-interface field appearing in
3190	// ForceSendFields will be sent to the server regardless of whether the
3191	// field is empty or not. This may be used to include empty fields in
3192	// Patch requests.
3193	ForceSendFields []string `json:"-"`
3194
3195	// NullFields is a list of field names (e.g. "ConsumerDestinations") to
3196	// include in API requests with the JSON null value. By default, fields
3197	// with empty values are omitted from API requests. However, any field
3198	// with an empty value appearing in NullFields will be sent to the
3199	// server as null. It is an error if a field in this list has a
3200	// non-empty value. This may be used to include null fields in Patch
3201	// requests.
3202	NullFields []string `json:"-"`
3203}
3204
3205func (s *Monitoring) MarshalJSON() ([]byte, error) {
3206	type NoMethod Monitoring
3207	raw := NoMethod(*s)
3208	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3209}
3210
3211// MonitoringDestination: Configuration of a specific monitoring
3212// destination (the producer project
3213// or the consumer project).
3214type MonitoringDestination struct {
3215	// Metrics: Types of the metrics to report to this monitoring
3216	// destination.
3217	// Each type must be defined in Service.metrics section.
3218	Metrics []string `json:"metrics,omitempty"`
3219
3220	// MonitoredResource: The monitored resource type. The type must be
3221	// defined in
3222	// Service.monitored_resources section.
3223	MonitoredResource string `json:"monitoredResource,omitempty"`
3224
3225	// ForceSendFields is a list of field names (e.g. "Metrics") to
3226	// unconditionally include in API requests. By default, fields with
3227	// empty values are omitted from API requests. However, any non-pointer,
3228	// non-interface field appearing in ForceSendFields will be sent to the
3229	// server regardless of whether the field is empty or not. This may be
3230	// used to include empty fields in Patch requests.
3231	ForceSendFields []string `json:"-"`
3232
3233	// NullFields is a list of field names (e.g. "Metrics") to include in
3234	// API requests with the JSON null value. By default, fields with empty
3235	// values are omitted from API requests. However, any field with an
3236	// empty value appearing in NullFields will be sent to the server as
3237	// null. It is an error if a field in this list has a non-empty value.
3238	// This may be used to include null fields in Patch requests.
3239	NullFields []string `json:"-"`
3240}
3241
3242func (s *MonitoringDestination) MarshalJSON() ([]byte, error) {
3243	type NoMethod MonitoringDestination
3244	raw := NoMethod(*s)
3245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3246}
3247
3248// OAuthRequirements: OAuth scopes are a way to define data and
3249// permissions on data. For example,
3250// there are scopes defined for "Read-only access to Google Calendar"
3251// and
3252// "Access to Cloud Platform". Users can consent to a scope for an
3253// application,
3254// giving it permission to access that data on their behalf.
3255//
3256// OAuth scope specifications should be fairly coarse grained; a user
3257// will need
3258// to see and understand the text description of what your scope
3259// means.
3260//
3261// In most cases: use one or at most two OAuth scopes for an entire
3262// family of
3263// products. If your product has multiple APIs, you should probably be
3264// sharing
3265// the OAuth scope across all of those APIs.
3266//
3267// When you need finer grained OAuth consent screens: talk with your
3268// product
3269// management about how developers will use them in practice.
3270//
3271// Please note that even though each of the canonical scopes is enough
3272// for a
3273// request to be accepted and passed to the backend, a request can still
3274// fail
3275// due to the backend requiring additional scopes or permissions.
3276type OAuthRequirements struct {
3277	// CanonicalScopes: The list of publicly documented OAuth scopes that
3278	// are allowed access. An
3279	// OAuth token containing any of these scopes will be
3280	// accepted.
3281	//
3282	// Example:
3283	//
3284	//      canonical_scopes: https://www.googleapis.com/auth/calendar,
3285	//                        https://www.googleapis.com/auth/calendar.read
3286	CanonicalScopes string `json:"canonicalScopes,omitempty"`
3287
3288	// ForceSendFields is a list of field names (e.g. "CanonicalScopes") to
3289	// unconditionally include in API requests. By default, fields with
3290	// empty values are omitted from API requests. However, any non-pointer,
3291	// non-interface field appearing in ForceSendFields will be sent to the
3292	// server regardless of whether the field is empty or not. This may be
3293	// used to include empty fields in Patch requests.
3294	ForceSendFields []string `json:"-"`
3295
3296	// NullFields is a list of field names (e.g. "CanonicalScopes") to
3297	// include in API requests with the JSON null value. By default, fields
3298	// with empty values are omitted from API requests. However, any field
3299	// with an empty value appearing in NullFields will be sent to the
3300	// server as null. It is an error if a field in this list has a
3301	// non-empty value. This may be used to include null fields in Patch
3302	// requests.
3303	NullFields []string `json:"-"`
3304}
3305
3306func (s *OAuthRequirements) MarshalJSON() ([]byte, error) {
3307	type NoMethod OAuthRequirements
3308	raw := NoMethod(*s)
3309	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3310}
3311
3312// Operation: This resource represents a long-running operation that is
3313// the result of a
3314// network API call.
3315type Operation struct {
3316	// Done: If the value is `false`, it means the operation is still in
3317	// progress.
3318	// If `true`, the operation is completed, and either `error` or
3319	// `response` is
3320	// available.
3321	Done bool `json:"done,omitempty"`
3322
3323	// Error: The error result of the operation in case of failure or
3324	// cancellation.
3325	Error *Status `json:"error,omitempty"`
3326
3327	// Metadata: Service-specific metadata associated with the operation.
3328	// It typically
3329	// contains progress information and common metadata such as create
3330	// time.
3331	// Some services might not provide such metadata.  Any method that
3332	// returns a
3333	// long-running operation should document the metadata type, if any.
3334	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3335
3336	// Name: The server-assigned name, which is only unique within the same
3337	// service that
3338	// originally returns it. If you use the default HTTP mapping,
3339	// the
3340	// `name` should be a resource name ending with
3341	// `operations/{unique_id}`.
3342	Name string `json:"name,omitempty"`
3343
3344	// Response: The normal response of the operation in case of success.
3345	// If the original
3346	// method returns no data on success, such as `Delete`, the response
3347	// is
3348	// `google.protobuf.Empty`.  If the original method is
3349	// standard
3350	// `Get`/`Create`/`Update`, the response should be the resource.  For
3351	// other
3352	// methods, the response should have the type `XxxResponse`, where
3353	// `Xxx`
3354	// is the original method name.  For example, if the original method
3355	// name
3356	// is `TakeSnapshot()`, the inferred response type
3357	// is
3358	// `TakeSnapshotResponse`.
3359	Response googleapi.RawMessage `json:"response,omitempty"`
3360
3361	// ServerResponse contains the HTTP response code and headers from the
3362	// server.
3363	googleapi.ServerResponse `json:"-"`
3364
3365	// ForceSendFields is a list of field names (e.g. "Done") to
3366	// unconditionally include in API requests. By default, fields with
3367	// empty values are omitted from API requests. However, any non-pointer,
3368	// non-interface field appearing in ForceSendFields will be sent to the
3369	// server regardless of whether the field is empty or not. This may be
3370	// used to include empty fields in Patch requests.
3371	ForceSendFields []string `json:"-"`
3372
3373	// NullFields is a list of field names (e.g. "Done") to include in API
3374	// requests with the JSON null value. By default, fields with empty
3375	// values are omitted from API requests. However, any field with an
3376	// empty value appearing in NullFields will be sent to the server as
3377	// null. It is an error if a field in this list has a non-empty value.
3378	// This may be used to include null fields in Patch requests.
3379	NullFields []string `json:"-"`
3380}
3381
3382func (s *Operation) MarshalJSON() ([]byte, error) {
3383	type NoMethod Operation
3384	raw := NoMethod(*s)
3385	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3386}
3387
3388// Option: A protocol buffer option, which can be attached to a message,
3389// field,
3390// enumeration, etc.
3391type Option struct {
3392	// Name: The option's name. For protobuf built-in options (options
3393	// defined in
3394	// descriptor.proto), this is the short name. For example,
3395	// "map_entry".
3396	// For custom options, it should be the fully-qualified name. For
3397	// example,
3398	// "google.api.http".
3399	Name string `json:"name,omitempty"`
3400
3401	// Value: The option's value packed in an Any message. If the value is a
3402	// primitive,
3403	// the corresponding wrapper type defined in
3404	// google/protobuf/wrappers.proto
3405	// should be used. If the value is an enum, it should be stored as an
3406	// int32
3407	// value using the google.protobuf.Int32Value type.
3408	Value googleapi.RawMessage `json:"value,omitempty"`
3409
3410	// ForceSendFields is a list of field names (e.g. "Name") to
3411	// unconditionally include in API requests. By default, fields with
3412	// empty values are omitted from API requests. However, any non-pointer,
3413	// non-interface field appearing in ForceSendFields will be sent to the
3414	// server regardless of whether the field is empty or not. This may be
3415	// used to include empty fields in Patch requests.
3416	ForceSendFields []string `json:"-"`
3417
3418	// NullFields is a list of field names (e.g. "Name") to include in API
3419	// requests with the JSON null value. By default, fields with empty
3420	// values are omitted from API requests. However, any field with an
3421	// empty value appearing in NullFields will be sent to the server as
3422	// null. It is an error if a field in this list has a non-empty value.
3423	// This may be used to include null fields in Patch requests.
3424	NullFields []string `json:"-"`
3425}
3426
3427func (s *Option) MarshalJSON() ([]byte, error) {
3428	type NoMethod Option
3429	raw := NoMethod(*s)
3430	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3431}
3432
3433// Page: Represents a documentation page. A page can contain subpages to
3434// represent
3435// nested documentation set structure.
3436type Page struct {
3437	// Content: The Markdown content of the page. You can use <code>&#40;==
3438	// include {path}
3439	// ==&#41;</code> to include content from a Markdown file.
3440	Content string `json:"content,omitempty"`
3441
3442	// Name: The name of the page. It will be used as an identity of the
3443	// page to
3444	// generate URI of the page, text of the link to this page in
3445	// navigation,
3446	// etc. The full page name (start from the root page name to this
3447	// page
3448	// concatenated with `.`) can be used as reference to the page in
3449	// your
3450	// documentation. For example:
3451	// <pre><code>pages:
3452	// - name: Tutorial
3453	//   content: &#40;== include tutorial.md ==&#41;
3454	//   subpages:
3455	//   - name: Java
3456	//     content: &#40;== include tutorial_java.md
3457	// ==&#41;
3458	// </code></pre>
3459	// You can reference `Java` page using Markdown reference link
3460	// syntax:
3461	// `Java`.
3462	Name string `json:"name,omitempty"`
3463
3464	// Subpages: Subpages of this page. The order of subpages specified here
3465	// will be
3466	// honored in the generated docset.
3467	Subpages []*Page `json:"subpages,omitempty"`
3468
3469	// ForceSendFields is a list of field names (e.g. "Content") to
3470	// unconditionally include in API requests. By default, fields with
3471	// empty values are omitted from API requests. However, any non-pointer,
3472	// non-interface field appearing in ForceSendFields will be sent to the
3473	// server regardless of whether the field is empty or not. This may be
3474	// used to include empty fields in Patch requests.
3475	ForceSendFields []string `json:"-"`
3476
3477	// NullFields is a list of field names (e.g. "Content") to include in
3478	// API requests with the JSON null value. By default, fields with empty
3479	// values are omitted from API requests. However, any field with an
3480	// empty value appearing in NullFields will be sent to the server as
3481	// null. It is an error if a field in this list has a non-empty value.
3482	// This may be used to include null fields in Patch requests.
3483	NullFields []string `json:"-"`
3484}
3485
3486func (s *Page) MarshalJSON() ([]byte, error) {
3487	type NoMethod Page
3488	raw := NoMethod(*s)
3489	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3490}
3491
3492// Quota: Quota configuration helps to achieve fairness and budgeting in
3493// service
3494// usage.
3495//
3496// The metric based quota configuration works this way:
3497// - The service configuration defines a set of metrics.
3498// - For API calls, the quota.metric_rules maps methods to metrics with
3499//   corresponding costs.
3500// - The quota.limits defines limits on the metrics, which will be used
3501// for
3502//   quota checks at runtime.
3503//
3504// An example quota configuration in yaml format:
3505//
3506//    quota:
3507//      limits:
3508//
3509//      - name: apiWriteQpsPerProject
3510//        metric: library.googleapis.com/write_calls
3511//        unit: "1/min/{project}"  # rate limit for consumer projects
3512//        values:
3513//          STANDARD: 10000
3514//
3515//
3516//      # The metric rules bind all methods to the read_calls metric,
3517//      # except for the UpdateBook and DeleteBook methods. These two
3518// methods
3519//      # are mapped to the write_calls metric, with the UpdateBook
3520// method
3521//      # consuming at twice rate as the DeleteBook method.
3522//      metric_rules:
3523//      - selector: "*"
3524//        metric_costs:
3525//          library.googleapis.com/read_calls: 1
3526//      - selector: google.example.library.v1.LibraryService.UpdateBook
3527//        metric_costs:
3528//          library.googleapis.com/write_calls: 2
3529//      - selector: google.example.library.v1.LibraryService.DeleteBook
3530//        metric_costs:
3531//          library.googleapis.com/write_calls: 1
3532//
3533//  Corresponding Metric definition:
3534//
3535//      metrics:
3536//      - name: library.googleapis.com/read_calls
3537//        display_name: Read requests
3538//        metric_kind: DELTA
3539//        value_type: INT64
3540//
3541//      - name: library.googleapis.com/write_calls
3542//        display_name: Write requests
3543//        metric_kind: DELTA
3544//        value_type: INT64
3545//
3546//
3547type Quota struct {
3548	// Limits: List of `QuotaLimit` definitions for the service.
3549	Limits []*QuotaLimit `json:"limits,omitempty"`
3550
3551	// MetricRules: List of `MetricRule` definitions, each one mapping a
3552	// selected method to one
3553	// or more metrics.
3554	MetricRules []*MetricRule `json:"metricRules,omitempty"`
3555
3556	// ForceSendFields is a list of field names (e.g. "Limits") to
3557	// unconditionally include in API requests. By default, fields with
3558	// empty values are omitted from API requests. However, any non-pointer,
3559	// non-interface field appearing in ForceSendFields will be sent to the
3560	// server regardless of whether the field is empty or not. This may be
3561	// used to include empty fields in Patch requests.
3562	ForceSendFields []string `json:"-"`
3563
3564	// NullFields is a list of field names (e.g. "Limits") to include in API
3565	// requests with the JSON null value. By default, fields with empty
3566	// values are omitted from API requests. However, any field with an
3567	// empty value appearing in NullFields will be sent to the server as
3568	// null. It is an error if a field in this list has a non-empty value.
3569	// This may be used to include null fields in Patch requests.
3570	NullFields []string `json:"-"`
3571}
3572
3573func (s *Quota) MarshalJSON() ([]byte, error) {
3574	type NoMethod Quota
3575	raw := NoMethod(*s)
3576	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3577}
3578
3579// QuotaLimit: `QuotaLimit` defines a specific limit that applies over a
3580// specified duration
3581// for a limit type. There can be at most one limit for a duration and
3582// limit
3583// type combination defined within a `QuotaGroup`.
3584type QuotaLimit struct {
3585	// DefaultLimit: Default number of tokens that can be consumed during
3586	// the specified
3587	// duration. This is the number of tokens assigned when a
3588	// client
3589	// application developer activates the service for his/her
3590	// project.
3591	//
3592	// Specifying a value of 0 will block all requests. This can be used if
3593	// you
3594	// are provisioning quota to selected consumers and blocking
3595	// others.
3596	// Similarly, a value of -1 will indicate an unlimited quota. No
3597	// other
3598	// negative values are allowed.
3599	//
3600	// Used by group-based quotas only.
3601	DefaultLimit int64 `json:"defaultLimit,omitempty,string"`
3602
3603	// Description: Optional. User-visible, extended description for this
3604	// quota limit.
3605	// Should be used only when more context is needed to understand this
3606	// limit
3607	// than provided by the limit's display name (see: `display_name`).
3608	Description string `json:"description,omitempty"`
3609
3610	// DisplayName: User-visible display name for this limit.
3611	// Optional. If not set, the UI will provide a default display name
3612	// based on
3613	// the quota configuration. This field can be used to override the
3614	// default
3615	// display name generated from the configuration.
3616	DisplayName string `json:"displayName,omitempty"`
3617
3618	// Duration: Duration of this limit in textual notation. Must be "100s"
3619	// or "1d".
3620	//
3621	// Used by group-based quotas only.
3622	Duration string `json:"duration,omitempty"`
3623
3624	// FreeTier: Free tier value displayed in the Developers Console for
3625	// this limit.
3626	// The free tier is the number of tokens that will be subtracted from
3627	// the
3628	// billed amount when billing is enabled.
3629	// This field can only be set on a limit with duration "1d", in a
3630	// billable
3631	// group; it is invalid on any other limit. If this field is not set,
3632	// it
3633	// defaults to 0, indicating that there is no free tier for this
3634	// service.
3635	//
3636	// Used by group-based quotas only.
3637	FreeTier int64 `json:"freeTier,omitempty,string"`
3638
3639	// MaxLimit: Maximum number of tokens that can be consumed during the
3640	// specified
3641	// duration. Client application developers can override the default
3642	// limit up
3643	// to this maximum. If specified, this value cannot be set to a value
3644	// less
3645	// than the default limit. If not specified, it is set to the default
3646	// limit.
3647	//
3648	// To allow clients to apply overrides with no upper bound, set this to
3649	// -1,
3650	// indicating unlimited maximum quota.
3651	//
3652	// Used by group-based quotas only.
3653	MaxLimit int64 `json:"maxLimit,omitempty,string"`
3654
3655	// Metric: The name of the metric this quota limit applies to. The quota
3656	// limits with
3657	// the same metric will be checked together during runtime. The metric
3658	// must be
3659	// defined within the service config.
3660	Metric string `json:"metric,omitempty"`
3661
3662	// Name: Name of the quota limit.
3663	//
3664	// The name must be provided, and it must be unique within the service.
3665	// The
3666	// name can only include alphanumeric characters as well as '-'.
3667	//
3668	// The maximum length of the limit name is 64 characters.
3669	Name string `json:"name,omitempty"`
3670
3671	// Unit: Specify the unit of the quota limit. It uses the same syntax
3672	// as
3673	// Metric.unit. The supported unit kinds are determined by the
3674	// quota
3675	// backend system.
3676	//
3677	// Here are some examples:
3678	// * "1/min/{project}" for quota per minute per project.
3679	//
3680	// Note: the order of unit components is insignificant.
3681	// The "1" at the beginning is required to follow the metric unit
3682	// syntax.
3683	Unit string `json:"unit,omitempty"`
3684
3685	// Values: Tiered limit values. You must specify this as a key:value
3686	// pair, with an
3687	// integer value that is the maximum number of requests allowed for
3688	// the
3689	// specified unit. Currently only STANDARD is supported.
3690	Values map[string]string `json:"values,omitempty"`
3691
3692	// ForceSendFields is a list of field names (e.g. "DefaultLimit") to
3693	// unconditionally include in API requests. By default, fields with
3694	// empty values are omitted from API requests. However, any non-pointer,
3695	// non-interface field appearing in ForceSendFields will be sent to the
3696	// server regardless of whether the field is empty or not. This may be
3697	// used to include empty fields in Patch requests.
3698	ForceSendFields []string `json:"-"`
3699
3700	// NullFields is a list of field names (e.g. "DefaultLimit") to include
3701	// in API requests with the JSON null value. By default, fields with
3702	// empty values are omitted from API requests. However, any field with
3703	// an empty value appearing in NullFields will be sent to the server as
3704	// null. It is an error if a field in this list has a non-empty value.
3705	// This may be used to include null fields in Patch requests.
3706	NullFields []string `json:"-"`
3707}
3708
3709func (s *QuotaLimit) MarshalJSON() ([]byte, error) {
3710	type NoMethod QuotaLimit
3711	raw := NoMethod(*s)
3712	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3713}
3714
3715// Range: Represents a found unused range.
3716type Range struct {
3717	// IpCidrRange: CIDR range in "10.x.x.x/y" format that is within
3718	// the
3719	// allocated ranges and currently unused.
3720	IpCidrRange string `json:"ipCidrRange,omitempty"`
3721
3722	// Network: In the Shared VPC host project, the VPC network that's
3723	// peered with the
3724	// consumer network. For
3725	// example:
3726	// `projects/1234321/global/networks/host-network`
3727	Network string `json:"network,omitempty"`
3728
3729	// ForceSendFields is a list of field names (e.g. "IpCidrRange") to
3730	// unconditionally include in API requests. By default, fields with
3731	// empty values are omitted from API requests. However, any non-pointer,
3732	// non-interface field appearing in ForceSendFields will be sent to the
3733	// server regardless of whether the field is empty or not. This may be
3734	// used to include empty fields in Patch requests.
3735	ForceSendFields []string `json:"-"`
3736
3737	// NullFields is a list of field names (e.g. "IpCidrRange") to include
3738	// in API requests with the JSON null value. By default, fields with
3739	// empty values are omitted from API requests. However, any field with
3740	// an empty value appearing in NullFields will be sent to the server as
3741	// null. It is an error if a field in this list has a non-empty value.
3742	// This may be used to include null fields in Patch requests.
3743	NullFields []string `json:"-"`
3744}
3745
3746func (s *Range) MarshalJSON() ([]byte, error) {
3747	type NoMethod Range
3748	raw := NoMethod(*s)
3749	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3750}
3751
3752// SearchRangeRequest: Request to search for an unused range within
3753// allocated ranges.
3754type SearchRangeRequest struct {
3755	// IpPrefixLength: Required. The prefix length of the IP range.
3756	// Use usual CIDR range notation.
3757	// For example, '30' to find unused x.x.x.x/30 CIDR range.
3758	// Actual range will be determined using allocated range for the
3759	// consumer
3760	// peered network and returned in the result.
3761	IpPrefixLength int64 `json:"ipPrefixLength,omitempty"`
3762
3763	// Network: Network name in the consumer project.   This network must
3764	// have been
3765	// already peered with a shared VPC network using
3766	// CreateConnection
3767	// method.
3768	// Must be in a form
3769	// 'projects/{project}/global/networks/{network}'.
3770	// {project} is a project number, as in '12345'
3771	// {network} is network name.
3772	Network string `json:"network,omitempty"`
3773
3774	// ForceSendFields is a list of field names (e.g. "IpPrefixLength") to
3775	// unconditionally include in API requests. By default, fields with
3776	// empty values are omitted from API requests. However, any non-pointer,
3777	// non-interface field appearing in ForceSendFields will be sent to the
3778	// server regardless of whether the field is empty or not. This may be
3779	// used to include empty fields in Patch requests.
3780	ForceSendFields []string `json:"-"`
3781
3782	// NullFields is a list of field names (e.g. "IpPrefixLength") to
3783	// include in API requests with the JSON null value. By default, fields
3784	// with empty values are omitted from API requests. However, any field
3785	// with an empty value appearing in NullFields will be sent to the
3786	// server as null. It is an error if a field in this list has a
3787	// non-empty value. This may be used to include null fields in Patch
3788	// requests.
3789	NullFields []string `json:"-"`
3790}
3791
3792func (s *SearchRangeRequest) MarshalJSON() ([]byte, error) {
3793	type NoMethod SearchRangeRequest
3794	raw := NoMethod(*s)
3795	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3796}
3797
3798// Service: `Service` is the root object of Google service configuration
3799// schema. It
3800// describes basic information about a service, such as the name and
3801// the
3802// title, and delegates other aspects to sub-sections. Each sub-section
3803// is
3804// either a proto message or a repeated proto message that configures
3805// a
3806// specific aspect, such as auth. See each proto message definition for
3807// details.
3808//
3809// Example:
3810//
3811//     type: google.api.Service
3812//     config_version: 3
3813//     name: calendar.googleapis.com
3814//     title: Google Calendar API
3815//     apis:
3816//     - name: google.calendar.v3.Calendar
3817//     authentication:
3818//       providers:
3819//       - id: google_calendar_auth
3820//         jwks_uri: https://www.googleapis.com/oauth2/v1/certs
3821//         issuer: https://securetoken.google.com
3822//       rules:
3823//       - selector: "*"
3824//         requirements:
3825//           provider_id: google_calendar_auth
3826type Service struct {
3827	// Apis: A list of API interfaces exported by this service. Only the
3828	// `name` field
3829	// of the google.protobuf.Api needs to be provided by the
3830	// configuration
3831	// author, as the remaining fields will be derived from the IDL during
3832	// the
3833	// normalization process. It is an error to specify an API interface
3834	// here
3835	// which cannot be resolved against the associated IDL files.
3836	Apis []*Api `json:"apis,omitempty"`
3837
3838	// Authentication: Auth configuration.
3839	Authentication *Authentication `json:"authentication,omitempty"`
3840
3841	// Backend: API backend configuration.
3842	Backend *Backend `json:"backend,omitempty"`
3843
3844	// Billing: Billing configuration.
3845	Billing *Billing `json:"billing,omitempty"`
3846
3847	// ConfigVersion: The semantic version of the service configuration. The
3848	// config version
3849	// affects the interpretation of the service configuration. For
3850	// example,
3851	// certain features are enabled by default for certain config
3852	// versions.
3853	// The latest config version is `3`.
3854	ConfigVersion int64 `json:"configVersion,omitempty"`
3855
3856	// Context: Context configuration.
3857	Context *Context `json:"context,omitempty"`
3858
3859	// Control: Configuration for the service control plane.
3860	Control *Control `json:"control,omitempty"`
3861
3862	// CustomError: Custom error configuration.
3863	CustomError *CustomError `json:"customError,omitempty"`
3864
3865	// Documentation: Additional API documentation.
3866	Documentation *Documentation `json:"documentation,omitempty"`
3867
3868	// Endpoints: Configuration for network endpoints.  If this is empty,
3869	// then an endpoint
3870	// with the same name as the service is automatically generated to
3871	// service all
3872	// defined APIs.
3873	Endpoints []*Endpoint `json:"endpoints,omitempty"`
3874
3875	// Enums: A list of all enum types included in this API service.
3876	// Enums
3877	// referenced directly or indirectly by the `apis` are
3878	// automatically
3879	// included.  Enums which are not referenced but shall be
3880	// included
3881	// should be listed here by name. Example:
3882	//
3883	//     enums:
3884	//     - name: google.someapi.v1.SomeEnum
3885	Enums []*Enum `json:"enums,omitempty"`
3886
3887	// Http: HTTP configuration.
3888	Http *Http `json:"http,omitempty"`
3889
3890	// Id: A unique ID for a specific instance of this message, typically
3891	// assigned
3892	// by the client for tracking purpose. Must be no longer than 63
3893	// characters
3894	// and only lower case letters, digits, '.', '_' and '-' are allowed.
3895	// If
3896	// empty, the server may choose to generate one instead.
3897	Id string `json:"id,omitempty"`
3898
3899	// Logging: Logging configuration.
3900	Logging *Logging `json:"logging,omitempty"`
3901
3902	// Logs: Defines the logs used by this service.
3903	Logs []*LogDescriptor `json:"logs,omitempty"`
3904
3905	// Metrics: Defines the metrics used by this service.
3906	Metrics []*MetricDescriptor `json:"metrics,omitempty"`
3907
3908	// MonitoredResources: Defines the monitored resources used by this
3909	// service. This is required
3910	// by the Service.monitoring and Service.logging configurations.
3911	MonitoredResources []*MonitoredResourceDescriptor `json:"monitoredResources,omitempty"`
3912
3913	// Monitoring: Monitoring configuration.
3914	Monitoring *Monitoring `json:"monitoring,omitempty"`
3915
3916	// Name: The service name, which is a DNS-like logical identifier for
3917	// the
3918	// service, such as `calendar.googleapis.com`. The service
3919	// name
3920	// typically goes through DNS verification to make sure the owner
3921	// of the service also owns the DNS name.
3922	Name string `json:"name,omitempty"`
3923
3924	// ProducerProjectId: The Google project that owns this service.
3925	ProducerProjectId string `json:"producerProjectId,omitempty"`
3926
3927	// Quota: Quota configuration.
3928	Quota *Quota `json:"quota,omitempty"`
3929
3930	// SourceInfo: Output only. The source information for this
3931	// configuration if available.
3932	SourceInfo *SourceInfo `json:"sourceInfo,omitempty"`
3933
3934	// SystemParameters: System parameter configuration.
3935	SystemParameters *SystemParameters `json:"systemParameters,omitempty"`
3936
3937	// SystemTypes: A list of all proto message types included in this API
3938	// service.
3939	// It serves similar purpose as [google.api.Service.types], except
3940	// that
3941	// these types are not needed by user-defined APIs. Therefore, they will
3942	// not
3943	// show up in the generated discovery doc. This field should only be
3944	// used
3945	// to define system APIs in ESF.
3946	SystemTypes []*Type `json:"systemTypes,omitempty"`
3947
3948	// Title: The product title for this service.
3949	Title string `json:"title,omitempty"`
3950
3951	// Types: A list of all proto message types included in this API
3952	// service.
3953	// Types referenced directly or indirectly by the `apis`
3954	// are
3955	// automatically included.  Messages which are not referenced but
3956	// shall be included, such as types used by the `google.protobuf.Any`
3957	// type,
3958	// should be listed here by name. Example:
3959	//
3960	//     types:
3961	//     - name: google.protobuf.Int32
3962	Types []*Type `json:"types,omitempty"`
3963
3964	// Usage: Configuration controlling usage of this service.
3965	Usage *Usage `json:"usage,omitempty"`
3966
3967	// ForceSendFields is a list of field names (e.g. "Apis") to
3968	// unconditionally include in API requests. By default, fields with
3969	// empty values are omitted from API requests. However, any non-pointer,
3970	// non-interface field appearing in ForceSendFields will be sent to the
3971	// server regardless of whether the field is empty or not. This may be
3972	// used to include empty fields in Patch requests.
3973	ForceSendFields []string `json:"-"`
3974
3975	// NullFields is a list of field names (e.g. "Apis") to include in API
3976	// requests with the JSON null value. By default, fields with empty
3977	// values are omitted from API requests. However, any field with an
3978	// empty value appearing in NullFields will be sent to the server as
3979	// null. It is an error if a field in this list has a non-empty value.
3980	// This may be used to include null fields in Patch requests.
3981	NullFields []string `json:"-"`
3982}
3983
3984func (s *Service) MarshalJSON() ([]byte, error) {
3985	type NoMethod Service
3986	raw := NoMethod(*s)
3987	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3988}
3989
3990// SourceContext: `SourceContext` represents information about the
3991// source of a
3992// protobuf element, like the file in which it is defined.
3993type SourceContext struct {
3994	// FileName: The path-qualified name of the .proto file that contained
3995	// the associated
3996	// protobuf element.  For example:
3997	// "google/protobuf/source_context.proto".
3998	FileName string `json:"fileName,omitempty"`
3999
4000	// ForceSendFields is a list of field names (e.g. "FileName") to
4001	// unconditionally include in API requests. By default, fields with
4002	// empty values are omitted from API requests. However, any non-pointer,
4003	// non-interface field appearing in ForceSendFields will be sent to the
4004	// server regardless of whether the field is empty or not. This may be
4005	// used to include empty fields in Patch requests.
4006	ForceSendFields []string `json:"-"`
4007
4008	// NullFields is a list of field names (e.g. "FileName") to include in
4009	// API requests with the JSON null value. By default, fields with empty
4010	// values are omitted from API requests. However, any field with an
4011	// empty value appearing in NullFields will be sent to the server as
4012	// null. It is an error if a field in this list has a non-empty value.
4013	// This may be used to include null fields in Patch requests.
4014	NullFields []string `json:"-"`
4015}
4016
4017func (s *SourceContext) MarshalJSON() ([]byte, error) {
4018	type NoMethod SourceContext
4019	raw := NoMethod(*s)
4020	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4021}
4022
4023// SourceInfo: Source information used to create a Service Config
4024type SourceInfo struct {
4025	// SourceFiles: All files used during config generation.
4026	SourceFiles []googleapi.RawMessage `json:"sourceFiles,omitempty"`
4027
4028	// ForceSendFields is a list of field names (e.g. "SourceFiles") to
4029	// unconditionally include in API requests. By default, fields with
4030	// empty values are omitted from API requests. However, any non-pointer,
4031	// non-interface field appearing in ForceSendFields will be sent to the
4032	// server regardless of whether the field is empty or not. This may be
4033	// used to include empty fields in Patch requests.
4034	ForceSendFields []string `json:"-"`
4035
4036	// NullFields is a list of field names (e.g. "SourceFiles") to include
4037	// in API requests with the JSON null value. By default, fields with
4038	// empty values are omitted from API requests. However, any field with
4039	// an empty value appearing in NullFields will be sent to the server as
4040	// null. It is an error if a field in this list has a non-empty value.
4041	// This may be used to include null fields in Patch requests.
4042	NullFields []string `json:"-"`
4043}
4044
4045func (s *SourceInfo) MarshalJSON() ([]byte, error) {
4046	type NoMethod SourceInfo
4047	raw := NoMethod(*s)
4048	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4049}
4050
4051// Status: The `Status` type defines a logical error model that is
4052// suitable for
4053// different programming environments, including REST APIs and RPC APIs.
4054// It is
4055// used by [gRPC](https://github.com/grpc). Each `Status` message
4056// contains
4057// three pieces of data: error code, error message, and error
4058// details.
4059//
4060// You can find out more about this error model and how to work with it
4061// in the
4062// [API Design Guide](https://cloud.google.com/apis/design/errors).
4063type Status struct {
4064	// Code: The status code, which should be an enum value of
4065	// google.rpc.Code.
4066	Code int64 `json:"code,omitempty"`
4067
4068	// Details: A list of messages that carry the error details.  There is a
4069	// common set of
4070	// message types for APIs to use.
4071	Details []googleapi.RawMessage `json:"details,omitempty"`
4072
4073	// Message: A developer-facing error message, which should be in
4074	// English. Any
4075	// user-facing error message should be localized and sent in
4076	// the
4077	// google.rpc.Status.details field, or localized by the client.
4078	Message string `json:"message,omitempty"`
4079
4080	// ForceSendFields is a list of field names (e.g. "Code") to
4081	// unconditionally include in API requests. By default, fields with
4082	// empty values are omitted from API requests. However, any non-pointer,
4083	// non-interface field appearing in ForceSendFields will be sent to the
4084	// server regardless of whether the field is empty or not. This may be
4085	// used to include empty fields in Patch requests.
4086	ForceSendFields []string `json:"-"`
4087
4088	// NullFields is a list of field names (e.g. "Code") to include in API
4089	// requests with the JSON null value. By default, fields with empty
4090	// values are omitted from API requests. However, any field with an
4091	// empty value appearing in NullFields will be sent to the server as
4092	// null. It is an error if a field in this list has a non-empty value.
4093	// This may be used to include null fields in Patch requests.
4094	NullFields []string `json:"-"`
4095}
4096
4097func (s *Status) MarshalJSON() ([]byte, error) {
4098	type NoMethod Status
4099	raw := NoMethod(*s)
4100	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4101}
4102
4103// Subnetwork: Represents a subnet that was created or discovered by a
4104// private access
4105// management service.
4106type Subnetwork struct {
4107	// IpCidrRange: Subnetwork CIDR range in `10.x.x.x/y` format.
4108	IpCidrRange string `json:"ipCidrRange,omitempty"`
4109
4110	// Name: Subnetwork name.
4111	// See https://cloud.google.com/compute/docs/vpc/
4112	Name string `json:"name,omitempty"`
4113
4114	// Network: In the Shared VPC host project, the VPC network that's
4115	// peered with the
4116	// consumer network. For
4117	// example:
4118	// `projects/1234321/global/networks/host-network`
4119	Network string `json:"network,omitempty"`
4120
4121	// OutsideAllocation: This is a discovered subnet that is not within the
4122	// current consumer
4123	// allocated ranges.
4124	OutsideAllocation bool `json:"outsideAllocation,omitempty"`
4125
4126	// ForceSendFields is a list of field names (e.g. "IpCidrRange") to
4127	// unconditionally include in API requests. By default, fields with
4128	// empty values are omitted from API requests. However, any non-pointer,
4129	// non-interface field appearing in ForceSendFields will be sent to the
4130	// server regardless of whether the field is empty or not. This may be
4131	// used to include empty fields in Patch requests.
4132	ForceSendFields []string `json:"-"`
4133
4134	// NullFields is a list of field names (e.g. "IpCidrRange") to include
4135	// in API requests with the JSON null value. By default, fields with
4136	// empty values are omitted from API requests. However, any field with
4137	// an empty value appearing in NullFields will be sent to the server as
4138	// null. It is an error if a field in this list has a non-empty value.
4139	// This may be used to include null fields in Patch requests.
4140	NullFields []string `json:"-"`
4141}
4142
4143func (s *Subnetwork) MarshalJSON() ([]byte, error) {
4144	type NoMethod Subnetwork
4145	raw := NoMethod(*s)
4146	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4147}
4148
4149// SystemParameter: Define a parameter's name and location. The
4150// parameter may be passed as either
4151// an HTTP header or a URL query parameter, and if both are passed the
4152// behavior
4153// is implementation-dependent.
4154type SystemParameter struct {
4155	// HttpHeader: Define the HTTP header name to use for the parameter. It
4156	// is case
4157	// insensitive.
4158	HttpHeader string `json:"httpHeader,omitempty"`
4159
4160	// Name: Define the name of the parameter, such as "api_key" . It is
4161	// case sensitive.
4162	Name string `json:"name,omitempty"`
4163
4164	// UrlQueryParameter: Define the URL query parameter name to use for the
4165	// parameter. It is case
4166	// sensitive.
4167	UrlQueryParameter string `json:"urlQueryParameter,omitempty"`
4168
4169	// ForceSendFields is a list of field names (e.g. "HttpHeader") to
4170	// unconditionally include in API requests. By default, fields with
4171	// empty values are omitted from API requests. However, any non-pointer,
4172	// non-interface field appearing in ForceSendFields will be sent to the
4173	// server regardless of whether the field is empty or not. This may be
4174	// used to include empty fields in Patch requests.
4175	ForceSendFields []string `json:"-"`
4176
4177	// NullFields is a list of field names (e.g. "HttpHeader") to include in
4178	// API requests with the JSON null value. By default, fields with empty
4179	// values are omitted from API requests. However, any field with an
4180	// empty value appearing in NullFields will be sent to the server as
4181	// null. It is an error if a field in this list has a non-empty value.
4182	// This may be used to include null fields in Patch requests.
4183	NullFields []string `json:"-"`
4184}
4185
4186func (s *SystemParameter) MarshalJSON() ([]byte, error) {
4187	type NoMethod SystemParameter
4188	raw := NoMethod(*s)
4189	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4190}
4191
4192// SystemParameterRule: Define a system parameter rule mapping system
4193// parameter definitions to
4194// methods.
4195type SystemParameterRule struct {
4196	// Parameters: Define parameters. Multiple names may be defined for a
4197	// parameter.
4198	// For a given method call, only one of them should be used. If
4199	// multiple
4200	// names are used the behavior is implementation-dependent.
4201	// If none of the specified names are present the behavior
4202	// is
4203	// parameter-dependent.
4204	Parameters []*SystemParameter `json:"parameters,omitempty"`
4205
4206	// Selector: Selects the methods to which this rule applies. Use '*' to
4207	// indicate all
4208	// methods in all APIs.
4209	//
4210	// Refer to selector for syntax details.
4211	Selector string `json:"selector,omitempty"`
4212
4213	// ForceSendFields is a list of field names (e.g. "Parameters") to
4214	// unconditionally include in API requests. By default, fields with
4215	// empty values are omitted from API requests. However, any non-pointer,
4216	// non-interface field appearing in ForceSendFields will be sent to the
4217	// server regardless of whether the field is empty or not. This may be
4218	// used to include empty fields in Patch requests.
4219	ForceSendFields []string `json:"-"`
4220
4221	// NullFields is a list of field names (e.g. "Parameters") to include in
4222	// API requests with the JSON null value. By default, fields with empty
4223	// values are omitted from API requests. However, any field with an
4224	// empty value appearing in NullFields will be sent to the server as
4225	// null. It is an error if a field in this list has a non-empty value.
4226	// This may be used to include null fields in Patch requests.
4227	NullFields []string `json:"-"`
4228}
4229
4230func (s *SystemParameterRule) MarshalJSON() ([]byte, error) {
4231	type NoMethod SystemParameterRule
4232	raw := NoMethod(*s)
4233	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4234}
4235
4236// SystemParameters: ### System parameter configuration
4237//
4238// A system parameter is a special kind of parameter defined by the
4239// API
4240// system, not by an individual API. It is typically mapped to an HTTP
4241// header
4242// and/or a URL query parameter. This configuration specifies which
4243// methods
4244// change the names of the system parameters.
4245type SystemParameters struct {
4246	// Rules: Define system parameters.
4247	//
4248	// The parameters defined here will override the default
4249	// parameters
4250	// implemented by the system. If this field is missing from the
4251	// service
4252	// config, default system parameters will be used. Default system
4253	// parameters
4254	// and names is implementation-dependent.
4255	//
4256	// Example: define api key for all methods
4257	//
4258	//     system_parameters
4259	//       rules:
4260	//         - selector: "*"
4261	//           parameters:
4262	//             - name: api_key
4263	//               url_query_parameter: api_key
4264	//
4265	//
4266	// Example: define 2 api key names for a specific method.
4267	//
4268	//     system_parameters
4269	//       rules:
4270	//         - selector: "/ListShelves"
4271	//           parameters:
4272	//             - name: api_key
4273	//               http_header: Api-Key1
4274	//             - name: api_key
4275	//               http_header: Api-Key2
4276	//
4277	// **NOTE:** All service configuration rules follow "last one wins"
4278	// order.
4279	Rules []*SystemParameterRule `json:"rules,omitempty"`
4280
4281	// ForceSendFields is a list of field names (e.g. "Rules") to
4282	// unconditionally include in API requests. By default, fields with
4283	// empty values are omitted from API requests. However, any non-pointer,
4284	// non-interface field appearing in ForceSendFields will be sent to the
4285	// server regardless of whether the field is empty or not. This may be
4286	// used to include empty fields in Patch requests.
4287	ForceSendFields []string `json:"-"`
4288
4289	// NullFields is a list of field names (e.g. "Rules") to include in API
4290	// requests with the JSON null value. By default, fields with empty
4291	// values are omitted from API requests. However, any field with an
4292	// empty value appearing in NullFields will be sent to the server as
4293	// null. It is an error if a field in this list has a non-empty value.
4294	// This may be used to include null fields in Patch requests.
4295	NullFields []string `json:"-"`
4296}
4297
4298func (s *SystemParameters) MarshalJSON() ([]byte, error) {
4299	type NoMethod SystemParameters
4300	raw := NoMethod(*s)
4301	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4302}
4303
4304// Type: A protocol buffer message type.
4305type Type struct {
4306	// Fields: The list of fields.
4307	Fields []*Field `json:"fields,omitempty"`
4308
4309	// Name: The fully qualified message name.
4310	Name string `json:"name,omitempty"`
4311
4312	// Oneofs: The list of types appearing in `oneof` definitions in this
4313	// type.
4314	Oneofs []string `json:"oneofs,omitempty"`
4315
4316	// Options: The protocol buffer options.
4317	Options []*Option `json:"options,omitempty"`
4318
4319	// SourceContext: The source context.
4320	SourceContext *SourceContext `json:"sourceContext,omitempty"`
4321
4322	// Syntax: The source syntax.
4323	//
4324	// Possible values:
4325	//   "SYNTAX_PROTO2" - Syntax `proto2`.
4326	//   "SYNTAX_PROTO3" - Syntax `proto3`.
4327	Syntax string `json:"syntax,omitempty"`
4328
4329	// ForceSendFields is a list of field names (e.g. "Fields") to
4330	// unconditionally include in API requests. By default, fields with
4331	// empty values are omitted from API requests. However, any non-pointer,
4332	// non-interface field appearing in ForceSendFields will be sent to the
4333	// server regardless of whether the field is empty or not. This may be
4334	// used to include empty fields in Patch requests.
4335	ForceSendFields []string `json:"-"`
4336
4337	// NullFields is a list of field names (e.g. "Fields") to include in API
4338	// requests with the JSON null value. By default, fields with empty
4339	// values are omitted from API requests. However, any field with an
4340	// empty value appearing in NullFields will be sent to the server as
4341	// null. It is an error if a field in this list has a non-empty value.
4342	// This may be used to include null fields in Patch requests.
4343	NullFields []string `json:"-"`
4344}
4345
4346func (s *Type) MarshalJSON() ([]byte, error) {
4347	type NoMethod Type
4348	raw := NoMethod(*s)
4349	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4350}
4351
4352// Usage: Configuration controlling usage of a service.
4353type Usage struct {
4354	// ProducerNotificationChannel: The full resource name of a channel used
4355	// for sending notifications to the
4356	// service producer.
4357	//
4358	// Google Service Management currently only supports
4359	// [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a
4360	// notification
4361	// channel. To use Google Cloud Pub/Sub as the channel, this must be the
4362	// name
4363	// of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name
4364	// format
4365	// documented in https://cloud.google.com/pubsub/docs/overview.
4366	ProducerNotificationChannel string `json:"producerNotificationChannel,omitempty"`
4367
4368	// Requirements: Requirements that must be satisfied before a consumer
4369	// project can use the
4370	// service. Each requirement is of the form
4371	// <service.name>/<requirement-id>;
4372	// for example 'serviceusage.googleapis.com/billing-enabled'.
4373	Requirements []string `json:"requirements,omitempty"`
4374
4375	// Rules: A list of usage rules that apply to individual API
4376	// methods.
4377	//
4378	// **NOTE:** All service configuration rules follow "last one wins"
4379	// order.
4380	Rules []*UsageRule `json:"rules,omitempty"`
4381
4382	// ForceSendFields is a list of field names (e.g.
4383	// "ProducerNotificationChannel") to unconditionally include in API
4384	// requests. By default, fields with empty values are omitted from API
4385	// requests. However, any non-pointer, non-interface field appearing in
4386	// ForceSendFields will be sent to the server regardless of whether the
4387	// field is empty or not. This may be used to include empty fields in
4388	// Patch requests.
4389	ForceSendFields []string `json:"-"`
4390
4391	// NullFields is a list of field names (e.g.
4392	// "ProducerNotificationChannel") to include in API requests with the
4393	// JSON null value. By default, fields with empty values are omitted
4394	// from API requests. However, any field with an empty value appearing
4395	// in NullFields will be sent to the server as null. It is an error if a
4396	// field in this list has a non-empty value. This may be used to include
4397	// null fields in Patch requests.
4398	NullFields []string `json:"-"`
4399}
4400
4401func (s *Usage) MarshalJSON() ([]byte, error) {
4402	type NoMethod Usage
4403	raw := NoMethod(*s)
4404	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4405}
4406
4407// UsageRule: Usage configuration rules for the service.
4408//
4409// NOTE: Under development.
4410//
4411//
4412// Use this rule to configure unregistered calls for the service.
4413// Unregistered
4414// calls are calls that do not contain consumer project
4415// identity.
4416// (Example: calls that do not contain an API key).
4417// By default, API methods do not allow unregistered calls, and each
4418// method call
4419// must be identified by a consumer project identity. Use this rule
4420// to
4421// allow/disallow unregistered calls.
4422//
4423// Example of an API that wants to allow unregistered calls for entire
4424// service.
4425//
4426//     usage:
4427//       rules:
4428//       - selector: "*"
4429//         allow_unregistered_calls: true
4430//
4431// Example of a method that wants to allow unregistered calls.
4432//
4433//     usage:
4434//       rules:
4435//       - selector:
4436// "google.example.library.v1.LibraryService.CreateBook"
4437//         allow_unregistered_calls: true
4438type UsageRule struct {
4439	// AllowUnregisteredCalls: If true, the selected method allows
4440	// unregistered calls, e.g. calls
4441	// that don't identify any user or application.
4442	AllowUnregisteredCalls bool `json:"allowUnregisteredCalls,omitempty"`
4443
4444	// Selector: Selects the methods to which this rule applies. Use '*' to
4445	// indicate all
4446	// methods in all APIs.
4447	//
4448	// Refer to selector for syntax details.
4449	Selector string `json:"selector,omitempty"`
4450
4451	// SkipServiceControl: If true, the selected method should skip service
4452	// control and the control
4453	// plane features, such as quota and billing, will not be
4454	// available.
4455	// This flag is used by Google Cloud Endpoints to bypass checks for
4456	// internal
4457	// methods, such as service health check methods.
4458	SkipServiceControl bool `json:"skipServiceControl,omitempty"`
4459
4460	// ForceSendFields is a list of field names (e.g.
4461	// "AllowUnregisteredCalls") to unconditionally include in API requests.
4462	// By default, fields with empty values are omitted from API requests.
4463	// However, any non-pointer, non-interface field appearing in
4464	// ForceSendFields will be sent to the server regardless of whether the
4465	// field is empty or not. This may be used to include empty fields in
4466	// Patch requests.
4467	ForceSendFields []string `json:"-"`
4468
4469	// NullFields is a list of field names (e.g. "AllowUnregisteredCalls")
4470	// to include in API requests with the JSON null value. By default,
4471	// fields with empty values are omitted from API requests. However, any
4472	// field with an empty value appearing in NullFields will be sent to the
4473	// server as null. It is an error if a field in this list has a
4474	// non-empty value. This may be used to include null fields in Patch
4475	// requests.
4476	NullFields []string `json:"-"`
4477}
4478
4479func (s *UsageRule) MarshalJSON() ([]byte, error) {
4480	type NoMethod UsageRule
4481	raw := NoMethod(*s)
4482	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4483}
4484
4485// method id "servicenetworking.operations.get":
4486
4487type OperationsGetCall struct {
4488	s            *APIService
4489	name         string
4490	urlParams_   gensupport.URLParams
4491	ifNoneMatch_ string
4492	ctx_         context.Context
4493	header_      http.Header
4494}
4495
4496// Get: Gets the latest state of a long-running operation.  Clients can
4497// use this
4498// method to poll the operation result at intervals as recommended by
4499// the API
4500// service.
4501func (r *OperationsService) Get(name string) *OperationsGetCall {
4502	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4503	c.name = name
4504	return c
4505}
4506
4507// Fields allows partial responses to be retrieved. See
4508// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4509// for more information.
4510func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
4511	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4512	return c
4513}
4514
4515// IfNoneMatch sets the optional parameter which makes the operation
4516// fail if the object's ETag matches the given value. This is useful for
4517// getting updates only after the object has changed since the last
4518// request. Use googleapi.IsNotModified to check whether the response
4519// error from Do is the result of In-None-Match.
4520func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
4521	c.ifNoneMatch_ = entityTag
4522	return c
4523}
4524
4525// Context sets the context to be used in this call's Do method. Any
4526// pending HTTP request will be aborted if the provided context is
4527// canceled.
4528func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
4529	c.ctx_ = ctx
4530	return c
4531}
4532
4533// Header returns an http.Header that can be modified by the caller to
4534// add HTTP headers to the request.
4535func (c *OperationsGetCall) Header() http.Header {
4536	if c.header_ == nil {
4537		c.header_ = make(http.Header)
4538	}
4539	return c.header_
4540}
4541
4542func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
4543	reqHeaders := make(http.Header)
4544	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
4545	for k, v := range c.header_ {
4546		reqHeaders[k] = v
4547	}
4548	reqHeaders.Set("User-Agent", c.s.userAgent())
4549	if c.ifNoneMatch_ != "" {
4550		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4551	}
4552	var body io.Reader = nil
4553	c.urlParams_.Set("alt", alt)
4554	c.urlParams_.Set("prettyPrint", "false")
4555	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
4556	urls += "?" + c.urlParams_.Encode()
4557	req, err := http.NewRequest("GET", urls, body)
4558	if err != nil {
4559		return nil, err
4560	}
4561	req.Header = reqHeaders
4562	googleapi.Expand(req.URL, map[string]string{
4563		"name": c.name,
4564	})
4565	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4566}
4567
4568// Do executes the "servicenetworking.operations.get" call.
4569// Exactly one of *Operation or error will be non-nil. Any non-2xx
4570// status code is an error. Response headers are in either
4571// *Operation.ServerResponse.Header or (if a response was returned at
4572// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4573// to check whether the returned error was because
4574// http.StatusNotModified was returned.
4575func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4576	gensupport.SetOptions(c.urlParams_, opts...)
4577	res, err := c.doRequest("json")
4578	if res != nil && res.StatusCode == http.StatusNotModified {
4579		if res.Body != nil {
4580			res.Body.Close()
4581		}
4582		return nil, &googleapi.Error{
4583			Code:   res.StatusCode,
4584			Header: res.Header,
4585		}
4586	}
4587	if err != nil {
4588		return nil, err
4589	}
4590	defer googleapi.CloseBody(res)
4591	if err := googleapi.CheckResponse(res); err != nil {
4592		return nil, err
4593	}
4594	ret := &Operation{
4595		ServerResponse: googleapi.ServerResponse{
4596			Header:         res.Header,
4597			HTTPStatusCode: res.StatusCode,
4598		},
4599	}
4600	target := &ret
4601	if err := gensupport.DecodeResponse(target, res); err != nil {
4602		return nil, err
4603	}
4604	return ret, nil
4605	// {
4606	//   "description": "Gets the latest state of a long-running operation.  Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
4607	//   "flatPath": "v1beta/operations/{operationsId}",
4608	//   "httpMethod": "GET",
4609	//   "id": "servicenetworking.operations.get",
4610	//   "parameterOrder": [
4611	//     "name"
4612	//   ],
4613	//   "parameters": {
4614	//     "name": {
4615	//       "description": "The name of the operation resource.",
4616	//       "location": "path",
4617	//       "pattern": "^operations/[^/]+$",
4618	//       "required": true,
4619	//       "type": "string"
4620	//     }
4621	//   },
4622	//   "path": "v1beta/{+name}",
4623	//   "response": {
4624	//     "$ref": "Operation"
4625	//   },
4626	//   "scopes": [
4627	//     "https://www.googleapis.com/auth/cloud-platform",
4628	//     "https://www.googleapis.com/auth/service.management"
4629	//   ]
4630	// }
4631
4632}
4633
4634// method id "servicenetworking.services.addSubnetwork":
4635
4636type ServicesAddSubnetworkCall struct {
4637	s                    *APIService
4638	parent               string
4639	addsubnetworkrequest *AddSubnetworkRequest
4640	urlParams_           gensupport.URLParams
4641	ctx_                 context.Context
4642	header_              http.Header
4643}
4644
4645// AddSubnetwork: For service producers, provisions a new subnet in
4646// a
4647// peered service's shared VPC network in the requested region and with
4648// the
4649// requested size that's expressed as a CIDR range (number of leading
4650// bits of
4651// ipV4 network mask). The method checks against the assigned allocated
4652// ranges
4653// to find a non-conflicting IP address range. The method will reuse a
4654// subnet
4655// if subsequent calls contain the same subnet name, region, and
4656// prefix
4657// length. This method will make producer's tenant project to be a
4658// shared VPC
4659// service project as needed. The response from the `get` operation will
4660// be of
4661// type `Subnetwork` if the operation successfully completes.
4662func (r *ServicesService) AddSubnetwork(parent string, addsubnetworkrequest *AddSubnetworkRequest) *ServicesAddSubnetworkCall {
4663	c := &ServicesAddSubnetworkCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4664	c.parent = parent
4665	c.addsubnetworkrequest = addsubnetworkrequest
4666	return c
4667}
4668
4669// Fields allows partial responses to be retrieved. See
4670// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4671// for more information.
4672func (c *ServicesAddSubnetworkCall) Fields(s ...googleapi.Field) *ServicesAddSubnetworkCall {
4673	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4674	return c
4675}
4676
4677// Context sets the context to be used in this call's Do method. Any
4678// pending HTTP request will be aborted if the provided context is
4679// canceled.
4680func (c *ServicesAddSubnetworkCall) Context(ctx context.Context) *ServicesAddSubnetworkCall {
4681	c.ctx_ = ctx
4682	return c
4683}
4684
4685// Header returns an http.Header that can be modified by the caller to
4686// add HTTP headers to the request.
4687func (c *ServicesAddSubnetworkCall) Header() http.Header {
4688	if c.header_ == nil {
4689		c.header_ = make(http.Header)
4690	}
4691	return c.header_
4692}
4693
4694func (c *ServicesAddSubnetworkCall) doRequest(alt string) (*http.Response, error) {
4695	reqHeaders := make(http.Header)
4696	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
4697	for k, v := range c.header_ {
4698		reqHeaders[k] = v
4699	}
4700	reqHeaders.Set("User-Agent", c.s.userAgent())
4701	var body io.Reader = nil
4702	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addsubnetworkrequest)
4703	if err != nil {
4704		return nil, err
4705	}
4706	reqHeaders.Set("Content-Type", "application/json")
4707	c.urlParams_.Set("alt", alt)
4708	c.urlParams_.Set("prettyPrint", "false")
4709	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:addSubnetwork")
4710	urls += "?" + c.urlParams_.Encode()
4711	req, err := http.NewRequest("POST", urls, body)
4712	if err != nil {
4713		return nil, err
4714	}
4715	req.Header = reqHeaders
4716	googleapi.Expand(req.URL, map[string]string{
4717		"parent": c.parent,
4718	})
4719	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4720}
4721
4722// Do executes the "servicenetworking.services.addSubnetwork" call.
4723// Exactly one of *Operation or error will be non-nil. Any non-2xx
4724// status code is an error. Response headers are in either
4725// *Operation.ServerResponse.Header or (if a response was returned at
4726// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4727// to check whether the returned error was because
4728// http.StatusNotModified was returned.
4729func (c *ServicesAddSubnetworkCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4730	gensupport.SetOptions(c.urlParams_, opts...)
4731	res, err := c.doRequest("json")
4732	if res != nil && res.StatusCode == http.StatusNotModified {
4733		if res.Body != nil {
4734			res.Body.Close()
4735		}
4736		return nil, &googleapi.Error{
4737			Code:   res.StatusCode,
4738			Header: res.Header,
4739		}
4740	}
4741	if err != nil {
4742		return nil, err
4743	}
4744	defer googleapi.CloseBody(res)
4745	if err := googleapi.CheckResponse(res); err != nil {
4746		return nil, err
4747	}
4748	ret := &Operation{
4749		ServerResponse: googleapi.ServerResponse{
4750			Header:         res.Header,
4751			HTTPStatusCode: res.StatusCode,
4752		},
4753	}
4754	target := &ret
4755	if err := gensupport.DecodeResponse(target, res); err != nil {
4756		return nil, err
4757	}
4758	return ret, nil
4759	// {
4760	//   "description": "For service producers, provisions a new subnet in a\npeered service's shared VPC network in the requested region and with the\nrequested size that's expressed as a CIDR range (number of leading bits of\nipV4 network mask). The method checks against the assigned allocated ranges\nto find a non-conflicting IP address range. The method will reuse a subnet\nif subsequent calls contain the same subnet name, region, and prefix\nlength. This method will make producer's tenant project to be a shared VPC\nservice project as needed. The response from the `get` operation will be of\ntype `Subnetwork` if the operation successfully completes.",
4761	//   "flatPath": "v1beta/services/{servicesId}/{servicesId1}/{servicesId2}:addSubnetwork",
4762	//   "httpMethod": "POST",
4763	//   "id": "servicenetworking.services.addSubnetwork",
4764	//   "parameterOrder": [
4765	//     "parent"
4766	//   ],
4767	//   "parameters": {
4768	//     "parent": {
4769	//       "description": "Required. A tenant project in the service producer organization, in the\nfollowing format: services/{service}/{collection-id}/{resource-id}.\n{collection-id} is the cloud resource collection type that represents the\ntenant project. Only `projects` are supported.\n{resource-id} is the tenant project numeric id, such as\n`123456`. {service} the name of the peering service, such as\n`service-peering.example.com`. This service must already be\nenabled in the service consumer's project.",
4770	//       "location": "path",
4771	//       "pattern": "^services/[^/]+/[^/]+/[^/]+$",
4772	//       "required": true,
4773	//       "type": "string"
4774	//     }
4775	//   },
4776	//   "path": "v1beta/{+parent}:addSubnetwork",
4777	//   "request": {
4778	//     "$ref": "AddSubnetworkRequest"
4779	//   },
4780	//   "response": {
4781	//     "$ref": "Operation"
4782	//   },
4783	//   "scopes": [
4784	//     "https://www.googleapis.com/auth/cloud-platform",
4785	//     "https://www.googleapis.com/auth/service.management"
4786	//   ]
4787	// }
4788
4789}
4790
4791// method id "servicenetworking.services.searchRange":
4792
4793type ServicesSearchRangeCall struct {
4794	s                  *APIService
4795	parent             string
4796	searchrangerequest *SearchRangeRequest
4797	urlParams_         gensupport.URLParams
4798	ctx_               context.Context
4799	header_            http.Header
4800}
4801
4802// SearchRange: Service producers can use this method to find a
4803// currently unused range
4804// within consumer allocated ranges.   This returned range is not
4805// reserved,
4806// and not guaranteed to remain unused.
4807// It will validate previously provided allocated ranges,
4808// find
4809// non-conflicting sub-range of requested size (expressed in
4810// number of leading bits of ipv4 network mask, as in CIDR
4811// range
4812// notation).
4813// Operation<response: Range>
4814func (r *ServicesService) SearchRange(parent string, searchrangerequest *SearchRangeRequest) *ServicesSearchRangeCall {
4815	c := &ServicesSearchRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4816	c.parent = parent
4817	c.searchrangerequest = searchrangerequest
4818	return c
4819}
4820
4821// Fields allows partial responses to be retrieved. See
4822// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4823// for more information.
4824func (c *ServicesSearchRangeCall) Fields(s ...googleapi.Field) *ServicesSearchRangeCall {
4825	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4826	return c
4827}
4828
4829// Context sets the context to be used in this call's Do method. Any
4830// pending HTTP request will be aborted if the provided context is
4831// canceled.
4832func (c *ServicesSearchRangeCall) Context(ctx context.Context) *ServicesSearchRangeCall {
4833	c.ctx_ = ctx
4834	return c
4835}
4836
4837// Header returns an http.Header that can be modified by the caller to
4838// add HTTP headers to the request.
4839func (c *ServicesSearchRangeCall) Header() http.Header {
4840	if c.header_ == nil {
4841		c.header_ = make(http.Header)
4842	}
4843	return c.header_
4844}
4845
4846func (c *ServicesSearchRangeCall) doRequest(alt string) (*http.Response, error) {
4847	reqHeaders := make(http.Header)
4848	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
4849	for k, v := range c.header_ {
4850		reqHeaders[k] = v
4851	}
4852	reqHeaders.Set("User-Agent", c.s.userAgent())
4853	var body io.Reader = nil
4854	body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchrangerequest)
4855	if err != nil {
4856		return nil, err
4857	}
4858	reqHeaders.Set("Content-Type", "application/json")
4859	c.urlParams_.Set("alt", alt)
4860	c.urlParams_.Set("prettyPrint", "false")
4861	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:searchRange")
4862	urls += "?" + c.urlParams_.Encode()
4863	req, err := http.NewRequest("POST", urls, body)
4864	if err != nil {
4865		return nil, err
4866	}
4867	req.Header = reqHeaders
4868	googleapi.Expand(req.URL, map[string]string{
4869		"parent": c.parent,
4870	})
4871	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4872}
4873
4874// Do executes the "servicenetworking.services.searchRange" call.
4875// Exactly one of *Operation or error will be non-nil. Any non-2xx
4876// status code is an error. Response headers are in either
4877// *Operation.ServerResponse.Header or (if a response was returned at
4878// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4879// to check whether the returned error was because
4880// http.StatusNotModified was returned.
4881func (c *ServicesSearchRangeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4882	gensupport.SetOptions(c.urlParams_, opts...)
4883	res, err := c.doRequest("json")
4884	if res != nil && res.StatusCode == http.StatusNotModified {
4885		if res.Body != nil {
4886			res.Body.Close()
4887		}
4888		return nil, &googleapi.Error{
4889			Code:   res.StatusCode,
4890			Header: res.Header,
4891		}
4892	}
4893	if err != nil {
4894		return nil, err
4895	}
4896	defer googleapi.CloseBody(res)
4897	if err := googleapi.CheckResponse(res); err != nil {
4898		return nil, err
4899	}
4900	ret := &Operation{
4901		ServerResponse: googleapi.ServerResponse{
4902			Header:         res.Header,
4903			HTTPStatusCode: res.StatusCode,
4904		},
4905	}
4906	target := &ret
4907	if err := gensupport.DecodeResponse(target, res); err != nil {
4908		return nil, err
4909	}
4910	return ret, nil
4911	// {
4912	//   "description": "Service producers can use this method to find a currently unused range\nwithin consumer allocated ranges.   This returned range is not reserved,\nand not guaranteed to remain unused.\nIt will validate previously provided allocated ranges, find\nnon-conflicting sub-range of requested size (expressed in\nnumber of leading bits of ipv4 network mask, as in CIDR range\nnotation).\nOperation\u003cresponse: Range\u003e",
4913	//   "flatPath": "v1beta/services/{servicesId}:searchRange",
4914	//   "httpMethod": "POST",
4915	//   "id": "servicenetworking.services.searchRange",
4916	//   "parameterOrder": [
4917	//     "parent"
4918	//   ],
4919	//   "parameters": {
4920	//     "parent": {
4921	//       "description": "Required. This is in a form services/{service}.\n{service} the name of the private access management service, for example\n'service-peering.example.com'.",
4922	//       "location": "path",
4923	//       "pattern": "^services/[^/]+$",
4924	//       "required": true,
4925	//       "type": "string"
4926	//     }
4927	//   },
4928	//   "path": "v1beta/{+parent}:searchRange",
4929	//   "request": {
4930	//     "$ref": "SearchRangeRequest"
4931	//   },
4932	//   "response": {
4933	//     "$ref": "Operation"
4934	//   },
4935	//   "scopes": [
4936	//     "https://www.googleapis.com/auth/cloud-platform",
4937	//     "https://www.googleapis.com/auth/service.management"
4938	//   ]
4939	// }
4940
4941}
4942
4943// method id "servicenetworking.services.updateConnections":
4944
4945type ServicesUpdateConnectionsCall struct {
4946	s          *APIService
4947	name       string
4948	connection *Connection
4949	urlParams_ gensupport.URLParams
4950	ctx_       context.Context
4951	header_    http.Header
4952}
4953
4954// UpdateConnections: Updates the allocated ranges that are assigned to
4955// a connection.
4956// The response from the `get` operation will be of type `Connection` if
4957// the
4958// operation successfully completes.
4959func (r *ServicesService) UpdateConnections(name string, connection *Connection) *ServicesUpdateConnectionsCall {
4960	c := &ServicesUpdateConnectionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4961	c.name = name
4962	c.connection = connection
4963	return c
4964}
4965
4966// Force sets the optional parameter "force": If a previously defined
4967// allocated range is removed, force flag must be
4968// set to true.
4969func (c *ServicesUpdateConnectionsCall) Force(force bool) *ServicesUpdateConnectionsCall {
4970	c.urlParams_.Set("force", fmt.Sprint(force))
4971	return c
4972}
4973
4974// UpdateMask sets the optional parameter "updateMask": The update mask.
4975// If this is omitted, it defaults to "*". You can only
4976// update the listed peering ranges.
4977func (c *ServicesUpdateConnectionsCall) UpdateMask(updateMask string) *ServicesUpdateConnectionsCall {
4978	c.urlParams_.Set("updateMask", updateMask)
4979	return c
4980}
4981
4982// Fields allows partial responses to be retrieved. See
4983// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4984// for more information.
4985func (c *ServicesUpdateConnectionsCall) Fields(s ...googleapi.Field) *ServicesUpdateConnectionsCall {
4986	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4987	return c
4988}
4989
4990// Context sets the context to be used in this call's Do method. Any
4991// pending HTTP request will be aborted if the provided context is
4992// canceled.
4993func (c *ServicesUpdateConnectionsCall) Context(ctx context.Context) *ServicesUpdateConnectionsCall {
4994	c.ctx_ = ctx
4995	return c
4996}
4997
4998// Header returns an http.Header that can be modified by the caller to
4999// add HTTP headers to the request.
5000func (c *ServicesUpdateConnectionsCall) Header() http.Header {
5001	if c.header_ == nil {
5002		c.header_ = make(http.Header)
5003	}
5004	return c.header_
5005}
5006
5007func (c *ServicesUpdateConnectionsCall) doRequest(alt string) (*http.Response, error) {
5008	reqHeaders := make(http.Header)
5009	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
5010	for k, v := range c.header_ {
5011		reqHeaders[k] = v
5012	}
5013	reqHeaders.Set("User-Agent", c.s.userAgent())
5014	var body io.Reader = nil
5015	body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection)
5016	if err != nil {
5017		return nil, err
5018	}
5019	reqHeaders.Set("Content-Type", "application/json")
5020	c.urlParams_.Set("alt", alt)
5021	c.urlParams_.Set("prettyPrint", "false")
5022	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/connections")
5023	urls += "?" + c.urlParams_.Encode()
5024	req, err := http.NewRequest("PATCH", urls, body)
5025	if err != nil {
5026		return nil, err
5027	}
5028	req.Header = reqHeaders
5029	googleapi.Expand(req.URL, map[string]string{
5030		"name": c.name,
5031	})
5032	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5033}
5034
5035// Do executes the "servicenetworking.services.updateConnections" call.
5036// Exactly one of *Operation or error will be non-nil. Any non-2xx
5037// status code is an error. Response headers are in either
5038// *Operation.ServerResponse.Header or (if a response was returned at
5039// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5040// to check whether the returned error was because
5041// http.StatusNotModified was returned.
5042func (c *ServicesUpdateConnectionsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5043	gensupport.SetOptions(c.urlParams_, opts...)
5044	res, err := c.doRequest("json")
5045	if res != nil && res.StatusCode == http.StatusNotModified {
5046		if res.Body != nil {
5047			res.Body.Close()
5048		}
5049		return nil, &googleapi.Error{
5050			Code:   res.StatusCode,
5051			Header: res.Header,
5052		}
5053	}
5054	if err != nil {
5055		return nil, err
5056	}
5057	defer googleapi.CloseBody(res)
5058	if err := googleapi.CheckResponse(res); err != nil {
5059		return nil, err
5060	}
5061	ret := &Operation{
5062		ServerResponse: googleapi.ServerResponse{
5063			Header:         res.Header,
5064			HTTPStatusCode: res.StatusCode,
5065		},
5066	}
5067	target := &ret
5068	if err := gensupport.DecodeResponse(target, res); err != nil {
5069		return nil, err
5070	}
5071	return ret, nil
5072	// {
5073	//   "description": "Updates the allocated ranges that are assigned to a connection.\nThe response from the `get` operation will be of type `Connection` if the\noperation successfully completes.",
5074	//   "flatPath": "v1beta/services/{servicesId}/connections",
5075	//   "httpMethod": "PATCH",
5076	//   "id": "servicenetworking.services.updateConnections",
5077	//   "parameterOrder": [
5078	//     "name"
5079	//   ],
5080	//   "parameters": {
5081	//     "force": {
5082	//       "description": "If a previously defined allocated range is removed, force flag must be\nset to true.",
5083	//       "location": "query",
5084	//       "type": "boolean"
5085	//     },
5086	//     "name": {
5087	//       "description": "The service producer peering service that is managing peering connectivity\nfor a service producer organization.\nFor Google services that support this functionality, this is\n`services/servicenetworking.googleapis.com`.",
5088	//       "location": "path",
5089	//       "pattern": "^services/[^/]+$",
5090	//       "required": true,
5091	//       "type": "string"
5092	//     },
5093	//     "updateMask": {
5094	//       "description": "The update mask. If this is omitted, it defaults to \"*\". You can only\nupdate the listed peering ranges.",
5095	//       "format": "google-fieldmask",
5096	//       "location": "query",
5097	//       "type": "string"
5098	//     }
5099	//   },
5100	//   "path": "v1beta/{+name}/connections",
5101	//   "request": {
5102	//     "$ref": "Connection"
5103	//   },
5104	//   "response": {
5105	//     "$ref": "Operation"
5106	//   },
5107	//   "scopes": [
5108	//     "https://www.googleapis.com/auth/cloud-platform",
5109	//     "https://www.googleapis.com/auth/service.management"
5110	//   ]
5111	// }
5112
5113}
5114
5115// method id "servicenetworking.services.connections.create":
5116
5117type ServicesConnectionsCreateCall struct {
5118	s          *APIService
5119	parent     string
5120	connection *Connection
5121	urlParams_ gensupport.URLParams
5122	ctx_       context.Context
5123	header_    http.Header
5124}
5125
5126// Create: Creates a private connection that establishes a VPC Network
5127// Peering
5128// connection to a VPC network in the service producer's
5129// organization.
5130// The administrator of the service consumer's VPC network invokes
5131// this
5132// method. The administrator must assign one or more allocated IP ranges
5133// for
5134// provisioning subnetworks in the service producer's VPC network.
5135// This
5136// connection is used for all supported services in the service
5137// producer's
5138// organization, so it only needs to be invoked once. The response from
5139// the
5140// `get` operation will be of type `Connection` if the operation
5141// successfully
5142// completes.
5143func (r *ServicesConnectionsService) Create(parent string, connection *Connection) *ServicesConnectionsCreateCall {
5144	c := &ServicesConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5145	c.parent = parent
5146	c.connection = connection
5147	return c
5148}
5149
5150// Fields allows partial responses to be retrieved. See
5151// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5152// for more information.
5153func (c *ServicesConnectionsCreateCall) Fields(s ...googleapi.Field) *ServicesConnectionsCreateCall {
5154	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5155	return c
5156}
5157
5158// Context sets the context to be used in this call's Do method. Any
5159// pending HTTP request will be aborted if the provided context is
5160// canceled.
5161func (c *ServicesConnectionsCreateCall) Context(ctx context.Context) *ServicesConnectionsCreateCall {
5162	c.ctx_ = ctx
5163	return c
5164}
5165
5166// Header returns an http.Header that can be modified by the caller to
5167// add HTTP headers to the request.
5168func (c *ServicesConnectionsCreateCall) Header() http.Header {
5169	if c.header_ == nil {
5170		c.header_ = make(http.Header)
5171	}
5172	return c.header_
5173}
5174
5175func (c *ServicesConnectionsCreateCall) doRequest(alt string) (*http.Response, error) {
5176	reqHeaders := make(http.Header)
5177	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
5178	for k, v := range c.header_ {
5179		reqHeaders[k] = v
5180	}
5181	reqHeaders.Set("User-Agent", c.s.userAgent())
5182	var body io.Reader = nil
5183	body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection)
5184	if err != nil {
5185		return nil, err
5186	}
5187	reqHeaders.Set("Content-Type", "application/json")
5188	c.urlParams_.Set("alt", alt)
5189	c.urlParams_.Set("prettyPrint", "false")
5190	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/connections")
5191	urls += "?" + c.urlParams_.Encode()
5192	req, err := http.NewRequest("POST", urls, body)
5193	if err != nil {
5194		return nil, err
5195	}
5196	req.Header = reqHeaders
5197	googleapi.Expand(req.URL, map[string]string{
5198		"parent": c.parent,
5199	})
5200	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5201}
5202
5203// Do executes the "servicenetworking.services.connections.create" call.
5204// Exactly one of *Operation or error will be non-nil. Any non-2xx
5205// status code is an error. Response headers are in either
5206// *Operation.ServerResponse.Header or (if a response was returned at
5207// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5208// to check whether the returned error was because
5209// http.StatusNotModified was returned.
5210func (c *ServicesConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5211	gensupport.SetOptions(c.urlParams_, opts...)
5212	res, err := c.doRequest("json")
5213	if res != nil && res.StatusCode == http.StatusNotModified {
5214		if res.Body != nil {
5215			res.Body.Close()
5216		}
5217		return nil, &googleapi.Error{
5218			Code:   res.StatusCode,
5219			Header: res.Header,
5220		}
5221	}
5222	if err != nil {
5223		return nil, err
5224	}
5225	defer googleapi.CloseBody(res)
5226	if err := googleapi.CheckResponse(res); err != nil {
5227		return nil, err
5228	}
5229	ret := &Operation{
5230		ServerResponse: googleapi.ServerResponse{
5231			Header:         res.Header,
5232			HTTPStatusCode: res.StatusCode,
5233		},
5234	}
5235	target := &ret
5236	if err := gensupport.DecodeResponse(target, res); err != nil {
5237		return nil, err
5238	}
5239	return ret, nil
5240	// {
5241	//   "description": "Creates a private connection that establishes a VPC Network Peering\nconnection to a VPC network in the service producer's organization.\nThe administrator of the service consumer's VPC network invokes this\nmethod. The administrator must assign one or more allocated IP ranges for\nprovisioning subnetworks in the service producer's VPC network. This\nconnection is used for all supported services in the service producer's\norganization, so it only needs to be invoked once. The response from the\n`get` operation will be of type `Connection` if the operation successfully\ncompletes.",
5242	//   "flatPath": "v1beta/services/{servicesId}/connections",
5243	//   "httpMethod": "POST",
5244	//   "id": "servicenetworking.services.connections.create",
5245	//   "parameterOrder": [
5246	//     "parent"
5247	//   ],
5248	//   "parameters": {
5249	//     "parent": {
5250	//       "description": "The service that is managing peering connectivity for a service producer's\norganization. For Google services that support this functionality, this\nvalue is `services/servicenetworking.googleapis.com`.",
5251	//       "location": "path",
5252	//       "pattern": "^services/[^/]+$",
5253	//       "required": true,
5254	//       "type": "string"
5255	//     }
5256	//   },
5257	//   "path": "v1beta/{+parent}/connections",
5258	//   "request": {
5259	//     "$ref": "Connection"
5260	//   },
5261	//   "response": {
5262	//     "$ref": "Operation"
5263	//   },
5264	//   "scopes": [
5265	//     "https://www.googleapis.com/auth/cloud-platform",
5266	//     "https://www.googleapis.com/auth/service.management"
5267	//   ]
5268	// }
5269
5270}
5271
5272// method id "servicenetworking.services.connections.list":
5273
5274type ServicesConnectionsListCall struct {
5275	s            *APIService
5276	parent       string
5277	urlParams_   gensupport.URLParams
5278	ifNoneMatch_ string
5279	ctx_         context.Context
5280	header_      http.Header
5281}
5282
5283// List: List the private connections that are configured in a service
5284// consumer's
5285// VPC network.
5286func (r *ServicesConnectionsService) List(parent string) *ServicesConnectionsListCall {
5287	c := &ServicesConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5288	c.parent = parent
5289	return c
5290}
5291
5292// Network sets the optional parameter "network": The name of service
5293// consumer's VPC network that's connected with service
5294// producer network through a private connection. The network name must
5295// be in
5296// the following format:
5297// `projects/{project}/global/networks/{network}`. {project} is
5298// a
5299// project number, such as in `12345` that includes the VPC
5300// service
5301// consumer's VPC network. {network} is the name of the service
5302// consumer's VPC
5303// network.
5304func (c *ServicesConnectionsListCall) Network(network string) *ServicesConnectionsListCall {
5305	c.urlParams_.Set("network", network)
5306	return c
5307}
5308
5309// Fields allows partial responses to be retrieved. See
5310// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5311// for more information.
5312func (c *ServicesConnectionsListCall) Fields(s ...googleapi.Field) *ServicesConnectionsListCall {
5313	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5314	return c
5315}
5316
5317// IfNoneMatch sets the optional parameter which makes the operation
5318// fail if the object's ETag matches the given value. This is useful for
5319// getting updates only after the object has changed since the last
5320// request. Use googleapi.IsNotModified to check whether the response
5321// error from Do is the result of In-None-Match.
5322func (c *ServicesConnectionsListCall) IfNoneMatch(entityTag string) *ServicesConnectionsListCall {
5323	c.ifNoneMatch_ = entityTag
5324	return c
5325}
5326
5327// Context sets the context to be used in this call's Do method. Any
5328// pending HTTP request will be aborted if the provided context is
5329// canceled.
5330func (c *ServicesConnectionsListCall) Context(ctx context.Context) *ServicesConnectionsListCall {
5331	c.ctx_ = ctx
5332	return c
5333}
5334
5335// Header returns an http.Header that can be modified by the caller to
5336// add HTTP headers to the request.
5337func (c *ServicesConnectionsListCall) Header() http.Header {
5338	if c.header_ == nil {
5339		c.header_ = make(http.Header)
5340	}
5341	return c.header_
5342}
5343
5344func (c *ServicesConnectionsListCall) doRequest(alt string) (*http.Response, error) {
5345	reqHeaders := make(http.Header)
5346	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
5347	for k, v := range c.header_ {
5348		reqHeaders[k] = v
5349	}
5350	reqHeaders.Set("User-Agent", c.s.userAgent())
5351	if c.ifNoneMatch_ != "" {
5352		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5353	}
5354	var body io.Reader = nil
5355	c.urlParams_.Set("alt", alt)
5356	c.urlParams_.Set("prettyPrint", "false")
5357	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/connections")
5358	urls += "?" + c.urlParams_.Encode()
5359	req, err := http.NewRequest("GET", urls, body)
5360	if err != nil {
5361		return nil, err
5362	}
5363	req.Header = reqHeaders
5364	googleapi.Expand(req.URL, map[string]string{
5365		"parent": c.parent,
5366	})
5367	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5368}
5369
5370// Do executes the "servicenetworking.services.connections.list" call.
5371// Exactly one of *ListConnectionsResponse or error will be non-nil. Any
5372// non-2xx status code is an error. Response headers are in either
5373// *ListConnectionsResponse.ServerResponse.Header or (if a response was
5374// returned at all) in error.(*googleapi.Error).Header. Use
5375// googleapi.IsNotModified to check whether the returned error was
5376// because http.StatusNotModified was returned.
5377func (c *ServicesConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) {
5378	gensupport.SetOptions(c.urlParams_, opts...)
5379	res, err := c.doRequest("json")
5380	if res != nil && res.StatusCode == http.StatusNotModified {
5381		if res.Body != nil {
5382			res.Body.Close()
5383		}
5384		return nil, &googleapi.Error{
5385			Code:   res.StatusCode,
5386			Header: res.Header,
5387		}
5388	}
5389	if err != nil {
5390		return nil, err
5391	}
5392	defer googleapi.CloseBody(res)
5393	if err := googleapi.CheckResponse(res); err != nil {
5394		return nil, err
5395	}
5396	ret := &ListConnectionsResponse{
5397		ServerResponse: googleapi.ServerResponse{
5398			Header:         res.Header,
5399			HTTPStatusCode: res.StatusCode,
5400		},
5401	}
5402	target := &ret
5403	if err := gensupport.DecodeResponse(target, res); err != nil {
5404		return nil, err
5405	}
5406	return ret, nil
5407	// {
5408	//   "description": "List the private connections that are configured in a service consumer's\nVPC network.",
5409	//   "flatPath": "v1beta/services/{servicesId}/connections",
5410	//   "httpMethod": "GET",
5411	//   "id": "servicenetworking.services.connections.list",
5412	//   "parameterOrder": [
5413	//     "parent"
5414	//   ],
5415	//   "parameters": {
5416	//     "network": {
5417	//       "description": "The name of service consumer's VPC network that's connected with service\nproducer network through a private connection. The network name must be in\nthe following format:\n`projects/{project}/global/networks/{network}`. {project} is a\nproject number, such as in `12345` that includes the VPC service\nconsumer's VPC network. {network} is the name of the service consumer's VPC\nnetwork.",
5418	//       "location": "query",
5419	//       "type": "string"
5420	//     },
5421	//     "parent": {
5422	//       "description": "The service that is managing peering connectivity for a service producer's\norganization. For Google services that support this functionality, this\nvalue is `services/servicenetworking.googleapis.com`.\nIf you specify `-` as the parameter value, all configured public peering\nservices are listed.",
5423	//       "location": "path",
5424	//       "pattern": "^services/[^/]+$",
5425	//       "required": true,
5426	//       "type": "string"
5427	//     }
5428	//   },
5429	//   "path": "v1beta/{+parent}/connections",
5430	//   "response": {
5431	//     "$ref": "ListConnectionsResponse"
5432	//   },
5433	//   "scopes": [
5434	//     "https://www.googleapis.com/auth/cloud-platform",
5435	//     "https://www.googleapis.com/auth/service.management"
5436	//   ]
5437	// }
5438
5439}
5440