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