1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: google/api/usage.proto 3 4package serviceconfig // import "google.golang.org/genproto/googleapis/api/serviceconfig" 5 6import proto "github.com/golang/protobuf/proto" 7import fmt "fmt" 8import math "math" 9import _ "google.golang.org/genproto/googleapis/api/annotations" 10 11// Reference imports to suppress errors if they are not otherwise used. 12var _ = proto.Marshal 13var _ = fmt.Errorf 14var _ = math.Inf 15 16// This is a compile-time assertion to ensure that this generated file 17// is compatible with the proto package it is being compiled against. 18// A compilation error at this line likely means your copy of the 19// proto package needs to be updated. 20const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 21 22// Configuration controlling usage of a service. 23type Usage struct { 24 // Requirements that must be satisfied before a consumer project can use the 25 // service. Each requirement is of the form <service.name>/<requirement-id>; 26 // for example 'serviceusage.googleapis.com/billing-enabled'. 27 Requirements []string `protobuf:"bytes,1,rep,name=requirements,proto3" json:"requirements,omitempty"` 28 // A list of usage rules that apply to individual API methods. 29 // 30 // **NOTE:** All service configuration rules follow "last one wins" order. 31 Rules []*UsageRule `protobuf:"bytes,6,rep,name=rules,proto3" json:"rules,omitempty"` 32 // The full resource name of a channel used for sending notifications to the 33 // service producer. 34 // 35 // Google Service Management currently only supports 36 // [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification 37 // channel. To use Google Cloud Pub/Sub as the channel, this must be the name 38 // of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format 39 // documented in https://cloud.google.com/pubsub/docs/overview. 40 ProducerNotificationChannel string `protobuf:"bytes,7,opt,name=producer_notification_channel,json=producerNotificationChannel,proto3" json:"producer_notification_channel,omitempty"` 41 XXX_NoUnkeyedLiteral struct{} `json:"-"` 42 XXX_unrecognized []byte `json:"-"` 43 XXX_sizecache int32 `json:"-"` 44} 45 46func (m *Usage) Reset() { *m = Usage{} } 47func (m *Usage) String() string { return proto.CompactTextString(m) } 48func (*Usage) ProtoMessage() {} 49func (*Usage) Descriptor() ([]byte, []int) { 50 return fileDescriptor_usage_d5fdf432dee45e22, []int{0} 51} 52func (m *Usage) XXX_Unmarshal(b []byte) error { 53 return xxx_messageInfo_Usage.Unmarshal(m, b) 54} 55func (m *Usage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 56 return xxx_messageInfo_Usage.Marshal(b, m, deterministic) 57} 58func (dst *Usage) XXX_Merge(src proto.Message) { 59 xxx_messageInfo_Usage.Merge(dst, src) 60} 61func (m *Usage) XXX_Size() int { 62 return xxx_messageInfo_Usage.Size(m) 63} 64func (m *Usage) XXX_DiscardUnknown() { 65 xxx_messageInfo_Usage.DiscardUnknown(m) 66} 67 68var xxx_messageInfo_Usage proto.InternalMessageInfo 69 70func (m *Usage) GetRequirements() []string { 71 if m != nil { 72 return m.Requirements 73 } 74 return nil 75} 76 77func (m *Usage) GetRules() []*UsageRule { 78 if m != nil { 79 return m.Rules 80 } 81 return nil 82} 83 84func (m *Usage) GetProducerNotificationChannel() string { 85 if m != nil { 86 return m.ProducerNotificationChannel 87 } 88 return "" 89} 90 91// Usage configuration rules for the service. 92// 93// NOTE: Under development. 94// 95// 96// Use this rule to configure unregistered calls for the service. Unregistered 97// calls are calls that do not contain consumer project identity. 98// (Example: calls that do not contain an API key). 99// By default, API methods do not allow unregistered calls, and each method call 100// must be identified by a consumer project identity. Use this rule to 101// allow/disallow unregistered calls. 102// 103// Example of an API that wants to allow unregistered calls for entire service. 104// 105// usage: 106// rules: 107// - selector: "*" 108// allow_unregistered_calls: true 109// 110// Example of a method that wants to allow unregistered calls. 111// 112// usage: 113// rules: 114// - selector: "google.example.library.v1.LibraryService.CreateBook" 115// allow_unregistered_calls: true 116type UsageRule struct { 117 // Selects the methods to which this rule applies. Use '*' to indicate all 118 // methods in all APIs. 119 // 120 // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. 121 Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` 122 // If true, the selected method allows unregistered calls, e.g. calls 123 // that don't identify any user or application. 124 AllowUnregisteredCalls bool `protobuf:"varint,2,opt,name=allow_unregistered_calls,json=allowUnregisteredCalls,proto3" json:"allow_unregistered_calls,omitempty"` 125 // If true, the selected method should skip service control and the control 126 // plane features, such as quota and billing, will not be available. 127 // This flag is used by Google Cloud Endpoints to bypass checks for internal 128 // methods, such as service health check methods. 129 SkipServiceControl bool `protobuf:"varint,3,opt,name=skip_service_control,json=skipServiceControl,proto3" json:"skip_service_control,omitempty"` 130 XXX_NoUnkeyedLiteral struct{} `json:"-"` 131 XXX_unrecognized []byte `json:"-"` 132 XXX_sizecache int32 `json:"-"` 133} 134 135func (m *UsageRule) Reset() { *m = UsageRule{} } 136func (m *UsageRule) String() string { return proto.CompactTextString(m) } 137func (*UsageRule) ProtoMessage() {} 138func (*UsageRule) Descriptor() ([]byte, []int) { 139 return fileDescriptor_usage_d5fdf432dee45e22, []int{1} 140} 141func (m *UsageRule) XXX_Unmarshal(b []byte) error { 142 return xxx_messageInfo_UsageRule.Unmarshal(m, b) 143} 144func (m *UsageRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 145 return xxx_messageInfo_UsageRule.Marshal(b, m, deterministic) 146} 147func (dst *UsageRule) XXX_Merge(src proto.Message) { 148 xxx_messageInfo_UsageRule.Merge(dst, src) 149} 150func (m *UsageRule) XXX_Size() int { 151 return xxx_messageInfo_UsageRule.Size(m) 152} 153func (m *UsageRule) XXX_DiscardUnknown() { 154 xxx_messageInfo_UsageRule.DiscardUnknown(m) 155} 156 157var xxx_messageInfo_UsageRule proto.InternalMessageInfo 158 159func (m *UsageRule) GetSelector() string { 160 if m != nil { 161 return m.Selector 162 } 163 return "" 164} 165 166func (m *UsageRule) GetAllowUnregisteredCalls() bool { 167 if m != nil { 168 return m.AllowUnregisteredCalls 169 } 170 return false 171} 172 173func (m *UsageRule) GetSkipServiceControl() bool { 174 if m != nil { 175 return m.SkipServiceControl 176 } 177 return false 178} 179 180func init() { 181 proto.RegisterType((*Usage)(nil), "google.api.Usage") 182 proto.RegisterType((*UsageRule)(nil), "google.api.UsageRule") 183} 184 185func init() { proto.RegisterFile("google/api/usage.proto", fileDescriptor_usage_d5fdf432dee45e22) } 186 187var fileDescriptor_usage_d5fdf432dee45e22 = []byte{ 188 // 331 bytes of a gzipped FileDescriptorProto 189 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xc1, 0x4b, 0xfb, 0x30, 190 0x14, 0xc7, 0xe9, 0xf6, 0xdb, 0x7e, 0x5b, 0x14, 0x0f, 0x41, 0x47, 0x99, 0x0a, 0x65, 0xa7, 0x82, 191 0xd0, 0x8a, 0x5e, 0x04, 0x4f, 0x6e, 0x88, 0x78, 0x91, 0x51, 0xd9, 0xc5, 0x4b, 0x89, 0xd9, 0x5b, 192 0x0c, 0x66, 0x79, 0x35, 0x49, 0xf5, 0x0f, 0xf1, 0xea, 0xc9, 0xbf, 0x54, 0x9a, 0xcc, 0xd9, 0x1d, 193 0xdf, 0xfb, 0x7c, 0xbe, 0xef, 0xb5, 0x2f, 0x64, 0x24, 0x10, 0x85, 0x82, 0x9c, 0x55, 0x32, 0xaf, 194 0x2d, 0x13, 0x90, 0x55, 0x06, 0x1d, 0x52, 0x12, 0xfa, 0x19, 0xab, 0xe4, 0xf8, 0xa4, 0xe5, 0x30, 195 0xad, 0xd1, 0x31, 0x27, 0x51, 0xdb, 0x60, 0x4e, 0xbe, 0x22, 0xd2, 0x5b, 0x34, 0x49, 0x3a, 0x21, 196 0xfb, 0x06, 0xde, 0x6a, 0x69, 0x60, 0x0d, 0xda, 0xd9, 0x38, 0x4a, 0xba, 0xe9, 0xb0, 0xd8, 0xe9, 197 0xd1, 0x33, 0xd2, 0x33, 0xb5, 0x02, 0x1b, 0xf7, 0x93, 0x6e, 0xba, 0x77, 0x71, 0x94, 0xfd, 0xed, 198 0xc9, 0xfc, 0x94, 0xa2, 0x56, 0x50, 0x04, 0x87, 0x4e, 0xc9, 0x69, 0x65, 0x70, 0x59, 0x73, 0x30, 199 0xa5, 0x46, 0x27, 0x57, 0x92, 0xfb, 0xd5, 0x25, 0x7f, 0x61, 0x5a, 0x83, 0x8a, 0xff, 0x27, 0x51, 200 0x3a, 0x2c, 0x8e, 0x7f, 0xa5, 0x87, 0x96, 0x33, 0x0b, 0xca, 0xe4, 0x33, 0x22, 0xc3, 0xed, 0x60, 201 0x3a, 0x26, 0x03, 0x0b, 0x0a, 0xb8, 0x43, 0x13, 0x47, 0x3e, 0xbc, 0xad, 0xe9, 0x15, 0x89, 0x99, 202 0x52, 0xf8, 0x51, 0xd6, 0xda, 0x80, 0x90, 0xd6, 0x81, 0x81, 0x65, 0xc9, 0x99, 0x52, 0x36, 0xee, 203 0x24, 0x51, 0x3a, 0x28, 0x46, 0x9e, 0x2f, 0x5a, 0x78, 0xd6, 0x50, 0x7a, 0x4e, 0x0e, 0xed, 0xab, 204 0xac, 0x4a, 0x0b, 0xe6, 0x5d, 0x72, 0x28, 0x39, 0x6a, 0x67, 0x50, 0xc5, 0x5d, 0x9f, 0xa2, 0x0d, 205 0x7b, 0x0c, 0x68, 0x16, 0xc8, 0x54, 0x91, 0x03, 0x8e, 0xeb, 0xd6, 0xcf, 0x4f, 0x89, 0xff, 0xc8, 206 0x79, 0x73, 0xd2, 0x79, 0xf4, 0x74, 0xbb, 0x21, 0x02, 0x15, 0xd3, 0x22, 0x43, 0x23, 0x72, 0x01, 207 0xda, 0x1f, 0x3c, 0x0f, 0x88, 0x55, 0xd2, 0xfa, 0x17, 0xd9, 0x2c, 0xe5, 0xa8, 0x57, 0x52, 0x5c, 208 0xef, 0x54, 0xdf, 0x9d, 0x7f, 0x77, 0x37, 0xf3, 0xfb, 0xe7, 0xbe, 0x0f, 0x5e, 0xfe, 0x04, 0x00, 209 0x00, 0xff, 0xff, 0x9c, 0x4b, 0x8c, 0x57, 0xed, 0x01, 0x00, 0x00, 210} 211