serviceconfig

package
v0.0.0-...-c66870c Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider struct {
	// The unique identifier of the auth provider. It will be referred to by
	// `AuthRequirement.provider_id`.
	//
	// Example: "bookstore_auth".
	Id string `protobuf:"bytes,1,opt,name=id,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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*AuthProvider) XXX_DiscardUnknown

func (m *AuthProvider) XXX_DiscardUnknown()

func (*AuthProvider) XXX_Marshal

func (m *AuthProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthProvider) XXX_Merge

func (dst *AuthProvider) XXX_Merge(src proto.Message)

func (*AuthProvider) XXX_Size

func (m *AuthProvider) XXX_Size() int

func (*AuthProvider) XXX_Unmarshal

func (m *AuthProvider) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*AuthRequirement) XXX_DiscardUnknown

func (m *AuthRequirement) XXX_DiscardUnknown()

func (*AuthRequirement) XXX_Marshal

func (m *AuthRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthRequirement) XXX_Merge

func (dst *AuthRequirement) XXX_Merge(src proto.Message)

func (*AuthRequirement) XXX_Size

func (m *AuthRequirement) XXX_Size() int

func (*AuthRequirement) XXX_Unmarshal

func (m *AuthRequirement) XXX_Unmarshal(b []byte) error

type Authentication

type Authentication struct {
	// A list of authentication rules that apply to individual API methods.
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules []*AuthenticationRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"`
	// Defines a set of authentication providers that a service supports.
	Providers            []*AuthProvider `protobuf:"bytes,4,rep,name=providers,proto3" json:"providers,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

`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

func (*Authentication) XXX_DiscardUnknown

func (m *Authentication) XXX_DiscardUnknown()

func (*Authentication) XXX_Marshal

func (m *Authentication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Authentication) XXX_Merge

func (dst *Authentication) XXX_Merge(src proto.Message)

func (*Authentication) XXX_Size

func (m *Authentication) XXX_Size() int

func (*Authentication) XXX_Unmarshal

func (m *Authentication) XXX_Unmarshal(b []byte) error

type AuthenticationRule

type AuthenticationRule struct {
	// Selects the methods to which this rule applies.
	//
	// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
	Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// The requirements for OAuth credentials.
	Oauth *OAuthRequirements `protobuf:"bytes,2,opt,name=oauth,proto3" json:"oauth,omitempty"`
	// If true, the service accepts API keys without any other credential.
	AllowWithoutCredential bool `` /* 130-byte string literal not displayed */
	// Requirements for additional authentication providers.
	Requirements         []*AuthRequirement `protobuf:"bytes,7,rep,name=requirements,proto3" json:"requirements,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

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

func (*AuthenticationRule) XXX_DiscardUnknown

func (m *AuthenticationRule) XXX_DiscardUnknown()

func (*AuthenticationRule) XXX_Marshal

func (m *AuthenticationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthenticationRule) XXX_Merge

func (dst *AuthenticationRule) XXX_Merge(src proto.Message)

func (*AuthenticationRule) XXX_Size

func (m *AuthenticationRule) XXX_Size() int

func (*AuthenticationRule) XXX_Unmarshal

func (m *AuthenticationRule) XXX_Unmarshal(b []byte) error

type Backend

type Backend struct {
	// A list of API backend rules that apply to individual API methods.
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules                []*BackendRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

`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

func (*Backend) XXX_DiscardUnknown

func (m *Backend) XXX_DiscardUnknown()

func (*Backend) XXX_Marshal

func (m *Backend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Backend) XXX_Merge

func (dst *Backend) XXX_Merge(src proto.Message)

func (*Backend) XXX_Size

func (m *Backend) XXX_Size() int

func (*Backend) XXX_Unmarshal

func (m *Backend) XXX_Unmarshal(b []byte) error

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
	// deadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.
	Deadline float64 `protobuf:"fixed64,3,opt,name=deadline,proto3" json:"deadline,omitempty"`
	// Minimum deadline in seconds needed for this method. Calls having deadline
	// value lower than this will be rejected.
	MinDeadline          float64  `protobuf:"fixed64,4,opt,name=min_deadline,json=minDeadline,proto3" json:"min_deadline,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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) GetMinDeadline

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

func (*BackendRule) XXX_DiscardUnknown

func (m *BackendRule) XXX_DiscardUnknown()

func (*BackendRule) XXX_Marshal

func (m *BackendRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BackendRule) XXX_Merge

func (dst *BackendRule) XXX_Merge(src proto.Message)

func (*BackendRule) XXX_Size

func (m *BackendRule) XXX_Size() int

func (*BackendRule) XXX_Unmarshal

func (m *BackendRule) XXX_Unmarshal(b []byte) error

type Billing

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

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

func (*Billing) XXX_DiscardUnknown

func (m *Billing) XXX_DiscardUnknown()

func (*Billing) XXX_Marshal

func (m *Billing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Billing) XXX_Merge

func (dst *Billing) XXX_Merge(src proto.Message)

func (*Billing) XXX_Size

func (m *Billing) XXX_Size() int

func (*Billing) XXX_Unmarshal

func (m *Billing) XXX_Unmarshal(b []byte) error

type Billing_BillingDestination

type Billing_BillingDestination struct {
	// The monitored resource type. The type must be defined in
	// [Service.monitored_resources][google.api.Service.monitored_resources] section.
	MonitoredResource string `protobuf:"bytes,1,opt,name=monitored_resource,json=monitoredResource,proto3" json:"monitored_resource,omitempty"`
	// Names of the metrics to report to this billing destination.
	// Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
	Metrics              []string `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*Billing_BillingDestination) XXX_DiscardUnknown

func (m *Billing_BillingDestination) XXX_DiscardUnknown()

func (*Billing_BillingDestination) XXX_Marshal

func (m *Billing_BillingDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Billing_BillingDestination) XXX_Merge

func (dst *Billing_BillingDestination) XXX_Merge(src proto.Message)

func (*Billing_BillingDestination) XXX_Size

func (m *Billing_BillingDestination) XXX_Size() int

func (*Billing_BillingDestination) XXX_Unmarshal

func (m *Billing_BillingDestination) XXX_Unmarshal(b []byte) error

type Context

type Context struct {
	// A list of RPC context rules that apply to individual API methods.
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules                []*ContextRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

`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

func (*Context) XXX_DiscardUnknown

func (m *Context) XXX_DiscardUnknown()

func (*Context) XXX_Marshal

func (m *Context) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Context) XXX_Merge

func (dst *Context) XXX_Merge(src proto.Message)

func (*Context) XXX_Size

func (m *Context) XXX_Size() int

func (*Context) XXX_Unmarshal

func (m *Context) XXX_Unmarshal(b []byte) error

type ContextRule

type ContextRule struct {
	// Selects the methods to which this rule applies.
	//
	// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
	Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
	// A list of full type names of requested contexts.
	Requested []string `protobuf:"bytes,2,rep,name=requested,proto3" json:"requested,omitempty"`
	// A list of full type names of provided contexts.
	Provided             []string `protobuf:"bytes,3,rep,name=provided,proto3" json:"provided,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*ContextRule) XXX_DiscardUnknown

func (m *ContextRule) XXX_DiscardUnknown()

func (*ContextRule) XXX_Marshal

func (m *ContextRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ContextRule) XXX_Merge

func (dst *ContextRule) XXX_Merge(src proto.Message)

func (*ContextRule) XXX_Size

func (m *ContextRule) XXX_Size() int

func (*ContextRule) XXX_Unmarshal

func (m *ContextRule) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*Control) XXX_DiscardUnknown

func (m *Control) XXX_DiscardUnknown()

func (*Control) XXX_Marshal

func (m *Control) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Control) XXX_Merge

func (dst *Control) XXX_Merge(src proto.Message)

func (*Control) XXX_Size

func (m *Control) XXX_Size() int

func (*Control) XXX_Unmarshal

func (m *Control) XXX_Unmarshal(b []byte) error

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,proto3" json:"pages,omitempty"`
	// A list of documentation rules that apply to individual API elements.
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules []*DocumentationRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"`
	// The URL to the root of documentation.
	DocumentationRootUrl string `protobuf:"bytes,4,opt,name=documentation_root_url,json=documentationRootUrl,proto3" json:"documentation_root_url,omitempty"`
	// 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

`Documentation` provides the information for describing a service.

Example: <pre><code>documentation:

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

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

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

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

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

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

func (*Documentation) Descriptor

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

func (*Documentation) XXX_DiscardUnknown

func (m *Documentation) XXX_DiscardUnknown()

func (*Documentation) XXX_Marshal

func (m *Documentation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Documentation) XXX_Merge

func (dst *Documentation) XXX_Merge(src proto.Message)

func (*Documentation) XXX_Size

func (m *Documentation) XXX_Size() int

func (*Documentation) XXX_Unmarshal

func (m *Documentation) XXX_Unmarshal(b []byte) error

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 */
	XXX_NoUnkeyedLiteral   struct{} `json:"-"`
	XXX_unrecognized       []byte   `json:"-"`
	XXX_sizecache          int32    `json:"-"`
}

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

func (*DocumentationRule) XXX_DiscardUnknown

func (m *DocumentationRule) XXX_DiscardUnknown()

func (*DocumentationRule) XXX_Marshal

func (m *DocumentationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DocumentationRule) XXX_Merge

func (dst *DocumentationRule) XXX_Merge(src proto.Message)

func (*DocumentationRule) XXX_Size

func (m *DocumentationRule) XXX_Size() int

func (*DocumentationRule) XXX_Unmarshal

func (m *DocumentationRule) XXX_Unmarshal(b []byte) error

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 intended
	// aliases.
	//
	// Additional names that this endpoint will be hosted on.
	Aliases []string `protobuf:"bytes,2,rep,name=aliases,proto3" json:"aliases,omitempty"`
	// The list of features enabled on this endpoint.
	Features []string `protobuf:"bytes,4,rep,name=features,proto3" 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*Endpoint) XXX_DiscardUnknown

func (m *Endpoint) XXX_DiscardUnknown()

func (*Endpoint) XXX_Marshal

func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Endpoint) XXX_Merge

func (dst *Endpoint) XXX_Merge(src proto.Message)

func (*Endpoint) XXX_Size

func (m *Endpoint) XXX_Size() int

func (*Endpoint) XXX_Unmarshal

func (m *Endpoint) XXX_Unmarshal(b []byte) error

type LogDescriptor

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

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() []*label.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

func (*LogDescriptor) XXX_DiscardUnknown

func (m *LogDescriptor) XXX_DiscardUnknown()

func (*LogDescriptor) XXX_Marshal

func (m *LogDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogDescriptor) XXX_Merge

func (dst *LogDescriptor) XXX_Merge(src proto.Message)

func (*LogDescriptor) XXX_Size

func (m *LogDescriptor) XXX_Size() int

func (*LogDescriptor) XXX_Unmarshal

func (m *LogDescriptor) XXX_Unmarshal(b []byte) error

type Logging

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

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

func (*Logging) XXX_DiscardUnknown

func (m *Logging) XXX_DiscardUnknown()

func (*Logging) XXX_Marshal

func (m *Logging) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Logging) XXX_Merge

func (dst *Logging) XXX_Merge(src proto.Message)

func (*Logging) XXX_Size

func (m *Logging) XXX_Size() int

func (*Logging) XXX_Unmarshal

func (m *Logging) XXX_Unmarshal(b []byte) error

type Logging_LoggingDestination

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

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

func (*Logging_LoggingDestination) XXX_DiscardUnknown

func (m *Logging_LoggingDestination) XXX_DiscardUnknown()

func (*Logging_LoggingDestination) XXX_Marshal

func (m *Logging_LoggingDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Logging_LoggingDestination) XXX_Merge

func (dst *Logging_LoggingDestination) XXX_Merge(src proto.Message)

func (*Logging_LoggingDestination) XXX_Size

func (m *Logging_LoggingDestination) XXX_Size() int

func (*Logging_LoggingDestination) XXX_Unmarshal

func (m *Logging_LoggingDestination) XXX_Unmarshal(b []byte) error

type MetricRule

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

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

func (*MetricRule) XXX_DiscardUnknown

func (m *MetricRule) XXX_DiscardUnknown()

func (*MetricRule) XXX_Marshal

func (m *MetricRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricRule) XXX_Merge

func (dst *MetricRule) XXX_Merge(src proto.Message)

func (*MetricRule) XXX_Size

func (m *MetricRule) XXX_Size() int

func (*MetricRule) XXX_Unmarshal

func (m *MetricRule) XXX_Unmarshal(b []byte) error

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,proto3" 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,proto3" json:"consumer_destinations,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                            `json:"-"`
	XXX_unrecognized     []byte                              `json:"-"`
	XXX_sizecache        int32                               `json:"-"`
}

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

func (*Monitoring) XXX_DiscardUnknown

func (m *Monitoring) XXX_DiscardUnknown()

func (*Monitoring) XXX_Marshal

func (m *Monitoring) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Monitoring) XXX_Merge

func (dst *Monitoring) XXX_Merge(src proto.Message)

func (*Monitoring) XXX_Size

func (m *Monitoring) XXX_Size() int

func (*Monitoring) XXX_Unmarshal

func (m *Monitoring) XXX_Unmarshal(b []byte) error

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,proto3" json:"metrics,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*Monitoring_MonitoringDestination) XXX_DiscardUnknown

func (m *Monitoring_MonitoringDestination) XXX_DiscardUnknown()

func (*Monitoring_MonitoringDestination) XXX_Marshal

func (m *Monitoring_MonitoringDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Monitoring_MonitoringDestination) XXX_Merge

func (dst *Monitoring_MonitoringDestination) XXX_Merge(src proto.Message)

func (*Monitoring_MonitoringDestination) XXX_Size

func (m *Monitoring_MonitoringDestination) XXX_Size() int

func (*Monitoring_MonitoringDestination) XXX_Unmarshal

func (m *Monitoring_MonitoringDestination) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*OAuthRequirements) XXX_DiscardUnknown

func (m *OAuthRequirements) XXX_DiscardUnknown()

func (*OAuthRequirements) XXX_Marshal

func (m *OAuthRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OAuthRequirements) XXX_Merge

func (dst *OAuthRequirements) XXX_Merge(src proto.Message)

func (*OAuthRequirements) XXX_Size

func (m *OAuthRequirements) XXX_Size() int

func (*OAuthRequirements) XXX_Unmarshal

func (m *OAuthRequirements) XXX_Unmarshal(b []byte) error

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,proto3" json:"subpages,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*Page) XXX_DiscardUnknown

func (m *Page) XXX_DiscardUnknown()

func (*Page) XXX_Marshal

func (m *Page) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Page) XXX_Merge

func (dst *Page) XXX_Merge(src proto.Message)

func (*Page) XXX_Size

func (m *Page) XXX_Size() int

func (*Page) XXX_Unmarshal

func (m *Page) XXX_Unmarshal(b []byte) error

type ProjectProperties

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

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

func (*ProjectProperties) XXX_DiscardUnknown

func (m *ProjectProperties) XXX_DiscardUnknown()

func (*ProjectProperties) XXX_Marshal

func (m *ProjectProperties) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProjectProperties) XXX_Merge

func (dst *ProjectProperties) XXX_Merge(src proto.Message)

func (*ProjectProperties) XXX_Size

func (m *ProjectProperties) XXX_Size() int

func (*ProjectProperties) XXX_Unmarshal

func (m *ProjectProperties) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*Property) XXX_DiscardUnknown

func (m *Property) XXX_DiscardUnknown()

func (*Property) XXX_Marshal

func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Property) XXX_Merge

func (dst *Property) XXX_Merge(src proto.Message)

func (*Property) XXX_Size

func (m *Property) XXX_Size() int

func (*Property) XXX_Unmarshal

func (m *Property) XXX_Unmarshal(b []byte) error

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,proto3" 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,proto3" json:"metric_rules,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

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

func (*Quota) XXX_DiscardUnknown

func (m *Quota) XXX_DiscardUnknown()

func (*Quota) XXX_Marshal

func (m *Quota) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Quota) XXX_Merge

func (dst *Quota) XXX_Merge(src proto.Message)

func (*Quota) XXX_Size

func (m *Quota) XXX_Size() int

func (*Quota) XXX_Unmarshal

func (m *Quota) XXX_Unmarshal(b []byte) error

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 `` /* 155-byte string literal not displayed */
	// User-visible display name for this limit.
	// Optional. If not set, the UI will provide a default display name based on
	// the quota configuration. This field can be used to override the default
	// display name generated from the configuration.
	DisplayName          string   `protobuf:"bytes,12,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

`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

func (*QuotaLimit) XXX_DiscardUnknown

func (m *QuotaLimit) XXX_DiscardUnknown()

func (*QuotaLimit) XXX_Marshal

func (m *QuotaLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QuotaLimit) XXX_Merge

func (dst *QuotaLimit) XXX_Merge(src proto.Message)

func (*QuotaLimit) XXX_Size

func (m *QuotaLimit) XXX_Size() int

func (*QuotaLimit) XXX_Unmarshal

func (m *QuotaLimit) XXX_Unmarshal(b []byte) error

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 *wrappers.UInt32Value `protobuf:"bytes,20,opt,name=config_version,json=configVersion,proto3" 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 []*api.Api `protobuf:"bytes,3,rep,name=apis,proto3" json:"apis,omitempty"`
	// A list of all proto message types included in this API service.
	// Types referenced directly or indirectly by the `apis` are
	// automatically included.  Messages which are not referenced but
	// shall be included, such as types used by the `google.protobuf.Any` type,
	// should be listed here by name. Example:
	//
	//     types:
	//     - name: google.protobuf.Int32
	Types []*ptype.Type `protobuf:"bytes,4,rep,name=types,proto3" json:"types,omitempty"`
	// A list of all enum types included in this API service.  Enums
	// referenced directly or indirectly by the `apis` are automatically
	// included.  Enums which are not referenced but shall be included
	// should be listed here by name. Example:
	//
	//     enums:
	//     - name: google.someapi.v1.SomeEnum
	Enums []*ptype.Enum `protobuf:"bytes,5,rep,name=enums,proto3" json:"enums,omitempty"`
	// Additional API documentation.
	Documentation *Documentation `protobuf:"bytes,6,opt,name=documentation,proto3" json:"documentation,omitempty"`
	// API backend configuration.
	Backend *Backend `protobuf:"bytes,8,opt,name=backend,proto3" json:"backend,omitempty"`
	// HTTP configuration.
	Http *annotations.Http `protobuf:"bytes,9,opt,name=http,proto3" json:"http,omitempty"`
	// Quota configuration.
	Quota *Quota `protobuf:"bytes,10,opt,name=quota,proto3" json:"quota,omitempty"`
	// Auth configuration.
	Authentication *Authentication `protobuf:"bytes,11,opt,name=authentication,proto3" json:"authentication,omitempty"`
	// Context configuration.
	Context *Context `protobuf:"bytes,12,opt,name=context,proto3" json:"context,omitempty"`
	// Configuration controlling usage of this service.
	Usage *Usage `protobuf:"bytes,15,opt,name=usage,proto3" json:"usage,omitempty"`
	// Configuration for network endpoints.  If this is empty, then an endpoint
	// with the same name as the service is automatically generated to service all
	// defined APIs.
	Endpoints []*Endpoint `protobuf:"bytes,18,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// Configuration for the service control plane.
	Control *Control `protobuf:"bytes,21,opt,name=control,proto3" json:"control,omitempty"`
	// Defines the logs used by this service.
	Logs []*LogDescriptor `protobuf:"bytes,23,rep,name=logs,proto3" json:"logs,omitempty"`
	// Defines the metrics used by this service.
	Metrics []*metric.MetricDescriptor `protobuf:"bytes,24,rep,name=metrics,proto3" json:"metrics,omitempty"`
	// Defines the monitored resources used by this service. This is required
	// by the [Service.monitoring][google.api.Service.monitoring] and [Service.logging][google.api.Service.logging] configurations.
	MonitoredResources []*monitoredres.MonitoredResourceDescriptor `protobuf:"bytes,25,rep,name=monitored_resources,json=monitoredResources,proto3" json:"monitored_resources,omitempty"`
	// Billing configuration.
	Billing *Billing `protobuf:"bytes,26,opt,name=billing,proto3" json:"billing,omitempty"`
	// Logging configuration.
	Logging *Logging `protobuf:"bytes,27,opt,name=logging,proto3" json:"logging,omitempty"`
	// Monitoring configuration.
	Monitoring *Monitoring `protobuf:"bytes,28,opt,name=monitoring,proto3" json:"monitoring,omitempty"`
	// System parameter configuration.
	SystemParameters *SystemParameters `protobuf:"bytes,29,opt,name=system_parameters,json=systemParameters,proto3" json:"system_parameters,omitempty"`
	// Output only. The source information for this configuration if available.
	SourceInfo           *SourceInfo `protobuf:"bytes,37,opt,name=source_info,json=sourceInfo,proto3" json:"source_info,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

`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() []*api.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() *wrappers.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() []*ptype.Enum

func (*Service) GetHttp

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

func (*Service) GetMonitoredResources

func (m *Service) GetMonitoredResources() []*monitoredres.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() []*ptype.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

func (*Service) XXX_DiscardUnknown

func (m *Service) XXX_DiscardUnknown()

func (*Service) XXX_Marshal

func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Service) XXX_Merge

func (dst *Service) XXX_Merge(src proto.Message)

func (*Service) XXX_Size

func (m *Service) XXX_Size() int

func (*Service) XXX_Unmarshal

func (m *Service) XXX_Unmarshal(b []byte) error

type SourceInfo

type SourceInfo struct {
	// All files used during config generation.
	SourceFiles          []*any.Any `protobuf:"bytes,1,rep,name=source_files,json=sourceFiles,proto3" json:"source_files,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

Source information used to create a Service Config

func (*SourceInfo) Descriptor

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

func (*SourceInfo) GetSourceFiles

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

func (*SourceInfo) ProtoMessage

func (*SourceInfo) ProtoMessage()

func (*SourceInfo) Reset

func (m *SourceInfo) Reset()

func (*SourceInfo) String

func (m *SourceInfo) String() string

func (*SourceInfo) XXX_DiscardUnknown

func (m *SourceInfo) XXX_DiscardUnknown()

func (*SourceInfo) XXX_Marshal

func (m *SourceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SourceInfo) XXX_Merge

func (dst *SourceInfo) XXX_Merge(src proto.Message)

func (*SourceInfo) XXX_Size

func (m *SourceInfo) XXX_Size() int

func (*SourceInfo) XXX_Unmarshal

func (m *SourceInfo) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*SystemParameter) XXX_DiscardUnknown

func (m *SystemParameter) XXX_DiscardUnknown()

func (*SystemParameter) XXX_Marshal

func (m *SystemParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SystemParameter) XXX_Merge

func (dst *SystemParameter) XXX_Merge(src proto.Message)

func (*SystemParameter) XXX_Size

func (m *SystemParameter) XXX_Size() int

func (*SystemParameter) XXX_Unmarshal

func (m *SystemParameter) XXX_Unmarshal(b []byte) error

type SystemParameterRule

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

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

func (*SystemParameterRule) XXX_DiscardUnknown

func (m *SystemParameterRule) XXX_DiscardUnknown()

func (*SystemParameterRule) XXX_Marshal

func (m *SystemParameterRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SystemParameterRule) XXX_Merge

func (dst *SystemParameterRule) XXX_Merge(src proto.Message)

func (*SystemParameterRule) XXX_Size

func (m *SystemParameterRule) XXX_Size() int

func (*SystemParameterRule) XXX_Unmarshal

func (m *SystemParameterRule) XXX_Unmarshal(b []byte) error

type SystemParameters

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

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

func (*SystemParameters) XXX_DiscardUnknown

func (m *SystemParameters) XXX_DiscardUnknown()

func (*SystemParameters) XXX_Marshal

func (m *SystemParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SystemParameters) XXX_Merge

func (dst *SystemParameters) XXX_Merge(src proto.Message)

func (*SystemParameters) XXX_Size

func (m *SystemParameters) XXX_Size() int

func (*SystemParameters) XXX_Unmarshal

func (m *SystemParameters) XXX_Unmarshal(b []byte) error

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,proto3" json:"requirements,omitempty"`
	// A list of usage rules that apply to individual API methods.
	//
	// **NOTE:** All service configuration rules follow "last one wins" order.
	Rules []*UsageRule `protobuf:"bytes,6,rep,name=rules,proto3" json:"rules,omitempty"`
	// The full resource name of a channel used for sending notifications to the
	// service producer.
	//
	// Google Service Management currently only supports
	// [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
	// channel. To use Google Cloud Pub/Sub as the channel, this must be the name
	// of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
	// documented in https://cloud.google.com/pubsub/docs/overview.
	ProducerNotificationChannel string   `` /* 144-byte string literal not displayed */
	XXX_NoUnkeyedLiteral        struct{} `json:"-"`
	XXX_unrecognized            []byte   `json:"-"`
	XXX_sizecache               int32    `json:"-"`
}

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

func (*Usage) XXX_DiscardUnknown

func (m *Usage) XXX_DiscardUnknown()

func (*Usage) XXX_Marshal

func (m *Usage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Usage) XXX_Merge

func (dst *Usage) XXX_Merge(src proto.Message)

func (*Usage) XXX_Size

func (m *Usage) XXX_Size() int

func (*Usage) XXX_Unmarshal

func (m *Usage) XXX_Unmarshal(b []byte) error

type UsageRule

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

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

func (*UsageRule) XXX_DiscardUnknown

func (m *UsageRule) XXX_DiscardUnknown()

func (*UsageRule) XXX_Marshal

func (m *UsageRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UsageRule) XXX_Merge

func (dst *UsageRule) XXX_Merge(src proto.Message)

func (*UsageRule) XXX_Size

func (m *UsageRule) XXX_Size() int

func (*UsageRule) XXX_Unmarshal

func (m *UsageRule) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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