| 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/billing.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 |
// Billing related configuration of the service. |
| 39 |
// |
| 40 |
// The following example shows how to configure monitored resources and metrics |
| 41 |
// for billing, `consumer_destinations` is the only supported destination and |
| 42 |
// the monitored resources need at least one label key |
| 43 |
// `cloud.googleapis.com/location` to indicate the location of the billing |
| 44 |
// usage, using different monitored resources between monitoring and billing is |
| 45 |
// recommended so they can be evolved independently: |
| 46 |
// |
| 47 |
// monitored_resources: |
| 48 |
// - type: library.googleapis.com/billing_branch |
| 49 |
// labels: |
| 50 |
// - key: cloud.googleapis.com/location |
| 51 |
// description: | |
| 52 |
// Predefined label to support billing location restriction. |
| 53 |
// - key: city |
| 54 |
// description: | |
| 55 |
// Custom label to define the city where the library branch is located |
| 56 |
// in. |
| 57 |
// - key: name |
| 58 |
// description: Custom label to define the name of the library branch. |
| 59 |
// metrics: |
| 60 |
// - name: library.googleapis.com/book/borrowed_count |
| 61 |
// metric_kind: DELTA |
| 62 |
// value_type: INT64 |
| 63 |
// unit: "1" |
| 64 |
// billing: |
| 65 |
// consumer_destinations: |
| 66 |
// - monitored_resource: library.googleapis.com/billing_branch |
| 67 |
// metrics: |
| 68 |
// - library.googleapis.com/book/borrowed_count |
| 69 |
type Billing struct { |
| 70 |
state protoimpl.MessageState |
| 71 |
sizeCache protoimpl.SizeCache |
| 72 |
unknownFields protoimpl.UnknownFields |
| 73 |
|
| 74 |
// Billing configurations for sending metrics to the consumer project. |
| 75 |
// There can be multiple consumer destinations per service, each one must have |
| 76 |
// a different monitored resource type. A metric can be used in at most |
| 77 |
// one consumer destination. |
| 78 |
ConsumerDestinations []*Billing_BillingDestination `protobuf:"bytes,8,rep,name=consumer_destinations,json=consumerDestinations,proto3" json:"consumer_destinations,omitempty"` |
| 79 |
} |
| 80 |
|
| 81 |
func (x *Billing) Reset() { |
| 82 |
*x = Billing{} |
| 83 |
if protoimpl.UnsafeEnabled { |
| 84 |
mi := &file_google_api_billing_proto_msgTypes[0] |
| 85 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 86 |
ms.StoreMessageInfo(mi) |
| 87 |
} |
| 88 |
} |
| 89 |
|
| 90 |
func (x *Billing) String() string { |
| 91 |
return protoimpl.X.MessageStringOf(x) |
| 92 |
} |
| 93 |
|
| 94 |
func (*Billing) ProtoMessage() {} |
| 95 |
|
| 96 |
func (x *Billing) ProtoReflect() protoreflect.Message { |
| 97 |
mi := &file_google_api_billing_proto_msgTypes[0] |
| 98 |
if protoimpl.UnsafeEnabled && x != nil { |
| 99 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 100 |
if ms.LoadMessageInfo() == nil { |
| 101 |
ms.StoreMessageInfo(mi) |
| 102 |
} |
| 103 |
return ms |
| 104 |
} |
| 105 |
return mi.MessageOf(x) |
| 106 |
} |
| 107 |
|
| 108 |
// Deprecated: Use Billing.ProtoReflect.Descriptor instead. |
| 109 |
func (*Billing) Descriptor() ([]byte, []int) { |
| 110 |
return file_google_api_billing_proto_rawDescGZIP(), []int{0} |
| 111 |
} |
| 112 |
|
| 113 |
func (x *Billing) GetConsumerDestinations() []*Billing_BillingDestination { |
| 114 |
if x != nil { |
| 115 |
return x.ConsumerDestinations |
| 116 |
} |
| 117 |
return nil |
| 118 |
} |
| 119 |
|
| 120 |
// Configuration of a specific billing destination (Currently only support |
| 121 |
// bill against consumer project). |
| 122 |
type Billing_BillingDestination struct { |
| 123 |
state protoimpl.MessageState |
| 124 |
sizeCache protoimpl.SizeCache |
| 125 |
unknownFields protoimpl.UnknownFields |
| 126 |
|
| 127 |
// The monitored resource type. The type must be defined in |
| 128 |
// [Service.monitored_resources][google.api.Service.monitored_resources] |
| 129 |
// section. |
| 130 |
MonitoredResource string `protobuf:"bytes,1,opt,name=monitored_resource,json=monitoredResource,proto3" json:"monitored_resource,omitempty"` |
| 131 |
// Names of the metrics to report to this billing destination. |
| 132 |
// Each name must be defined in |
| 133 |
// [Service.metrics][google.api.Service.metrics] section. |
| 134 |
Metrics []string `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` |
| 135 |
} |
| 136 |
|
| 137 |
func (x *Billing_BillingDestination) Reset() { |
| 138 |
*x = Billing_BillingDestination{} |
| 139 |
if protoimpl.UnsafeEnabled { |
| 140 |
mi := &file_google_api_billing_proto_msgTypes[1] |
| 141 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 142 |
ms.StoreMessageInfo(mi) |
| 143 |
} |
| 144 |
} |
| 145 |
|
| 146 |
func (x *Billing_BillingDestination) String() string { |
| 147 |
return protoimpl.X.MessageStringOf(x) |
| 148 |
} |
| 149 |
|
| 150 |
func (*Billing_BillingDestination) ProtoMessage() {} |
| 151 |
|
| 152 |
func (x *Billing_BillingDestination) ProtoReflect() protoreflect.Message { |
| 153 |
mi := &file_google_api_billing_proto_msgTypes[1] |
| 154 |
if protoimpl.UnsafeEnabled && x != nil { |
| 155 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 156 |
if ms.LoadMessageInfo() == nil { |
| 157 |
ms.StoreMessageInfo(mi) |
| 158 |
} |
| 159 |
return ms |
| 160 |
} |
| 161 |
return mi.MessageOf(x) |
| 162 |
} |
| 163 |
|
| 164 |
// Deprecated: Use Billing_BillingDestination.ProtoReflect.Descriptor instead. |
| 165 |
func (*Billing_BillingDestination) Descriptor() ([]byte, []int) { |
| 166 |
return file_google_api_billing_proto_rawDescGZIP(), []int{0, 0} |
| 167 |
} |
| 168 |
|
| 169 |
func (x *Billing_BillingDestination) GetMonitoredResource() string { |
| 170 |
if x != nil { |
| 171 |
return x.MonitoredResource |
| 172 |
} |
| 173 |
return "" |
| 174 |
} |
| 175 |
|
| 176 |
func (x *Billing_BillingDestination) GetMetrics() []string { |
| 177 |
if x != nil { |
| 178 |
return x.Metrics |
| 179 |
} |
| 180 |
return nil |
| 181 |
} |
| 182 |
|
| 183 |
var File_google_api_billing_proto protoreflect.FileDescriptor |
| 184 |
|
| 185 |
var file_google_api_billing_proto_rawDesc = []byte{ |
| 186 |
0x0a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x69, 0x6c, |
| 187 |
0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, |
| 188 |
0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0xc5, 0x01, 0x0a, 0x07, 0x42, 0x69, 0x6c, 0x6c, 0x69, |
| 189 |
0x6e, 0x67, 0x12, 0x5b, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x64, |
| 190 |
0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, |
| 191 |
0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, |
| 192 |
0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x65, |
| 193 |
0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x75, |
| 194 |
0x6d, 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, |
| 195 |
0x5d, 0x0a, 0x12, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, |
| 196 |
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, |
| 197 |
0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, |
| 198 |
0x09, 0x52, 0x11, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, |
| 199 |
0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, |
| 200 |
0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x6e, |
| 201 |
0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, |
| 202 |
0x42, 0x0c, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, |
| 203 |
0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, |
| 204 |
0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, |
| 205 |
0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, |
| 206 |
0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, |
| 207 |
0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, |
| 208 |
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| 209 |
} |
| 210 |
|
| 211 |
var ( |
| 212 |
file_google_api_billing_proto_rawDescOnce sync.Once |
| 213 |
file_google_api_billing_proto_rawDescData = file_google_api_billing_proto_rawDesc |
| 214 |
) |
| 215 |
|
| 216 |
func file_google_api_billing_proto_rawDescGZIP() []byte { |
| 217 |
file_google_api_billing_proto_rawDescOnce.Do(func() { |
| 218 |
file_google_api_billing_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_billing_proto_rawDescData) |
| 219 |
}) |
| 220 |
return file_google_api_billing_proto_rawDescData |
| 221 |
} |
| 222 |
|
| 223 |
var file_google_api_billing_proto_msgTypes = make([]protoimpl.MessageInfo, 2) |
| 224 |
var file_google_api_billing_proto_goTypes = []interface{}{ |
| 225 |
(*Billing)(nil), // 0: google.api.Billing |
| 226 |
(*Billing_BillingDestination)(nil), // 1: google.api.Billing.BillingDestination |
| 227 |
} |
| 228 |
var file_google_api_billing_proto_depIdxs = []int32{ |
| 229 |
1, // 0: google.api.Billing.consumer_destinations:type_name -> google.api.Billing.BillingDestination |
| 230 |
1, // [1:1] is the sub-list for method output_type |
| 231 |
1, // [1:1] is the sub-list for method input_type |
| 232 |
1, // [1:1] is the sub-list for extension type_name |
| 233 |
1, // [1:1] is the sub-list for extension extendee |
| 234 |
0, // [0:1] is the sub-list for field type_name |
| 235 |
} |
| 236 |
|
| 237 |
func init() { file_google_api_billing_proto_init() } |
| 238 |
func file_google_api_billing_proto_init() { |
| 239 |
if File_google_api_billing_proto != nil { |
| 240 |
return |
| 241 |
} |
| 242 |
if !protoimpl.UnsafeEnabled { |
| 243 |
file_google_api_billing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| 244 |
switch v := v.(*Billing); i { |
| 245 |
case 0: |
| 246 |
return &v.state |
| 247 |
case 1: |
| 248 |
return &v.sizeCache |
| 249 |
case 2: |
| 250 |
return &v.unknownFields |
| 251 |
default: |
| 252 |
return nil |
| 253 |
} |
| 254 |
} |
| 255 |
file_google_api_billing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { |
| 256 |
switch v := v.(*Billing_BillingDestination); i { |
| 257 |
case 0: |
| 258 |
return &v.state |
| 259 |
case 1: |
| 260 |
return &v.sizeCache |
| 261 |
case 2: |
| 262 |
return &v.unknownFields |
| 263 |
default: |
| 264 |
return nil |
| 265 |
} |
| 266 |
} |
| 267 |
} |
| 268 |
type x struct{} |
| 269 |
out := protoimpl.TypeBuilder{ |
| 270 |
File: protoimpl.DescBuilder{ |
| 271 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 272 |
RawDescriptor: file_google_api_billing_proto_rawDesc, |
| 273 |
NumEnums: 0, |
| 274 |
NumMessages: 2, |
| 275 |
NumExtensions: 0, |
| 276 |
NumServices: 0, |
| 277 |
}, |
| 278 |
GoTypes: file_google_api_billing_proto_goTypes, |
| 279 |
DependencyIndexes: file_google_api_billing_proto_depIdxs, |
| 280 |
MessageInfos: file_google_api_billing_proto_msgTypes, |
| 281 |
}.Build() |
| 282 |
File_google_api_billing_proto = out.File |
| 283 |
file_google_api_billing_proto_rawDesc = nil |
| 284 |
file_google_api_billing_proto_goTypes = nil |
| 285 |
file_google_api_billing_proto_depIdxs = nil |
| 286 |
} |