serviceconfig

package
v0.0.0-...-10f96fb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 12 Imported by: 155

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BackendRule_PathTranslation_name = map[int32]string{
		0: "PATH_TRANSLATION_UNSPECIFIED",
		1: "CONSTANT_ADDRESS",
		2: "APPEND_PATH_TO_ADDRESS",
	}
	BackendRule_PathTranslation_value = map[string]int32{
		"PATH_TRANSLATION_UNSPECIFIED": 0,
		"CONSTANT_ADDRESS":             1,
		"APPEND_PATH_TO_ADDRESS":       2,
	}
)

Enum value maps for BackendRule_PathTranslation.

View Source
var (
	Property_PropertyType_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "INT64",
		2: "BOOL",
		3: "STRING",
		4: "DOUBLE",
	}
	Property_PropertyType_value = map[string]int32{
		"UNSPECIFIED": 0,
		"INT64":       1,
		"BOOL":        2,
		"STRING":      3,
		"DOUBLE":      4,
	}
)

Enum value maps for Property_PropertyType.

View Source
var File_google_api_auth_proto protoreflect.FileDescriptor
View Source
var File_google_api_backend_proto protoreflect.FileDescriptor
View Source
var File_google_api_billing_proto protoreflect.FileDescriptor
View Source
var File_google_api_consumer_proto protoreflect.FileDescriptor
View Source
var File_google_api_context_proto protoreflect.FileDescriptor
View Source
var File_google_api_control_proto protoreflect.FileDescriptor
View Source
var File_google_api_documentation_proto protoreflect.FileDescriptor
View Source
var File_google_api_endpoint_proto protoreflect.FileDescriptor
View Source
var File_google_api_log_proto protoreflect.FileDescriptor
View Source
var File_google_api_logging_proto protoreflect.FileDescriptor
View Source
var File_google_api_monitoring_proto protoreflect.FileDescriptor
View Source
var File_google_api_quota_proto protoreflect.FileDescriptor
View Source
var File_google_api_service_proto protoreflect.FileDescriptor
View Source
var File_google_api_source_info_proto protoreflect.FileDescriptor
View Source
var File_google_api_system_parameter_proto protoreflect.FileDescriptor
View Source
var File_google_api_usage_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider struct {

	// The unique identifier of the auth provider. It will be referred to by
	// `AuthRequirement.provider_id`.
	//
	// Example: "bookstore_auth".
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Identifies the principal that issued the JWT. See
	// https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
	// Usually a URL or an email address.
	//
	// Example: https://securetoken.google.com
	// Example: 1234567-compute@developer.gserviceaccount.com
	Issuer string `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"`
	// URL of the provider's public key set to validate signature of the JWT. See
	// [OpenID
	// Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
	// Optional if the key set document:
	//   - can be retrieved from
	//     [OpenID
	//     Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
	//     of the issuer.
	//   - can be inferred from the email domain of the issuer (e.g. a Google
	//     service account).
	//
	// Example: https://www.googleapis.com/oauth2/v1/certs
	JwksUri string `protobuf:"bytes,3,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"`
	// The list of JWT
	// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
	// that are allowed to access. A JWT containing any of these audiences will
	// be accepted. When this setting is absent, JWTs with audiences:
	//   - "https://[service.name]/[google.protobuf.Api.name]"
	//   - "https://[service.name]/"
	//
	// will be accepted.
	// For example, if no audiences are in the setting, LibraryService API will
	// accept JWTs with the following audiences:
	//
	//	-
	//	https://library-example.googleapis.com/google.example.library.v1.LibraryService
	//	- https://library-example.googleapis.com/
	//
	// Example:
	//
	//	audiences: bookstore_android.apps.googleusercontent.com,
	//	           bookstore_web.apps.googleusercontent.com
	Audiences string `protobuf:"bytes,4,opt,name=audiences,proto3" json:"audiences,omitempty"`
	// Redirect URL if JWT token is required but not present or is expired.
	// Implement authorizationUrl of securityDefinitions in OpenAPI spec.
	AuthorizationUrl string `protobuf:"bytes,5,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"`
	// Defines the locations to extract the JWT.  For now it is only used by the
	// Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
	// (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
	//
	// JWT locations can be one of HTTP headers, URL query parameters or
	// cookies. The rule is that the first match wins.
	//
	// If not specified,  default to use following 3 locations:
	//  1. Authorization: Bearer
	//  2. x-goog-iap-jwt-assertion
	//  3. access_token query parameter
	//
	// Default locations can be specified as followings:
	//
	//	jwt_locations:
	//	- header: Authorization
	//	  value_prefix: "Bearer "
	//	- header: x-goog-iap-jwt-assertion
	//	- query: access_token
	JwtLocations []*JwtLocation `protobuf:"bytes,6,rep,name=jwt_locations,json=jwtLocations,proto3" json:"jwt_locations,omitempty"`
	// contains filtered or unexported fields
}

Configuration for an authentication provider, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).

func (*AuthProvider) Descriptor deprecated

func (*AuthProvider) Descriptor() ([]byte, []int)

Deprecated: Use AuthProvider.ProtoReflect.Descriptor instead.

func (*AuthProvider) GetAudiences

func (x *AuthProvider) GetAudiences() string

func (*AuthProvider) GetAuthorizationUrl

func (x *AuthProvider) GetAuthorizationUrl() string

func (*AuthProvider) GetId

func (x *AuthProvider) GetId() string

func (*AuthProvider) GetIssuer

func (x *AuthProvider) GetIssuer() string

func (*AuthProvider) GetJwksUri

func (x *AuthProvider) GetJwksUri() string

func (*AuthProvider) GetJwtLocations

func (x *AuthProvider) GetJwtLocations() []*JwtLocation

func (*AuthProvider) ProtoMessage

func (*AuthProvider) ProtoMessage()

func (*AuthProvider) ProtoReflect

func (x *AuthProvider) ProtoReflect() protoreflect.Message

func (*AuthProvider) Reset

func (x *AuthProvider) Reset()

func (*AuthProvider) String

func (x *AuthProvider) String() string

type AuthRequirement

type AuthRequirement struct {

	// [id][google.api.AuthProvider.id] from authentication provider.
	//
	// Example:
	//
	//	provider_id: bookstore_auth
	ProviderId string `protobuf:"bytes,1,opt,name=provider_id,json=providerId,proto3" json:"provider_id,omitempty"`
	// NOTE: This will be deprecated soon, once AuthProvider.audiences is
	// implemented and accepted in all the runtime components.
	//
	// The list of JWT
	// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
	// that are allowed to access. A JWT containing any of these audiences will
	// be accepted. When this setting is absent, only JWTs with audience
	// "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
	// will be accepted. For example, if no audiences are in the setting,
	// LibraryService API will only accept JWTs with the following audience
	// "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
	//
	// Example:
	//
	//	audiences: bookstore_android.apps.googleusercontent.com,
	//	           bookstore_web.apps.googleusercontent.com
	Audiences string `protobuf:"bytes,2,opt,name=audiences,proto3" json:"audiences,omitempty"`
	// contains filtered or unexported fields
}

User-defined authentication requirements, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).

func (*AuthRequirement) Descriptor deprecated

func (*AuthRequirement) Descriptor() ([]byte, []int)

Deprecated: Use AuthRequirement.ProtoReflect.Descriptor instead.

func (*AuthRequirement) GetAudiences

func (x *AuthRequirement) GetAudiences() string

func (*AuthRequirement) GetProviderId

func (x *AuthRequirement) GetProviderId() string

func (*AuthRequirement) ProtoMessage

func (*AuthRequirement) ProtoMessage()

func (*AuthRequirement) ProtoReflect

func (x *AuthRequirement) ProtoReflect() protoreflect.Message

func (*AuthRequirement) Reset

func (x *AuthRequirement) Reset()

func (*AuthRequirement) String

func (x *AuthRequirement) String() string

type Authentication

type Authentication struct {

	// A list of authentication rules that apply to individual API methods.
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules []*AuthenticationRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"`
	// Defines a set of authentication providers that a service supports.
	Providers []*AuthProvider `protobuf:"bytes,4,rep,name=providers,proto3" json:"providers,omitempty"`
	// contains filtered or unexported fields
}

`Authentication` defines the authentication configuration for API methods provided by an API service.

Example:

name: calendar.googleapis.com
authentication:
  providers:
  - id: google_calendar_auth
    jwks_uri: https://www.googleapis.com/oauth2/v1/certs
    issuer: https://securetoken.google.com
  rules:
  - selector: "*"
    requirements:
      provider_id: google_calendar_auth
  - selector: google.calendar.Delegate
    oauth:
      canonical_scopes: https://www.googleapis.com/auth/calendar.read

func (*Authentication) Descriptor deprecated

func (*Authentication) Descriptor() ([]byte, []int)

Deprecated: Use Authentication.ProtoReflect.Descriptor instead.

func (*Authentication) GetProviders

func (x *Authentication) GetProviders() []*AuthProvider

func (*Authentication) GetRules

func (x *Authentication) GetRules() []*AuthenticationRule

func (*Authentication) ProtoMessage

func (*Authentication) ProtoMessage()

func (*Authentication) ProtoReflect

func (x *Authentication) ProtoReflect() protoreflect.Message

func (*Authentication) Reset

func (x *Authentication) Reset()

func (*Authentication) String

func (x *Authentication) String() string

type AuthenticationRule

type AuthenticationRule struct {

	// Selects the methods to which this rule applies.
	//
	// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
	Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// The requirements for OAuth credentials.
	Oauth *OAuthRequirements `protobuf:"bytes,2,opt,name=oauth,proto3" json:"oauth,omitempty"`
	// If true, the service accepts API keys without any other credential.
	// This flag only applies to HTTP and gRPC requests.
	AllowWithoutCredential bool `` /* 130-byte string literal not displayed */
	// Requirements for additional authentication providers.
	Requirements []*AuthRequirement `protobuf:"bytes,7,rep,name=requirements,proto3" json:"requirements,omitempty"`
	// contains filtered or unexported fields
}

Authentication rules for the service.

By default, if a method has any authentication requirements, every request must include a valid credential matching one of the requirements. It's an error to include more than one kind of credential in a single request.

If a method doesn't have any auth requirements, request credentials will be ignored.

func (*AuthenticationRule) Descriptor deprecated

func (*AuthenticationRule) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticationRule.ProtoReflect.Descriptor instead.

func (*AuthenticationRule) GetAllowWithoutCredential

func (x *AuthenticationRule) GetAllowWithoutCredential() bool

func (*AuthenticationRule) GetOauth

func (x *AuthenticationRule) GetOauth() *OAuthRequirements

func (*AuthenticationRule) GetRequirements

func (x *AuthenticationRule) GetRequirements() []*AuthRequirement

func (*AuthenticationRule) GetSelector

func (x *AuthenticationRule) GetSelector() string

func (*AuthenticationRule) ProtoMessage

func (*AuthenticationRule) ProtoMessage()

func (*AuthenticationRule) ProtoReflect

func (x *AuthenticationRule) ProtoReflect() protoreflect.Message

func (*AuthenticationRule) Reset

func (x *AuthenticationRule) Reset()

func (*AuthenticationRule) String

func (x *AuthenticationRule) String() string

type Backend

type Backend struct {

	// A list of API backend rules that apply to individual API methods.
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules []*BackendRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

`Backend` defines the backend configuration for a service.

func (*Backend) Descriptor deprecated

func (*Backend) Descriptor() ([]byte, []int)

Deprecated: Use Backend.ProtoReflect.Descriptor instead.

func (*Backend) GetRules

func (x *Backend) GetRules() []*BackendRule

func (*Backend) ProtoMessage

func (*Backend) ProtoMessage()

func (*Backend) ProtoReflect

func (x *Backend) ProtoReflect() protoreflect.Message

func (*Backend) Reset

func (x *Backend) Reset()

func (*Backend) String

func (x *Backend) String() string

type BackendRule

type BackendRule struct {

	// Selects the methods to which this rule applies.
	//
	// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
	Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// The address of the API backend.
	//
	// The scheme is used to determine the backend protocol and security.
	// The following schemes are accepted:
	//
	//	SCHEME        PROTOCOL    SECURITY
	//	http://       HTTP        None
	//	https://      HTTP        TLS
	//	grpc://       gRPC        None
	//	grpcs://      gRPC        TLS
	//
	// It is recommended to explicitly include a scheme. Leaving out the scheme
	// may cause constrasting behaviors across platforms.
	//
	// If the port is unspecified, the default is:
	// - 80 for schemes without TLS
	// - 443 for schemes with TLS
	//
	// For HTTP backends, use [protocol][google.api.BackendRule.protocol]
	// to specify the protocol version.
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// The number of seconds to wait for a response from a request. The default
	// varies based on the request protocol and deployment environment.
	Deadline float64 `protobuf:"fixed64,3,opt,name=deadline,proto3" json:"deadline,omitempty"`
	// Deprecated, do not use.
	//
	// Deprecated: Do not use.
	MinDeadline float64 `protobuf:"fixed64,4,opt,name=min_deadline,json=minDeadline,proto3" json:"min_deadline,omitempty"`
	// The number of seconds to wait for the completion of a long running
	// operation. The default is no deadline.
	OperationDeadline float64                     `protobuf:"fixed64,5,opt,name=operation_deadline,json=operationDeadline,proto3" json:"operation_deadline,omitempty"`
	PathTranslation   BackendRule_PathTranslation `` /* 151-byte string literal not displayed */
	// Authentication settings used by the backend.
	//
	// These are typically used to provide service management functionality to
	// a backend served on a publicly-routable URL. The `authentication`
	// details should match the authentication behavior used by the backend.
	//
	// For example, specifying `jwt_audience` implies that the backend expects
	// authentication via a JWT.
	//
	// When authentication is unspecified, the resulting behavior is the same
	// as `disable_auth` set to `true`.
	//
	// Refer to https://developers.google.com/identity/protocols/OpenIDConnect for
	// JWT ID token.
	//
	// Types that are assignable to Authentication:
	//
	//	*BackendRule_JwtAudience
	//	*BackendRule_DisableAuth
	Authentication isBackendRule_Authentication `protobuf_oneof:"authentication"`
	// The protocol used for sending a request to the backend.
	// The supported values are "http/1.1" and "h2".
	//
	// The default value is inferred from the scheme in the
	// [address][google.api.BackendRule.address] field:
	//
	//	SCHEME        PROTOCOL
	//	http://       http/1.1
	//	https://      http/1.1
	//	grpc://       h2
	//	grpcs://      h2
	//
	// For secure HTTP backends (https://) that support HTTP/2, set this field
	// to "h2" for improved performance.
	//
	// Configuring this field to non-default values is only supported for secure
	// HTTP backends. This field will be ignored for all other backends.
	//
	// See
	// https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
	// for more details on the supported values.
	Protocol string `protobuf:"bytes,9,opt,name=protocol,proto3" json:"protocol,omitempty"`
	// contains filtered or unexported fields
}

A backend rule provides configuration for an individual API element.

func (*BackendRule) Descriptor deprecated

func (*BackendRule) Descriptor() ([]byte, []int)

Deprecated: Use BackendRule.ProtoReflect.Descriptor instead.

func (*BackendRule) GetAddress

func (x *BackendRule) GetAddress() string

func (*BackendRule) GetAuthentication

func (m *BackendRule) GetAuthentication() isBackendRule_Authentication

func (*BackendRule) GetDeadline

func (x *BackendRule) GetDeadline() float64

func (*BackendRule) GetDisableAuth

func (x *BackendRule) GetDisableAuth() bool

func (*BackendRule) GetJwtAudience

func (x *BackendRule) GetJwtAudience() string

func (*BackendRule) GetMinDeadline deprecated

func (x *BackendRule) GetMinDeadline() float64

Deprecated: Do not use.

func (*BackendRule) GetOperationDeadline

func (x *BackendRule) GetOperationDeadline() float64

func (*BackendRule) GetPathTranslation

func (x *BackendRule) GetPathTranslation() BackendRule_PathTranslation

func (*BackendRule) GetProtocol

func (x *BackendRule) GetProtocol() string

func (*BackendRule) GetSelector

func (x *BackendRule) GetSelector() string

func (*BackendRule) ProtoMessage

func (*BackendRule) ProtoMessage()

func (*BackendRule) ProtoReflect

func (x *BackendRule) ProtoReflect() protoreflect.Message

func (*BackendRule) Reset

func (x *BackendRule) Reset()

func (*BackendRule) String

func (x *BackendRule) String() string

type BackendRule_DisableAuth

type BackendRule_DisableAuth struct {
	// When disable_auth is true, a JWT ID token won't be generated and the
	// original "Authorization" HTTP header will be preserved. If the header is
	// used to carry the original token and is expected by the backend, this
	// field must be set to true to preserve the header.
	DisableAuth bool `protobuf:"varint,8,opt,name=disable_auth,json=disableAuth,proto3,oneof"`
}

type BackendRule_JwtAudience

type BackendRule_JwtAudience struct {
	// The JWT audience is used when generating a JWT ID token for the backend.
	// This ID token will be added in the HTTP "authorization" header, and sent
	// to the backend.
	JwtAudience string `protobuf:"bytes,7,opt,name=jwt_audience,json=jwtAudience,proto3,oneof"`
}

type BackendRule_PathTranslation

type BackendRule_PathTranslation int32

Path Translation specifies how to combine the backend address with the request path in order to produce the appropriate forwarding URL for the request.

Path Translation is applicable only to HTTP-based backends. Backends which do not accept requests over HTTP/HTTPS should leave `path_translation` unspecified.

const (
	BackendRule_PATH_TRANSLATION_UNSPECIFIED BackendRule_PathTranslation = 0
	// Use the backend address as-is, with no modification to the path. If the
	// URL pattern contains variables, the variable names and values will be
	// appended to the query string. If a query string parameter and a URL
	// pattern variable have the same name, this may result in duplicate keys in
	// the query string.
	//
	// # Examples
	//
	// Given the following operation config:
	//
	//	Method path:        /api/company/{cid}/user/{uid}
	//	Backend address:    https://example.cloudfunctions.net/getUser
	//
	// Requests to the following request paths will call the backend at the
	// translated path:
	//
	//	Request path: /api/company/widgetworks/user/johndoe
	//	Translated:
	//	https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
	//
	//	Request path: /api/company/widgetworks/user/johndoe?timezone=EST
	//	Translated:
	//	https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
	BackendRule_CONSTANT_ADDRESS BackendRule_PathTranslation = 1
	// The request path will be appended to the backend address.
	//
	// # Examples
	//
	// Given the following operation config:
	//
	//	Method path:        /api/company/{cid}/user/{uid}
	//	Backend address:    https://example.appspot.com
	//
	// Requests to the following request paths will call the backend at the
	// translated path:
	//
	//	Request path: /api/company/widgetworks/user/johndoe
	//	Translated:
	//	https://example.appspot.com/api/company/widgetworks/user/johndoe
	//
	//	Request path: /api/company/widgetworks/user/johndoe?timezone=EST
	//	Translated:
	//	https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
	BackendRule_APPEND_PATH_TO_ADDRESS BackendRule_PathTranslation = 2
)

func (BackendRule_PathTranslation) Descriptor

func (BackendRule_PathTranslation) Enum

func (BackendRule_PathTranslation) EnumDescriptor deprecated

func (BackendRule_PathTranslation) EnumDescriptor() ([]byte, []int)

Deprecated: Use BackendRule_PathTranslation.Descriptor instead.

func (BackendRule_PathTranslation) Number

func (BackendRule_PathTranslation) String

func (BackendRule_PathTranslation) Type

type Billing

type Billing struct {

	// Billing configurations for sending metrics to the consumer project.
	// There can be multiple consumer destinations per service, each one must have
	// a different monitored resource type. A metric can be used in at most
	// one consumer destination.
	ConsumerDestinations []*Billing_BillingDestination `protobuf:"bytes,8,rep,name=consumer_destinations,json=consumerDestinations,proto3" json:"consumer_destinations,omitempty"`
	// contains filtered or unexported fields
}

Billing related configuration of the service.

The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently:

monitored_resources:
- type: library.googleapis.com/billing_branch
  labels:
  - key: cloud.googleapis.com/location
    description: |
      Predefined label to support billing location restriction.
  - key: city
    description: |
      Custom label to define the city where the library branch is located
      in.
  - key: name
    description: Custom label to define the name of the library branch.
metrics:
- name: library.googleapis.com/book/borrowed_count
  metric_kind: DELTA
  value_type: INT64
  unit: "1"
billing:
  consumer_destinations:
  - monitored_resource: library.googleapis.com/billing_branch
    metrics:
    - library.googleapis.com/book/borrowed_count

func (*Billing) Descriptor deprecated

func (*Billing) Descriptor() ([]byte, []int)

Deprecated: Use Billing.ProtoReflect.Descriptor instead.

func (*Billing) GetConsumerDestinations

func (x *Billing) GetConsumerDestinations() []*Billing_BillingDestination

func (*Billing) ProtoMessage

func (*Billing) ProtoMessage()

func (*Billing) ProtoReflect

func (x *Billing) ProtoReflect() protoreflect.Message

func (*Billing) Reset

func (x *Billing) Reset()

func (*Billing) String

func (x *Billing) String() string

type Billing_BillingDestination

type Billing_BillingDestination struct {

	// The monitored resource type. The type must be defined in
	// [Service.monitored_resources][google.api.Service.monitored_resources] section.
	MonitoredResource string `protobuf:"bytes,1,opt,name=monitored_resource,json=monitoredResource,proto3" json:"monitored_resource,omitempty"`
	// Names of the metrics to report to this billing destination.
	// Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
	Metrics []string `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
	// contains filtered or unexported fields
}

Configuration of a specific billing destination (Currently only support bill against consumer project).

func (*Billing_BillingDestination) Descriptor deprecated

func (*Billing_BillingDestination) Descriptor() ([]byte, []int)

Deprecated: Use Billing_BillingDestination.ProtoReflect.Descriptor instead.

func (*Billing_BillingDestination) GetMetrics

func (x *Billing_BillingDestination) GetMetrics() []string

func (*Billing_BillingDestination) GetMonitoredResource

func (x *Billing_BillingDestination) GetMonitoredResource() string

func (*Billing_BillingDestination) ProtoMessage

func (*Billing_BillingDestination) ProtoMessage()

func (*Billing_BillingDestination) ProtoReflect

func (*Billing_BillingDestination) Reset

func (x *Billing_BillingDestination) Reset()

func (*Billing_BillingDestination) String

func (x *Billing_BillingDestination) String() string

type Context

type Context struct {

	// A list of RPC context rules that apply to individual API methods.
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules []*ContextRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

`Context` defines which contexts an API requests.

Example:

context:
  rules:
  - selector: "*"
    requested:
    - google.rpc.context.ProjectContext
    - google.rpc.context.OriginContext

The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`.

Available context types are defined in package `google.rpc.context`.

This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and “x-goog-ext-<extension_id>-jspb” format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file:

Example:

context:
  rules:
   - selector: "google.example.library.v1.LibraryService.CreateBook"
     allowed_request_extensions:
     - google.foo.v1.NewExtension
     allowed_response_extensions:
     - google.foo.v1.NewExtension

You can also specify extension ID instead of fully qualified extension name here.

func (*Context) Descriptor deprecated

func (*Context) Descriptor() ([]byte, []int)

Deprecated: Use Context.ProtoReflect.Descriptor instead.

func (*Context) GetRules

func (x *Context) GetRules() []*ContextRule

func (*Context) ProtoMessage

func (*Context) ProtoMessage()

func (*Context) ProtoReflect

func (x *Context) ProtoReflect() protoreflect.Message

func (*Context) Reset

func (x *Context) Reset()

func (*Context) String

func (x *Context) String() string

type ContextRule

type ContextRule struct {

	// Selects the methods to which this rule applies.
	//
	// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
	Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// A list of full type names of requested contexts.
	Requested []string `protobuf:"bytes,2,rep,name=requested,proto3" json:"requested,omitempty"`
	// A list of full type names of provided contexts.
	Provided []string `protobuf:"bytes,3,rep,name=provided,proto3" json:"provided,omitempty"`
	// A list of full type names or extension IDs of extensions allowed in grpc
	// side channel from client to backend.
	AllowedRequestExtensions []string `` /* 135-byte string literal not displayed */
	// A list of full type names or extension IDs of extensions allowed in grpc
	// side channel from backend to client.
	AllowedResponseExtensions []string `` /* 138-byte string literal not displayed */
	// contains filtered or unexported fields
}

A context rule provides information about the context for an individual API element.

func (*ContextRule) Descriptor deprecated

func (*ContextRule) Descriptor() ([]byte, []int)

Deprecated: Use ContextRule.ProtoReflect.Descriptor instead.

func (*ContextRule) GetAllowedRequestExtensions

func (x *ContextRule) GetAllowedRequestExtensions() []string

func (*ContextRule) GetAllowedResponseExtensions

func (x *ContextRule) GetAllowedResponseExtensions() []string

func (*ContextRule) GetProvided

func (x *ContextRule) GetProvided() []string

func (*ContextRule) GetRequested

func (x *ContextRule) GetRequested() []string

func (*ContextRule) GetSelector

func (x *ContextRule) GetSelector() string

func (*ContextRule) ProtoMessage

func (*ContextRule) ProtoMessage()

func (*ContextRule) ProtoReflect

func (x *ContextRule) ProtoReflect() protoreflect.Message

func (*ContextRule) Reset

func (x *ContextRule) Reset()

func (*ContextRule) String

func (x *ContextRule) String() string

type Control

type Control struct {

	// The service controller environment to use. If empty, no control plane
	// feature (like quota and billing) will be enabled. The recommended value for
	// most services is servicecontrol.googleapis.com
	Environment string `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"`
	// contains filtered or unexported fields
}

Selects and configures the service controller used by the service.

Example:

control:
  environment: servicecontrol.googleapis.com

func (*Control) Descriptor deprecated

func (*Control) Descriptor() ([]byte, []int)

Deprecated: Use Control.ProtoReflect.Descriptor instead.

func (*Control) GetEnvironment

func (x *Control) GetEnvironment() string

func (*Control) ProtoMessage

func (*Control) ProtoMessage()

func (*Control) ProtoReflect

func (x *Control) ProtoReflect() protoreflect.Message

func (*Control) Reset

func (x *Control) Reset()

func (*Control) String

func (x *Control) String() string

type Documentation

type Documentation struct {

	// A short description of what the service does. The summary must be plain
	// text. It becomes the overview of the service displayed in Google Cloud
	// Console.
	// NOTE: This field is equivalent to the standard field `description`.
	Summary string `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"`
	// The top level pages for the documentation set.
	Pages []*Page `protobuf:"bytes,5,rep,name=pages,proto3" json:"pages,omitempty"`
	// A list of documentation rules that apply to individual API elements.
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules []*DocumentationRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"`
	// The URL to the root of documentation.
	DocumentationRootUrl string `protobuf:"bytes,4,opt,name=documentation_root_url,json=documentationRootUrl,proto3" json:"documentation_root_url,omitempty"`
	// Specifies the service root url if the default one (the service name
	// from the yaml file) is not suitable. This can be seen in any fully
	// specified service urls as well as sections that show a base that other
	// urls are relative to.
	ServiceRootUrl string `protobuf:"bytes,6,opt,name=service_root_url,json=serviceRootUrl,proto3" json:"service_root_url,omitempty"`
	// Declares a single overview page. For example:
	// <pre><code>documentation:
	//
	//	summary: ...
	//	overview: &#40;== include overview.md ==&#41;
	//
	// </code></pre>
	// This is a shortcut for the following declaration (using pages style):
	// <pre><code>documentation:
	//
	//	summary: ...
	//	pages:
	//	- name: Overview
	//	  content: &#40;== include overview.md ==&#41;
	//
	// </code></pre>
	// Note: you cannot specify both `overview` field and `pages` field.
	Overview string `protobuf:"bytes,2,opt,name=overview,proto3" json:"overview,omitempty"`
	// contains filtered or unexported fields
}

`Documentation` provides the information for describing a service.

Example: <pre><code>documentation:

summary: >
  The Google Calendar API gives access
  to most calendar features.
pages:
- name: Overview
  content: &#40;== include google/foo/overview.md ==&#41;
- name: Tutorial
  content: &#40;== include google/foo/tutorial.md ==&#41;
  subpages;
  - name: Java
    content: &#40;== include google/foo/tutorial_java.md ==&#41;
rules:
- selector: google.calendar.Calendar.Get
  description: >
    ...
- selector: google.calendar.Calendar.Put
  description: >
    ...

</code></pre> Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded.

Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided.

A number of constructs specific to the API platform are supported in documentation text.

In order to reference a proto element, the following notation can be used: <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre> To override the display text used for the link, this can be used: <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre> Text can be excluded from doc using the following notation: <pre><code>&#40;-- internal comment --&#41;</code></pre>

A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: <pre><code>&#40;== include path/to/file ==&#41;</code></pre> The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre> The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.

func (*Documentation) Descriptor deprecated

func (*Documentation) Descriptor() ([]byte, []int)

Deprecated: Use Documentation.ProtoReflect.Descriptor instead.

func (*Documentation) GetDocumentationRootUrl

func (x *Documentation) GetDocumentationRootUrl() string

func (*Documentation) GetOverview

func (x *Documentation) GetOverview() string

func (*Documentation) GetPages

func (x *Documentation) GetPages() []*Page

func (*Documentation) GetRules

func (x *Documentation) GetRules() []*DocumentationRule

func (*Documentation) GetServiceRootUrl

func (x *Documentation) GetServiceRootUrl() string

func (*Documentation) GetSummary

func (x *Documentation) GetSummary() string

func (*Documentation) ProtoMessage

func (*Documentation) ProtoMessage()

func (*Documentation) ProtoReflect

func (x *Documentation) ProtoReflect() protoreflect.Message

func (*Documentation) Reset

func (x *Documentation) Reset()

func (*Documentation) String

func (x *Documentation) String() string

type DocumentationRule

type DocumentationRule struct {

	// The selector is a comma-separated list of patterns for any element such as
	// a method, a field, an enum value. Each pattern is a qualified name of the
	// element which may end in "*", indicating a wildcard. Wildcards are only
	// allowed at the end and for a whole component of the qualified name,
	// i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
	// one or more components. To specify a default for all applicable elements,
	// the whole pattern "*" is used.
	Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// Description of the selected proto element (e.g. a message, a method, a
	// 'service' definition, or a field). Defaults to leading & trailing comments
	// taken from the proto source definition of the proto element.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Deprecation description of the selected element(s). It can be provided if
	// an element is marked as `deprecated`.
	DeprecationDescription string `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

A documentation rule provides information about individual API elements.

func (*DocumentationRule) Descriptor deprecated

func (*DocumentationRule) Descriptor() ([]byte, []int)

Deprecated: Use DocumentationRule.ProtoReflect.Descriptor instead.

func (*DocumentationRule) GetDeprecationDescription

func (x *DocumentationRule) GetDeprecationDescription() string

func (*DocumentationRule) GetDescription

func (x *DocumentationRule) GetDescription() string

func (*DocumentationRule) GetSelector

func (x *DocumentationRule) GetSelector() string

func (*DocumentationRule) ProtoMessage

func (*DocumentationRule) ProtoMessage()

func (*DocumentationRule) ProtoReflect

func (x *DocumentationRule) ProtoReflect() protoreflect.Message

func (*DocumentationRule) Reset

func (x *DocumentationRule) Reset()

func (*DocumentationRule) String

func (x *DocumentationRule) String() string

type Endpoint

type Endpoint struct {

	// The canonical name of this endpoint.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Unimplemented. Dot not use.
	//
	// DEPRECATED: This field is no longer supported. Instead of using aliases,
	// please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
	// of the intended aliases.
	//
	// Additional names that this endpoint will be hosted on.
	//
	// Deprecated: Do not use.
	Aliases []string `protobuf:"bytes,2,rep,name=aliases,proto3" json:"aliases,omitempty"`
	// The specification of an Internet routable address of API frontend that will
	// handle requests to this [API
	// Endpoint](https://cloud.google.com/apis/design/glossary). It should be
	// either a valid IPv4 address or a fully-qualified domain name. For example,
	// "8.8.8.8" or "myservice.appspot.com".
	Target string `protobuf:"bytes,101,opt,name=target,proto3" json:"target,omitempty"`
	// Allowing
	// [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
	// cross-domain traffic, would allow the backends served from this endpoint to
	// receive and respond to HTTP OPTIONS requests. The response will be used by
	// the browser to determine whether the subsequent cross-origin request is
	// allowed to proceed.
	AllowCors bool `protobuf:"varint,5,opt,name=allow_cors,json=allowCors,proto3" json:"allow_cors,omitempty"`
	// contains filtered or unexported fields
}

`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics.

Example:

type: google.api.Service
name: library-example.googleapis.com
endpoints:
  # Declares network address `https://library-example.googleapis.com`
  # for service `library-example.googleapis.com`. The `https` scheme
  # is implicit for all service endpoints. Other schemes may be
  # supported in the future.
- name: library-example.googleapis.com
  allow_cors: false
- name: content-staging-library-example.googleapis.com
  # Allows HTTP OPTIONS calls to be passed to the API frontend, for it
  # to decide whether the subsequent cross-origin request is allowed
  # to proceed.
  allow_cors: true

func (*Endpoint) Descriptor deprecated

func (*Endpoint) Descriptor() ([]byte, []int)

Deprecated: Use Endpoint.ProtoReflect.Descriptor instead.

func (*Endpoint) GetAliases deprecated

func (x *Endpoint) GetAliases() []string

Deprecated: Do not use.

func (*Endpoint) GetAllowCors

func (x *Endpoint) GetAllowCors() bool

func (*Endpoint) GetName

func (x *Endpoint) GetName() string

func (*Endpoint) GetTarget

func (x *Endpoint) GetTarget() string

func (*Endpoint) ProtoMessage

func (*Endpoint) ProtoMessage()

func (*Endpoint) ProtoReflect

func (x *Endpoint) ProtoReflect() protoreflect.Message

func (*Endpoint) Reset

func (x *Endpoint) Reset()

func (*Endpoint) String

func (x *Endpoint) String() string

type JwtLocation

type JwtLocation struct {

	// Types that are assignable to In:
	//
	//	*JwtLocation_Header
	//	*JwtLocation_Query
	//	*JwtLocation_Cookie
	In isJwtLocation_In `protobuf_oneof:"in"`
	// The value prefix. The value format is "value_prefix{token}"
	// Only applies to "in" header type. Must be empty for "in" query type.
	// If not empty, the header value has to match (case sensitive) this prefix.
	// If not matched, JWT will not be extracted. If matched, JWT will be
	// extracted after the prefix is removed.
	//
	// For example, for "Authorization: Bearer {JWT}",
	// value_prefix="Bearer " with a space at the end.
	ValuePrefix string `protobuf:"bytes,3,opt,name=value_prefix,json=valuePrefix,proto3" json:"value_prefix,omitempty"`
	// contains filtered or unexported fields
}

Specifies a location to extract JWT from an API request.

func (*JwtLocation) Descriptor deprecated

func (*JwtLocation) Descriptor() ([]byte, []int)

Deprecated: Use JwtLocation.ProtoReflect.Descriptor instead.

func (*JwtLocation) GetCookie

func (x *JwtLocation) GetCookie() string

func (*JwtLocation) GetHeader

func (x *JwtLocation) GetHeader() string

func (*JwtLocation) GetIn

func (m *JwtLocation) GetIn() isJwtLocation_In

func (*JwtLocation) GetQuery

func (x *JwtLocation) GetQuery() string

func (*JwtLocation) GetValuePrefix

func (x *JwtLocation) GetValuePrefix() string

func (*JwtLocation) ProtoMessage

func (*JwtLocation) ProtoMessage()

func (*JwtLocation) ProtoReflect

func (x *JwtLocation) ProtoReflect() protoreflect.Message

func (*JwtLocation) Reset

func (x *JwtLocation) Reset()

func (*JwtLocation) String

func (x *JwtLocation) String() string
type JwtLocation_Cookie struct {
	// Specifies cookie name to extract JWT token.
	Cookie string `protobuf:"bytes,4,opt,name=cookie,proto3,oneof"`
}

type JwtLocation_Header

type JwtLocation_Header struct {
	// Specifies HTTP header name to extract JWT token.
	Header string `protobuf:"bytes,1,opt,name=header,proto3,oneof"`
}

type JwtLocation_Query

type JwtLocation_Query struct {
	// Specifies URL query parameter name to extract JWT token.
	Query string `protobuf:"bytes,2,opt,name=query,proto3,oneof"`
}

type LogDescriptor

type LogDescriptor struct {

	// The name of the log. It must be less than 512 characters long and can
	// include the following characters: upper- and lower-case alphanumeric
	// characters [A-Za-z0-9], and punctuation characters including
	// slash, underscore, hyphen, period [/_-.].
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The set of labels that are available to describe a specific log entry.
	// Runtime requests that contain labels not specified here are
	// considered invalid.
	Labels []*label.LabelDescriptor `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"`
	// A human-readable description of this log. This information appears in
	// the documentation and can contain details.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// The human-readable name for this log. This information appears on
	// the user interface and should be concise.
	DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// contains filtered or unexported fields
}

A description of a log type. Example in YAML format:

  • name: library.googleapis.com/activity_history description: The history of borrowing and returning library items. display_name: Activity labels:
  • key: /customer_id description: Identifier of a library customer

func (*LogDescriptor) Descriptor deprecated

func (*LogDescriptor) Descriptor() ([]byte, []int)

Deprecated: Use LogDescriptor.ProtoReflect.Descriptor instead.

func (*LogDescriptor) GetDescription

func (x *LogDescriptor) GetDescription() string

func (*LogDescriptor) GetDisplayName

func (x *LogDescriptor) GetDisplayName() string

func (*LogDescriptor) GetLabels

func (x *LogDescriptor) GetLabels() []*label.LabelDescriptor

func (*LogDescriptor) GetName

func (x *LogDescriptor) GetName() string

func (*LogDescriptor) ProtoMessage

func (*LogDescriptor) ProtoMessage()

func (*LogDescriptor) ProtoReflect

func (x *LogDescriptor) ProtoReflect() protoreflect.Message

func (*LogDescriptor) Reset

func (x *LogDescriptor) Reset()

func (*LogDescriptor) String

func (x *LogDescriptor) String() string

type Logging

type Logging struct {

	// Logging configurations for sending logs to the producer project.
	// There can be multiple producer destinations, each one must have a
	// different monitored resource type. A log can be used in at most
	// one producer destination.
	ProducerDestinations []*Logging_LoggingDestination `protobuf:"bytes,1,rep,name=producer_destinations,json=producerDestinations,proto3" json:"producer_destinations,omitempty"`
	// Logging configurations for sending logs to the consumer project.
	// There can be multiple consumer destinations, each one must have a
	// different monitored resource type. A log can be used in at most
	// one consumer destination.
	ConsumerDestinations []*Logging_LoggingDestination `protobuf:"bytes,2,rep,name=consumer_destinations,json=consumerDestinations,proto3" json:"consumer_destinations,omitempty"`
	// contains filtered or unexported fields
}

Logging configuration of the service.

The following example shows how to configure logs to be sent to the producer and consumer projects. In the example, the `activity_history` log is sent to both the producer and consumer projects, whereas the `purchase_history` log is only sent to the producer project.

monitored_resources:
- type: library.googleapis.com/branch
  labels:
  - key: /city
    description: The city where the library branch is located in.
  - key: /name
    description: The name of the branch.
logs:
- name: activity_history
  labels:
  - key: /customer_id
- name: purchase_history
logging:
  producer_destinations:
  - monitored_resource: library.googleapis.com/branch
    logs:
    - activity_history
    - purchase_history
  consumer_destinations:
  - monitored_resource: library.googleapis.com/branch
    logs:
    - activity_history

func (*Logging) Descriptor deprecated

func (*Logging) Descriptor() ([]byte, []int)

Deprecated: Use Logging.ProtoReflect.Descriptor instead.

func (*Logging) GetConsumerDestinations

func (x *Logging) GetConsumerDestinations() []*Logging_LoggingDestination

func (*Logging) GetProducerDestinations

func (x *Logging) GetProducerDestinations() []*Logging_LoggingDestination

func (*Logging) ProtoMessage

func (*Logging) ProtoMessage()

func (*Logging) ProtoReflect

func (x *Logging) ProtoReflect() protoreflect.Message

func (*Logging) Reset

func (x *Logging) Reset()

func (*Logging) String

func (x *Logging) String() string

type Logging_LoggingDestination

type Logging_LoggingDestination struct {

	// The monitored resource type. The type must be defined in the
	// [Service.monitored_resources][google.api.Service.monitored_resources] section.
	MonitoredResource string `protobuf:"bytes,3,opt,name=monitored_resource,json=monitoredResource,proto3" json:"monitored_resource,omitempty"`
	// Names of the logs to be sent to this destination. Each name must
	// be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
	// not a domain scoped name, it will be automatically prefixed with
	// the service name followed by "/".
	Logs []string `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"`
	// contains filtered or unexported fields
}

Configuration of a specific logging destination (the producer project or the consumer project).

func (*Logging_LoggingDestination) Descriptor deprecated

func (*Logging_LoggingDestination) Descriptor() ([]byte, []int)

Deprecated: Use Logging_LoggingDestination.ProtoReflect.Descriptor instead.

func (*Logging_LoggingDestination) GetLogs

func (x *Logging_LoggingDestination) GetLogs() []string

func (*Logging_LoggingDestination) GetMonitoredResource

func (x *Logging_LoggingDestination) GetMonitoredResource() string

func (*Logging_LoggingDestination) ProtoMessage

func (*Logging_LoggingDestination) ProtoMessage()

func (*Logging_LoggingDestination) ProtoReflect

func (*Logging_LoggingDestination) Reset

func (x *Logging_LoggingDestination) Reset()

func (*Logging_LoggingDestination) String

func (x *Logging_LoggingDestination) String() string

type MetricRule

type MetricRule struct {

	// Selects the methods to which this rule applies.
	//
	// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
	Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// Metrics to update when the selected methods are called, and the associated
	// cost applied to each metric.
	//
	// The key of the map is the metric name, and the values are the amount
	// increased for the metric against which the quota limits are defined.
	// The value must not be negative.
	MetricCosts map[string]int64 `` /* 183-byte string literal not displayed */
	// contains filtered or unexported fields
}

Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.

func (*MetricRule) Descriptor deprecated

func (*MetricRule) Descriptor() ([]byte, []int)

Deprecated: Use MetricRule.ProtoReflect.Descriptor instead.

func (*MetricRule) GetMetricCosts

func (x *MetricRule) GetMetricCosts() map[string]int64

func (*MetricRule) GetSelector

func (x *MetricRule) GetSelector() string

func (*MetricRule) ProtoMessage

func (*MetricRule) ProtoMessage()

func (*MetricRule) ProtoReflect

func (x *MetricRule) ProtoReflect() protoreflect.Message

func (*MetricRule) Reset

func (x *MetricRule) Reset()

func (*MetricRule) String

func (x *MetricRule) String() string

type Monitoring

type Monitoring struct {

	// Monitoring configurations for sending metrics to the producer project.
	// There can be multiple producer destinations. A monitored resource type may
	// appear in multiple monitoring destinations if different aggregations are
	// needed for different sets of metrics associated with that monitored
	// resource type. A monitored resource and metric pair may only be used once
	// in the Monitoring configuration.
	ProducerDestinations []*Monitoring_MonitoringDestination `protobuf:"bytes,1,rep,name=producer_destinations,json=producerDestinations,proto3" json:"producer_destinations,omitempty"`
	// Monitoring configurations for sending metrics to the consumer project.
	// There can be multiple consumer destinations. A monitored resource type may
	// appear in multiple monitoring destinations if different aggregations are
	// needed for different sets of metrics associated with that monitored
	// resource type. A monitored resource and metric pair may only be used once
	// in the Monitoring configuration.
	ConsumerDestinations []*Monitoring_MonitoringDestination `protobuf:"bytes,2,rep,name=consumer_destinations,json=consumerDestinations,proto3" json:"consumer_destinations,omitempty"`
	// contains filtered or unexported fields
}

Monitoring configuration of the service.

The example below shows how to configure monitored resources and metrics for monitoring. In the example, a monitored resource and two metrics are defined. The `library.googleapis.com/book/returned_count` metric is sent to both producer and consumer projects, whereas the `library.googleapis.com/book/num_overdue` metric is only sent to the consumer project.

monitored_resources:
- type: library.googleapis.com/Branch
  display_name: "Library Branch"
  description: "A branch of a library."
  launch_stage: GA
  labels:
  - key: resource_container
    description: "The Cloud container (ie. project id) for the Branch."
  - key: location
    description: "The location of the library branch."
  - key: branch_id
    description: "The id of the branch."
metrics:
- name: library.googleapis.com/book/returned_count
  display_name: "Books Returned"
  description: "The count of books that have been returned."
  launch_stage: GA
  metric_kind: DELTA
  value_type: INT64
  unit: "1"
  labels:
  - key: customer_id
    description: "The id of the customer."
- name: library.googleapis.com/book/num_overdue
  display_name: "Books Overdue"
  description: "The current number of overdue books."
  launch_stage: GA
  metric_kind: GAUGE
  value_type: INT64
  unit: "1"
  labels:
  - key: customer_id
    description: "The id of the customer."
monitoring:
  producer_destinations:
  - monitored_resource: library.googleapis.com/Branch
    metrics:
    - library.googleapis.com/book/returned_count
  consumer_destinations:
  - monitored_resource: library.googleapis.com/Branch
    metrics:
    - library.googleapis.com/book/returned_count
    - library.googleapis.com/book/num_overdue

func (*Monitoring) Descriptor deprecated

func (*Monitoring) Descriptor() ([]byte, []int)

Deprecated: Use Monitoring.ProtoReflect.Descriptor instead.

func (*Monitoring) GetConsumerDestinations

func (x *Monitoring) GetConsumerDestinations() []*Monitoring_MonitoringDestination

func (*Monitoring) GetProducerDestinations

func (x *Monitoring) GetProducerDestinations() []*Monitoring_MonitoringDestination

func (*Monitoring) ProtoMessage

func (*Monitoring) ProtoMessage()

func (*Monitoring) ProtoReflect

func (x *Monitoring) ProtoReflect() protoreflect.Message

func (*Monitoring) Reset

func (x *Monitoring) Reset()

func (*Monitoring) String

func (x *Monitoring) String() string

type Monitoring_MonitoringDestination

type Monitoring_MonitoringDestination struct {

	// The monitored resource type. The type must be defined in
	// [Service.monitored_resources][google.api.Service.monitored_resources] section.
	MonitoredResource string `protobuf:"bytes,1,opt,name=monitored_resource,json=monitoredResource,proto3" json:"monitored_resource,omitempty"`
	// Types of the metrics to report to this monitoring destination.
	// Each type must be defined in [Service.metrics][google.api.Service.metrics] section.
	Metrics []string `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
	// contains filtered or unexported fields
}

Configuration of a specific monitoring destination (the producer project or the consumer project).

func (*Monitoring_MonitoringDestination) Descriptor deprecated

func (*Monitoring_MonitoringDestination) Descriptor() ([]byte, []int)

Deprecated: Use Monitoring_MonitoringDestination.ProtoReflect.Descriptor instead.

func (*Monitoring_MonitoringDestination) GetMetrics

func (x *Monitoring_MonitoringDestination) GetMetrics() []string

func (*Monitoring_MonitoringDestination) GetMonitoredResource

func (x *Monitoring_MonitoringDestination) GetMonitoredResource() string

func (*Monitoring_MonitoringDestination) ProtoMessage

func (*Monitoring_MonitoringDestination) ProtoMessage()

func (*Monitoring_MonitoringDestination) ProtoReflect

func (*Monitoring_MonitoringDestination) Reset

func (*Monitoring_MonitoringDestination) String

type OAuthRequirements

type OAuthRequirements struct {

	// The list of publicly documented OAuth scopes that are allowed access. An
	// OAuth token containing any of these scopes will be accepted.
	//
	// Example:
	//
	//	canonical_scopes: https://www.googleapis.com/auth/calendar,
	//	                  https://www.googleapis.com/auth/calendar.read
	CanonicalScopes string `protobuf:"bytes,1,opt,name=canonical_scopes,json=canonicalScopes,proto3" json:"canonical_scopes,omitempty"`
	// contains filtered or unexported fields
}

OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for "Read-only access to Google Calendar" and "Access to Cloud Platform". Users can consent to a scope for an application, giving it permission to access that data on their behalf.

OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means.

In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs.

When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice.

Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.

func (*OAuthRequirements) Descriptor deprecated

func (*OAuthRequirements) Descriptor() ([]byte, []int)

Deprecated: Use OAuthRequirements.ProtoReflect.Descriptor instead.

func (*OAuthRequirements) GetCanonicalScopes

func (x *OAuthRequirements) GetCanonicalScopes() string

func (*OAuthRequirements) ProtoMessage

func (*OAuthRequirements) ProtoMessage()

func (*OAuthRequirements) ProtoReflect

func (x *OAuthRequirements) ProtoReflect() protoreflect.Message

func (*OAuthRequirements) Reset

func (x *OAuthRequirements) Reset()

func (*OAuthRequirements) String

func (x *OAuthRequirements) String() string

type Page

type Page struct {

	// The name of the page. It will be used as an identity of the page to
	// generate URI of the page, text of the link to this page in navigation,
	// etc. The full page name (start from the root page name to this page
	// concatenated with `.`) can be used as reference to the page in your
	// documentation. For example:
	// <pre><code>pages:
	//   - name: Tutorial
	//     content: &#40;== include tutorial.md ==&#41;
	//     subpages:
	//   - name: Java
	//     content: &#40;== include tutorial_java.md ==&#41;
	//
	// </code></pre>
	// You can reference `Java` page using Markdown reference link syntax:
	// `[Java][Tutorial.Java]`.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The Markdown content of the page. You can use <code>&#40;== include {path}
	// ==&#41;</code> to include content from a Markdown file. The content can be
	// used to produce the documentation page such as HTML format page.
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// Subpages of this page. The order of subpages specified here will be
	// honored in the generated docset.
	Subpages []*Page `protobuf:"bytes,3,rep,name=subpages,proto3" json:"subpages,omitempty"`
	// contains filtered or unexported fields
}

Represents a documentation page. A page can contain subpages to represent nested documentation set structure.

func (*Page) Descriptor deprecated

func (*Page) Descriptor() ([]byte, []int)

Deprecated: Use Page.ProtoReflect.Descriptor instead.

func (*Page) GetContent

func (x *Page) GetContent() string

func (*Page) GetName

func (x *Page) GetName() string

func (*Page) GetSubpages

func (x *Page) GetSubpages() []*Page

func (*Page) ProtoMessage

func (*Page) ProtoMessage()

func (*Page) ProtoReflect

func (x *Page) ProtoReflect() protoreflect.Message

func (*Page) Reset

func (x *Page) Reset()

func (*Page) String

func (x *Page) String() string

type ProjectProperties

type ProjectProperties struct {

	// List of per consumer project-specific properties.
	Properties []*Property `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"`
	// contains filtered or unexported fields
}

A descriptor for defining project properties for a service. One service may have many consumer projects, and the service may want to behave differently depending on some properties on the project. For example, a project may be associated with a school, or a business, or a government agency, a business type property on the project may affect how a service responds to the client. This descriptor defines which properties are allowed to be set on a project.

Example:

project_properties:
  properties:
  - name: NO_WATERMARK
    type: BOOL
    description: Allows usage of the API without watermarks.
  - name: EXTENDED_TILE_CACHE_PERIOD
    type: INT64

func (*ProjectProperties) Descriptor deprecated

func (*ProjectProperties) Descriptor() ([]byte, []int)

Deprecated: Use ProjectProperties.ProtoReflect.Descriptor instead.

func (*ProjectProperties) GetProperties

func (x *ProjectProperties) GetProperties() []*Property

func (*ProjectProperties) ProtoMessage

func (*ProjectProperties) ProtoMessage()

func (*ProjectProperties) ProtoReflect

func (x *ProjectProperties) ProtoReflect() protoreflect.Message

func (*ProjectProperties) Reset

func (x *ProjectProperties) Reset()

func (*ProjectProperties) String

func (x *ProjectProperties) String() string

type Property

type Property struct {

	// The name of the property (a.k.a key).
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The type of this property.
	Type Property_PropertyType `protobuf:"varint,2,opt,name=type,proto3,enum=google.api.Property_PropertyType" json:"type,omitempty"`
	// The description of the property
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

Defines project properties.

API services can define properties that can be assigned to consumer projects so that backends can perform response customization without having to make additional calls or maintain additional storage. For example, Maps API defines properties that controls map tile cache period, or whether to embed a watermark in a result.

These values can be set via API producer console. Only API providers can define and set these properties.

func (*Property) Descriptor deprecated

func (*Property) Descriptor() ([]byte, []int)

Deprecated: Use Property.ProtoReflect.Descriptor instead.

func (*Property) GetDescription

func (x *Property) GetDescription() string

func (*Property) GetName

func (x *Property) GetName() string

func (*Property) GetType

func (x *Property) GetType() Property_PropertyType

func (*Property) ProtoMessage

func (*Property) ProtoMessage()

func (*Property) ProtoReflect

func (x *Property) ProtoReflect() protoreflect.Message

func (*Property) Reset

func (x *Property) Reset()

func (*Property) String

func (x *Property) String() string

type Property_PropertyType

type Property_PropertyType int32

Supported data type of the property values

const (
	// The type is unspecified, and will result in an error.
	Property_UNSPECIFIED Property_PropertyType = 0
	// The type is `int64`.
	Property_INT64 Property_PropertyType = 1
	// The type is `bool`.
	Property_BOOL Property_PropertyType = 2
	// The type is `string`.
	Property_STRING Property_PropertyType = 3
	// The type is 'double'.
	Property_DOUBLE Property_PropertyType = 4
)

func (Property_PropertyType) Descriptor

func (Property_PropertyType) Enum

func (Property_PropertyType) EnumDescriptor deprecated

func (Property_PropertyType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Property_PropertyType.Descriptor instead.

func (Property_PropertyType) Number

func (Property_PropertyType) String

func (x Property_PropertyType) String() string

func (Property_PropertyType) Type

type Quota

type Quota struct {

	// List of QuotaLimit definitions for the service.
	Limits []*QuotaLimit `protobuf:"bytes,3,rep,name=limits,proto3" json:"limits,omitempty"`
	// List of MetricRule definitions, each one mapping a selected method to one
	// or more metrics.
	MetricRules []*MetricRule `protobuf:"bytes,4,rep,name=metric_rules,json=metricRules,proto3" json:"metric_rules,omitempty"`
	// contains filtered or unexported fields
}

Quota configuration helps to achieve fairness and budgeting in service usage.

The metric based quota configuration works this way:

  • The service configuration defines a set of metrics.
  • For API calls, the quota.metric_rules maps methods to metrics with corresponding costs.
  • The quota.limits defines limits on the metrics, which will be used for quota checks at runtime.

An example quota configuration in yaml format:

  quota:
    limits:

    - name: apiWriteQpsPerProject
      metric: library.googleapis.com/write_calls
      unit: "1/min/{project}"  # rate limit for consumer projects
      values:
        STANDARD: 10000

    (The metric rules bind all methods to the read_calls metric,
     except for the UpdateBook and DeleteBook methods. These two methods
     are mapped to the write_calls metric, with the UpdateBook method
     consuming at twice rate as the DeleteBook method.)
    metric_rules:
    - selector: "*"
      metric_costs:
        library.googleapis.com/read_calls: 1
    - selector: google.example.library.v1.LibraryService.UpdateBook
      metric_costs:
        library.googleapis.com/write_calls: 2
    - selector: google.example.library.v1.LibraryService.DeleteBook
      metric_costs:
        library.googleapis.com/write_calls: 1

Corresponding Metric definition:

    metrics:
    - name: library.googleapis.com/read_calls
      display_name: Read requests
      metric_kind: DELTA
      value_type: INT64

    - name: library.googleapis.com/write_calls
      display_name: Write requests
      metric_kind: DELTA
      value_type: INT64

func (*Quota) Descriptor deprecated

func (*Quota) Descriptor() ([]byte, []int)

Deprecated: Use Quota.ProtoReflect.Descriptor instead.

func (*Quota) GetLimits

func (x *Quota) GetLimits() []*QuotaLimit

func (*Quota) GetMetricRules

func (x *Quota) GetMetricRules() []*MetricRule

func (*Quota) ProtoMessage

func (*Quota) ProtoMessage()

func (*Quota) ProtoReflect

func (x *Quota) ProtoReflect() protoreflect.Message

func (*Quota) Reset

func (x *Quota) Reset()

func (*Quota) String

func (x *Quota) String() string

type QuotaLimit

type QuotaLimit struct {

	// Name of the quota limit.
	//
	// The name must be provided, and it must be unique within the service. The
	// name can only include alphanumeric characters as well as '-'.
	//
	// The maximum length of the limit name is 64 characters.
	Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
	// Optional. User-visible, extended description for this quota limit.
	// Should be used only when more context is needed to understand this limit
	// than provided by the limit's display name (see: `display_name`).
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Default number of tokens that can be consumed during the specified
	// duration. This is the number of tokens assigned when a client
	// application developer activates the service for his/her project.
	//
	// Specifying a value of 0 will block all requests. This can be used if you
	// are provisioning quota to selected consumers and blocking others.
	// Similarly, a value of -1 will indicate an unlimited quota. No other
	// negative values are allowed.
	//
	// Used by group-based quotas only.
	DefaultLimit int64 `protobuf:"varint,3,opt,name=default_limit,json=defaultLimit,proto3" json:"default_limit,omitempty"`
	// Maximum number of tokens that can be consumed during the specified
	// duration. Client application developers can override the default limit up
	// to this maximum. If specified, this value cannot be set to a value less
	// than the default limit. If not specified, it is set to the default limit.
	//
	// To allow clients to apply overrides with no upper bound, set this to -1,
	// indicating unlimited maximum quota.
	//
	// Used by group-based quotas only.
	MaxLimit int64 `protobuf:"varint,4,opt,name=max_limit,json=maxLimit,proto3" json:"max_limit,omitempty"`
	// Free tier value displayed in the Developers Console for this limit.
	// The free tier is the number of tokens that will be subtracted from the
	// billed amount when billing is enabled.
	// This field can only be set on a limit with duration "1d", in a billable
	// group; it is invalid on any other limit. If this field is not set, it
	// defaults to 0, indicating that there is no free tier for this service.
	//
	// Used by group-based quotas only.
	FreeTier int64 `protobuf:"varint,7,opt,name=free_tier,json=freeTier,proto3" json:"free_tier,omitempty"`
	// Duration of this limit in textual notation. Must be "100s" or "1d".
	//
	// Used by group-based quotas only.
	Duration string `protobuf:"bytes,5,opt,name=duration,proto3" json:"duration,omitempty"`
	// The name of the metric this quota limit applies to. The quota limits with
	// the same metric will be checked together during runtime. The metric must be
	// defined within the service config.
	Metric string `protobuf:"bytes,8,opt,name=metric,proto3" json:"metric,omitempty"`
	// Specify the unit of the quota limit. It uses the same syntax as
	// [Metric.unit][]. The supported unit kinds are determined by the quota
	// backend system.
	//
	// Here are some examples:
	// * "1/min/{project}" for quota per minute per project.
	//
	// Note: the order of unit components is insignificant.
	// The "1" at the beginning is required to follow the metric unit syntax.
	Unit string `protobuf:"bytes,9,opt,name=unit,proto3" json:"unit,omitempty"`
	// Tiered limit values. You must specify this as a key:value pair, with an
	// integer value that is the maximum number of requests allowed for the
	// specified unit. Currently only STANDARD is supported.
	Values map[string]int64 `` /* 155-byte string literal not displayed */
	// User-visible display name for this limit.
	// Optional. If not set, the UI will provide a default display name based on
	// the quota configuration. This field can be used to override the default
	// display name generated from the configuration.
	DisplayName string `protobuf:"bytes,12,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// contains filtered or unexported fields
}

`QuotaLimit` defines a specific limit that applies over a specified duration for a limit type. There can be at most one limit for a duration and limit type combination defined within a `QuotaGroup`.

func (*QuotaLimit) Descriptor deprecated

func (*QuotaLimit) Descriptor() ([]byte, []int)

Deprecated: Use QuotaLimit.ProtoReflect.Descriptor instead.

func (*QuotaLimit) GetDefaultLimit

func (x *QuotaLimit) GetDefaultLimit() int64

func (*QuotaLimit) GetDescription

func (x *QuotaLimit) GetDescription() string

func (*QuotaLimit) GetDisplayName

func (x *QuotaLimit) GetDisplayName() string

func (*QuotaLimit) GetDuration

func (x *QuotaLimit) GetDuration() string

func (*QuotaLimit) GetFreeTier

func (x *QuotaLimit) GetFreeTier() int64

func (*QuotaLimit) GetMaxLimit

func (x *QuotaLimit) GetMaxLimit() int64

func (*QuotaLimit) GetMetric

func (x *QuotaLimit) GetMetric() string

func (*QuotaLimit) GetName

func (x *QuotaLimit) GetName() string

func (*QuotaLimit) GetUnit

func (x *QuotaLimit) GetUnit() string

func (*QuotaLimit) GetValues

func (x *QuotaLimit) GetValues() map[string]int64

func (*QuotaLimit) ProtoMessage

func (*QuotaLimit) ProtoMessage()

func (*QuotaLimit) ProtoReflect

func (x *QuotaLimit) ProtoReflect() protoreflect.Message

func (*QuotaLimit) Reset

func (x *QuotaLimit) Reset()

func (*QuotaLimit) String

func (x *QuotaLimit) String() string

type Service

type Service struct {

	// The service name, which is a DNS-like logical identifier for the
	// service, such as `calendar.googleapis.com`. The service name
	// typically goes through DNS verification to make sure the owner
	// of the service also owns the DNS name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The product title for this service, it is the name displayed in Google
	// Cloud Console.
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// The Google project that owns this service.
	ProducerProjectId string `protobuf:"bytes,22,opt,name=producer_project_id,json=producerProjectId,proto3" json:"producer_project_id,omitempty"`
	// A unique ID for a specific instance of this message, typically assigned
	// by the client for tracking purpose. Must be no longer than 63 characters
	// and only lower case letters, digits, '.', '_' and '-' are allowed. If
	// empty, the server may choose to generate one instead.
	Id string `protobuf:"bytes,33,opt,name=id,proto3" json:"id,omitempty"`
	// A list of API interfaces exported by this service. Only the `name` field
	// of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by the configuration
	// author, as the remaining fields will be derived from the IDL during the
	// normalization process. It is an error to specify an API interface here
	// which cannot be resolved against the associated IDL files.
	Apis []*apipb.Api `protobuf:"bytes,3,rep,name=apis,proto3" json:"apis,omitempty"`
	// A list of all proto message types included in this API service.
	// Types referenced directly or indirectly by the `apis` are automatically
	// included.  Messages which are not referenced but shall be included, such as
	// types used by the `google.protobuf.Any` type, should be listed here by
	// name by the configuration author. Example:
	//
	//	types:
	//	- name: google.protobuf.Int32
	Types []*typepb.Type `protobuf:"bytes,4,rep,name=types,proto3" json:"types,omitempty"`
	// A list of all enum types included in this API service.  Enums referenced
	// directly or indirectly by the `apis` are automatically included.  Enums
	// which are not referenced but shall be included should be listed here by
	// name by the configuration author. Example:
	//
	//	enums:
	//	- name: google.someapi.v1.SomeEnum
	Enums []*typepb.Enum `protobuf:"bytes,5,rep,name=enums,proto3" json:"enums,omitempty"`
	// Additional API documentation.
	Documentation *Documentation `protobuf:"bytes,6,opt,name=documentation,proto3" json:"documentation,omitempty"`
	// API backend configuration.
	Backend *Backend `protobuf:"bytes,8,opt,name=backend,proto3" json:"backend,omitempty"`
	// HTTP configuration.
	Http *annotations.Http `protobuf:"bytes,9,opt,name=http,proto3" json:"http,omitempty"`
	// Quota configuration.
	Quota *Quota `protobuf:"bytes,10,opt,name=quota,proto3" json:"quota,omitempty"`
	// Auth configuration.
	Authentication *Authentication `protobuf:"bytes,11,opt,name=authentication,proto3" json:"authentication,omitempty"`
	// Context configuration.
	Context *Context `protobuf:"bytes,12,opt,name=context,proto3" json:"context,omitempty"`
	// Configuration controlling usage of this service.
	Usage *Usage `protobuf:"bytes,15,opt,name=usage,proto3" json:"usage,omitempty"`
	// Configuration for network endpoints.  If this is empty, then an endpoint
	// with the same name as the service is automatically generated to service all
	// defined APIs.
	Endpoints []*Endpoint `protobuf:"bytes,18,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// Configuration for the service control plane.
	Control *Control `protobuf:"bytes,21,opt,name=control,proto3" json:"control,omitempty"`
	// Defines the logs used by this service.
	Logs []*LogDescriptor `protobuf:"bytes,23,rep,name=logs,proto3" json:"logs,omitempty"`
	// Defines the metrics used by this service.
	Metrics []*metric.MetricDescriptor `protobuf:"bytes,24,rep,name=metrics,proto3" json:"metrics,omitempty"`
	// Defines the monitored resources used by this service. This is required
	// by the [Service.monitoring][google.api.Service.monitoring] and [Service.logging][google.api.Service.logging] configurations.
	MonitoredResources []*monitoredres.MonitoredResourceDescriptor `protobuf:"bytes,25,rep,name=monitored_resources,json=monitoredResources,proto3" json:"monitored_resources,omitempty"`
	// Billing configuration.
	Billing *Billing `protobuf:"bytes,26,opt,name=billing,proto3" json:"billing,omitempty"`
	// Logging configuration.
	Logging *Logging `protobuf:"bytes,27,opt,name=logging,proto3" json:"logging,omitempty"`
	// Monitoring configuration.
	Monitoring *Monitoring `protobuf:"bytes,28,opt,name=monitoring,proto3" json:"monitoring,omitempty"`
	// System parameter configuration.
	SystemParameters *SystemParameters `protobuf:"bytes,29,opt,name=system_parameters,json=systemParameters,proto3" json:"system_parameters,omitempty"`
	// Output only. The source information for this configuration if available.
	SourceInfo *SourceInfo `protobuf:"bytes,37,opt,name=source_info,json=sourceInfo,proto3" json:"source_info,omitempty"`
	// Settings for [Google Cloud Client
	// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
	// generated from APIs defined as protocol buffers.
	Publishing *annotations.Publishing `protobuf:"bytes,45,opt,name=publishing,proto3" json:"publishing,omitempty"`
	// Obsolete. Do not use.
	//
	// This field has no semantic meaning. The service config compiler always
	// sets this field to `3`.
	ConfigVersion *wrapperspb.UInt32Value `protobuf:"bytes,20,opt,name=config_version,json=configVersion,proto3" json:"config_version,omitempty"`
	// contains filtered or unexported fields
}

`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition.

Example:

type: google.api.Service
name: calendar.googleapis.com
title: Google Calendar API
apis:
- name: google.calendar.v3.Calendar

visibility:
  rules:
  - selector: "google.calendar.v3.*"
    restriction: PREVIEW
backend:
  rules:
  - selector: "google.calendar.v3.*"
    address: calendar.example.com

authentication:
  providers:
  - id: google_calendar_auth
    jwks_uri: https://www.googleapis.com/oauth2/v1/certs
    issuer: https://securetoken.google.com
  rules:
  - selector: "*"
    requirements:
      provider_id: google_calendar_auth

func (*Service) Descriptor deprecated

func (*Service) Descriptor() ([]byte, []int)

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetApis

func (x *Service) GetApis() []*apipb.Api

func (*Service) GetAuthentication

func (x *Service) GetAuthentication() *Authentication

func (*Service) GetBackend

func (x *Service) GetBackend() *Backend

func (*Service) GetBilling

func (x *Service) GetBilling() *Billing

func (*Service) GetConfigVersion

func (x *Service) GetConfigVersion() *wrapperspb.UInt32Value

func (*Service) GetContext

func (x *Service) GetContext() *Context

func (*Service) GetControl

func (x *Service) GetControl() *Control

func (*Service) GetDocumentation

func (x *Service) GetDocumentation() *Documentation

func (*Service) GetEndpoints

func (x *Service) GetEndpoints() []*Endpoint

func (*Service) GetEnums

func (x *Service) GetEnums() []*typepb.Enum

func (*Service) GetHttp

func (x *Service) GetHttp() *annotations.Http

func (*Service) GetId

func (x *Service) GetId() string

func (*Service) GetLogging

func (x *Service) GetLogging() *Logging

func (*Service) GetLogs

func (x *Service) GetLogs() []*LogDescriptor

func (*Service) GetMetrics

func (x *Service) GetMetrics() []*metric.MetricDescriptor

func (*Service) GetMonitoredResources

func (x *Service) GetMonitoredResources() []*monitoredres.MonitoredResourceDescriptor

func (*Service) GetMonitoring

func (x *Service) GetMonitoring() *Monitoring

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) GetProducerProjectId

func (x *Service) GetProducerProjectId() string

func (*Service) GetPublishing

func (x *Service) GetPublishing() *annotations.Publishing

func (*Service) GetQuota

func (x *Service) GetQuota() *Quota

func (*Service) GetSourceInfo

func (x *Service) GetSourceInfo() *SourceInfo

func (*Service) GetSystemParameters

func (x *Service) GetSystemParameters() *SystemParameters

func (*Service) GetTitle

func (x *Service) GetTitle() string

func (*Service) GetTypes

func (x *Service) GetTypes() []*typepb.Type

func (*Service) GetUsage

func (x *Service) GetUsage() *Usage

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

func (x *Service) ProtoReflect() protoreflect.Message

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

type SourceInfo

type SourceInfo struct {

	// All files used during config generation.
	SourceFiles []*anypb.Any `protobuf:"bytes,1,rep,name=source_files,json=sourceFiles,proto3" json:"source_files,omitempty"`
	// contains filtered or unexported fields
}

Source information used to create a Service Config

func (*SourceInfo) Descriptor deprecated

func (*SourceInfo) Descriptor() ([]byte, []int)

Deprecated: Use SourceInfo.ProtoReflect.Descriptor instead.

func (*SourceInfo) GetSourceFiles

func (x *SourceInfo) GetSourceFiles() []*anypb.Any

func (*SourceInfo) ProtoMessage

func (*SourceInfo) ProtoMessage()

func (*SourceInfo) ProtoReflect

func (x *SourceInfo) ProtoReflect() protoreflect.Message

func (*SourceInfo) Reset

func (x *SourceInfo) Reset()

func (*SourceInfo) String

func (x *SourceInfo) String() string

type SystemParameter

type SystemParameter struct {

	// Define the name of the parameter, such as "api_key" . It is case sensitive.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Define the HTTP header name to use for the parameter. It is case
	// insensitive.
	HttpHeader string `protobuf:"bytes,2,opt,name=http_header,json=httpHeader,proto3" json:"http_header,omitempty"`
	// Define the URL query parameter name to use for the parameter. It is case
	// sensitive.
	UrlQueryParameter string `protobuf:"bytes,3,opt,name=url_query_parameter,json=urlQueryParameter,proto3" json:"url_query_parameter,omitempty"`
	// contains filtered or unexported fields
}

Define a parameter's name and location. The parameter may be passed as either an HTTP header or a URL query parameter, and if both are passed the behavior is implementation-dependent.

func (*SystemParameter) Descriptor deprecated

func (*SystemParameter) Descriptor() ([]byte, []int)

Deprecated: Use SystemParameter.ProtoReflect.Descriptor instead.

func (*SystemParameter) GetHttpHeader

func (x *SystemParameter) GetHttpHeader() string

func (*SystemParameter) GetName

func (x *SystemParameter) GetName() string

func (*SystemParameter) GetUrlQueryParameter

func (x *SystemParameter) GetUrlQueryParameter() string

func (*SystemParameter) ProtoMessage

func (*SystemParameter) ProtoMessage()

func (*SystemParameter) ProtoReflect

func (x *SystemParameter) ProtoReflect() protoreflect.Message

func (*SystemParameter) Reset

func (x *SystemParameter) Reset()

func (*SystemParameter) String

func (x *SystemParameter) String() string

type SystemParameterRule

type SystemParameterRule struct {

	// Selects the methods to which this rule applies. Use '*' to indicate all
	// methods in all APIs.
	//
	// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
	Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// Define parameters. Multiple names may be defined for a parameter.
	// For a given method call, only one of them should be used. If multiple
	// names are used the behavior is implementation-dependent.
	// If none of the specified names are present the behavior is
	// parameter-dependent.
	Parameters []*SystemParameter `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty"`
	// contains filtered or unexported fields
}

Define a system parameter rule mapping system parameter definitions to methods.

func (*SystemParameterRule) Descriptor deprecated

func (*SystemParameterRule) Descriptor() ([]byte, []int)

Deprecated: Use SystemParameterRule.ProtoReflect.Descriptor instead.

func (*SystemParameterRule) GetParameters

func (x *SystemParameterRule) GetParameters() []*SystemParameter

func (*SystemParameterRule) GetSelector

func (x *SystemParameterRule) GetSelector() string

func (*SystemParameterRule) ProtoMessage

func (*SystemParameterRule) ProtoMessage()

func (*SystemParameterRule) ProtoReflect

func (x *SystemParameterRule) ProtoReflect() protoreflect.Message

func (*SystemParameterRule) Reset

func (x *SystemParameterRule) Reset()

func (*SystemParameterRule) String

func (x *SystemParameterRule) String() string

type SystemParameters

type SystemParameters struct {

	// Define system parameters.
	//
	// The parameters defined here will override the default parameters
	// implemented by the system. If this field is missing from the service
	// config, default system parameters will be used. Default system parameters
	// and names is implementation-dependent.
	//
	// Example: define api key for all methods
	//
	//     system_parameters
	//       rules:
	//         - selector: "*"
	//           parameters:
	//             - name: api_key
	//               url_query_parameter: api_key
	//
	//
	// Example: define 2 api key names for a specific method.
	//
	//     system_parameters
	//       rules:
	//         - selector: "/ListShelves"
	//           parameters:
	//             - name: api_key
	//               http_header: Api-Key1
	//             - name: api_key
	//               http_header: Api-Key2
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules []*SystemParameterRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

### System parameter configuration

A system parameter is a special kind of parameter defined by the API system, not by an individual API. It is typically mapped to an HTTP header and/or a URL query parameter. This configuration specifies which methods change the names of the system parameters.

func (*SystemParameters) Descriptor deprecated

func (*SystemParameters) Descriptor() ([]byte, []int)

Deprecated: Use SystemParameters.ProtoReflect.Descriptor instead.

func (*SystemParameters) GetRules

func (x *SystemParameters) GetRules() []*SystemParameterRule

func (*SystemParameters) ProtoMessage

func (*SystemParameters) ProtoMessage()

func (*SystemParameters) ProtoReflect

func (x *SystemParameters) ProtoReflect() protoreflect.Message

func (*SystemParameters) Reset

func (x *SystemParameters) Reset()

func (*SystemParameters) String

func (x *SystemParameters) String() string

type Usage

type Usage struct {

	// Requirements that must be satisfied before a consumer project can use the
	// service. Each requirement is of the form <service.name>/<requirement-id>;
	// for example 'serviceusage.googleapis.com/billing-enabled'.
	//
	// For Google APIs, a Terms of Service requirement must be included here.
	// Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud".
	// Other Google APIs should include
	// "serviceusage.googleapis.com/tos/universal". Additional ToS can be
	// included based on the business needs.
	Requirements []string `protobuf:"bytes,1,rep,name=requirements,proto3" json:"requirements,omitempty"`
	// A list of usage rules that apply to individual API methods.
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules []*UsageRule `protobuf:"bytes,6,rep,name=rules,proto3" json:"rules,omitempty"`
	// The full resource name of a channel used for sending notifications to the
	// service producer.
	//
	// Google Service Management currently only supports
	// [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
	// channel. To use Google Cloud Pub/Sub as the channel, this must be the name
	// of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
	// documented in https://cloud.google.com/pubsub/docs/overview.
	ProducerNotificationChannel string `` /* 144-byte string literal not displayed */
	// contains filtered or unexported fields
}

Configuration controlling usage of a service.

func (*Usage) Descriptor deprecated

func (*Usage) Descriptor() ([]byte, []int)

Deprecated: Use Usage.ProtoReflect.Descriptor instead.

func (*Usage) GetProducerNotificationChannel

func (x *Usage) GetProducerNotificationChannel() string

func (*Usage) GetRequirements

func (x *Usage) GetRequirements() []string

func (*Usage) GetRules

func (x *Usage) GetRules() []*UsageRule

func (*Usage) ProtoMessage

func (*Usage) ProtoMessage()

func (*Usage) ProtoReflect

func (x *Usage) ProtoReflect() protoreflect.Message

func (*Usage) Reset

func (x *Usage) Reset()

func (*Usage) String

func (x *Usage) String() string

type UsageRule

type UsageRule struct {

	// Selects the methods to which this rule applies. Use '*' to indicate all
	// methods in all APIs.
	//
	// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
	Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// If true, the selected method allows unregistered calls, e.g. calls
	// that don't identify any user or application.
	AllowUnregisteredCalls bool `` /* 130-byte string literal not displayed */
	// If true, the selected method should skip service control and the control
	// plane features, such as quota and billing, will not be available.
	// This flag is used by Google Cloud Endpoints to bypass checks for internal
	// methods, such as service health check methods.
	SkipServiceControl bool `protobuf:"varint,3,opt,name=skip_service_control,json=skipServiceControl,proto3" json:"skip_service_control,omitempty"`
	// contains filtered or unexported fields
}

Usage configuration rules for the service.

NOTE: Under development.

Use this rule to configure unregistered calls for the service. Unregistered calls are calls that do not contain consumer project identity. (Example: calls that do not contain an API key). By default, API methods do not allow unregistered calls, and each method call must be identified by a consumer project identity. Use this rule to allow/disallow unregistered calls.

Example of an API that wants to allow unregistered calls for entire service.

usage:
  rules:
  - selector: "*"
    allow_unregistered_calls: true

Example of a method that wants to allow unregistered calls.

usage:
  rules:
  - selector: "google.example.library.v1.LibraryService.CreateBook"
    allow_unregistered_calls: true

func (*UsageRule) Descriptor deprecated

func (*UsageRule) Descriptor() ([]byte, []int)

Deprecated: Use UsageRule.ProtoReflect.Descriptor instead.

func (*UsageRule) GetAllowUnregisteredCalls

func (x *UsageRule) GetAllowUnregisteredCalls() bool

func (*UsageRule) GetSelector

func (x *UsageRule) GetSelector() string

func (*UsageRule) GetSkipServiceControl

func (x *UsageRule) GetSkipServiceControl() bool

func (*UsageRule) ProtoMessage

func (*UsageRule) ProtoMessage()

func (*UsageRule) ProtoReflect

func (x *UsageRule) ProtoReflect() protoreflect.Message

func (*UsageRule) Reset

func (x *UsageRule) Reset()

func (*UsageRule) String

func (x *UsageRule) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL