| 1 |
// Copyright 2026 Google LLC |
| 2 |
// |
| 3 |
// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
// you may not use this file except in compliance with the License. |
| 5 |
// You may obtain a copy of the License at |
| 6 |
// |
| 7 |
// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
// |
| 9 |
// Unless required by applicable law or agreed to in writing, software |
| 10 |
// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
// See the License for the specific language governing permissions and |
| 13 |
// limitations under the License. |
| 14 |
|
| 15 |
// Code generated by protoc-gen-go. DO NOT EDIT. |
| 16 |
// versions: |
| 17 |
// protoc-gen-go v1.26.0 |
| 18 |
// protoc v4.24.4 |
| 19 |
// source: google/api/usage.proto |
| 20 |
|
| 21 |
package serviceconfig |
| 22 |
|
| 23 |
import ( |
| 24 |
reflect "reflect" |
| 25 |
sync "sync" |
| 26 |
|
| 27 |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 28 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 29 |
) |
| 30 |
|
| 31 |
const ( |
| 32 |
// Verify that this generated code is sufficiently up-to-date. |
| 33 |
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 34 |
// Verify that runtime/protoimpl is sufficiently up-to-date. |
| 35 |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 36 |
) |
| 37 |
|
| 38 |
// Configuration controlling usage of a service. |
| 39 |
type Usage struct { |
| 40 |
state protoimpl.MessageState |
| 41 |
sizeCache protoimpl.SizeCache |
| 42 |
unknownFields protoimpl.UnknownFields |
| 43 |
|
| 44 |
// Requirements that must be satisfied before a consumer project can use the |
| 45 |
// service. Each requirement is of the form <service.name>/<requirement-id>; |
| 46 |
// for example 'serviceusage.googleapis.com/billing-enabled'. |
| 47 |
// |
| 48 |
// For Google APIs, a Terms of Service requirement must be included here. |
| 49 |
// Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". |
| 50 |
// Other Google APIs should include |
| 51 |
// "serviceusage.googleapis.com/tos/universal". Additional ToS can be |
| 52 |
// included based on the business needs. |
| 53 |
Requirements []string `protobuf:"bytes,1,rep,name=requirements,proto3" json:"requirements,omitempty"` |
| 54 |
// A list of usage rules that apply to individual API methods. |
| 55 |
// |
| 56 |
// **NOTE:** All service configuration rules follow "last one wins" order. |
| 57 |
Rules []*UsageRule `protobuf:"bytes,6,rep,name=rules,proto3" json:"rules,omitempty"` |
| 58 |
// The full resource name of a channel used for sending notifications to the |
| 59 |
// service producer. |
| 60 |
// |
| 61 |
// Google Service Management currently only supports |
| 62 |
// [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification |
| 63 |
// channel. To use Google Cloud Pub/Sub as the channel, this must be the name |
| 64 |
// of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format |
| 65 |
// documented in https://cloud.google.com/pubsub/docs/overview. |
| 66 |
ProducerNotificationChannel string `protobuf:"bytes,7,opt,name=producer_notification_channel,json=producerNotificationChannel,proto3" json:"producer_notification_channel,omitempty"` |
| 67 |
} |
| 68 |
|
| 69 |
func (x *Usage) Reset() { |
| 70 |
*x = Usage{} |
| 71 |
if protoimpl.UnsafeEnabled { |
| 72 |
mi := &file_google_api_usage_proto_msgTypes[0] |
| 73 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 74 |
ms.StoreMessageInfo(mi) |
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
func (x *Usage) String() string { |
| 79 |
return protoimpl.X.MessageStringOf(x) |
| 80 |
} |
| 81 |
|
| 82 |
func (*Usage) ProtoMessage() {} |
| 83 |
|
| 84 |
func (x *Usage) ProtoReflect() protoreflect.Message { |
| 85 |
mi := &file_google_api_usage_proto_msgTypes[0] |
| 86 |
if protoimpl.UnsafeEnabled && x != nil { |
| 87 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 88 |
if ms.LoadMessageInfo() == nil { |
| 89 |
ms.StoreMessageInfo(mi) |
| 90 |
} |
| 91 |
return ms |
| 92 |
} |
| 93 |
return mi.MessageOf(x) |
| 94 |
} |
| 95 |
|
| 96 |
// Deprecated: Use Usage.ProtoReflect.Descriptor instead. |
| 97 |
func (*Usage) Descriptor() ([]byte, []int) { |
| 98 |
return file_google_api_usage_proto_rawDescGZIP(), []int{0} |
| 99 |
} |
| 100 |
|
| 101 |
func (x *Usage) GetRequirements() []string { |
| 102 |
if x != nil { |
| 103 |
return x.Requirements |
| 104 |
} |
| 105 |
return nil |
| 106 |
} |
| 107 |
|
| 108 |
func (x *Usage) GetRules() []*UsageRule { |
| 109 |
if x != nil { |
| 110 |
return x.Rules |
| 111 |
} |
| 112 |
return nil |
| 113 |
} |
| 114 |
|
| 115 |
func (x *Usage) GetProducerNotificationChannel() string { |
| 116 |
if x != nil { |
| 117 |
return x.ProducerNotificationChannel |
| 118 |
} |
| 119 |
return "" |
| 120 |
} |
| 121 |
|
| 122 |
// Usage configuration rules for the service. |
| 123 |
type UsageRule struct { |
| 124 |
state protoimpl.MessageState |
| 125 |
sizeCache protoimpl.SizeCache |
| 126 |
unknownFields protoimpl.UnknownFields |
| 127 |
|
| 128 |
// Selects the methods to which this rule applies. Use '*' to indicate all |
| 129 |
// methods in all APIs. |
| 130 |
// |
| 131 |
// Refer to [selector][google.api.DocumentationRule.selector] for syntax |
| 132 |
// details. |
| 133 |
Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` |
| 134 |
// Use this rule to configure unregistered calls for the service. Unregistered |
| 135 |
// calls are calls that do not contain consumer project identity. |
| 136 |
// (Example: calls that do not contain an API key). |
| 137 |
// |
| 138 |
// WARNING: By default, API methods do not allow unregistered calls, and each |
| 139 |
// method call must be identified by a consumer project identity. |
| 140 |
AllowUnregisteredCalls bool `protobuf:"varint,2,opt,name=allow_unregistered_calls,json=allowUnregisteredCalls,proto3" json:"allow_unregistered_calls,omitempty"` |
| 141 |
// If true, the selected method should skip service control and the control |
| 142 |
// plane features, such as quota and billing, will not be available. |
| 143 |
// This flag is used by Google Cloud Endpoints to bypass checks for internal |
| 144 |
// methods, such as service health check methods. |
| 145 |
SkipServiceControl bool `protobuf:"varint,3,opt,name=skip_service_control,json=skipServiceControl,proto3" json:"skip_service_control,omitempty"` |
| 146 |
} |
| 147 |
|
| 148 |
func (x *UsageRule) Reset() { |
| 149 |
*x = UsageRule{} |
| 150 |
if protoimpl.UnsafeEnabled { |
| 151 |
mi := &file_google_api_usage_proto_msgTypes[1] |
| 152 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 153 |
ms.StoreMessageInfo(mi) |
| 154 |
} |
| 155 |
} |
| 156 |
|
| 157 |
func (x *UsageRule) String() string { |
| 158 |
return protoimpl.X.MessageStringOf(x) |
| 159 |
} |
| 160 |
|
| 161 |
func (*UsageRule) ProtoMessage() {} |
| 162 |
|
| 163 |
func (x *UsageRule) ProtoReflect() protoreflect.Message { |
| 164 |
mi := &file_google_api_usage_proto_msgTypes[1] |
| 165 |
if protoimpl.UnsafeEnabled && x != nil { |
| 166 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 167 |
if ms.LoadMessageInfo() == nil { |
| 168 |
ms.StoreMessageInfo(mi) |
| 169 |
} |
| 170 |
return ms |
| 171 |
} |
| 172 |
return mi.MessageOf(x) |
| 173 |
} |
| 174 |
|
| 175 |
// Deprecated: Use UsageRule.ProtoReflect.Descriptor instead. |
| 176 |
func (*UsageRule) Descriptor() ([]byte, []int) { |
| 177 |
return file_google_api_usage_proto_rawDescGZIP(), []int{1} |
| 178 |
} |
| 179 |
|
| 180 |
func (x *UsageRule) GetSelector() string { |
| 181 |
if x != nil { |
| 182 |
return x.Selector |
| 183 |
} |
| 184 |
return "" |
| 185 |
} |
| 186 |
|
| 187 |
func (x *UsageRule) GetAllowUnregisteredCalls() bool { |
| 188 |
if x != nil { |
| 189 |
return x.AllowUnregisteredCalls |
| 190 |
} |
| 191 |
return false |
| 192 |
} |
| 193 |
|
| 194 |
func (x *UsageRule) GetSkipServiceControl() bool { |
| 195 |
if x != nil { |
| 196 |
return x.SkipServiceControl |
| 197 |
} |
| 198 |
return false |
| 199 |
} |
| 200 |
|
| 201 |
var File_google_api_usage_proto protoreflect.FileDescriptor |
| 202 |
|
| 203 |
var file_google_api_usage_proto_rawDesc = []byte{ |
| 204 |
0x0a, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x61, |
| 205 |
0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, |
| 206 |
0x2e, 0x61, 0x70, 0x69, 0x22, 0x9c, 0x01, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, |
| 207 |
0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, |
| 208 |
0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, |
| 209 |
0x74, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, |
| 210 |
0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, |
| 211 |
0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, |
| 212 |
0x42, 0x0a, 0x1d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x74, 0x69, |
| 213 |
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, |
| 214 |
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, |
| 215 |
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, |
| 216 |
0x6e, 0x65, 0x6c, 0x22, 0x93, 0x01, 0x0a, 0x09, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, |
| 217 |
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, |
| 218 |
0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x38, 0x0a, |
| 219 |
0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, |
| 220 |
0x72, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, |
| 221 |
0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, |
| 222 |
0x65, 0x64, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6b, 0x69, 0x70, 0x5f, |
| 223 |
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, |
| 224 |
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x6b, 0x69, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, |
| 225 |
0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x6c, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, |
| 226 |
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0a, 0x55, 0x73, 0x61, |
| 227 |
0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, |
| 228 |
0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, |
| 229 |
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, |
| 230 |
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, |
| 231 |
0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, |
| 232 |
0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| 233 |
} |
| 234 |
|
| 235 |
var ( |
| 236 |
file_google_api_usage_proto_rawDescOnce sync.Once |
| 237 |
file_google_api_usage_proto_rawDescData = file_google_api_usage_proto_rawDesc |
| 238 |
) |
| 239 |
|
| 240 |
func file_google_api_usage_proto_rawDescGZIP() []byte { |
| 241 |
file_google_api_usage_proto_rawDescOnce.Do(func() { |
| 242 |
file_google_api_usage_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_usage_proto_rawDescData) |
| 243 |
}) |
| 244 |
return file_google_api_usage_proto_rawDescData |
| 245 |
} |
| 246 |
|
| 247 |
var file_google_api_usage_proto_msgTypes = make([]protoimpl.MessageInfo, 2) |
| 248 |
var file_google_api_usage_proto_goTypes = []interface{}{ |
| 249 |
(*Usage)(nil), // 0: google.api.Usage |
| 250 |
(*UsageRule)(nil), // 1: google.api.UsageRule |
| 251 |
} |
| 252 |
var file_google_api_usage_proto_depIdxs = []int32{ |
| 253 |
1, // 0: google.api.Usage.rules:type_name -> google.api.UsageRule |
| 254 |
1, // [1:1] is the sub-list for method output_type |
| 255 |
1, // [1:1] is the sub-list for method input_type |
| 256 |
1, // [1:1] is the sub-list for extension type_name |
| 257 |
1, // [1:1] is the sub-list for extension extendee |
| 258 |
0, // [0:1] is the sub-list for field type_name |
| 259 |
} |
| 260 |
|
| 261 |
func init() { file_google_api_usage_proto_init() } |
| 262 |
func file_google_api_usage_proto_init() { |
| 263 |
if File_google_api_usage_proto != nil { |
| 264 |
return |
| 265 |
} |
| 266 |
if !protoimpl.UnsafeEnabled { |
| 267 |
file_google_api_usage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| 268 |
switch v := v.(*Usage); i { |
| 269 |
case 0: |
| 270 |
return &v.state |
| 271 |
case 1: |
| 272 |
return &v.sizeCache |
| 273 |
case 2: |
| 274 |
return &v.unknownFields |
| 275 |
default: |
| 276 |
return nil |
| 277 |
} |
| 278 |
} |
| 279 |
file_google_api_usage_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { |
| 280 |
switch v := v.(*UsageRule); i { |
| 281 |
case 0: |
| 282 |
return &v.state |
| 283 |
case 1: |
| 284 |
return &v.sizeCache |
| 285 |
case 2: |
| 286 |
return &v.unknownFields |
| 287 |
default: |
| 288 |
return nil |
| 289 |
} |
| 290 |
} |
| 291 |
} |
| 292 |
type x struct{} |
| 293 |
out := protoimpl.TypeBuilder{ |
| 294 |
File: protoimpl.DescBuilder{ |
| 295 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 296 |
RawDescriptor: file_google_api_usage_proto_rawDesc, |
| 297 |
NumEnums: 0, |
| 298 |
NumMessages: 2, |
| 299 |
NumExtensions: 0, |
| 300 |
NumServices: 0, |
| 301 |
}, |
| 302 |
GoTypes: file_google_api_usage_proto_goTypes, |
| 303 |
DependencyIndexes: file_google_api_usage_proto_depIdxs, |
| 304 |
MessageInfos: file_google_api_usage_proto_msgTypes, |
| 305 |
}.Build() |
| 306 |
File_google_api_usage_proto = out.File |
| 307 |
file_google_api_usage_proto_rawDesc = nil |
| 308 |
file_google_api_usage_proto_goTypes = nil |
| 309 |
file_google_api_usage_proto_depIdxs = nil |
| 310 |
} |