google_api

package
v0.0.0-...-dbc791b Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChangeType_name = map[int32]string{
	0: "CHANGE_TYPE_UNSPECIFIED",
	1: "ADDED",
	2: "REMOVED",
	3: "MODIFIED",
}
View Source
var ChangeType_value = map[string]int32{
	"CHANGE_TYPE_UNSPECIFIED": 0,
	"ADDED":                   1,
	"REMOVED":                 2,
	"MODIFIED":                3,
}
View Source
var E_Http = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.MethodOptions)(nil),
	ExtensionType: (*HttpRule)(nil),
	Field:         72295728,
	Name:          "google.api.http",
	Tag:           "bytes,72295728,opt,name=http",
	Filename:      "google/api/annotations.proto",
}
View Source
var LabelDescriptor_ValueType_name = map[int32]string{
	0: "STRING",
	1: "BOOL",
	2: "INT64",
}
View Source
var LabelDescriptor_ValueType_value = map[string]int32{
	"STRING": 0,
	"BOOL":   1,
	"INT64":  2,
}
View Source
var MetricDescriptor_MetricKind_name = map[int32]string{
	0: "METRIC_KIND_UNSPECIFIED",
	1: "GAUGE",
	2: "DELTA",
	3: "CUMULATIVE",
}
View Source
var MetricDescriptor_MetricKind_value = map[string]int32{
	"METRIC_KIND_UNSPECIFIED": 0,
	"GAUGE":                   1,
	"DELTA":                   2,
	"CUMULATIVE":              3,
}
View Source
var MetricDescriptor_ValueType_name = map[int32]string{
	0: "VALUE_TYPE_UNSPECIFIED",
	1: "BOOL",
	2: "INT64",
	3: "DOUBLE",
	4: "STRING",
	5: "DISTRIBUTION",
	6: "MONEY",
}
View Source
var MetricDescriptor_ValueType_value = map[string]int32{
	"VALUE_TYPE_UNSPECIFIED": 0,
	"BOOL":                   1,
	"INT64":                  2,
	"DOUBLE":                 3,
	"STRING":                 4,
	"DISTRIBUTION":           5,
	"MONEY":                  6,
}
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 Advice

type Advice struct {
	// Useful description for why this advice was applied and what actions should
	// be taken to mitigate any implied risks.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
}

Generated advice about this change, used for providing more information about how a change will affect the existing service.

func (*Advice) Descriptor

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

func (*Advice) GetDescription

func (m *Advice) GetDescription() string

func (*Advice) ProtoMessage

func (*Advice) ProtoMessage()

func (*Advice) Reset

func (m *Advice) Reset()

func (*Advice) String

func (m *Advice) String() string

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, 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,proto3" 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,proto3" 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,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"`
}

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,proto3" 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 `` /* 130-byte string literal not displayed */
	// 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,proto3" json:"selector,omitempty"`
	// The address of the API backend.
	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 depends on the deployment context.
	Deadline float64 `protobuf:"fixed64,3,opt,name=deadline,proto3" 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 {
	// 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" json:"consumer_destinations,omitempty"`
}

Billing related configuration of the service.

The following example shows how to configure monitored resources and metrics for billing:

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/borrowed_count
  metric_kind: DELTA
  value_type: INT64
billing:
  consumer_destinations:
  - monitored_resource: library.googleapis.com/branch
    metrics:
    - library.googleapis.com/book/borrowed_count

func (*Billing) Descriptor

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

func (*Billing) GetConsumerDestinations

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

func (*Billing) ProtoMessage

func (*Billing) ProtoMessage()

func (*Billing) Reset

func (m *Billing) Reset()

func (*Billing) String

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

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

func (*Billing_BillingDestination) Descriptor

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

func (*Billing_BillingDestination) GetMetrics

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

func (*Billing_BillingDestination) GetMonitoredResource

func (m *Billing_BillingDestination) GetMonitoredResource() string

func (*Billing_BillingDestination) ProtoMessage

func (*Billing_BillingDestination) ProtoMessage()

func (*Billing_BillingDestination) Reset

func (m *Billing_BillingDestination) Reset()

func (*Billing_BillingDestination) String

func (m *Billing_BillingDestination) String() string

type ChangeType

type ChangeType int32

Classifies set of possible modifications to an object in the service configuration.

const (
	// No value was provided.
	ChangeType_CHANGE_TYPE_UNSPECIFIED ChangeType = 0
	// The changed object exists in the 'new' service configuration, but not
	// in the 'old' service configuration.
	ChangeType_ADDED ChangeType = 1
	// The changed object exists in the 'old' service configuration, but not
	// in the 'new' service configuration.
	ChangeType_REMOVED ChangeType = 2
	// The changed object exists in both service configurations, but its value
	// is different.
	ChangeType_MODIFIED ChangeType = 3
)

func (ChangeType) EnumDescriptor

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

func (ChangeType) String

func (x ChangeType) String() string

type ConfigChange

type ConfigChange struct {
	// Object hierarchy path to the change, with levels separated by a '.'
	// character. For repeated fields, an applicable unique identifier field is
	// used for the index (usually selector, name, or id). For maps, the term
	// 'key' is used. If the field has no unique identifier, the numeric index
	// is used.
	// Examples:
	// - visibility.rules[selector=="google.LibraryService.CreateBook"].restriction
	// - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
	// - logging.producer_destinations[0]
	Element string `protobuf:"bytes,1,opt,name=element,proto3" json:"element,omitempty"`
	// Value of the changed object in the old Service configuration,
	// in JSON format. This field will not be populated if ChangeType == ADDED.
	OldValue string `protobuf:"bytes,2,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"`
	// Value of the changed object in the new Service configuration,
	// in JSON format. This field will not be populated if ChangeType == REMOVED.
	NewValue string `protobuf:"bytes,3,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"`
	// The type for this change, either ADDED, REMOVED, or MODIFIED.
	ChangeType ChangeType `protobuf:"varint,4,opt,name=change_type,json=changeType,proto3,enum=google.api.ChangeType" json:"change_type,omitempty"`
	// Collection of advice provided for this change, useful for determining the
	// possible impact of this change.
	Advices []*Advice `protobuf:"bytes,5,rep,name=advices" json:"advices,omitempty"`
}

Output generated from semantically comparing two versions of a service configuration.

Includes detailed information about a field that have changed with applicable advice about potential consequences for the change, such as backwards-incompatibility.

func (*ConfigChange) Descriptor

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

func (*ConfigChange) GetAdvices

func (m *ConfigChange) GetAdvices() []*Advice

func (*ConfigChange) GetChangeType

func (m *ConfigChange) GetChangeType() ChangeType

func (*ConfigChange) GetElement

func (m *ConfigChange) GetElement() string

func (*ConfigChange) GetNewValue

func (m *ConfigChange) GetNewValue() string

func (*ConfigChange) GetOldValue

func (m *ConfigChange) GetOldValue() string

func (*ConfigChange) ProtoMessage

func (*ConfigChange) ProtoMessage()

func (*ConfigChange) Reset

func (m *ConfigChange) Reset()

func (*ConfigChange) String

func (m *ConfigChange) 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,proto3" 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,proto3" 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 CustomHttpPattern

type CustomHttpPattern struct {
	// The name of this custom HTTP verb.
	Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// The path matched by this custom verb.
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
}

A custom pattern is used for defining custom HTTP verb.

func (*CustomHttpPattern) Descriptor

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

func (*CustomHttpPattern) GetKind

func (m *CustomHttpPattern) GetKind() string

func (*CustomHttpPattern) GetPath

func (m *CustomHttpPattern) GetPath() string

func (*CustomHttpPattern) ProtoMessage

func (*CustomHttpPattern) ProtoMessage()

func (*CustomHttpPattern) Reset

func (m *CustomHttpPattern) Reset()

func (*CustomHttpPattern) String

func (m *CustomHttpPattern) String() string

type Distribution

type Distribution struct {
	// The number of values in the population. Must be non-negative.
	Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// The arithmetic mean of the values in the population. If `count` is zero
	// then this field must be zero.
	Mean float64 `protobuf:"fixed64,2,opt,name=mean,proto3" json:"mean,omitempty"`
	// The sum of squared deviations from the mean of the values in the
	// population.  For values x_i this is:
	//
	//     Sum[i=1..n]((x_i - mean)^2)
	//
	// Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
	// describes Welford's method for accumulating this sum in one pass.
	//
	// If `count` is zero then this field must be zero.
	SumOfSquaredDeviation float64 `` /* 130-byte string literal not displayed */
	// If specified, contains the range of the population values. The field
	// must not be present if the `count` is zero.
	Range *Distribution_Range `protobuf:"bytes,4,opt,name=range" json:"range,omitempty"`
	// Defines the histogram bucket boundaries.
	BucketOptions *Distribution_BucketOptions `protobuf:"bytes,6,opt,name=bucket_options,json=bucketOptions" json:"bucket_options,omitempty"`
	// If `bucket_options` is given, then the sum of the values in `bucket_counts`
	// must equal the value in `count`.  If `bucket_options` is not given, no
	// `bucket_counts` fields may be given.
	//
	// Bucket counts are given in order under the numbering scheme described
	// above (the underflow bucket has number 0; the finite buckets, if any,
	// have numbers 1 through N-2; the overflow bucket has number N-1).
	//
	// The size of `bucket_counts` must be no greater than N as defined in
	// `bucket_options`.
	//
	// Any suffix of trailing zero bucket_count fields may be omitted.
	BucketCounts []int64 `protobuf:"varint,7,rep,packed,name=bucket_counts,json=bucketCounts" json:"bucket_counts,omitempty"`
}

Distribution contains summary statistics for a population of values and, optionally, a histogram representing the distribution of those values across a specified set of histogram buckets.

The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values.

The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by specifying parameters for a method of computing them (buckets of fixed width or buckets of exponentially increasing width).

Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the `mean` and `sum_of_squared_deviation` fields meaningless.

func (*Distribution) Descriptor

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

func (*Distribution) GetBucketCounts

func (m *Distribution) GetBucketCounts() []int64

func (*Distribution) GetBucketOptions

func (m *Distribution) GetBucketOptions() *Distribution_BucketOptions

func (*Distribution) GetCount

func (m *Distribution) GetCount() int64

func (*Distribution) GetMean

func (m *Distribution) GetMean() float64

func (*Distribution) GetRange

func (m *Distribution) GetRange() *Distribution_Range

func (*Distribution) GetSumOfSquaredDeviation

func (m *Distribution) GetSumOfSquaredDeviation() float64

func (*Distribution) ProtoMessage

func (*Distribution) ProtoMessage()

func (*Distribution) Reset

func (m *Distribution) Reset()

func (*Distribution) String

func (m *Distribution) String() string

type Distribution_BucketOptions

type Distribution_BucketOptions struct {
	// Exactly one of these three fields must be set.
	//
	// Types that are valid to be assigned to Options:
	//	*Distribution_BucketOptions_LinearBuckets
	//	*Distribution_BucketOptions_ExponentialBuckets
	//	*Distribution_BucketOptions_ExplicitBuckets
	Options isDistribution_BucketOptions_Options `protobuf_oneof:"options"`
}

A Distribution may optionally contain a histogram of the values in the population. The histogram is given in `bucket_counts` as counts of values that fall into one of a sequence of non-overlapping buckets. The sequence of buckets is described by `bucket_options`.

A bucket specifies an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket is strictly greater than the lower bound.

The sequence of N buckets for a Distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite.

`BucketOptions` describes bucket boundaries in one of three ways. Two describe the boundaries by giving parameters for a formula to generate boundaries and one gives the bucket boundaries explicitly.

If `bucket_boundaries` is not given, then no `bucket_counts` may be given.

func (*Distribution_BucketOptions) Descriptor

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

func (*Distribution_BucketOptions) GetExplicitBuckets

func (*Distribution_BucketOptions) GetExponentialBuckets

func (*Distribution_BucketOptions) GetLinearBuckets

func (*Distribution_BucketOptions) GetOptions

func (m *Distribution_BucketOptions) GetOptions() isDistribution_BucketOptions_Options

func (*Distribution_BucketOptions) ProtoMessage

func (*Distribution_BucketOptions) ProtoMessage()

func (*Distribution_BucketOptions) Reset

func (m *Distribution_BucketOptions) Reset()

func (*Distribution_BucketOptions) String

func (m *Distribution_BucketOptions) String() string

func (*Distribution_BucketOptions) XXX_OneofFuncs

func (*Distribution_BucketOptions) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Distribution_BucketOptions_Explicit

type Distribution_BucketOptions_Explicit struct {
	// The values must be monotonically increasing.
	Bounds []float64 `protobuf:"fixed64,1,rep,packed,name=bounds" json:"bounds,omitempty"`
}

A set of buckets with arbitrary widths.

Defines `size(bounds) + 1` (= N) buckets with these boundaries for bucket i:

Upper bound (0 <= i < N-1):     bounds[i]
Lower bound (1 <= i < N);       bounds[i - 1]

There must be at least one element in `bounds`. If `bounds` has only one element, there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets.

func (*Distribution_BucketOptions_Explicit) Descriptor

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

func (*Distribution_BucketOptions_Explicit) GetBounds

func (*Distribution_BucketOptions_Explicit) ProtoMessage

func (*Distribution_BucketOptions_Explicit) ProtoMessage()

func (*Distribution_BucketOptions_Explicit) Reset

func (*Distribution_BucketOptions_Explicit) String

type Distribution_BucketOptions_ExplicitBuckets

type Distribution_BucketOptions_ExplicitBuckets struct {
	ExplicitBuckets *Distribution_BucketOptions_Explicit `protobuf:"bytes,3,opt,name=explicit_buckets,json=explicitBuckets,oneof"`
}

type Distribution_BucketOptions_Exponential

type Distribution_BucketOptions_Exponential struct {
	// Must be greater than 0.
	NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets,proto3" json:"num_finite_buckets,omitempty"`
	// Must be greater than 1.
	GrowthFactor float64 `protobuf:"fixed64,2,opt,name=growth_factor,json=growthFactor,proto3" json:"growth_factor,omitempty"`
	// Must be greater than 0.
	Scale float64 `protobuf:"fixed64,3,opt,name=scale,proto3" json:"scale,omitempty"`
}

Specify a sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.

Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for bucket i:

Upper bound (0 <= i < N-1):     scale * (growth_factor ^ i).
Lower bound (1 <= i < N):       scale * (growth_factor ^ (i - 1)).

func (*Distribution_BucketOptions_Exponential) Descriptor

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

func (*Distribution_BucketOptions_Exponential) GetGrowthFactor

func (m *Distribution_BucketOptions_Exponential) GetGrowthFactor() float64

func (*Distribution_BucketOptions_Exponential) GetNumFiniteBuckets

func (m *Distribution_BucketOptions_Exponential) GetNumFiniteBuckets() int32

func (*Distribution_BucketOptions_Exponential) GetScale

func (*Distribution_BucketOptions_Exponential) ProtoMessage

func (*Distribution_BucketOptions_Exponential) Reset

func (*Distribution_BucketOptions_Exponential) String

type Distribution_BucketOptions_ExponentialBuckets

type Distribution_BucketOptions_ExponentialBuckets struct {
	ExponentialBuckets *Distribution_BucketOptions_Exponential `protobuf:"bytes,2,opt,name=exponential_buckets,json=exponentialBuckets,oneof"`
}

type Distribution_BucketOptions_Linear

type Distribution_BucketOptions_Linear struct {
	// Must be greater than 0.
	NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets,proto3" json:"num_finite_buckets,omitempty"`
	// Must be greater than 0.
	Width float64 `protobuf:"fixed64,2,opt,name=width,proto3" json:"width,omitempty"`
	// Lower bound of the first bucket.
	Offset float64 `protobuf:"fixed64,3,opt,name=offset,proto3" json:"offset,omitempty"`
}

Specify a sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.

Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for bucket `i`:

Upper bound (0 <= i < N-1):     offset + (width * i).
Lower bound (1 <= i < N):       offset + (width * (i - 1)).

func (*Distribution_BucketOptions_Linear) Descriptor

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

func (*Distribution_BucketOptions_Linear) GetNumFiniteBuckets

func (m *Distribution_BucketOptions_Linear) GetNumFiniteBuckets() int32

func (*Distribution_BucketOptions_Linear) GetOffset

func (*Distribution_BucketOptions_Linear) GetWidth

func (*Distribution_BucketOptions_Linear) ProtoMessage

func (*Distribution_BucketOptions_Linear) ProtoMessage()

func (*Distribution_BucketOptions_Linear) Reset

func (*Distribution_BucketOptions_Linear) String

type Distribution_BucketOptions_LinearBuckets

type Distribution_BucketOptions_LinearBuckets struct {
	LinearBuckets *Distribution_BucketOptions_Linear `protobuf:"bytes,1,opt,name=linear_buckets,json=linearBuckets,oneof"`
}

type Distribution_Range

type Distribution_Range struct {
	// The minimum of the population values.
	Min float64 `protobuf:"fixed64,1,opt,name=min,proto3" json:"min,omitempty"`
	// The maximum of the population values.
	Max float64 `protobuf:"fixed64,2,opt,name=max,proto3" json:"max,omitempty"`
}

The range of the population values.

func (*Distribution_Range) Descriptor

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

func (*Distribution_Range) GetMax

func (m *Distribution_Range) GetMax() float64

func (*Distribution_Range) GetMin

func (m *Distribution_Range) GetMin() float64

func (*Distribution_Range) ProtoMessage

func (*Distribution_Range) ProtoMessage()

func (*Distribution_Range) Reset

func (m *Distribution_Range) Reset()

func (*Distribution_Range) String

func (m *Distribution_Range) 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,proto3" 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,proto3" 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,proto3" 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,proto3" json:"selector,omitempty"`
	// Description of the selected API(s).
	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 */
}

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,proto3" 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,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"`
}

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

type Http struct {
	// A list of HTTP configuration rules that apply to individual API methods.
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules []*HttpRule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"`
}

Defines the HTTP configuration for a service. It contains a list of HttpRule[google.api.HttpRule], each specifying the mapping of an RPC method to one or more HTTP REST API methods.

func (*Http) Descriptor

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

func (*Http) GetRules

func (m *Http) GetRules() []*HttpRule

func (*Http) ProtoMessage

func (*Http) ProtoMessage()

func (*Http) Reset

func (m *Http) Reset()

func (*Http) String

func (m *Http) String() string

type HttpBody

type HttpBody struct {
	// The HTTP Content-Type string representing the content type of the body.
	ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// HTTP body binary data.
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page.

This message can be used both in streaming and non-streaming API methods in the request as well as the response.

It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body.

Example:

message GetResourceRequest {
  // A unique request id.
  string request_id = 1;

  // The raw HTTP body is bound to this field.
  google.api.HttpBody http_body = 2;
}

service ResourceService {
  rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
  rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);
}

Example with streaming methods:

service CaldavService {
  rpc GetCalendar(stream google.api.HttpBody)
    returns (stream google.api.HttpBody);
  rpc UpdateCalendar(stream google.api.HttpBody)
    returns (stream google.api.HttpBody);
}

Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.

func (*HttpBody) Descriptor

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

func (*HttpBody) GetContentType

func (m *HttpBody) GetContentType() string

func (*HttpBody) GetData

func (m *HttpBody) GetData() []byte

func (*HttpBody) ProtoMessage

func (*HttpBody) ProtoMessage()

func (*HttpBody) Reset

func (m *HttpBody) Reset()

func (*HttpBody) String

func (m *HttpBody) String() string

type HttpRule

type HttpRule struct {
	// Selects 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"`
	// Determines the URL pattern is matched by this rules. This pattern can be
	// used with any of the {get|put|post|delete|patch} methods. A custom method
	// can be defined using the 'custom' field.
	//
	// Types that are valid to be assigned to Pattern:
	//	*HttpRule_Get
	//	*HttpRule_Put
	//	*HttpRule_Post
	//	*HttpRule_Delete
	//	*HttpRule_Patch
	//	*HttpRule_Custom
	Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"`
	// The name of the request field whose value is mapped to the HTTP body, or
	// `*` for mapping all fields not captured by the path pattern to the HTTP
	// body. NOTE: the referred field must not be a repeated field and must be
	// present at the top-level of request message type.
	Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"`
	// Additional HTTP bindings for the selector. Nested bindings must
	// not contain an `additional_bindings` field themselves (that is,
	// the nesting may only be one level deep).
	AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings" json:"additional_bindings,omitempty"`
}

`HttpRule` defines the mapping of an RPC method to one or more HTTP REST APIs. The mapping determines what portions of the request message are populated from the path, query parameters, or body of the HTTP request. The mapping is typically specified as an `google.api.http` annotation, see "google/api/annotations.proto" for details.

The mapping consists of a field specifying the path template and method kind. The path template can refer to fields in the request message, as in the example below which describes a REST GET operation on a resource collection of messages:

service Messaging {
  rpc GetMessage(GetMessageRequest) returns (Message) {
    option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}";
  }
}
message GetMessageRequest {
  message SubMessage {
    string subfield = 1;
  }
  string message_id = 1; // mapped to the URL
  SubMessage sub = 2;    // `sub.subfield` is url-mapped
}
message Message {
  string text = 1; // content of the resource
}

The same http annotation can alternatively be expressed inside the `GRPC API Configuration` YAML file.

http:
  rules:
    - selector: <proto_package_name>.Messaging.GetMessage
      get: /v1/messages/{message_id}/{sub.subfield}

This definition enables an automatic, bidrectional mapping of HTTP JSON to RPC. Example:

HTTP | RPC -----|----- `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))`

In general, not only fields but also field paths can be referenced from a path pattern. Fields mapped to the path pattern cannot be repeated and must have a primitive (non-message) type.

Any fields in the request message which are not bound by the path pattern automatically become (optional) HTTP query parameters. Assume the following definition of the request message:

message GetMessageRequest {
  message SubMessage {
    string subfield = 1;
  }
  string message_id = 1; // mapped to the URL
  int64 revision = 2;    // becomes a parameter
  SubMessage sub = 3;    // `sub.subfield` becomes a parameter
}

This enables a HTTP JSON to RPC mapping as below:

HTTP | RPC -----|----- `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))`

Note that fields which are mapped to HTTP parameters must have a primitive type or a repeated primitive type. Message types are not allowed. In the case of a repeated type, the parameter can be repeated in the URL, as in `...?param=A&param=B`.

For HTTP method kinds which allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection:

service Messaging {
  rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
    option (google.api.http) = {
      put: "/v1/messages/{message_id}"
      body: "message"
    };
  }
}
message UpdateMessageRequest {
  string message_id = 1; // mapped to the URL
  Message message = 2;   // mapped to the body
}

The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding:

HTTP | RPC -----|----- `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`

The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method:

service Messaging {
  rpc UpdateMessage(Message) returns (Message) {
    option (google.api.http) = {
      put: "/v1/messages/{message_id}"
      body: "*"
    };
  }
}
message Message {
  string message_id = 1;
  string text = 2;
}

The following HTTP JSON to RPC mapping is enabled:

HTTP | RPC -----|----- `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`

Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice of defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data.

It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example:

service Messaging {
  rpc GetMessage(GetMessageRequest) returns (Message) {
    option (google.api.http) = {
      get: "/v1/messages/{message_id}"
      additional_bindings {
        get: "/v1/users/{user_id}/messages/{message_id}"
      }
    };
  }
}
message GetMessageRequest {
  string message_id = 1;
  string user_id = 2;
}

This enables the following two alternative HTTP JSON to RPC mappings:

HTTP | RPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`

Rules for HTTP mapping

The rules for mapping HTTP path, query parameters, and body fields to the request message are as follows:

  1. The `body` field specifies either `*` or a field path, or is omitted. If omitted, it assumes there is no HTTP body.
  2. Leaf fields (recursive expansion of nested messages in the request) can be classified into three types: (a) Matched in the URL template. (b) Covered by body (if body is `*`, everything except (a) fields; else everything under the body field) (c) All other fields.
  3. URL query parameters found in the HTTP request are mapped to (c) fields.
  4. Any body sent with an HTTP request can contain only (b) fields.

The syntax of the path template is as follows:

Template = "/" Segments [ Verb ] ;
Segments = Segment { "/" Segment } ;
Segment  = "*" | "**" | LITERAL | Variable ;
Variable = "{" FieldPath [ "=" Segments ] "}" ;
FieldPath = IDENT { "." IDENT } ;
Verb     = ":" LITERAL ;

The syntax `*` matches a single path segment. It follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion.

The syntax `**` matches zero or more path segments. It follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.3 Reserved Expansion. NOTE: it must be the last segment in the path except the Verb.

The syntax `LITERAL` matches literal text in the URL path.

The syntax `Variable` matches the entire path as specified by its template; this nested template must not contain further variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`.

NOTE: the field paths in variables and in the `body` must not refer to repeated fields or map fields.

Use CustomHttpPattern to specify any HTTP method that is not included in the `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for a given URL path rule. The wild-card rule is useful for services that provide content to Web (HTML) clients.

func (*HttpRule) Descriptor

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

func (*HttpRule) GetAdditionalBindings

func (m *HttpRule) GetAdditionalBindings() []*HttpRule

func (*HttpRule) GetBody

func (m *HttpRule) GetBody() string

func (*HttpRule) GetCustom

func (m *HttpRule) GetCustom() *CustomHttpPattern

func (*HttpRule) GetDelete

func (m *HttpRule) GetDelete() string

func (*HttpRule) GetGet

func (m *HttpRule) GetGet() string

func (*HttpRule) GetPatch

func (m *HttpRule) GetPatch() string

func (*HttpRule) GetPattern

func (m *HttpRule) GetPattern() isHttpRule_Pattern

func (*HttpRule) GetPost

func (m *HttpRule) GetPost() string

func (*HttpRule) GetPut

func (m *HttpRule) GetPut() string

func (*HttpRule) GetSelector

func (m *HttpRule) GetSelector() string

func (*HttpRule) ProtoMessage

func (*HttpRule) ProtoMessage()

func (*HttpRule) Reset

func (m *HttpRule) Reset()

func (*HttpRule) String

func (m *HttpRule) String() string

func (*HttpRule) XXX_OneofFuncs

func (*HttpRule) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type HttpRule_Custom

type HttpRule_Custom struct {
	Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,oneof"`
}

type HttpRule_Delete

type HttpRule_Delete struct {
	Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"`
}

type HttpRule_Get

type HttpRule_Get struct {
	Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"`
}

type HttpRule_Patch

type HttpRule_Patch struct {
	Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"`
}

type HttpRule_Post

type HttpRule_Post struct {
	Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"`
}

type HttpRule_Put

type HttpRule_Put struct {
	Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"`
}

type LabelDescriptor

type LabelDescriptor struct {
	// The label key.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The type of data that can be assigned to the label.
	ValueType LabelDescriptor_ValueType `` /* 131-byte string literal not displayed */
	// A human-readable description for the label.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
}

A description of a label.

func (*LabelDescriptor) Descriptor

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

func (*LabelDescriptor) GetDescription

func (m *LabelDescriptor) GetDescription() string

func (*LabelDescriptor) GetKey

func (m *LabelDescriptor) GetKey() string

func (*LabelDescriptor) GetValueType

func (m *LabelDescriptor) GetValueType() LabelDescriptor_ValueType

func (*LabelDescriptor) ProtoMessage

func (*LabelDescriptor) ProtoMessage()

func (*LabelDescriptor) Reset

func (m *LabelDescriptor) Reset()

func (*LabelDescriptor) String

func (m *LabelDescriptor) String() string

type LabelDescriptor_ValueType

type LabelDescriptor_ValueType int32

Value types that can be used as label values.

const (
	// A variable-length string. This is the default.
	LabelDescriptor_STRING LabelDescriptor_ValueType = 0
	// Boolean; true or false.
	LabelDescriptor_BOOL LabelDescriptor_ValueType = 1
	// A 64-bit signed integer.
	LabelDescriptor_INT64 LabelDescriptor_ValueType = 2
)

func (LabelDescriptor_ValueType) EnumDescriptor

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

func (LabelDescriptor_ValueType) String

func (x LabelDescriptor_ValueType) 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,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 []*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,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"`
}

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() []*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,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" 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 Metric

type Metric struct {
	// An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
	// For example, `custom.googleapis.com/invoice/paid/amount`.
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// The set of label values that uniquely identify this metric. All
	// labels listed in the `MetricDescriptor` must be assigned values.
	Labels map[string]string `` /* 146-byte string literal not displayed */
}

A specific metric, identified by specifying values for all of the labels of a [`MetricDescriptor`][google.api.MetricDescriptor].

func (*Metric) Descriptor

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

func (*Metric) GetLabels

func (m *Metric) GetLabels() map[string]string

func (*Metric) GetType

func (m *Metric) GetType() string

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) Reset

func (m *Metric) Reset()

func (*Metric) String

func (m *Metric) String() string

type MetricDescriptor

type MetricDescriptor struct {
	// The resource name of the metric descriptor. Depending on the
	// implementation, the name typically includes: (1) the parent resource name
	// that defines the scope of the metric type or of its data; and (2) the
	// metric's URL-encoded type, which also appears in the `type` field of this
	// descriptor. For example, following is the resource name of a custom
	// metric within the GCP project `my-project-id`:
	//
	//     "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The metric type, including its DNS name prefix. The type is not
	// URL-encoded.  All user-defined custom metric types have the DNS name
	// `custom.googleapis.com`.  Metric types should use a natural hierarchical
	// grouping. For example:
	//
	//     "custom.googleapis.com/invoice/paid/amount"
	//     "appengine.googleapis.com/http/server/response_latencies"
	Type string `protobuf:"bytes,8,opt,name=type,proto3" json:"type,omitempty"`
	// The set of labels that can be used to describe a specific
	// instance of this metric type. For example, the
	// `appengine.googleapis.com/http/server/response_latencies` metric
	// type has a label for the HTTP response code, `response_code`, so
	// you can look at latencies for successful responses or just
	// for responses that failed.
	Labels []*LabelDescriptor `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty"`
	// Whether the metric records instantaneous values, changes to a value, etc.
	// Some combinations of `metric_kind` and `value_type` might not be supported.
	MetricKind MetricDescriptor_MetricKind `` /* 136-byte string literal not displayed */
	// Whether the measurement is an integer, a floating-point number, etc.
	// Some combinations of `metric_kind` and `value_type` might not be supported.
	ValueType MetricDescriptor_ValueType `` /* 132-byte string literal not displayed */
	// The unit in which the metric value is reported. It is only applicable
	// if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
	// supported units are a subset of [The Unified Code for Units of
	// Measure](http://unitsofmeasure.org/ucum.html) standard:
	//
	// **Basic units (UNIT)**
	//
	// * `bit`   bit
	// * `By`    byte
	// * `s`     second
	// * `min`   minute
	// * `h`     hour
	// * `d`     day
	//
	// **Prefixes (PREFIX)**
	//
	// * `k`     kilo    (10**3)
	// * `M`     mega    (10**6)
	// * `G`     giga    (10**9)
	// * `T`     tera    (10**12)
	// * `P`     peta    (10**15)
	// * `E`     exa     (10**18)
	// * `Z`     zetta   (10**21)
	// * `Y`     yotta   (10**24)
	// * `m`     milli   (10**-3)
	// * `u`     micro   (10**-6)
	// * `n`     nano    (10**-9)
	// * `p`     pico    (10**-12)
	// * `f`     femto   (10**-15)
	// * `a`     atto    (10**-18)
	// * `z`     zepto   (10**-21)
	// * `y`     yocto   (10**-24)
	// * `Ki`    kibi    (2**10)
	// * `Mi`    mebi    (2**20)
	// * `Gi`    gibi    (2**30)
	// * `Ti`    tebi    (2**40)
	//
	// **Grammar**
	//
	// The grammar includes the dimensionless unit `1`, such as `1/s`.
	//
	// The grammar also includes these connectors:
	//
	// * `/`    division (as an infix operator, e.g. `1/s`).
	// * `.`    multiplication (as an infix operator, e.g. `GBy.d`)
	//
	// The grammar for a unit is as follows:
	//
	//     Expression = Component { "." Component } { "/" Component } ;
	//
	//     Component = [ PREFIX ] UNIT [ Annotation ]
	//               | Annotation
	//               | "1"
	//               ;
	//
	//     Annotation = "{" NAME "}" ;
	//
	// Notes:
	//
	// * `Annotation` is just a comment if it follows a `UNIT` and is
	//    equivalent to `1` if it is used alone. For examples,
	//    `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
	// * `NAME` is a sequence of non-blank printable ASCII characters not
	//    containing '{' or '}'.
	Unit string `protobuf:"bytes,5,opt,name=unit,proto3" json:"unit,omitempty"`
	// A detailed description of the metric, which can be used in documentation.
	Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	// A concise name for the metric, which can be displayed in user interfaces.
	// Use sentence case without an ending period, for example "Request count".
	DisplayName string `protobuf:"bytes,7,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
}

Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.

func (*MetricDescriptor) Descriptor

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

func (*MetricDescriptor) GetDescription

func (m *MetricDescriptor) GetDescription() string

func (*MetricDescriptor) GetDisplayName

func (m *MetricDescriptor) GetDisplayName() string

func (*MetricDescriptor) GetLabels

func (m *MetricDescriptor) GetLabels() []*LabelDescriptor

func (*MetricDescriptor) GetMetricKind

func (m *MetricDescriptor) GetMetricKind() MetricDescriptor_MetricKind

func (*MetricDescriptor) GetName

func (m *MetricDescriptor) GetName() string

func (*MetricDescriptor) GetType

func (m *MetricDescriptor) GetType() string

func (*MetricDescriptor) GetUnit

func (m *MetricDescriptor) GetUnit() string

func (*MetricDescriptor) GetValueType

func (m *MetricDescriptor) GetValueType() MetricDescriptor_ValueType

func (*MetricDescriptor) ProtoMessage

func (*MetricDescriptor) ProtoMessage()

func (*MetricDescriptor) Reset

func (m *MetricDescriptor) Reset()

func (*MetricDescriptor) String

func (m *MetricDescriptor) String() string

type MetricDescriptor_MetricKind

type MetricDescriptor_MetricKind int32

The kind of measurement. It describes how the data is reported.

const (
	// Do not use this default value.
	MetricDescriptor_METRIC_KIND_UNSPECIFIED MetricDescriptor_MetricKind = 0
	// An instantaneous measurement of a value.
	MetricDescriptor_GAUGE MetricDescriptor_MetricKind = 1
	// The change in a value during a time interval.
	MetricDescriptor_DELTA MetricDescriptor_MetricKind = 2
	// A value accumulated over a time interval.  Cumulative
	// measurements in a time series should have the same start time
	// and increasing end times, until an event resets the cumulative
	// value to zero and sets a new start time for the following
	// points.
	MetricDescriptor_CUMULATIVE MetricDescriptor_MetricKind = 3
)

func (MetricDescriptor_MetricKind) EnumDescriptor

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

func (MetricDescriptor_MetricKind) String

type MetricDescriptor_ValueType

type MetricDescriptor_ValueType int32

The value type of a metric.

const (
	// Do not use this default value.
	MetricDescriptor_VALUE_TYPE_UNSPECIFIED MetricDescriptor_ValueType = 0
	// The value is a boolean.
	// This value type can be used only if the metric kind is `GAUGE`.
	MetricDescriptor_BOOL MetricDescriptor_ValueType = 1
	// The value is a signed 64-bit integer.
	MetricDescriptor_INT64 MetricDescriptor_ValueType = 2
	// The value is a double precision floating point number.
	MetricDescriptor_DOUBLE MetricDescriptor_ValueType = 3
	// The value is a text string.
	// This value type can be used only if the metric kind is `GAUGE`.
	MetricDescriptor_STRING MetricDescriptor_ValueType = 4
	// The value is a [`Distribution`][google.api.Distribution].
	MetricDescriptor_DISTRIBUTION MetricDescriptor_ValueType = 5
	// The value is money.
	MetricDescriptor_MONEY MetricDescriptor_ValueType = 6
)

func (MetricDescriptor_ValueType) EnumDescriptor

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

func (MetricDescriptor_ValueType) 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 `` /* 176-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 MonitoredResource

type MonitoredResource struct {
	// Required. The monitored resource type. This field must match
	// the `type` field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For
	// example, the type of a Cloud SQL database is `"cloudsql_database"`.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Required. Values for all of the labels listed in the associated monitored
	// resource descriptor. For example, Cloud SQL databases use the labels
	// `"database_id"` and `"zone"`.
	Labels map[string]string `` /* 146-byte string literal not displayed */
}

An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The `type` field identifies a MonitoredResourceDescriptor[google.api.MonitoredResourceDescriptor] object that describes the resource's schema. Information in the `labels` field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor[google.api.MonitoredResourceDescriptor] for `"gce_instance"` has labels `"instance_id"` and `"zone"`:

{ "type": "gce_instance",
  "labels": { "instance_id": "12345678901234",
              "zone": "us-central1-a" }}

func (*MonitoredResource) Descriptor

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

func (*MonitoredResource) GetLabels

func (m *MonitoredResource) GetLabels() map[string]string

func (*MonitoredResource) GetType

func (m *MonitoredResource) GetType() string

func (*MonitoredResource) ProtoMessage

func (*MonitoredResource) ProtoMessage()

func (*MonitoredResource) Reset

func (m *MonitoredResource) Reset()

func (*MonitoredResource) String

func (m *MonitoredResource) String() string

type MonitoredResourceDescriptor

type MonitoredResourceDescriptor struct {
	// Optional. The resource name of the monitored resource descriptor:
	// `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
	// {type} is the value of the `type` field in this object and
	// {project_id} is a project ID that provides API-specific context for
	// accessing the type.  APIs that do not use project information can use the
	// resource name format `"monitoredResourceDescriptors/{type}"`.
	Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	// Required. The monitored resource type. For example, the type
	// `"cloudsql_database"` represents databases in Google Cloud SQL.
	// The maximum length of this value is 256 characters.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Optional. A concise name for the monitored resource type that might be
	// displayed in user interfaces. It should be a Title Cased Noun Phrase,
	// without any article or other determiners. For example,
	// `"Google Cloud SQL Database"`.
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Optional. A detailed description of the monitored resource type that might
	// be used in documentation.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Required. A set of labels used to describe instances of this monitored
	// resource type. For example, an individual Google Cloud SQL database is
	// identified by values for the labels `"database_id"` and `"zone"`.
	Labels []*LabelDescriptor `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty"`
}

An object that describes the schema of a MonitoredResource[google.api.MonitoredResource] object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `"gce_instance"` and specifies the use of the labels `"instance_id"` and `"zone"` to identify particular VM instances.

Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API.

func (*MonitoredResourceDescriptor) Descriptor

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

func (*MonitoredResourceDescriptor) GetDescription

func (m *MonitoredResourceDescriptor) GetDescription() string

func (*MonitoredResourceDescriptor) GetDisplayName

func (m *MonitoredResourceDescriptor) GetDisplayName() string

func (*MonitoredResourceDescriptor) GetLabels

func (m *MonitoredResourceDescriptor) GetLabels() []*LabelDescriptor

func (*MonitoredResourceDescriptor) GetName

func (m *MonitoredResourceDescriptor) GetName() string

func (*MonitoredResourceDescriptor) GetType

func (m *MonitoredResourceDescriptor) GetType() string

func (*MonitoredResourceDescriptor) ProtoMessage

func (*MonitoredResourceDescriptor) ProtoMessage()

func (*MonitoredResourceDescriptor) Reset

func (m *MonitoredResourceDescriptor) Reset()

func (*MonitoredResourceDescriptor) String

func (m *MonitoredResourceDescriptor) 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,proto3" 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,proto3" 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,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.
	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" 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,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"`
}

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,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. 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,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.
	//
	// Used by metric-based quotas only.
	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.
	//
	// 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,proto3" 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 `` /* 148-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"`
}

`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 semantic version of the service configuration. The config version
	// affects the interpretation of the service configuration. For example,
	// certain features are enabled by default for certain config versions.
	// The latest config version is `3`.
	ConfigVersion *google_protobuf6.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,proto3" 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,proto3" json:"id,omitempty"`
	// The product title for this service.
	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 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_protobuf5.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_protobuf4.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_protobuf4.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 *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 []*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 []*MonitoredResourceDescriptor `protobuf:"bytes,25,rep,name=monitored_resources,json=monitoredResources" json:"monitored_resources,omitempty"`
	// Billing configuration.
	Billing *Billing `protobuf:"bytes,26,opt,name=billing" json:"billing,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_api2.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_protobuf5.Api

func (*Service) GetAuthentication

func (m *Service) GetAuthentication() *Authentication

func (*Service) GetBackend

func (m *Service) GetBackend() *Backend

func (*Service) GetBilling

func (m *Service) GetBilling() *Billing

func (*Service) GetConfigVersion

func (m *Service) GetConfigVersion() *google_protobuf6.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_protobuf4.Enum

func (*Service) GetExperimental

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

func (*Service) GetHttp

func (m *Service) GetHttp() *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() []*MetricDescriptor

func (*Service) GetMonitoredResources

func (m *Service) GetMonitoredResources() []*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_protobuf4.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,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"`
}

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,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" 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 `` /* 144-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,proto3" json:"selector,omitempty"`
	// True, if the method allows unregistered calls; false otherwise.
	AllowUnregisteredCalls bool `` /* 130-byte string literal not displayed */
	// 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,proto3" 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

Directories

Path Synopsis
servicecontrol
v1
servicemanagement
v1

Jump to

Keyboard shortcuts

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