genproto: google.golang.org/genproto/googleapis/api/serviceconfig Index | Files

package serviceconfig

import "google.golang.org/genproto/googleapis/api/serviceconfig"

Index

Package Files

auth.pb.go backend.pb.go billing.pb.go consumer.pb.go context.pb.go control.pb.go documentation.pb.go endpoint.pb.go log.pb.go logging.pb.go monitoring.pb.go quota.pb.go service.pb.go source_info.pb.go system_parameter.pb.go usage.pb.go

Variables

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

Enum value maps for BackendRule_PathTranslation.

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

Enum value maps for Property_PropertyType.

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

type AuthProvider Uses

type AuthProvider struct {

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

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

func (*AuthProvider) Descriptor Uses

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

Deprecated: Use AuthProvider.ProtoReflect.Descriptor instead.

func (*AuthProvider) GetAudiences Uses

func (x *AuthProvider) GetAudiences() string

func (*AuthProvider) GetAuthorizationUrl Uses

func (x *AuthProvider) GetAuthorizationUrl() string

func (*AuthProvider) GetId Uses

func (x *AuthProvider) GetId() string

func (*AuthProvider) GetIssuer Uses

func (x *AuthProvider) GetIssuer() string

func (*AuthProvider) GetJwksUri Uses

func (x *AuthProvider) GetJwksUri() string

func (*AuthProvider) GetJwtLocations Uses

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

func (*AuthProvider) ProtoMessage Uses

func (*AuthProvider) ProtoMessage()

func (*AuthProvider) ProtoReflect Uses

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

func (*AuthProvider) Reset Uses

func (x *AuthProvider) Reset()

func (*AuthProvider) String Uses

func (x *AuthProvider) String() string

type AuthRequirement Uses

type AuthRequirement struct {

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

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

func (*AuthRequirement) Descriptor Uses

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

Deprecated: Use AuthRequirement.ProtoReflect.Descriptor instead.

func (*AuthRequirement) GetAudiences Uses

func (x *AuthRequirement) GetAudiences() string

func (*AuthRequirement) GetProviderId Uses

func (x *AuthRequirement) GetProviderId() string

func (*AuthRequirement) ProtoMessage Uses

func (*AuthRequirement) ProtoMessage()

func (*AuthRequirement) ProtoReflect Uses

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

func (*AuthRequirement) Reset Uses

func (x *AuthRequirement) Reset()

func (*AuthRequirement) String Uses

func (x *AuthRequirement) String() string

type Authentication Uses

type Authentication struct {

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

`Authentication` defines the authentication configuration for 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 Uses

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

Deprecated: Use Authentication.ProtoReflect.Descriptor instead.

func (*Authentication) GetProviders Uses

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

func (*Authentication) GetRules Uses

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

func (*Authentication) ProtoMessage Uses

func (*Authentication) ProtoMessage()

func (*Authentication) ProtoReflect Uses

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

func (*Authentication) Reset Uses

func (x *Authentication) Reset()

func (*Authentication) String Uses

func (x *Authentication) String() string

type AuthenticationRule Uses

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 `protobuf:"varint,5,opt,name=allow_without_credential,json=allowWithoutCredential,proto3" json:"allow_without_credential,omitempty"`
    // Requirements for additional authentication providers.
    Requirements []*AuthRequirement `protobuf:"bytes,7,rep,name=requirements,proto3" json:"requirements,omitempty"`
    // contains filtered or unexported fields
}

Authentication rules for the service.

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

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

func (*AuthenticationRule) Descriptor Uses

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

Deprecated: Use AuthenticationRule.ProtoReflect.Descriptor instead.

func (*AuthenticationRule) GetAllowWithoutCredential Uses

func (x *AuthenticationRule) GetAllowWithoutCredential() bool

func (*AuthenticationRule) GetOauth Uses

func (x *AuthenticationRule) GetOauth() *OAuthRequirements

func (*AuthenticationRule) GetRequirements Uses

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

func (*AuthenticationRule) GetSelector Uses

func (x *AuthenticationRule) GetSelector() string

func (*AuthenticationRule) ProtoMessage Uses

func (*AuthenticationRule) ProtoMessage()

func (*AuthenticationRule) ProtoReflect Uses

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

func (*AuthenticationRule) Reset Uses

func (x *AuthenticationRule) Reset()

func (*AuthenticationRule) String Uses

func (x *AuthenticationRule) String() string

type Backend Uses

type Backend struct {

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

`Backend` defines the backend configuration for a service.

func (*Backend) Descriptor Uses

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

Deprecated: Use Backend.ProtoReflect.Descriptor instead.

func (*Backend) GetRules Uses

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

func (*Backend) ProtoMessage Uses

func (*Backend) ProtoMessage()

func (*Backend) ProtoReflect Uses

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

func (*Backend) Reset Uses

func (x *Backend) Reset()

func (*Backend) String Uses

func (x *Backend) String() string

type BackendRule Uses

type BackendRule struct {

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

A backend rule provides configuration for an individual API element.

func (*BackendRule) Descriptor Uses

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

Deprecated: Use BackendRule.ProtoReflect.Descriptor instead.

func (*BackendRule) GetAddress Uses

func (x *BackendRule) GetAddress() string

func (*BackendRule) GetAuthentication Uses

func (m *BackendRule) GetAuthentication() isBackendRule_Authentication

func (*BackendRule) GetDeadline Uses

func (x *BackendRule) GetDeadline() float64

func (*BackendRule) GetDisableAuth Uses

func (x *BackendRule) GetDisableAuth() bool

func (*BackendRule) GetJwtAudience Uses

func (x *BackendRule) GetJwtAudience() string

func (*BackendRule) GetMinDeadline Uses

func (x *BackendRule) GetMinDeadline() float64

func (*BackendRule) GetOperationDeadline Uses

func (x *BackendRule) GetOperationDeadline() float64

func (*BackendRule) GetPathTranslation Uses

func (x *BackendRule) GetPathTranslation() BackendRule_PathTranslation

func (*BackendRule) GetProtocol Uses

func (x *BackendRule) GetProtocol() string

func (*BackendRule) GetSelector Uses

func (x *BackendRule) GetSelector() string

func (*BackendRule) ProtoMessage Uses

func (*BackendRule) ProtoMessage()

func (*BackendRule) ProtoReflect Uses

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

func (*BackendRule) Reset Uses

func (x *BackendRule) Reset()

func (*BackendRule) String Uses

func (x *BackendRule) String() string

type BackendRule_DisableAuth Uses

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

type BackendRule_JwtAudience Uses

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

type BackendRule_PathTranslation Uses

type BackendRule_PathTranslation int32

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

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

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

func (BackendRule_PathTranslation) Descriptor Uses

func (BackendRule_PathTranslation) Descriptor() protoreflect.EnumDescriptor

func (BackendRule_PathTranslation) Enum Uses

func (x BackendRule_PathTranslation) Enum() *BackendRule_PathTranslation

func (BackendRule_PathTranslation) EnumDescriptor Uses

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

Deprecated: Use BackendRule_PathTranslation.Descriptor instead.

func (BackendRule_PathTranslation) Number Uses

func (x BackendRule_PathTranslation) Number() protoreflect.EnumNumber

func (BackendRule_PathTranslation) String Uses

func (x BackendRule_PathTranslation) String() string

func (BackendRule_PathTranslation) Type Uses

func (BackendRule_PathTranslation) Type() protoreflect.EnumType

type Billing Uses

type Billing struct {

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

Billing related configuration of the service.

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

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

func (*Billing) Descriptor Uses

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

Deprecated: Use Billing.ProtoReflect.Descriptor instead.

func (*Billing) GetConsumerDestinations Uses

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

func (*Billing) ProtoMessage Uses

func (*Billing) ProtoMessage()

func (*Billing) ProtoReflect Uses

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

func (*Billing) Reset Uses

func (x *Billing) Reset()

func (*Billing) String Uses

func (x *Billing) String() string

type Billing_BillingDestination Uses

type Billing_BillingDestination struct {

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

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

func (*Billing_BillingDestination) Descriptor Uses

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

Deprecated: Use Billing_BillingDestination.ProtoReflect.Descriptor instead.

func (*Billing_BillingDestination) GetMetrics Uses

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

func (*Billing_BillingDestination) GetMonitoredResource Uses

func (x *Billing_BillingDestination) GetMonitoredResource() string

func (*Billing_BillingDestination) ProtoMessage Uses

func (*Billing_BillingDestination) ProtoMessage()

func (*Billing_BillingDestination) ProtoReflect Uses

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

func (*Billing_BillingDestination) Reset Uses

func (x *Billing_BillingDestination) Reset()

func (*Billing_BillingDestination) String Uses

func (x *Billing_BillingDestination) String() string

type Context Uses

type Context struct {

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

`Context` defines which contexts an API requests.

Example:

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

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

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

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

Example:

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

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

func (*Context) Descriptor Uses

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

Deprecated: Use Context.ProtoReflect.Descriptor instead.

func (*Context) GetRules Uses

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

func (*Context) ProtoMessage Uses

func (*Context) ProtoMessage()

func (*Context) ProtoReflect Uses

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

func (*Context) Reset Uses

func (x *Context) Reset()

func (*Context) String Uses

func (x *Context) String() string

type ContextRule Uses

type ContextRule struct {

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

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

func (*ContextRule) Descriptor Uses

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

Deprecated: Use ContextRule.ProtoReflect.Descriptor instead.

func (*ContextRule) GetAllowedRequestExtensions Uses

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

func (*ContextRule) GetAllowedResponseExtensions Uses

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

func (*ContextRule) GetProvided Uses

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

func (*ContextRule) GetRequested Uses

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

func (*ContextRule) GetSelector Uses

func (x *ContextRule) GetSelector() string

func (*ContextRule) ProtoMessage Uses

func (*ContextRule) ProtoMessage()

func (*ContextRule) ProtoReflect Uses

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

func (*ContextRule) Reset Uses

func (x *ContextRule) Reset()

func (*ContextRule) String Uses

func (x *ContextRule) String() string

type Control Uses

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"`
    // contains filtered or unexported fields
}

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 Uses

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

Deprecated: Use Control.ProtoReflect.Descriptor instead.

func (*Control) GetEnvironment Uses

func (x *Control) GetEnvironment() string

func (*Control) ProtoMessage Uses

func (*Control) ProtoMessage()

func (*Control) ProtoReflect Uses

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

func (*Control) Reset Uses

func (x *Control) Reset()

func (*Control) String Uses

func (x *Control) String() string

type Documentation Uses

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"`
    // Specifies the service root url if the default one (the service name
    // from the yaml file) is not suitable. This can be seen in any fully
    // specified service urls as well as sections that show a base that other
    // urls are relative to.
    ServiceRootUrl string `protobuf:"bytes,6,opt,name=service_root_url,json=serviceRootUrl,proto3" json:"service_root_url,omitempty"`
    // Declares a single overview page. For example:
    // <pre><code>documentation:
    //   summary: ...
    //   overview: &#40;== include overview.md ==&#41;
    // </code></pre>
    // This is a shortcut for the following declaration (using pages style):
    // <pre><code>documentation:
    //   summary: ...
    //   pages:
    //   - name: Overview
    //     content: &#40;== include overview.md ==&#41;
    // </code></pre>
    // Note: you cannot specify both `overview` field and `pages` field.
    Overview string `protobuf:"bytes,2,opt,name=overview,proto3" json:"overview,omitempty"`
    // contains filtered or unexported fields
}

`Documentation` provides the information for describing a service.

Example: <pre><code>documentation:

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

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

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

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

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

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

func (*Documentation) Descriptor Uses

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

Deprecated: Use Documentation.ProtoReflect.Descriptor instead.

func (*Documentation) GetDocumentationRootUrl Uses

func (x *Documentation) GetDocumentationRootUrl() string

func (*Documentation) GetOverview Uses

func (x *Documentation) GetOverview() string

func (*Documentation) GetPages Uses

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

func (*Documentation) GetRules Uses

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

func (*Documentation) GetServiceRootUrl Uses

func (x *Documentation) GetServiceRootUrl() string

func (*Documentation) GetSummary Uses

func (x *Documentation) GetSummary() string

func (*Documentation) ProtoMessage Uses

func (*Documentation) ProtoMessage()

func (*Documentation) ProtoReflect Uses

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

func (*Documentation) Reset Uses

func (x *Documentation) Reset()

func (*Documentation) String Uses

func (x *Documentation) String() string

type DocumentationRule Uses

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". A
    // wildcard will match one or more components. To specify a default for all
    // applicable elements, the whole pattern "*" is used.
    Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
    // Description of the selected 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 `protobuf:"bytes,3,opt,name=deprecation_description,json=deprecationDescription,proto3" json:"deprecation_description,omitempty"`
    // contains filtered or unexported fields
}

A documentation rule provides information about individual API elements.

func (*DocumentationRule) Descriptor Uses

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

Deprecated: Use DocumentationRule.ProtoReflect.Descriptor instead.

func (*DocumentationRule) GetDeprecationDescription Uses

func (x *DocumentationRule) GetDeprecationDescription() string

func (*DocumentationRule) GetDescription Uses

func (x *DocumentationRule) GetDescription() string

func (*DocumentationRule) GetSelector Uses

func (x *DocumentationRule) GetSelector() string

func (*DocumentationRule) ProtoMessage Uses

func (*DocumentationRule) ProtoMessage()

func (*DocumentationRule) ProtoReflect Uses

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

func (*DocumentationRule) Reset Uses

func (x *DocumentationRule) Reset()

func (*DocumentationRule) String Uses

func (x *DocumentationRule) String() string

type Endpoint Uses

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.
    //
    // Deprecated: Do not use.
    Aliases []string `protobuf:"bytes,2,rep,name=aliases,proto3" json:"aliases,omitempty"`
    // The specification of an Internet routable address of API frontend that will
    // handle requests to this [API
    // Endpoint](https://cloud.google.com/apis/design/glossary). It should be
    // either a valid IPv4 address or a fully-qualified domain name. For example,
    // "8.8.8.8" or "myservice.appspot.com".
    Target string `protobuf:"bytes,101,opt,name=target,proto3" json:"target,omitempty"`
    // Allowing
    // [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
    // cross-domain traffic, would allow the backends served from this endpoint to
    // receive and respond to HTTP OPTIONS requests. The response will be used by
    // the browser to determine whether the subsequent cross-origin request is
    // allowed to proceed.
    AllowCors bool `protobuf:"varint,5,opt,name=allow_cors,json=allowCors,proto3" json:"allow_cors,omitempty"`
    // contains filtered or unexported fields
}

`Endpoint` describes a network 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 Uses

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

Deprecated: Use Endpoint.ProtoReflect.Descriptor instead.

func (*Endpoint) GetAliases Uses

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

Deprecated: Do not use.

func (*Endpoint) GetAllowCors Uses

func (x *Endpoint) GetAllowCors() bool

func (*Endpoint) GetName Uses

func (x *Endpoint) GetName() string

func (*Endpoint) GetTarget Uses

func (x *Endpoint) GetTarget() string

func (*Endpoint) ProtoMessage Uses

func (*Endpoint) ProtoMessage()

func (*Endpoint) ProtoReflect Uses

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

func (*Endpoint) Reset Uses

func (x *Endpoint) Reset()

func (*Endpoint) String Uses

func (x *Endpoint) String() string

type JwtLocation Uses

type JwtLocation struct {

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

Specifies a location to extract JWT from an API request.

func (*JwtLocation) Descriptor Uses

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

Deprecated: Use JwtLocation.ProtoReflect.Descriptor instead.

func (*JwtLocation) GetHeader Uses

func (x *JwtLocation) GetHeader() string

func (*JwtLocation) GetIn Uses

func (m *JwtLocation) GetIn() isJwtLocation_In

func (*JwtLocation) GetQuery Uses

func (x *JwtLocation) GetQuery() string

func (*JwtLocation) GetValuePrefix Uses

func (x *JwtLocation) GetValuePrefix() string

func (*JwtLocation) ProtoMessage Uses

func (*JwtLocation) ProtoMessage()

func (*JwtLocation) ProtoReflect Uses

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

func (*JwtLocation) Reset Uses

func (x *JwtLocation) Reset()

func (*JwtLocation) String Uses

func (x *JwtLocation) String() string

type JwtLocation_Header Uses

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

type JwtLocation_Query Uses

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

type LogDescriptor Uses

type LogDescriptor struct {

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

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

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

func (*LogDescriptor) Descriptor Uses

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

Deprecated: Use LogDescriptor.ProtoReflect.Descriptor instead.

func (*LogDescriptor) GetDescription Uses

func (x *LogDescriptor) GetDescription() string

func (*LogDescriptor) GetDisplayName Uses

func (x *LogDescriptor) GetDisplayName() string

func (*LogDescriptor) GetLabels Uses

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

func (*LogDescriptor) GetName Uses

func (x *LogDescriptor) GetName() string

func (*LogDescriptor) ProtoMessage Uses

func (*LogDescriptor) ProtoMessage()

func (*LogDescriptor) ProtoReflect Uses

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

func (*LogDescriptor) Reset Uses

func (x *LogDescriptor) Reset()

func (*LogDescriptor) String Uses

func (x *LogDescriptor) String() string

type Logging Uses

type Logging struct {

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

Logging configuration of the service.

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

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

func (*Logging) Descriptor Uses

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

Deprecated: Use Logging.ProtoReflect.Descriptor instead.

func (*Logging) GetConsumerDestinations Uses

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

func (*Logging) GetProducerDestinations Uses

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

func (*Logging) ProtoMessage Uses

func (*Logging) ProtoMessage()

func (*Logging) ProtoReflect Uses

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

func (*Logging) Reset Uses

func (x *Logging) Reset()

func (*Logging) String Uses

func (x *Logging) String() string

type Logging_LoggingDestination Uses

type Logging_LoggingDestination struct {

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

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

func (*Logging_LoggingDestination) Descriptor Uses

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

Deprecated: Use Logging_LoggingDestination.ProtoReflect.Descriptor instead.

func (*Logging_LoggingDestination) GetLogs Uses

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

func (*Logging_LoggingDestination) GetMonitoredResource Uses

func (x *Logging_LoggingDestination) GetMonitoredResource() string

func (*Logging_LoggingDestination) ProtoMessage Uses

func (*Logging_LoggingDestination) ProtoMessage()

func (*Logging_LoggingDestination) ProtoReflect Uses

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

func (*Logging_LoggingDestination) Reset Uses

func (x *Logging_LoggingDestination) Reset()

func (*Logging_LoggingDestination) String Uses

func (x *Logging_LoggingDestination) String() string

type MetricRule Uses

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 `protobuf:"bytes,2,rep,name=metric_costs,json=metricCosts,proto3" json:"metric_costs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
    // contains filtered or unexported fields
}

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

func (*MetricRule) Descriptor Uses

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

Deprecated: Use MetricRule.ProtoReflect.Descriptor instead.

func (*MetricRule) GetMetricCosts Uses

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

func (*MetricRule) GetSelector Uses

func (x *MetricRule) GetSelector() string

func (*MetricRule) ProtoMessage Uses

func (*MetricRule) ProtoMessage()

func (*MetricRule) ProtoReflect Uses

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

func (*MetricRule) Reset Uses

func (x *MetricRule) Reset()

func (*MetricRule) String Uses

func (x *MetricRule) String() string

type Monitoring Uses

type Monitoring struct {

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

Monitoring configuration of the service.

The example below shows how to configure monitored resources and metrics for monitoring. In the example, a monitored resource and two metrics are defined. The `library.googleapis.com/book/returned_count` metric is sent to both producer and consumer projects, whereas the `library.googleapis.com/book/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 Uses

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

Deprecated: Use Monitoring.ProtoReflect.Descriptor instead.

func (*Monitoring) GetConsumerDestinations Uses

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

func (*Monitoring) GetProducerDestinations Uses

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

func (*Monitoring) ProtoMessage Uses

func (*Monitoring) ProtoMessage()

func (*Monitoring) ProtoReflect Uses

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

func (*Monitoring) Reset Uses

func (x *Monitoring) Reset()

func (*Monitoring) String Uses

func (x *Monitoring) String() string

type Monitoring_MonitoringDestination Uses

type Monitoring_MonitoringDestination struct {

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

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

func (*Monitoring_MonitoringDestination) Descriptor Uses

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

Deprecated: Use Monitoring_MonitoringDestination.ProtoReflect.Descriptor instead.

func (*Monitoring_MonitoringDestination) GetMetrics Uses

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

func (*Monitoring_MonitoringDestination) GetMonitoredResource Uses

func (x *Monitoring_MonitoringDestination) GetMonitoredResource() string

func (*Monitoring_MonitoringDestination) ProtoMessage Uses

func (*Monitoring_MonitoringDestination) ProtoMessage()

func (*Monitoring_MonitoringDestination) ProtoReflect Uses

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

func (*Monitoring_MonitoringDestination) Reset Uses

func (x *Monitoring_MonitoringDestination) Reset()

func (*Monitoring_MonitoringDestination) String Uses

func (x *Monitoring_MonitoringDestination) String() string

type OAuthRequirements Uses

type OAuthRequirements struct {

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

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

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

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

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

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

func (*OAuthRequirements) Descriptor Uses

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

Deprecated: Use OAuthRequirements.ProtoReflect.Descriptor instead.

func (*OAuthRequirements) GetCanonicalScopes Uses

func (x *OAuthRequirements) GetCanonicalScopes() string

func (*OAuthRequirements) ProtoMessage Uses

func (*OAuthRequirements) ProtoMessage()

func (*OAuthRequirements) ProtoReflect Uses

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

func (*OAuthRequirements) Reset Uses

func (x *OAuthRequirements) Reset()

func (*OAuthRequirements) String Uses

func (x *OAuthRequirements) String() string

type Page Uses

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"`
    // contains filtered or unexported fields
}

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

func (*Page) Descriptor Uses

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

Deprecated: Use Page.ProtoReflect.Descriptor instead.

func (*Page) GetContent Uses

func (x *Page) GetContent() string

func (*Page) GetName Uses

func (x *Page) GetName() string

func (*Page) GetSubpages Uses

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

func (*Page) ProtoMessage Uses

func (*Page) ProtoMessage()

func (*Page) ProtoReflect Uses

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

func (*Page) Reset Uses

func (x *Page) Reset()

func (*Page) String Uses

func (x *Page) String() string

type ProjectProperties Uses

type ProjectProperties struct {

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

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

Example:

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

func (*ProjectProperties) Descriptor Uses

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

Deprecated: Use ProjectProperties.ProtoReflect.Descriptor instead.

func (*ProjectProperties) GetProperties Uses

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

func (*ProjectProperties) ProtoMessage Uses

func (*ProjectProperties) ProtoMessage()

func (*ProjectProperties) ProtoReflect Uses

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

func (*ProjectProperties) Reset Uses

func (x *ProjectProperties) Reset()

func (*ProjectProperties) String Uses

func (x *ProjectProperties) String() string

type Property Uses

type Property struct {

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

Defines project properties.

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

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

func (*Property) Descriptor Uses

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

Deprecated: Use Property.ProtoReflect.Descriptor instead.

func (*Property) GetDescription Uses

func (x *Property) GetDescription() string

func (*Property) GetName Uses

func (x *Property) GetName() string

func (*Property) GetType Uses

func (x *Property) GetType() Property_PropertyType

func (*Property) ProtoMessage Uses

func (*Property) ProtoMessage()

func (*Property) ProtoReflect Uses

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

func (*Property) Reset Uses

func (x *Property) Reset()

func (*Property) String Uses

func (x *Property) String() string

type Property_PropertyType Uses

type Property_PropertyType int32

Supported data type of the property values

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

func (Property_PropertyType) Descriptor Uses

func (Property_PropertyType) Descriptor() protoreflect.EnumDescriptor

func (Property_PropertyType) Enum Uses

func (x Property_PropertyType) Enum() *Property_PropertyType

func (Property_PropertyType) EnumDescriptor Uses

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

Deprecated: Use Property_PropertyType.Descriptor instead.

func (Property_PropertyType) Number Uses

func (x Property_PropertyType) Number() protoreflect.EnumNumber

func (Property_PropertyType) String Uses

func (x Property_PropertyType) String() string

func (Property_PropertyType) Type Uses

func (Property_PropertyType) Type() protoreflect.EnumType

type Quota Uses

type Quota struct {

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

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

The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with

corresponding costs.

- The quota.limits defines limits on the metrics, which will be used for

quota checks at runtime.

An example quota configuration in yaml format:

  quota:
    limits:

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

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

Corresponding Metric definition:

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

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

func (*Quota) Descriptor Uses

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

Deprecated: Use Quota.ProtoReflect.Descriptor instead.

func (*Quota) GetLimits Uses

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

func (*Quota) GetMetricRules Uses

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

func (*Quota) ProtoMessage Uses

func (*Quota) ProtoMessage()

func (*Quota) ProtoReflect Uses

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

func (*Quota) Reset Uses

func (x *Quota) Reset()

func (*Quota) String Uses

func (x *Quota) String() string

type QuotaLimit Uses

type QuotaLimit struct {

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

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

func (*QuotaLimit) Descriptor Uses

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

Deprecated: Use QuotaLimit.ProtoReflect.Descriptor instead.

func (*QuotaLimit) GetDefaultLimit Uses

func (x *QuotaLimit) GetDefaultLimit() int64

func (*QuotaLimit) GetDescription Uses

func (x *QuotaLimit) GetDescription() string

func (*QuotaLimit) GetDisplayName Uses

func (x *QuotaLimit) GetDisplayName() string

func (*QuotaLimit) GetDuration Uses

func (x *QuotaLimit) GetDuration() string

func (*QuotaLimit) GetFreeTier Uses

func (x *QuotaLimit) GetFreeTier() int64

func (*QuotaLimit) GetMaxLimit Uses

func (x *QuotaLimit) GetMaxLimit() int64

func (*QuotaLimit) GetMetric Uses

func (x *QuotaLimit) GetMetric() string

func (*QuotaLimit) GetName Uses

func (x *QuotaLimit) GetName() string

func (*QuotaLimit) GetUnit Uses

func (x *QuotaLimit) GetUnit() string

func (*QuotaLimit) GetValues Uses

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

func (*QuotaLimit) ProtoMessage Uses

func (*QuotaLimit) ProtoMessage()

func (*QuotaLimit) ProtoReflect Uses

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

func (*QuotaLimit) Reset Uses

func (x *QuotaLimit) Reset()

func (*QuotaLimit) String Uses

func (x *QuotaLimit) String() string

type Service Uses

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 service name, which is a DNS-like logical identifier for the
    // service, such as `calendar.googleapis.com`. The service name
    // typically goes through DNS verification to make sure the owner
    // of the service also owns the DNS name.
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // A unique ID for a specific instance of this message, typically assigned
    // by the client for tracking purpose. Must be no longer than 63 characters
    // and only lower case letters, digits, '.', '_' and '-' are allowed. If
    // empty, the server may choose to generate one instead.
    Id  string `protobuf:"bytes,33,opt,name=id,proto3" json:"id,omitempty"`
    // 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"`
    // contains filtered or unexported fields
}

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

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

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetApis Uses

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

func (*Service) GetAuthentication Uses

func (x *Service) GetAuthentication() *Authentication

func (*Service) GetBackend Uses

func (x *Service) GetBackend() *Backend

func (*Service) GetBilling Uses

func (x *Service) GetBilling() *Billing

func (*Service) GetConfigVersion Uses

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

func (*Service) GetContext Uses

func (x *Service) GetContext() *Context

func (*Service) GetControl Uses

func (x *Service) GetControl() *Control

func (*Service) GetDocumentation Uses

func (x *Service) GetDocumentation() *Documentation

func (*Service) GetEndpoints Uses

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

func (*Service) GetEnums Uses

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

func (*Service) GetHttp Uses

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

func (*Service) GetId Uses

func (x *Service) GetId() string

func (*Service) GetLogging Uses

func (x *Service) GetLogging() *Logging

func (*Service) GetLogs Uses

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

func (*Service) GetMetrics Uses

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

func (*Service) GetMonitoredResources Uses

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

func (*Service) GetMonitoring Uses

func (x *Service) GetMonitoring() *Monitoring

func (*Service) GetName Uses

func (x *Service) GetName() string

func (*Service) GetProducerProjectId Uses

func (x *Service) GetProducerProjectId() string

func (*Service) GetQuota Uses

func (x *Service) GetQuota() *Quota

func (*Service) GetSourceInfo Uses

func (x *Service) GetSourceInfo() *SourceInfo

func (*Service) GetSystemParameters Uses

func (x *Service) GetSystemParameters() *SystemParameters

func (*Service) GetTitle Uses

func (x *Service) GetTitle() string

func (*Service) GetTypes Uses

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

func (*Service) GetUsage Uses

func (x *Service) GetUsage() *Usage

func (*Service) ProtoMessage Uses

func (*Service) ProtoMessage()

func (*Service) ProtoReflect Uses

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

func (*Service) Reset Uses

func (x *Service) Reset()

func (*Service) String Uses

func (x *Service) String() string

type SourceInfo Uses

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"`
    // contains filtered or unexported fields
}

Source information used to create a Service Config

func (*SourceInfo) Descriptor Uses

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

Deprecated: Use SourceInfo.ProtoReflect.Descriptor instead.

func (*SourceInfo) GetSourceFiles Uses

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

func (*SourceInfo) ProtoMessage Uses

func (*SourceInfo) ProtoMessage()

func (*SourceInfo) ProtoReflect Uses

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

func (*SourceInfo) Reset Uses

func (x *SourceInfo) Reset()

func (*SourceInfo) String Uses

func (x *SourceInfo) String() string

type SystemParameter Uses

type SystemParameter struct {

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

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

func (*SystemParameter) Descriptor Uses

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

Deprecated: Use SystemParameter.ProtoReflect.Descriptor instead.

func (*SystemParameter) GetHttpHeader Uses

func (x *SystemParameter) GetHttpHeader() string

func (*SystemParameter) GetName Uses

func (x *SystemParameter) GetName() string

func (*SystemParameter) GetUrlQueryParameter Uses

func (x *SystemParameter) GetUrlQueryParameter() string

func (*SystemParameter) ProtoMessage Uses

func (*SystemParameter) ProtoMessage()

func (*SystemParameter) ProtoReflect Uses

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

func (*SystemParameter) Reset Uses

func (x *SystemParameter) Reset()

func (*SystemParameter) String Uses

func (x *SystemParameter) String() string

type SystemParameterRule Uses

type SystemParameterRule struct {

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

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

func (*SystemParameterRule) Descriptor Uses

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

Deprecated: Use SystemParameterRule.ProtoReflect.Descriptor instead.

func (*SystemParameterRule) GetParameters Uses

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

func (*SystemParameterRule) GetSelector Uses

func (x *SystemParameterRule) GetSelector() string

func (*SystemParameterRule) ProtoMessage Uses

func (*SystemParameterRule) ProtoMessage()

func (*SystemParameterRule) ProtoReflect Uses

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

func (*SystemParameterRule) Reset Uses

func (x *SystemParameterRule) Reset()

func (*SystemParameterRule) String Uses

func (x *SystemParameterRule) String() string

type SystemParameters Uses

type SystemParameters struct {

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

### System parameter configuration

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

func (*SystemParameters) Descriptor Uses

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

Deprecated: Use SystemParameters.ProtoReflect.Descriptor instead.

func (*SystemParameters) GetRules Uses

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

func (*SystemParameters) ProtoMessage Uses

func (*SystemParameters) ProtoMessage()

func (*SystemParameters) ProtoReflect Uses

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

func (*SystemParameters) Reset Uses

func (x *SystemParameters) Reset()

func (*SystemParameters) String Uses

func (x *SystemParameters) String() string

type Usage Uses

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 `protobuf:"bytes,7,opt,name=producer_notification_channel,json=producerNotificationChannel,proto3" json:"producer_notification_channel,omitempty"`
    // contains filtered or unexported fields
}

Configuration controlling usage of a service.

func (*Usage) Descriptor Uses

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

Deprecated: Use Usage.ProtoReflect.Descriptor instead.

func (*Usage) GetProducerNotificationChannel Uses

func (x *Usage) GetProducerNotificationChannel() string

func (*Usage) GetRequirements Uses

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

func (*Usage) GetRules Uses

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

func (*Usage) ProtoMessage Uses

func (*Usage) ProtoMessage()

func (*Usage) ProtoReflect Uses

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

func (*Usage) Reset Uses

func (x *Usage) Reset()

func (*Usage) String Uses

func (x *Usage) String() string

type UsageRule Uses

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 `protobuf:"varint,2,opt,name=allow_unregistered_calls,json=allowUnregisteredCalls,proto3" json:"allow_unregistered_calls,omitempty"`
    // If true, the selected method should skip service control and the control
    // plane features, such as quota and billing, will not be available.
    // This flag is used by Google Cloud Endpoints to bypass checks for internal
    // methods, such as service health check methods.
    SkipServiceControl bool `protobuf:"varint,3,opt,name=skip_service_control,json=skipServiceControl,proto3" json:"skip_service_control,omitempty"`
    // contains filtered or unexported fields
}

Usage configuration rules for the service.

NOTE: Under development.

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

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

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

Example of a method that wants to allow unregistered calls.

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

func (*UsageRule) Descriptor Uses

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

Deprecated: Use UsageRule.ProtoReflect.Descriptor instead.

func (*UsageRule) GetAllowUnregisteredCalls Uses

func (x *UsageRule) GetAllowUnregisteredCalls() bool

func (*UsageRule) GetSelector Uses

func (x *UsageRule) GetSelector() string

func (*UsageRule) GetSkipServiceControl Uses

func (x *UsageRule) GetSkipServiceControl() bool

func (*UsageRule) ProtoMessage Uses

func (*UsageRule) ProtoMessage()

func (*UsageRule) ProtoReflect Uses

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

func (*UsageRule) Reset Uses

func (x *UsageRule) Reset()

func (*UsageRule) String Uses

func (x *UsageRule) String() string

Package serviceconfig imports 13 packages (graph) and is imported by 4 packages. Updated 2020-08-13. Refresh now. Tools for package owners.