146 lines
6.1 KiB
Go
146 lines
6.1 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: google/api/usage.proto
|
|
|
|
package serviceconfig
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// Configuration controlling usage of a service.
|
|
type Usage struct {
|
|
// Requirements that must be satisfied before a consumer project can use the
|
|
// service. Each requirement is of the form <service.name>/<requirement-id>;
|
|
// for example 'serviceusage.googleapis.com/billing-enabled'.
|
|
Requirements []string `protobuf:"bytes,1,rep,name=requirements" json:"requirements,omitempty"`
|
|
// A list of usage rules that apply to individual API methods.
|
|
//
|
|
// **NOTE:** All service configuration rules follow "last one wins" order.
|
|
Rules []*UsageRule `protobuf:"bytes,6,rep,name=rules" json:"rules,omitempty"`
|
|
// The full resource name of a channel used for sending notifications to the
|
|
// service producer.
|
|
//
|
|
// Google Service Management currently only supports
|
|
// [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
|
|
// channel. To use Google Cloud Pub/Sub as the channel, this must be the name
|
|
// of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
|
|
// documented in https://cloud.google.com/pubsub/docs/overview.
|
|
ProducerNotificationChannel string `protobuf:"bytes,7,opt,name=producer_notification_channel,json=producerNotificationChannel" json:"producer_notification_channel,omitempty"`
|
|
}
|
|
|
|
func (m *Usage) Reset() { *m = Usage{} }
|
|
func (m *Usage) String() string { return proto.CompactTextString(m) }
|
|
func (*Usage) ProtoMessage() {}
|
|
func (*Usage) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{0} }
|
|
|
|
func (m *Usage) GetRequirements() []string {
|
|
if m != nil {
|
|
return m.Requirements
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Usage) GetRules() []*UsageRule {
|
|
if m != nil {
|
|
return m.Rules
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Usage) GetProducerNotificationChannel() string {
|
|
if m != nil {
|
|
return m.ProducerNotificationChannel
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// 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
|
|
type UsageRule struct {
|
|
// Selects the methods to which this rule applies. Use '*' to indicate all
|
|
// methods in all APIs.
|
|
//
|
|
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
|
|
Selector string `protobuf:"bytes,1,opt,name=selector" json:"selector,omitempty"`
|
|
// True, if the method allows unregistered calls; false otherwise.
|
|
AllowUnregisteredCalls bool `protobuf:"varint,2,opt,name=allow_unregistered_calls,json=allowUnregisteredCalls" json:"allow_unregistered_calls,omitempty"`
|
|
}
|
|
|
|
func (m *UsageRule) Reset() { *m = UsageRule{} }
|
|
func (m *UsageRule) String() string { return proto.CompactTextString(m) }
|
|
func (*UsageRule) ProtoMessage() {}
|
|
func (*UsageRule) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{1} }
|
|
|
|
func (m *UsageRule) GetSelector() string {
|
|
if m != nil {
|
|
return m.Selector
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *UsageRule) GetAllowUnregisteredCalls() bool {
|
|
if m != nil {
|
|
return m.AllowUnregisteredCalls
|
|
}
|
|
return false
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Usage)(nil), "google.api.Usage")
|
|
proto.RegisterType((*UsageRule)(nil), "google.api.UsageRule")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("google/api/usage.proto", fileDescriptor15) }
|
|
|
|
var fileDescriptor15 = []byte{
|
|
// 303 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xcf, 0x4b, 0x3b, 0x31,
|
|
0x10, 0xc5, 0x49, 0xfb, 0x6d, 0xbf, 0x6d, 0x14, 0x0f, 0x01, 0x4b, 0xa8, 0x0a, 0x4b, 0x4f, 0x0b,
|
|
0xc2, 0x2e, 0xe8, 0x45, 0xf0, 0x64, 0x8b, 0x88, 0x17, 0x29, 0x0b, 0xbd, 0x78, 0x59, 0x62, 0x3a,
|
|
0x8d, 0x81, 0x34, 0xb3, 0xe6, 0x87, 0xfe, 0x33, 0x9e, 0xfc, 0x4b, 0xa5, 0x59, 0xad, 0xdb, 0xe3,
|
|
0xcc, 0xfb, 0xbc, 0x79, 0xcc, 0xa3, 0x13, 0x85, 0xa8, 0x0c, 0x94, 0xa2, 0xd1, 0x65, 0xf4, 0x42,
|
|
0x41, 0xd1, 0x38, 0x0c, 0xc8, 0x68, 0xbb, 0x2f, 0x44, 0xa3, 0xa7, 0xe7, 0x1d, 0x46, 0x58, 0x8b,
|
|
0x41, 0x04, 0x8d, 0xd6, 0xb7, 0xe4, 0xec, 0x93, 0xd0, 0xc1, 0x6a, 0xe7, 0x64, 0x33, 0x7a, 0xec,
|
|
0xe0, 0x2d, 0x6a, 0x07, 0x5b, 0xb0, 0xc1, 0x73, 0x92, 0xf5, 0xf3, 0x71, 0x75, 0xb0, 0x63, 0x97,
|
|
0x74, 0xe0, 0xa2, 0x01, 0xcf, 0x87, 0x59, 0x3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