1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/api/billing.proto
6 import proto "github.com/golang/protobuf/proto"
9 import _ "google.golang.org/genproto/googleapis/api/annotations"
10 import _ "google.golang.org/genproto/googleapis/api/metric"
12 // Reference imports to suppress errors if they are not otherwise used.
17 // Billing related configuration of the service.
19 // The following example shows how to configure metrics for billing:
22 // - name: library.googleapis.com/read_calls
25 // - name: library.googleapis.com/write_calls
30 // - library.googleapis.com/read_calls
31 // - library.googleapis.com/write_calls
33 // The next example shows how to enable billing status check and customize the
34 // check behavior. It makes sure billing status check is included in the `Check`
35 // method of [Service Control API](https://cloud.google.com/service-control/).
36 // In the example, "google.storage.Get" method can be served when the billing
37 // status is either `current` or `delinquent`, while "google.storage.Write"
38 // method can only be served when the billing status is `current`:
42 // - selector: google.storage.Get
46 // - selector: google.storage.Write
47 // allowed_statuses: current
49 // Mostly services should only allow `current` status when serving requests.
50 // In addition, services can choose to allow both `current` and `delinquent`
51 // statuses when serving read-only requests to resources. If there's no
52 // matching selector for operation, no billing status check will be performed.
55 // Names of the metrics to report to billing. Each name must
56 // be defined in [Service.metrics][google.api.Service.metrics] section.
57 Metrics []string `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"`
58 // A list of billing status rules for configuring billing status check.
59 Rules []*BillingStatusRule `protobuf:"bytes,5,rep,name=rules" json:"rules,omitempty"`
62 func (m *Billing) Reset() { *m = Billing{} }
63 func (m *Billing) String() string { return proto.CompactTextString(m) }
64 func (*Billing) ProtoMessage() {}
65 func (*Billing) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
67 func (m *Billing) GetMetrics() []string {
74 func (m *Billing) GetRules() []*BillingStatusRule {
81 // Defines the billing status requirements for operations.
84 // [Service Control API](https://cloud.google.com/service-control/), the
85 // following statuses are supported:
87 // - **current**: the associated billing account is up to date and capable of
88 // paying for resource usages.
89 // - **delinquent**: the associated billing account has a correctable problem,
90 // such as late payment.
92 // Mostly services should only allow `current` status when serving requests.
93 // In addition, services can choose to allow both `current` and `delinquent`
94 // statuses when serving read-only requests to resources. If the list of
95 // allowed_statuses is empty, it means no billing requirement.
97 type BillingStatusRule struct {
98 // Selects the operation names to which this rule applies.
99 // Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
100 Selector string `protobuf:"bytes,1,opt,name=selector" json:"selector,omitempty"`
101 // Allowed billing statuses. The billing status check passes if the actual
102 // billing status matches any of the provided values here.
103 AllowedStatuses []string `protobuf:"bytes,2,rep,name=allowed_statuses,json=allowedStatuses" json:"allowed_statuses,omitempty"`
106 func (m *BillingStatusRule) Reset() { *m = BillingStatusRule{} }
107 func (m *BillingStatusRule) String() string { return proto.CompactTextString(m) }
108 func (*BillingStatusRule) ProtoMessage() {}
109 func (*BillingStatusRule) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
111 func (m *BillingStatusRule) GetSelector() string {
118 func (m *BillingStatusRule) GetAllowedStatuses() []string {
120 return m.AllowedStatuses
126 proto.RegisterType((*Billing)(nil), "google.api.Billing")
127 proto.RegisterType((*BillingStatusRule)(nil), "google.api.BillingStatusRule")
130 func init() { proto.RegisterFile("google/api/billing.proto", fileDescriptor2) }
132 var fileDescriptor2 = []byte{
133 // 253 bytes of a gzipped FileDescriptorProto
134 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x4f, 0x4b, 0x03, 0x31,
135 0x10, 0xc5, 0x59, 0x4b, 0xad, 0x8d, 0xe2, 0x9f, 0xbd, 0x18, 0x16, 0x85, 0xa5, 0xa7, 0xf5, 0x92,
136 0x05, 0x7b, 0xf4, 0xb6, 0xe0, 0xbd, 0x6c, 0x2f, 0xd2, 0x8b, 0xa4, 0x71, 0x0c, 0x81, 0x34, 0xb3,
137 0x64, 0xb2, 0xfa, 0xf5, 0xc5, 0x24, 0xea, 0x4a, 0x8f, 0x6f, 0x7e, 0xef, 0x65, 0xe6, 0x85, 0x71,
138 0x8d, 0xa8, 0x2d, 0xb4, 0x72, 0x30, 0xed, 0xde, 0x58, 0x6b, 0x9c, 0x16, 0x83, 0xc7, 0x80, 0x25,
139 0x4b, 0x44, 0xc8, 0xc1, 0x54, 0x77, 0x13, 0x97, 0x74, 0x0e, 0x83, 0x0c, 0x06, 0x1d, 0x25, 0x67,
140 0x75, 0x3b, 0xa1, 0x07, 0x08, 0xde, 0xa8, 0x04, 0x56, 0x2f, 0x6c, 0xd1, 0xa5, 0x37, 0x4b, 0xce,
141 0x16, 0x09, 0x11, 0x2f, 0xea, 0x59, 0xb3, 0xec, 0x7f, 0x64, 0xb9, 0x66, 0x73, 0x3f, 0x5a, 0x20,
142 0x3e, 0xaf, 0x67, 0xcd, 0xf9, 0xe3, 0xbd, 0xf8, 0xdb, 0x2b, 0x72, 0x7a, 0x1b, 0x64, 0x18, 0xa9,
143 0x1f, 0x2d, 0xf4, 0xc9, 0xbb, 0xda, 0xb1, 0x9b, 0x23, 0x56, 0x56, 0xec, 0x8c, 0xc0, 0x82, 0x0a,
144 0xe8, 0x79, 0x51, 0x17, 0xcd, 0xb2, 0xff, 0xd5, 0xe5, 0x03, 0xbb, 0x96, 0xd6, 0xe2, 0x27, 0xbc,
145 0xbd, 0x52, 0x4c, 0x00, 0xf1, 0x93, 0x78, 0xc8, 0x55, 0x9e, 0x6f, 0xf3, 0xb8, 0xd3, 0xec, 0x52,
146 0xe1, 0x61, 0x72, 0x46, 0x77, 0x91, 0x77, 0x6d, 0xbe, 0x5b, 0x6d, 0x8a, 0xdd, 0x73, 0x66, 0x1a,
147 0xad, 0x74, 0x5a, 0xa0, 0xd7, 0xad, 0x06, 0x17, 0x3b, 0xb7, 0x09, 0xc9, 0xc1, 0x50, 0xfc, 0x0f,
148 0x02, 0xff, 0x61, 0x14, 0x28, 0x74, 0xef, 0x46, 0x3f, 0xfd, 0x53, 0xfb, 0xd3, 0x98, 0x58, 0x7f,
149 0x05, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x90, 0x2d, 0x32, 0x84, 0x01, 0x00, 0x00,