...

Source file src/google.golang.org/api/serviceuser/v1/serviceuser-gen.go

Documentation: google.golang.org/api/serviceuser/v1

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

View as plain text