1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/api/servicecontrol/v1/metric_value.proto
6 import proto "github.com/golang/protobuf/proto"
9 import _ "google.golang.org/genproto/googleapis/api/annotations"
10 import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp"
11 import _ "google.golang.org/genproto/googleapis/type/money"
13 // Reference imports to suppress errors if they are not otherwise used.
18 // Represents a single metric value.
19 type MetricValue struct {
20 // The labels describing the metric value.
21 // See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for
22 // the overriding relationship.
23 Labels map[string]string `protobuf:"bytes,1,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
24 // The start of the time period over which this metric value's measurement
25 // applies. The time period has different semantics for different metric
26 // types (cumulative, delta, and gauge). See the metric definition
27 // documentation in the service configuration for details.
28 StartTime *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
29 // The end of the time period over which this metric value's measurement
31 EndTime *google_protobuf3.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
32 // The value. The type of value used in the request must
33 // agree with the metric definition in the service configuration, otherwise
34 // the MetricValue is rejected.
36 // Types that are valid to be assigned to Value:
37 // *MetricValue_BoolValue
38 // *MetricValue_Int64Value
39 // *MetricValue_DoubleValue
40 // *MetricValue_StringValue
41 // *MetricValue_DistributionValue
42 Value isMetricValue_Value `protobuf_oneof:"value"`
45 func (m *MetricValue) Reset() { *m = MetricValue{} }
46 func (m *MetricValue) String() string { return proto.CompactTextString(m) }
47 func (*MetricValue) ProtoMessage() {}
48 func (*MetricValue) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
50 type isMetricValue_Value interface {
54 type MetricValue_BoolValue struct {
55 BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,oneof"`
57 type MetricValue_Int64Value struct {
58 Int64Value int64 `protobuf:"varint,5,opt,name=int64_value,json=int64Value,oneof"`
60 type MetricValue_DoubleValue struct {
61 DoubleValue float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue,oneof"`
63 type MetricValue_StringValue struct {
64 StringValue string `protobuf:"bytes,7,opt,name=string_value,json=stringValue,oneof"`
66 type MetricValue_DistributionValue struct {
67 DistributionValue *Distribution `protobuf:"bytes,8,opt,name=distribution_value,json=distributionValue,oneof"`
70 func (*MetricValue_BoolValue) isMetricValue_Value() {}
71 func (*MetricValue_Int64Value) isMetricValue_Value() {}
72 func (*MetricValue_DoubleValue) isMetricValue_Value() {}
73 func (*MetricValue_StringValue) isMetricValue_Value() {}
74 func (*MetricValue_DistributionValue) isMetricValue_Value() {}
76 func (m *MetricValue) GetValue() isMetricValue_Value {
83 func (m *MetricValue) GetLabels() map[string]string {
90 func (m *MetricValue) GetStartTime() *google_protobuf3.Timestamp {
97 func (m *MetricValue) GetEndTime() *google_protobuf3.Timestamp {
104 func (m *MetricValue) GetBoolValue() bool {
105 if x, ok := m.GetValue().(*MetricValue_BoolValue); ok {
111 func (m *MetricValue) GetInt64Value() int64 {
112 if x, ok := m.GetValue().(*MetricValue_Int64Value); ok {
118 func (m *MetricValue) GetDoubleValue() float64 {
119 if x, ok := m.GetValue().(*MetricValue_DoubleValue); ok {
125 func (m *MetricValue) GetStringValue() string {
126 if x, ok := m.GetValue().(*MetricValue_StringValue); ok {
132 func (m *MetricValue) GetDistributionValue() *Distribution {
133 if x, ok := m.GetValue().(*MetricValue_DistributionValue); ok {
134 return x.DistributionValue
139 // XXX_OneofFuncs is for the internal use of the proto package.
140 func (*MetricValue) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
141 return _MetricValue_OneofMarshaler, _MetricValue_OneofUnmarshaler, _MetricValue_OneofSizer, []interface{}{
142 (*MetricValue_BoolValue)(nil),
143 (*MetricValue_Int64Value)(nil),
144 (*MetricValue_DoubleValue)(nil),
145 (*MetricValue_StringValue)(nil),
146 (*MetricValue_DistributionValue)(nil),
150 func _MetricValue_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
151 m := msg.(*MetricValue)
153 switch x := m.Value.(type) {
154 case *MetricValue_BoolValue:
159 b.EncodeVarint(4<<3 | proto.WireVarint)
161 case *MetricValue_Int64Value:
162 b.EncodeVarint(5<<3 | proto.WireVarint)
163 b.EncodeVarint(uint64(x.Int64Value))
164 case *MetricValue_DoubleValue:
165 b.EncodeVarint(6<<3 | proto.WireFixed64)
166 b.EncodeFixed64(math.Float64bits(x.DoubleValue))
167 case *MetricValue_StringValue:
168 b.EncodeVarint(7<<3 | proto.WireBytes)
169 b.EncodeStringBytes(x.StringValue)
170 case *MetricValue_DistributionValue:
171 b.EncodeVarint(8<<3 | proto.WireBytes)
172 if err := b.EncodeMessage(x.DistributionValue); err != nil {
177 return fmt.Errorf("MetricValue.Value has unexpected type %T", x)
182 func _MetricValue_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
183 m := msg.(*MetricValue)
185 case 4: // value.bool_value
186 if wire != proto.WireVarint {
187 return true, proto.ErrInternalBadWireType
189 x, err := b.DecodeVarint()
190 m.Value = &MetricValue_BoolValue{x != 0}
192 case 5: // value.int64_value
193 if wire != proto.WireVarint {
194 return true, proto.ErrInternalBadWireType
196 x, err := b.DecodeVarint()
197 m.Value = &MetricValue_Int64Value{int64(x)}
199 case 6: // value.double_value
200 if wire != proto.WireFixed64 {
201 return true, proto.ErrInternalBadWireType
203 x, err := b.DecodeFixed64()
204 m.Value = &MetricValue_DoubleValue{math.Float64frombits(x)}
206 case 7: // value.string_value
207 if wire != proto.WireBytes {
208 return true, proto.ErrInternalBadWireType
210 x, err := b.DecodeStringBytes()
211 m.Value = &MetricValue_StringValue{x}
213 case 8: // value.distribution_value
214 if wire != proto.WireBytes {
215 return true, proto.ErrInternalBadWireType
217 msg := new(Distribution)
218 err := b.DecodeMessage(msg)
219 m.Value = &MetricValue_DistributionValue{msg}
226 func _MetricValue_OneofSizer(msg proto.Message) (n int) {
227 m := msg.(*MetricValue)
229 switch x := m.Value.(type) {
230 case *MetricValue_BoolValue:
231 n += proto.SizeVarint(4<<3 | proto.WireVarint)
233 case *MetricValue_Int64Value:
234 n += proto.SizeVarint(5<<3 | proto.WireVarint)
235 n += proto.SizeVarint(uint64(x.Int64Value))
236 case *MetricValue_DoubleValue:
237 n += proto.SizeVarint(6<<3 | proto.WireFixed64)
239 case *MetricValue_StringValue:
240 n += proto.SizeVarint(7<<3 | proto.WireBytes)
241 n += proto.SizeVarint(uint64(len(x.StringValue)))
242 n += len(x.StringValue)
243 case *MetricValue_DistributionValue:
244 s := proto.Size(x.DistributionValue)
245 n += proto.SizeVarint(8<<3 | proto.WireBytes)
246 n += proto.SizeVarint(uint64(s))
250 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
255 // Represents a set of metric values in the same metric.
256 // Each metric value in the set should have a unique combination of start time,
257 // end time, and label values.
258 type MetricValueSet struct {
259 // The metric name defined in the service configuration.
260 MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName" json:"metric_name,omitempty"`
261 // The values in this metric.
262 MetricValues []*MetricValue `protobuf:"bytes,2,rep,name=metric_values,json=metricValues" json:"metric_values,omitempty"`
265 func (m *MetricValueSet) Reset() { *m = MetricValueSet{} }
266 func (m *MetricValueSet) String() string { return proto.CompactTextString(m) }
267 func (*MetricValueSet) ProtoMessage() {}
268 func (*MetricValueSet) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
270 func (m *MetricValueSet) GetMetricName() string {
277 func (m *MetricValueSet) GetMetricValues() []*MetricValue {
279 return m.MetricValues
285 proto.RegisterType((*MetricValue)(nil), "google.api.servicecontrol.v1.MetricValue")
286 proto.RegisterType((*MetricValueSet)(nil), "google.api.servicecontrol.v1.MetricValueSet")
289 func init() { proto.RegisterFile("google/api/servicecontrol/v1/metric_value.proto", fileDescriptor3) }
291 var fileDescriptor3 = []byte{
292 // 482 bytes of a gzipped FileDescriptorProto
293 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcf, 0x8b, 0xd3, 0x40,
294 0x14, 0xc7, 0x3b, 0x8d, 0xdb, 0x1f, 0x2f, 0xab, 0x68, 0x14, 0x0c, 0x65, 0xa1, 0x71, 0xbd, 0x44,
295 0x0f, 0x13, 0x76, 0x75, 0xc5, 0xd5, 0x5b, 0x51, 0x28, 0xe2, 0x2e, 0x4b, 0x14, 0x0f, 0x7a, 0x58,
296 0x26, 0xed, 0x33, 0x0c, 0x26, 0x33, 0x21, 0x33, 0x2d, 0xf4, 0xe8, 0xcd, 0x3f, 0xd9, 0x8b, 0x20,
297 0xf3, 0xa3, 0x9a, 0x82, 0xd4, 0xbd, 0xe5, 0x7d, 0xf3, 0xfd, 0xbc, 0x7c, 0x27, 0xef, 0x0d, 0x64,
298 0xa5, 0x94, 0x65, 0x85, 0x19, 0x6b, 0x78, 0xa6, 0xb0, 0x5d, 0xf3, 0x05, 0x2e, 0xa4, 0xd0, 0xad,
299 0xac, 0xb2, 0xf5, 0x49, 0x56, 0xa3, 0x6e, 0xf9, 0xe2, 0x7a, 0xcd, 0xaa, 0x15, 0xd2, 0xa6, 0x95,
300 0x5a, 0x46, 0x47, 0x0e, 0xa0, 0xac, 0xe1, 0x74, 0x17, 0xa0, 0xeb, 0x93, 0xc9, 0x51, 0xa7, 0x1d,
301 0x13, 0x42, 0x6a, 0xa6, 0xb9, 0x14, 0xca, 0xb1, 0x93, 0xfd, 0x1f, 0x5b, 0x72, 0xa5, 0x5b, 0x5e,
302 0xac, 0x0c, 0xe1, 0x81, 0xa9, 0x07, 0x6c, 0x55, 0xac, 0xbe, 0x66, 0x9a, 0xd7, 0xa8, 0x34, 0xab,
303 0x1b, 0x6f, 0x78, 0xe8, 0x0d, 0x7a, 0xd3, 0x60, 0x56, 0x4b, 0x81, 0x1b, 0xf7, 0xe2, 0xf8, 0x57,
304 0x00, 0xe1, 0x85, 0x4d, 0xff, 0xc9, 0x84, 0x8f, 0x2e, 0x60, 0x50, 0xb1, 0x02, 0x2b, 0x15, 0x93,
305 0x24, 0x48, 0xc3, 0xd3, 0x33, 0xba, 0xef, 0x1c, 0xb4, 0x83, 0xd2, 0xf7, 0x96, 0x7b, 0x2b, 0x74,
306 0xbb, 0xc9, 0x7d, 0x93, 0xe8, 0x1c, 0x40, 0x69, 0xd6, 0xea, 0x6b, 0x13, 0x28, 0xee, 0x27, 0x24,
307 0x0d, 0x4f, 0x27, 0xdb, 0x96, 0xdb, 0xb4, 0xf4, 0xe3, 0x36, 0x6d, 0x3e, 0xb6, 0x6e, 0x53, 0x47,
308 0x67, 0x30, 0x42, 0xb1, 0x74, 0x60, 0xf0, 0x5f, 0x70, 0x88, 0x62, 0x69, 0xb1, 0x29, 0x40, 0x21,
309 0x65, 0xe5, 0x66, 0x11, 0xdf, 0x4a, 0x48, 0x3a, 0x9a, 0xf7, 0xf2, 0xb1, 0xd1, 0xdc, 0x09, 0x1f,
310 0x41, 0xc8, 0x85, 0x7e, 0xf1, 0xdc, 0x3b, 0x0e, 0x12, 0x92, 0x06, 0xf3, 0x5e, 0x0e, 0x56, 0x74,
311 0x96, 0xc7, 0x70, 0xb8, 0x94, 0xab, 0xa2, 0x42, 0xef, 0x19, 0x24, 0x24, 0x25, 0xf3, 0x5e, 0x1e,
312 0x3a, 0xf5, 0x8f, 0xc9, 0xcc, 0x41, 0x94, 0xde, 0x34, 0x4c, 0x48, 0x3a, 0x36, 0x26, 0xa7, 0x3a,
313 0xd3, 0x17, 0x88, 0xba, 0xe3, 0xf2, 0xd6, 0x91, 0x3d, 0xce, 0xd3, 0xfd, 0xbf, 0xf6, 0x4d, 0x87,
314 0x9b, 0xf7, 0xf2, 0x7b, 0xdd, 0x3e, 0xb6, 0xf9, 0xe4, 0x1c, 0xc2, 0xce, 0x3f, 0x8f, 0x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