OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / genproto / googleapis / api / serviceconfig / billing.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/api/billing.proto
3
4 package serviceconfig
5
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9 import _ "google.golang.org/genproto/googleapis/api/annotations"
10 import _ "google.golang.org/genproto/googleapis/api/metric"
11
12 // Reference imports to suppress errors if they are not otherwise used.
13 var _ = proto.Marshal
14 var _ = fmt.Errorf
15 var _ = math.Inf
16
17 // Billing related configuration of the service.
18 //
19 // The following example shows how to configure metrics for billing:
20 //
21 //     metrics:
22 //     - name: library.googleapis.com/read_calls
23 //       metric_kind: DELTA
24 //       value_type: INT64
25 //     - name: library.googleapis.com/write_calls
26 //       metric_kind: DELTA
27 //       value_type: INT64
28 //     billing:
29 //       metrics:
30 //       - library.googleapis.com/read_calls
31 //       - library.googleapis.com/write_calls
32 //
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`:
39 //
40 //     billing:
41 //       rules:
42 //       - selector: google.storage.Get
43 //         allowed_statuses:
44 //         - current
45 //         - delinquent
46 //       - selector: google.storage.Write
47 //         allowed_statuses: current
48 //
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.
53 //
54 type Billing struct {
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"`
60 }
61
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} }
66
67 func (m *Billing) GetMetrics() []string {
68         if m != nil {
69                 return m.Metrics
70         }
71         return nil
72 }
73
74 func (m *Billing) GetRules() []*BillingStatusRule {
75         if m != nil {
76                 return m.Rules
77         }
78         return nil
79 }
80
81 // Defines the billing status requirements for operations.
82 //
83 // When used with
84 // [Service Control API](https://cloud.google.com/service-control/), the
85 // following statuses are supported:
86 //
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.
91 //
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.
96 //
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"`
104 }
105
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} }
110
111 func (m *BillingStatusRule) GetSelector() string {
112         if m != nil {
113                 return m.Selector
114         }
115         return ""
116 }
117
118 func (m *BillingStatusRule) GetAllowedStatuses() []string {
119         if m != nil {
120                 return m.AllowedStatuses
121         }
122         return nil
123 }
124
125 func init() {
126         proto.RegisterType((*Billing)(nil), "google.api.Billing")
127         proto.RegisterType((*BillingStatusRule)(nil), "google.api.BillingStatusRule")
128 }
129
130 func init() { proto.RegisterFile("google/api/billing.proto", fileDescriptor2) }
131
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,
150 }