serviceconfig

package
v0.0.0-...-52d6a69 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: Apache-2.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package serviceconfig is a generated protocol buffer package.

It is generated from these files:

google/api/auth.proto
google/api/backend.proto
google/api/billing.proto
google/api/consumer.proto
google/api/context.proto
google/api/control.proto
google/api/documentation.proto
google/api/endpoint.proto
google/api/log.proto
google/api/logging.proto
google/api/monitoring.proto
google/api/quota.proto
google/api/service.proto
google/api/source_info.proto
google/api/system_parameter.proto
google/api/usage.proto

It has these top-level messages:

Authentication
AuthenticationRule
AuthProvider
OAuthRequirements
AuthRequirement
Backend
BackendRule
Billing
BillingStatusRule
ProjectProperties
Property
Context
ContextRule
Control
Documentation
DocumentationRule
Page
Endpoint
LogDescriptor
Logging
Monitoring
Quota
MetricRule
QuotaLimit
Service
SourceInfo
SystemParameters
SystemParameterRule
SystemParameter
Usage
UsageRule

Index

Constants

This section is empty.

Variables

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

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" 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" 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" 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, 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,4,opt,name=audiences" json:"audiences,omitempty"`
	// Redirect URL if JWT token is required but no present or is expired.
	// Implement authorizationUrl of securityDefinitions in OpenAPI spec.
	AuthorizationUrl string `protobuf:"bytes,5,opt,name=authorization_url,json=authorizationUrl" json:"authorization_url,omitempty"`
}

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

func (*AuthProvider) Descriptor

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

func (*AuthProvider) GetAudiences

func (m *AuthProvider) GetAudiences() string

func (*AuthProvider) GetAuthorizationUrl

func (m *AuthProvider) GetAuthorizationUrl() string

func (*AuthProvider) GetId

func (m *AuthProvider) GetId() string

func (*AuthProvider) GetIssuer

func (m *AuthProvider) GetIssuer() string

func (*AuthProvider) GetJwksUri

func (m *AuthProvider) GetJwksUri() string

func (*AuthProvider) ProtoMessage

func (*AuthProvider) ProtoMessage()

func (*AuthProvider) Reset

func (m *AuthProvider) Reset()

func (*AuthProvider) String

func (m *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" 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" json:"audiences,omitempty"`
}

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

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

func (*AuthRequirement) GetAudiences

func (m *AuthRequirement) GetAudiences() string

func (*AuthRequirement) GetProviderId

func (m *AuthRequirement) GetProviderId() string

func (*AuthRequirement) ProtoMessage

func (*AuthRequirement) ProtoMessage()

func (*AuthRequirement) Reset

func (m *AuthRequirement) Reset()

func (*AuthRequirement) String

func (m *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" json:"rules,omitempty"`
	// Defines a set of authentication providers that a service supports.
	Providers []*AuthProvider `protobuf:"bytes,4,rep,name=providers" json:"providers,omitempty"`
}

`Authentication` defines the authentication configuration for an API.

Example for an API targeted for external use:

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

func (*Authentication) Descriptor

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

func (*Authentication) GetProviders

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

func (*Authentication) GetRules

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

func (*Authentication) ProtoMessage

func (*Authentication) ProtoMessage()

func (*Authentication) Reset

func (m *Authentication) Reset()

func (*Authentication) String

func (m *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" json:"selector,omitempty"`
	// The requirements for OAuth credentials.
	Oauth *OAuthRequirements `protobuf:"bytes,2,opt,name=oauth" json:"oauth,omitempty"`
	// Whether to allow requests without a credential. The credential can be
	// an OAuth token, Google cookies (first-party auth) or EndUserCreds.
	//
	// For requests without credentials, if the service control environment is
	// specified, each incoming request **must** be associated with a service
	// consumer. This can be done by passing an API key that belongs to a consumer
	// project.
	AllowWithoutCredential bool `protobuf:"varint,5,opt,name=allow_without_credential,json=allowWithoutCredential" json:"allow_without_credential,omitempty"`
	// Requirements for additional authentication providers.
	Requirements []*AuthRequirement `protobuf:"bytes,7,rep,name=requirements" json:"requirements,omitempty"`
}

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

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

func (*AuthenticationRule) GetAllowWithoutCredential

func (m *AuthenticationRule) GetAllowWithoutCredential() bool

func (*AuthenticationRule) GetOauth

func (m *AuthenticationRule) GetOauth() *OAuthRequirements

func (*AuthenticationRule) GetRequirements

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

func (*AuthenticationRule) GetSelector

func (m *AuthenticationRule) GetSelector() string

func (*AuthenticationRule) ProtoMessage

func (*AuthenticationRule) ProtoMessage()

func (*AuthenticationRule) Reset

func (m *AuthenticationRule) Reset()

func (*AuthenticationRule) String

func (m *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" json:"rules,omitempty"`
}

`Backend` defines the backend configuration for a service.

func (*Backend) Descriptor

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

func (*Backend) GetRules

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

func (*Backend) ProtoMessage

func (*Backend) ProtoMessage()

func (*Backend) Reset

func (m *Backend) Reset()

func (*Backend) String

func (m *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" json:"selector,omitempty"`
	// The address of the API backend.
	Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"`
	// The number of seconds to wait for a response from a request.  The
	// default depends on the deployment context.
	Deadline float64 `protobuf:"fixed64,3,opt,name=deadline" json:"deadline,omitempty"`
}

A backend rule provides configuration for an individual API element.

func (*BackendRule) Descriptor

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

func (*BackendRule) GetAddress

func (m *BackendRule) GetAddress() string

func (*BackendRule) GetDeadline

func (m *BackendRule) GetDeadline() float64

func (*BackendRule) GetSelector

func (m *BackendRule) GetSelector() string

func (*BackendRule) ProtoMessage

func (*BackendRule) ProtoMessage()

func (*BackendRule) Reset

func (m *BackendRule) Reset()

func (*BackendRule) String

func (m *BackendRule) String() string

type Billing

type Billing struct {
	// Names of the metrics to report to billing. Each name must
	// be defined in [Service.metrics][google.api.Service.metrics] section.
	Metrics []string `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"`
	// A list of billing status rules for configuring billing status check.
	Rules []*BillingStatusRule `protobuf:"bytes,5,rep,name=rules" json:"rules,omitempty"`
}

Billing related configuration of the service.

The following example shows how to configure metrics for billing:

metrics:
- name: library.googleapis.com/read_calls
  metric_kind: DELTA
  value_type: INT64
- name: library.googleapis.com/write_calls
  metric_kind: DELTA
  value_type: INT64
billing:
  metrics:
  - library.googleapis.com/read_calls
  - library.googleapis.com/write_calls

The next example shows how to enable billing status check and customize the check behavior. It makes sure billing status check is included in the `Check` method of [Service Control API](https://cloud.google.com/service-control/). In the example, "google.storage.Get" method can be served when the billing status is either `current` or `delinquent`, while "google.storage.Write" method can only be served when the billing status is `current`:

billing:
  rules:
  - selector: google.storage.Get
    allowed_statuses:
    - current
    - delinquent
  - selector: google.storage.Write
    allowed_statuses: current

Mostly services should only allow `current` status when serving requests. In addition, services can choose to allow both `current` and `delinquent` statuses when serving read-only requests to resources. If there's no matching selector for operation, no billing status check will be performed.

func (*Billing) Descriptor

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

func (*Billing) GetMetrics

func (m *Billing) GetMetrics() []string

func (*Billing) GetRules

func (m *Billing) GetRules() []*BillingStatusRule

func (*Billing) ProtoMessage

func (*Billing) ProtoMessage()

func (*Billing) Reset

func (m *Billing) Reset()

func (*Billing) String

func (m *Billing) String() string

type BillingStatusRule

type BillingStatusRule struct {
	// Selects the operation names to which this rule applies.
	// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
	Selector string `protobuf:"bytes,1,opt,name=selector" json:"selector,omitempty"`
	// Allowed billing statuses. The billing status check passes if the actual
	// billing status matches any of the provided values here.
	AllowedStatuses []string `protobuf:"bytes,2,rep,name=allowed_statuses,json=allowedStatuses" json:"allowed_statuses,omitempty"`
}

Defines the billing status requirements for operations.

When used with [Service Control API](https://cloud.google.com/service-control/), the following statuses are supported:

  • **current**: the associated billing account is up to date and capable of paying for resource usages.
  • **delinquent**: the associated billing account has a correctable problem, such as late payment.

Mostly services should only allow `current` status when serving requests. In addition, services can choose to allow both `current` and `delinquent` statuses when serving read-only requests to resources. If the list of allowed_statuses is empty, it means no billing requirement.

func (*BillingStatusRule) Descriptor

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

func (*BillingStatusRule) GetAllowedStatuses

func (m *BillingStatusRule) GetAllowedStatuses() []string

func (*BillingStatusRule) GetSelector

func (m *BillingStatusRule) GetSelector() string

func (*BillingStatusRule) ProtoMessage

func (*BillingStatusRule) ProtoMessage()

func (*BillingStatusRule) Reset

func (m *BillingStatusRule) Reset()

func (*BillingStatusRule) String

func (m *BillingStatusRule) 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" json:"rules,omitempty"`
}

`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`.

func (*Context) Descriptor

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

func (*Context) GetRules

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

func (*Context) ProtoMessage

func (*Context) ProtoMessage()

func (*Context) Reset

func (m *Context) Reset()

func (*Context) String

func (m *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" json:"selector,omitempty"`
	// A list of full type names of requested contexts.
	Requested []string `protobuf:"bytes,2,rep,name=requested" json:"requested,omitempty"`
	// A list of full type names of provided contexts.
	Provided []string `protobuf:"bytes,3,rep,name=provided" json:"provided,omitempty"`
}

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

func (*ContextRule) Descriptor

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

func (*ContextRule) GetProvided

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

func (*ContextRule) GetRequested

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

func (*ContextRule) GetSelector

func (m *ContextRule) GetSelector() string

func (*ContextRule) ProtoMessage

func (*ContextRule) ProtoMessage()

func (*ContextRule) Reset

func (m *ContextRule) Reset()

func (*ContextRule) String

func (m *ContextRule) String() string

type Control

type Control struct {
	// The service control environment to use. If empty, no control plane
	// feature (like quota and billing) will be enabled.
	Environment string `protobuf:"bytes,1,opt,name=environment" json:"environment,omitempty"`
}

Selects and configures the service controller used by the service. The service controller handles features like abuse, quota, billing, logging, monitoring, etc.

func (*Control) Descriptor

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

func (*Control) GetEnvironment

func (m *Control) GetEnvironment() string

func (*Control) ProtoMessage

func (*Control) ProtoMessage()

func (*Control) Reset

func (m *Control) Reset()

func (*Control) String

func (m *Control) String() string

type Documentation

type Documentation struct {
	// A short summary of what the service does. Can only be provided by
	// plain text.
	Summary string `protobuf:"bytes,1,opt,name=summary" json:"summary,omitempty"`
	// The top level pages for the documentation set.
	Pages []*Page `protobuf:"bytes,5,rep,name=pages" 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" json:"rules,omitempty"`
	// The URL to the root of documentation.
	DocumentationRootUrl string `protobuf:"bytes,4,opt,name=documentation_root_url,json=documentationRootUrl" json:"documentation_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" json:"overview,omitempty"`
}

`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> Comments can be made conditional using a visibility label. The below text will be only rendered if the `BETA` label is available: <pre><code>&#40;--BETA: comment for BETA users --&#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

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

func (*Documentation) GetDocumentationRootUrl

func (m *Documentation) GetDocumentationRootUrl() string

func (*Documentation) GetOverview

func (m *Documentation) GetOverview() string

func (*Documentation) GetPages

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

func (*Documentation) GetRules

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

func (*Documentation) GetSummary

func (m *Documentation) GetSummary() string

func (*Documentation) ProtoMessage

func (*Documentation) ProtoMessage()

func (*Documentation) Reset

func (m *Documentation) Reset()

func (*Documentation) String

func (m *Documentation) String() string

type DocumentationRule

type DocumentationRule struct {
	// The selector is a comma-separated list of patterns. 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". To
	// specify a default for all applicable elements, the whole pattern "*"
	// is used.
	Selector string `protobuf:"bytes,1,opt,name=selector" json:"selector,omitempty"`
	// Description of the selected API(s).
	Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
	// Deprecation description of the selected element(s). It can be provided if an
	// element is marked as `deprecated`.
	DeprecationDescription string `protobuf:"bytes,3,opt,name=deprecation_description,json=deprecationDescription" json:"deprecation_description,omitempty"`
}

A documentation rule provides information about individual API elements.

func (*DocumentationRule) Descriptor

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

func (*DocumentationRule) GetDeprecationDescription

func (m *DocumentationRule) GetDeprecationDescription() string

func (*DocumentationRule) GetDescription

func (m *DocumentationRule) GetDescription() string

func (*DocumentationRule) GetSelector

func (m *DocumentationRule) GetSelector() string

func (*DocumentationRule) ProtoMessage

func (*DocumentationRule) ProtoMessage()

func (*DocumentationRule) Reset

func (m *DocumentationRule) Reset()

func (*DocumentationRule) String

func (m *DocumentationRule) String() string

type Endpoint

type Endpoint struct {
	// The canonical name of this endpoint.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// DEPRECATED: This field is no longer supported. Instead of using aliases,
	// please specify multiple [google.api.Endpoint][google.api.Endpoint] for each of the intented
	// alias.
	//
	// Additional names that this endpoint will be hosted on.
	Aliases []string `protobuf:"bytes,2,rep,name=aliases" json:"aliases,omitempty"`
	// The list of APIs served by this endpoint.
	Apis []string `protobuf:"bytes,3,rep,name=apis" json:"apis,omitempty"`
	// The list of features enabled on this endpoint.
	Features []string `protobuf:"bytes,4,rep,name=features" json:"features,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" 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" json:"allow_cors,omitempty"`
}

`Endpoint` describes a network endpoint that serves a set of APIs. A service may expose any number of endpoints, and all endpoints share the same service configuration, such as quota configuration and monitoring configuration.

Example service configuration:

name: library-example.googleapis.com
endpoints:
  # Below entry makes 'google.example.library.v1.Library'
  # API be served from endpoint address library-example.googleapis.com.
  # It also allows HTTP OPTIONS calls to be passed to the backend, for
  # it to decide whether the subsequent cross-origin request is
  # allowed to proceed.
- name: library-example.googleapis.com
  allow_cors: true

func (*Endpoint) Descriptor

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

func (*Endpoint) GetAliases

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

func (*Endpoint) GetAllowCors

func (m *Endpoint) GetAllowCors() bool

func (*Endpoint) GetApis

func (m *Endpoint) GetApis() []string

func (*Endpoint) GetFeatures

func (m *Endpoint) GetFeatures() []string

func (*Endpoint) GetName

func (m *Endpoint) GetName() string

func (*Endpoint) GetTarget

func (m *Endpoint) GetTarget() string

func (*Endpoint) ProtoMessage

func (*Endpoint) ProtoMessage()

func (*Endpoint) Reset

func (m *Endpoint) Reset()

func (*Endpoint) String

func (m *Endpoint) String() string

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" 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 []*google_api2.LabelDescriptor `protobuf:"bytes,2,rep,name=labels" 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" 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" json:"display_name,omitempty"`
}

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

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

func (*LogDescriptor) GetDescription

func (m *LogDescriptor) GetDescription() string

func (*LogDescriptor) GetDisplayName

func (m *LogDescriptor) GetDisplayName() string

func (*LogDescriptor) GetLabels

func (m *LogDescriptor) GetLabels() []*google_api2.LabelDescriptor

func (*LogDescriptor) GetName

func (m *LogDescriptor) GetName() string

func (*LogDescriptor) ProtoMessage

func (*LogDescriptor) ProtoMessage()

func (*LogDescriptor) Reset

func (m *LogDescriptor) Reset()

func (*LogDescriptor) String

func (m *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" 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" json:"consumer_destinations,omitempty"`
}

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

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

func (*Logging) GetConsumerDestinations

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

func (*Logging) GetProducerDestinations

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

func (*Logging) ProtoMessage

func (*Logging) ProtoMessage()

func (*Logging) Reset

func (m *Logging) Reset()

func (*Logging) String

func (m *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" 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" json:"logs,omitempty"`
}

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

func (*Logging_LoggingDestination) Descriptor

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

func (*Logging_LoggingDestination) GetLogs

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

func (*Logging_LoggingDestination) GetMonitoredResource

func (m *Logging_LoggingDestination) GetMonitoredResource() string

func (*Logging_LoggingDestination) ProtoMessage

func (*Logging_LoggingDestination) ProtoMessage()

func (*Logging_LoggingDestination) Reset

func (m *Logging_LoggingDestination) Reset()

func (*Logging_LoggingDestination) String

func (m *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" 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 `` /* 162-byte string literal not displayed */
}

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

Used by metric-based quotas only.

func (*MetricRule) Descriptor

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

func (*MetricRule) GetMetricCosts

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

func (*MetricRule) GetSelector

func (m *MetricRule) GetSelector() string

func (*MetricRule) ProtoMessage

func (*MetricRule) ProtoMessage()

func (*MetricRule) Reset

func (m *MetricRule) Reset()

func (*MetricRule) String

func (m *MetricRule) String() string

type Monitoring

type Monitoring struct {
	// Monitoring configurations for sending metrics to the producer project.
	// There can be multiple producer destinations, each one must have a
	// different monitored resource type. A metric can be used in at most
	// one producer destination.
	ProducerDestinations []*Monitoring_MonitoringDestination `protobuf:"bytes,1,rep,name=producer_destinations,json=producerDestinations" json:"producer_destinations,omitempty"`
	// Monitoring configurations for sending metrics to the consumer project.
	// There can be multiple consumer destinations, each one must have a
	// different monitored resource type. A metric can be used in at most
	// one consumer destination.
	ConsumerDestinations []*Monitoring_MonitoringDestination `protobuf:"bytes,2,rep,name=consumer_destinations,json=consumerDestinations" json:"consumer_destinations,omitempty"`
}

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/overdue_count` metric is only sent to the consumer 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.
metrics:
- name: library.googleapis.com/book/returned_count
  metric_kind: DELTA
  value_type: INT64
  labels:
  - key: /customer_id
- name: library.googleapis.com/book/overdue_count
  metric_kind: GAUGE
  value_type: INT64
  labels:
  - key: /customer_id
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/overdue_count

func (*Monitoring) Descriptor

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

func (*Monitoring) GetConsumerDestinations

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

func (*Monitoring) GetProducerDestinations

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

func (*Monitoring) ProtoMessage

func (*Monitoring) ProtoMessage()

func (*Monitoring) Reset

func (m *Monitoring) Reset()

func (*Monitoring) String

func (m *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" json:"monitored_resource,omitempty"`
	// Names of the metrics to report to this monitoring destination.
	// Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
	Metrics []string `protobuf:"bytes,2,rep,name=metrics" json:"metrics,omitempty"`
}

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

func (*Monitoring_MonitoringDestination) Descriptor

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

func (*Monitoring_MonitoringDestination) GetMetrics

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

func (*Monitoring_MonitoringDestination) GetMonitoredResource

func (m *Monitoring_MonitoringDestination) GetMonitoredResource() string

func (*Monitoring_MonitoringDestination) ProtoMessage

func (*Monitoring_MonitoringDestination) ProtoMessage()

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" json:"canonical_scopes,omitempty"`
}

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

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

func (*OAuthRequirements) GetCanonicalScopes

func (m *OAuthRequirements) GetCanonicalScopes() string

func (*OAuthRequirements) ProtoMessage

func (*OAuthRequirements) ProtoMessage()

func (*OAuthRequirements) Reset

func (m *OAuthRequirements) Reset()

func (*OAuthRequirements) String

func (m *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" 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.
	Content string `protobuf:"bytes,2,opt,name=content" 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" json:"subpages,omitempty"`
}

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

func (*Page) Descriptor

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

func (*Page) GetContent

func (m *Page) GetContent() string

func (*Page) GetName

func (m *Page) GetName() string

func (*Page) GetSubpages

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

func (*Page) ProtoMessage

func (*Page) ProtoMessage()

func (*Page) Reset

func (m *Page) Reset()

func (*Page) String

func (m *Page) String() string

type ProjectProperties

type ProjectProperties struct {
	// List of per consumer project-specific properties.
	Properties []*Property `protobuf:"bytes,1,rep,name=properties" json:"properties,omitempty"`
}

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

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

func (*ProjectProperties) GetProperties

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

func (*ProjectProperties) ProtoMessage

func (*ProjectProperties) ProtoMessage()

func (*ProjectProperties) Reset

func (m *ProjectProperties) Reset()

func (*ProjectProperties) String

func (m *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" json:"name,omitempty"`
	// The type of this property.
	Type Property_PropertyType `protobuf:"varint,2,opt,name=type,enum=google.api.Property_PropertyType" json:"type,omitempty"`
	// The description of the property
	Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
}

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

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

func (*Property) GetDescription

func (m *Property) GetDescription() string

func (*Property) GetName

func (m *Property) GetName() string

func (*Property) GetType

func (m *Property) GetType() Property_PropertyType

func (*Property) ProtoMessage

func (*Property) ProtoMessage()

func (*Property) Reset

func (m *Property) Reset()

func (*Property) String

func (m *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) EnumDescriptor

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

func (Property_PropertyType) String

func (x Property_PropertyType) String() string

type Quota

type Quota struct {
	// List of `QuotaLimit` definitions for the service.
	//
	// Used by metric-based quotas only.
	Limits []*QuotaLimit `protobuf:"bytes,3,rep,name=limits" json:"limits,omitempty"`
	// List of `MetricRule` definitions, each one mapping a selected method to one
	// or more metrics.
	//
	// Used by metric-based quotas only.
	MetricRules []*MetricRule `protobuf:"bytes,4,rep,name=metric_rules,json=metricRules" json:"metric_rules,omitempty"`
}

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

The 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

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

func (*Quota) GetLimits

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

func (*Quota) GetMetricRules

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

func (*Quota) ProtoMessage

func (*Quota) ProtoMessage()

func (*Quota) Reset

func (m *Quota) Reset()

func (*Quota) String

func (m *Quota) String() string

type QuotaLimit

type QuotaLimit struct {
	// Name of the quota limit. The name is used to refer to the limit when
	// overriding the default limit on per-consumer basis.
	//
	// For group-based quota limits, the name must be unique within the quota
	// group. If a name is not provided, it will be generated from the limit_by
	// and duration fields.
	//
	// For metric-based quota limits, 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.
	//
	// The name of a limit is used as a unique identifier for this limit.
	// Therefore, once a limit has been put into use, its name should be
	// immutable. You can use the display_name field to provide a user-friendly
	// name for the limit. The display name can be evolved over time without
	// affecting the identity of the limit.
	Name string `protobuf:"bytes,6,opt,name=name" 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" 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" 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" 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" json:"free_tier,omitempty"`
	// Duration of this limit in textual notation. Example: "100s", "24h", "1d".
	// For duration longer than a day, only multiple of days is supported. We
	// support only "100s" and "1d" for now. Additional support will be added in
	// the future. "0" indicates indefinite duration.
	//
	// Used by group-based quotas only.
	Duration string `protobuf:"bytes,5,opt,name=duration" 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.
	//
	// Used by metric-based quotas only.
	Metric string `protobuf:"bytes,8,opt,name=metric" 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.
	//
	// The [Google Service Control](https://cloud.google.com/service-control)
	// supports the following unit components:
	// * One of the time intevals:
	//   * "/min"  for quota every minute.
	//   * "/d"  for quota every 24 hours, starting 00:00 US Pacific Time.
	//   * Otherwise the quota won't be reset by time, such as storage limit.
	// * One and only one of the granted containers:
	//   * "/{organization}" quota for an organization.
	//   * "/{project}" quota for a project.
	//   * "/{folder}" quota for a folder.
	//   * "/{resource}" quota for a universal resource.
	// * Zero or more quota segmentation dimension. Not all combos are valid.
	//   * "/{region}" quota for every region. Not to be used with time intervals.
	//   * Otherwise the resources granted on the target is not segmented.
	//   * "/{zone}" quota for every zone. Not to be used with time intervals.
	//   * Otherwise the resources granted on the target is not segmented.
	//   * "/{resource}" quota for a resource associated with a project or org.
	//
	// Here are some examples:
	// * "1/min/{project}" for quota per minute per project.
	// * "1/min/{user}" for quota per minute per user.
	// * "1/min/{organization}" for quota per minute per organization.
	//
	// Note: the order of unit components is insignificant.
	// The "1" at the beginning is required to follow the metric unit syntax.
	//
	// Used by metric-based quotas only.
	Unit string `protobuf:"bytes,9,opt,name=unit" json:"unit,omitempty"`
	// Tiered limit values. Also allows for regional or zone overrides for these
	// values if "/{region}" or "/{zone}" is specified in the unit field.
	//
	// Currently supported tiers from low to high:
	// VERY_LOW, LOW, STANDARD, HIGH, VERY_HIGH
	//
	// To apply different limit values for users according to their tiers, specify
	// the values for the tiers you want to differentiate. For example:
	// {LOW:100, STANDARD:500, HIGH:1000, VERY_HIGH:5000}
	//
	// The limit value for each tier is optional except for the tier STANDARD.
	// The limit value for an unspecified tier falls to the value of its next
	// tier towards tier STANDARD. For the above example, the limit value for tier
	// STANDARD is 500.
	//
	// To apply the same limit value for all users, just specify limit value for
	// tier STANDARD. For example: {STANDARD:500}.
	//
	// To apply a regional overide for a tier, add a map entry with key
	// "<TIER>/<region>", where <region> is a region name. Similarly, for a zone
	// override, add a map entry with key "<TIER>/{zone}".
	// Further, a wildcard can be used at the end of a zone name in order to
	// specify zone level overrides. For example:
	// LOW: 10, STANDARD: 50, HIGH: 100,
	// LOW/us-central1: 20, STANDARD/us-central1: 60, HIGH/us-central1: 200,
	// LOW/us-central1-*: 10, STANDARD/us-central1-*: 20, HIGH/us-central1-*: 80
	//
	// The regional overrides tier set for each region must be the same as
	// the tier set for default limit values. Same rule applies for zone overrides
	// tier as well.
	//
	// Used by metric-based quotas only.
	Values map[string]int64 `` /* 134-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" json:"display_name,omitempty"`
}

`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

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

func (*QuotaLimit) GetDefaultLimit

func (m *QuotaLimit) GetDefaultLimit() int64

func (*QuotaLimit) GetDescription

func (m *QuotaLimit) GetDescription() string

func (*QuotaLimit) GetDisplayName

func (m *QuotaLimit) GetDisplayName() string

func (*QuotaLimit) GetDuration

func (m *QuotaLimit) GetDuration() string

func (*QuotaLimit) GetFreeTier

func (m *QuotaLimit) GetFreeTier() int64

func (*QuotaLimit) GetMaxLimit

func (m *QuotaLimit) GetMaxLimit() int64

func (*QuotaLimit) GetMetric

func (m *QuotaLimit) GetMetric() string

func (*QuotaLimit) GetName

func (m *QuotaLimit) GetName() string

func (*QuotaLimit) GetUnit

func (m *QuotaLimit) GetUnit() string

func (*QuotaLimit) GetValues

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

func (*QuotaLimit) ProtoMessage

func (*QuotaLimit) ProtoMessage()

func (*QuotaLimit) Reset

func (m *QuotaLimit) Reset()

func (*QuotaLimit) String

func (m *QuotaLimit) String() string

type Service

type Service struct {
	// The version of the service configuration. The config version may
	// influence interpretation of the configuration, for example, to
	// determine defaults. This is documented together with applicable
	// options. The current default for the config version itself is `3`.
	ConfigVersion *google_protobuf5.UInt32Value `protobuf:"bytes,20,opt,name=config_version,json=configVersion" json:"config_version,omitempty"`
	// The DNS address at which this service is available,
	// e.g. `calendar.googleapis.com`.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// A unique ID for a specific instance of this message, typically assigned
	// by the client for tracking purpose. If empty, the server may choose to
	// generate one instead.
	Id string `protobuf:"bytes,33,opt,name=id" json:"id,omitempty"`
	// The product title associated with this service.
	Title string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
	// The id of the Google developer project that owns the service.
	// Members of this project can manage the service configuration,
	// manage consumption of the service, etc.
	ProducerProjectId string `protobuf:"bytes,22,opt,name=producer_project_id,json=producerProjectId" json:"producer_project_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 []*google_protobuf4.Api `protobuf:"bytes,3,rep,name=apis" 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. Example:
	//
	//     types:
	//     - name: google.protobuf.Int32
	Types []*google_protobuf3.Type `protobuf:"bytes,4,rep,name=types" 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. Example:
	//
	//     enums:
	//     - name: google.someapi.v1.SomeEnum
	Enums []*google_protobuf3.Enum `protobuf:"bytes,5,rep,name=enums" json:"enums,omitempty"`
	// Additional API documentation.
	Documentation *Documentation `protobuf:"bytes,6,opt,name=documentation" json:"documentation,omitempty"`
	// API backend configuration.
	Backend *Backend `protobuf:"bytes,8,opt,name=backend" json:"backend,omitempty"`
	// HTTP configuration.
	Http *google_api.Http `protobuf:"bytes,9,opt,name=http" json:"http,omitempty"`
	// Quota configuration.
	Quota *Quota `protobuf:"bytes,10,opt,name=quota" json:"quota,omitempty"`
	// Auth configuration.
	Authentication *Authentication `protobuf:"bytes,11,opt,name=authentication" json:"authentication,omitempty"`
	// Context configuration.
	Context *Context `protobuf:"bytes,12,opt,name=context" json:"context,omitempty"`
	// Configuration controlling usage of this service.
	Usage *Usage `protobuf:"bytes,15,opt,name=usage" 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" json:"endpoints,omitempty"`
	// Configuration for the service control plane.
	Control *Control `protobuf:"bytes,21,opt,name=control" json:"control,omitempty"`
	// Defines the logs used by this service.
	Logs []*LogDescriptor `protobuf:"bytes,23,rep,name=logs" json:"logs,omitempty"`
	// Defines the metrics used by this service.
	Metrics []*google_api3.MetricDescriptor `protobuf:"bytes,24,rep,name=metrics" 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 []*google_api6.MonitoredResourceDescriptor `protobuf:"bytes,25,rep,name=monitored_resources,json=monitoredResources" json:"monitored_resources,omitempty"`
	// Logging configuration.
	Logging *Logging `protobuf:"bytes,27,opt,name=logging" json:"logging,omitempty"`
	// Monitoring configuration.
	Monitoring *Monitoring `protobuf:"bytes,28,opt,name=monitoring" json:"monitoring,omitempty"`
	// System parameter configuration.
	SystemParameters *SystemParameters `protobuf:"bytes,29,opt,name=system_parameters,json=systemParameters" 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" json:"source_info,omitempty"`
	// Experimental configuration.
	Experimental *google_api5.Experimental `protobuf:"bytes,101,opt,name=experimental" json:"experimental,omitempty"`
}

`Service` is the root object of Google service configuration schema. It describes basic information about a service, such as the name and the 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. See each proto message definition for details.

Example:

type: google.api.Service
config_version: 3
name: calendar.googleapis.com
title: Google Calendar API
apis:
- name: google.calendar.v3.Calendar
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

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

func (*Service) GetApis

func (m *Service) GetApis() []*google_protobuf4.Api

func (*Service) GetAuthentication

func (m *Service) GetAuthentication() *Authentication

func (*Service) GetBackend

func (m *Service) GetBackend() *Backend

func (*Service) GetConfigVersion

func (m *Service) GetConfigVersion() *google_protobuf5.UInt32Value

func (*Service) GetContext

func (m *Service) GetContext() *Context

func (*Service) GetControl

func (m *Service) GetControl() *Control

func (*Service) GetDocumentation

func (m *Service) GetDocumentation() *Documentation

func (*Service) GetEndpoints

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

func (*Service) GetEnums

func (m *Service) GetEnums() []*google_protobuf3.Enum

func (*Service) GetExperimental

func (m *Service) GetExperimental() *google_api5.Experimental

func (*Service) GetHttp

func (m *Service) GetHttp() *google_api.Http

func (*Service) GetId

func (m *Service) GetId() string

func (*Service) GetLogging

func (m *Service) GetLogging() *Logging

func (*Service) GetLogs

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

func (*Service) GetMetrics

func (m *Service) GetMetrics() []*google_api3.MetricDescriptor

func (*Service) GetMonitoredResources

func (m *Service) GetMonitoredResources() []*google_api6.MonitoredResourceDescriptor

func (*Service) GetMonitoring

func (m *Service) GetMonitoring() *Monitoring

func (*Service) GetName

func (m *Service) GetName() string

func (*Service) GetProducerProjectId

func (m *Service) GetProducerProjectId() string

func (*Service) GetQuota

func (m *Service) GetQuota() *Quota

func (*Service) GetSourceInfo

func (m *Service) GetSourceInfo() *SourceInfo

func (*Service) GetSystemParameters

func (m *Service) GetSystemParameters() *SystemParameters

func (*Service) GetTitle

func (m *Service) GetTitle() string

func (*Service) GetTypes

func (m *Service) GetTypes() []*google_protobuf3.Type

func (*Service) GetUsage

func (m *Service) GetUsage() *Usage

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) Reset

func (m *Service) Reset()

func (*Service) String

func (m *Service) String() string

type SourceInfo

type SourceInfo struct {
	// All files used during config generation.
	SourceFiles []*google_protobuf1.Any `protobuf:"bytes,1,rep,name=source_files,json=sourceFiles" json:"source_files,omitempty"`
}

Source information used to create a Service Config

func (*SourceInfo) Descriptor

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

func (*SourceInfo) GetSourceFiles

func (m *SourceInfo) GetSourceFiles() []*google_protobuf1.Any

func (*SourceInfo) ProtoMessage

func (*SourceInfo) ProtoMessage()

func (*SourceInfo) Reset

func (m *SourceInfo) Reset()

func (*SourceInfo) String

func (m *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" 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" 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" json:"url_query_parameter,omitempty"`
}

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

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

func (*SystemParameter) GetHttpHeader

func (m *SystemParameter) GetHttpHeader() string

func (*SystemParameter) GetName

func (m *SystemParameter) GetName() string

func (*SystemParameter) GetUrlQueryParameter

func (m *SystemParameter) GetUrlQueryParameter() string

func (*SystemParameter) ProtoMessage

func (*SystemParameter) ProtoMessage()

func (*SystemParameter) Reset

func (m *SystemParameter) Reset()

func (*SystemParameter) String

func (m *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" 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" json:"parameters,omitempty"`
}

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

func (*SystemParameterRule) Descriptor

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

func (*SystemParameterRule) GetParameters

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

func (*SystemParameterRule) GetSelector

func (m *SystemParameterRule) GetSelector() string

func (*SystemParameterRule) ProtoMessage

func (*SystemParameterRule) ProtoMessage()

func (*SystemParameterRule) Reset

func (m *SystemParameterRule) Reset()

func (*SystemParameterRule) String

func (m *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" json:"rules,omitempty"`
}

### 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

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

func (*SystemParameters) GetRules

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

func (*SystemParameters) ProtoMessage

func (*SystemParameters) ProtoMessage()

func (*SystemParameters) Reset

func (m *SystemParameters) Reset()

func (*SystemParameters) String

func (m *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'.
	Requirements []string `protobuf:"bytes,1,rep,name=requirements" 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" 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 `` /* 137-byte string literal not displayed */
}

Configuration controlling usage of a service.

func (*Usage) Descriptor

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

func (*Usage) GetProducerNotificationChannel

func (m *Usage) GetProducerNotificationChannel() string

func (*Usage) GetRequirements

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

func (*Usage) GetRules

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

func (*Usage) ProtoMessage

func (*Usage) ProtoMessage()

func (*Usage) Reset

func (m *Usage) Reset()

func (*Usage) String

func (m *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" json:"selector,omitempty"`
	// True, if the method allows unregistered calls; false otherwise.
	AllowUnregisteredCalls bool `protobuf:"varint,2,opt,name=allow_unregistered_calls,json=allowUnregisteredCalls" json:"allow_unregistered_calls,omitempty"`
	// True, if the method should skip service control. If so, no control plane
	// feature (like quota and billing) will be enabled.
	SkipServiceControl bool `protobuf:"varint,3,opt,name=skip_service_control,json=skipServiceControl" json:"skip_service_control,omitempty"`
}

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

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

func (*UsageRule) GetAllowUnregisteredCalls

func (m *UsageRule) GetAllowUnregisteredCalls() bool

func (*UsageRule) GetSelector

func (m *UsageRule) GetSelector() string

func (*UsageRule) GetSkipServiceControl

func (m *UsageRule) GetSkipServiceControl() bool

func (*UsageRule) ProtoMessage

func (*UsageRule) ProtoMessage()

func (*UsageRule) Reset

func (m *UsageRule) Reset()

func (*UsageRule) String

func (m *UsageRule) String() string

Jump to

Keyboard shortcuts

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