You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

387 lines
14 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/api/servicecontrol/v1/metric_value.proto
  3. package servicecontrol // import "google.golang.org/genproto/googleapis/api/servicecontrol/v1"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import timestamp "github.com/golang/protobuf/ptypes/timestamp"
  8. import _ "google.golang.org/genproto/googleapis/api/annotations"
  9. import _ "google.golang.org/genproto/googleapis/type/money"
  10. // Reference imports to suppress errors if they are not otherwise used.
  11. var _ = proto.Marshal
  12. var _ = fmt.Errorf
  13. var _ = math.Inf
  14. // This is a compile-time assertion to ensure that this generated file
  15. // is compatible with the proto package it is being compiled against.
  16. // A compilation error at this line likely means your copy of the
  17. // proto package needs to be updated.
  18. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  19. // Represents a single metric value.
  20. type MetricValue struct {
  21. // The labels describing the metric value.
  22. // See comments on
  23. // [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels]
  24. // for the overriding relationship.
  25. Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  26. // The start of the time period over which this metric value's measurement
  27. // applies. The time period has different semantics for different metric
  28. // types (cumulative, delta, and gauge). See the metric definition
  29. // documentation in the service configuration for details.
  30. StartTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
  31. // The end of the time period over which this metric value's measurement
  32. // applies.
  33. EndTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
  34. // The value. The type of value used in the request must
  35. // agree with the metric definition in the service configuration, otherwise
  36. // the MetricValue is rejected.
  37. //
  38. // Types that are valid to be assigned to Value:
  39. // *MetricValue_BoolValue
  40. // *MetricValue_Int64Value
  41. // *MetricValue_DoubleValue
  42. // *MetricValue_StringValue
  43. // *MetricValue_DistributionValue
  44. Value isMetricValue_Value `protobuf_oneof:"value"`
  45. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  46. XXX_unrecognized []byte `json:"-"`
  47. XXX_sizecache int32 `json:"-"`
  48. }
  49. func (m *MetricValue) Reset() { *m = MetricValue{} }
  50. func (m *MetricValue) String() string { return proto.CompactTextString(m) }
  51. func (*MetricValue) ProtoMessage() {}
  52. func (*MetricValue) Descriptor() ([]byte, []int) {
  53. return fileDescriptor_metric_value_53e5cc05481b2add, []int{0}
  54. }
  55. func (m *MetricValue) XXX_Unmarshal(b []byte) error {
  56. return xxx_messageInfo_MetricValue.Unmarshal(m, b)
  57. }
  58. func (m *MetricValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  59. return xxx_messageInfo_MetricValue.Marshal(b, m, deterministic)
  60. }
  61. func (dst *MetricValue) XXX_Merge(src proto.Message) {
  62. xxx_messageInfo_MetricValue.Merge(dst, src)
  63. }
  64. func (m *MetricValue) XXX_Size() int {
  65. return xxx_messageInfo_MetricValue.Size(m)
  66. }
  67. func (m *MetricValue) XXX_DiscardUnknown() {
  68. xxx_messageInfo_MetricValue.DiscardUnknown(m)
  69. }
  70. var xxx_messageInfo_MetricValue proto.InternalMessageInfo
  71. func (m *MetricValue) GetLabels() map[string]string {
  72. if m != nil {
  73. return m.Labels
  74. }
  75. return nil
  76. }
  77. func (m *MetricValue) GetStartTime() *timestamp.Timestamp {
  78. if m != nil {
  79. return m.StartTime
  80. }
  81. return nil
  82. }
  83. func (m *MetricValue) GetEndTime() *timestamp.Timestamp {
  84. if m != nil {
  85. return m.EndTime
  86. }
  87. return nil
  88. }
  89. type isMetricValue_Value interface {
  90. isMetricValue_Value()
  91. }
  92. type MetricValue_BoolValue struct {
  93. BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
  94. }
  95. type MetricValue_Int64Value struct {
  96. Int64Value int64 `protobuf:"varint,5,opt,name=int64_value,json=int64Value,proto3,oneof"`
  97. }
  98. type MetricValue_DoubleValue struct {
  99. DoubleValue float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue,proto3,oneof"`
  100. }
  101. type MetricValue_StringValue struct {
  102. StringValue string `protobuf:"bytes,7,opt,name=string_value,json=stringValue,proto3,oneof"`
  103. }
  104. type MetricValue_DistributionValue struct {
  105. DistributionValue *Distribution `protobuf:"bytes,8,opt,name=distribution_value,json=distributionValue,proto3,oneof"`
  106. }
  107. func (*MetricValue_BoolValue) isMetricValue_Value() {}
  108. func (*MetricValue_Int64Value) isMetricValue_Value() {}
  109. func (*MetricValue_DoubleValue) isMetricValue_Value() {}
  110. func (*MetricValue_StringValue) isMetricValue_Value() {}
  111. func (*MetricValue_DistributionValue) isMetricValue_Value() {}
  112. func (m *MetricValue) GetValue() isMetricValue_Value {
  113. if m != nil {
  114. return m.Value
  115. }
  116. return nil
  117. }
  118. func (m *MetricValue) GetBoolValue() bool {
  119. if x, ok := m.GetValue().(*MetricValue_BoolValue); ok {
  120. return x.BoolValue
  121. }
  122. return false
  123. }
  124. func (m *MetricValue) GetInt64Value() int64 {
  125. if x, ok := m.GetValue().(*MetricValue_Int64Value); ok {
  126. return x.Int64Value
  127. }
  128. return 0
  129. }
  130. func (m *MetricValue) GetDoubleValue() float64 {
  131. if x, ok := m.GetValue().(*MetricValue_DoubleValue); ok {
  132. return x.DoubleValue
  133. }
  134. return 0
  135. }
  136. func (m *MetricValue) GetStringValue() string {
  137. if x, ok := m.GetValue().(*MetricValue_StringValue); ok {
  138. return x.StringValue
  139. }
  140. return ""
  141. }
  142. func (m *MetricValue) GetDistributionValue() *Distribution {
  143. if x, ok := m.GetValue().(*MetricValue_DistributionValue); ok {
  144. return x.DistributionValue
  145. }
  146. return nil
  147. }
  148. // XXX_OneofFuncs is for the internal use of the proto package.
  149. 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{}) {
  150. return _MetricValue_OneofMarshaler, _MetricValue_OneofUnmarshaler, _MetricValue_OneofSizer, []interface{}{
  151. (*MetricValue_BoolValue)(nil),
  152. (*MetricValue_Int64Value)(nil),
  153. (*MetricValue_DoubleValue)(nil),
  154. (*MetricValue_StringValue)(nil),
  155. (*MetricValue_DistributionValue)(nil),
  156. }
  157. }
  158. func _MetricValue_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  159. m := msg.(*MetricValue)
  160. // value
  161. switch x := m.Value.(type) {
  162. case *MetricValue_BoolValue:
  163. t := uint64(0)
  164. if x.BoolValue {
  165. t = 1
  166. }
  167. b.EncodeVarint(4<<3 | proto.WireVarint)
  168. b.EncodeVarint(t)
  169. case *MetricValue_Int64Value:
  170. b.EncodeVarint(5<<3 | proto.WireVarint)
  171. b.EncodeVarint(uint64(x.Int64Value))
  172. case *MetricValue_DoubleValue:
  173. b.EncodeVarint(6<<3 | proto.WireFixed64)
  174. b.EncodeFixed64(math.Float64bits(x.DoubleValue))
  175. case *MetricValue_StringValue:
  176. b.EncodeVarint(7<<3 | proto.WireBytes)
  177. b.EncodeStringBytes(x.StringValue)
  178. case *MetricValue_DistributionValue:
  179. b.EncodeVarint(8<<3 | proto.WireBytes)
  180. if err := b.EncodeMessage(x.DistributionValue); err != nil {
  181. return err
  182. }
  183. case nil:
  184. default:
  185. return fmt.Errorf("MetricValue.Value has unexpected type %T", x)
  186. }
  187. return nil
  188. }
  189. func _MetricValue_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  190. m := msg.(*MetricValue)
  191. switch tag {
  192. case 4: // value.bool_value
  193. if wire != proto.WireVarint {
  194. return true, proto.ErrInternalBadWireType
  195. }
  196. x, err := b.DecodeVarint()
  197. m.Value = &MetricValue_BoolValue{x != 0}
  198. return true, err
  199. case 5: // value.int64_value
  200. if wire != proto.WireVarint {
  201. return true, proto.ErrInternalBadWireType
  202. }
  203. x, err := b.DecodeVarint()
  204. m.Value = &MetricValue_Int64Value{int64(x)}
  205. return true, err
  206. case 6: // value.double_value
  207. if wire != proto.WireFixed64 {
  208. return true, proto.ErrInternalBadWireType
  209. }
  210. x, err := b.DecodeFixed64()
  211. m.Value = &MetricValue_DoubleValue{math.Float64frombits(x)}
  212. return true, err
  213. case 7: // value.string_value
  214. if wire != proto.WireBytes {
  215. return true, proto.ErrInternalBadWireType
  216. }
  217. x, err := b.DecodeStringBytes()
  218. m.Value = &MetricValue_StringValue{x}
  219. return true, err
  220. case 8: // value.distribution_value
  221. if wire != proto.WireBytes {
  222. return true, proto.ErrInternalBadWireType
  223. }
  224. msg := new(Distribution)
  225. err := b.DecodeMessage(msg)
  226. m.Value = &MetricValue_DistributionValue{msg}
  227. return true, err
  228. default:
  229. return false, nil
  230. }
  231. }
  232. func _MetricValue_OneofSizer(msg proto.Message) (n int) {
  233. m := msg.(*MetricValue)
  234. // value
  235. switch x := m.Value.(type) {
  236. case *MetricValue_BoolValue:
  237. n += 1 // tag and wire
  238. n += 1
  239. case *MetricValue_Int64Value:
  240. n += 1 // tag and wire
  241. n += proto.SizeVarint(uint64(x.Int64Value))
  242. case *MetricValue_DoubleValue:
  243. n += 1 // tag and wire
  244. n += 8
  245. case *MetricValue_StringValue:
  246. n += 1 // tag and wire
  247. n += proto.SizeVarint(uint64(len(x.StringValue)))
  248. n += len(x.StringValue)
  249. case *MetricValue_DistributionValue:
  250. s := proto.Size(x.DistributionValue)
  251. n += 1 // tag and wire
  252. n += proto.SizeVarint(uint64(s))
  253. n += s
  254. case nil:
  255. default:
  256. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  257. }
  258. return n
  259. }
  260. // Represents a set of metric values in the same metric.
  261. // Each metric value in the set should have a unique combination of start time,
  262. // end time, and label values.
  263. type MetricValueSet struct {
  264. // The metric name defined in the service configuration.
  265. MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"`
  266. // The values in this metric.
  267. MetricValues []*MetricValue `protobuf:"bytes,2,rep,name=metric_values,json=metricValues,proto3" json:"metric_values,omitempty"`
  268. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  269. XXX_unrecognized []byte `json:"-"`
  270. XXX_sizecache int32 `json:"-"`
  271. }
  272. func (m *MetricValueSet) Reset() { *m = MetricValueSet{} }
  273. func (m *MetricValueSet) String() string { return proto.CompactTextString(m) }
  274. func (*MetricValueSet) ProtoMessage() {}
  275. func (*MetricValueSet) Descriptor() ([]byte, []int) {
  276. return fileDescriptor_metric_value_53e5cc05481b2add, []int{1}
  277. }
  278. func (m *MetricValueSet) XXX_Unmarshal(b []byte) error {
  279. return xxx_messageInfo_MetricValueSet.Unmarshal(m, b)
  280. }
  281. func (m *MetricValueSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  282. return xxx_messageInfo_MetricValueSet.Marshal(b, m, deterministic)
  283. }
  284. func (dst *MetricValueSet) XXX_Merge(src proto.Message) {
  285. xxx_messageInfo_MetricValueSet.Merge(dst, src)
  286. }
  287. func (m *MetricValueSet) XXX_Size() int {
  288. return xxx_messageInfo_MetricValueSet.Size(m)
  289. }
  290. func (m *MetricValueSet) XXX_DiscardUnknown() {
  291. xxx_messageInfo_MetricValueSet.DiscardUnknown(m)
  292. }
  293. var xxx_messageInfo_MetricValueSet proto.InternalMessageInfo
  294. func (m *MetricValueSet) GetMetricName() string {
  295. if m != nil {
  296. return m.MetricName
  297. }
  298. return ""
  299. }
  300. func (m *MetricValueSet) GetMetricValues() []*MetricValue {
  301. if m != nil {
  302. return m.MetricValues
  303. }
  304. return nil
  305. }
  306. func init() {
  307. proto.RegisterType((*MetricValue)(nil), "google.api.servicecontrol.v1.MetricValue")
  308. proto.RegisterMapType((map[string]string)(nil), "google.api.servicecontrol.v1.MetricValue.LabelsEntry")
  309. proto.RegisterType((*MetricValueSet)(nil), "google.api.servicecontrol.v1.MetricValueSet")
  310. }
  311. func init() {
  312. proto.RegisterFile("google/api/servicecontrol/v1/metric_value.proto", fileDescriptor_metric_value_53e5cc05481b2add)
  313. }
  314. var fileDescriptor_metric_value_53e5cc05481b2add = []byte{
  315. // 482 bytes of a gzipped FileDescriptorProto
  316. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcf, 0x8b, 0xd3, 0x40,
  317. 0x14, 0xc7, 0x3b, 0x8d, 0xdb, 0x1f, 0x2f, 0xab, 0x68, 0x14, 0x0c, 0x65, 0xa1, 0x71, 0xbd, 0x44,
  318. 0x0f, 0x13, 0x76, 0x75, 0xc5, 0xd5, 0x5b, 0x51, 0x28, 0xe2, 0x2e, 0x4b, 0x14, 0x0f, 0x7a, 0x58,
  319. 0x26, 0xed, 0x33, 0x0c, 0x26, 0x33, 0x21, 0x33, 0x2d, 0xf4, 0xe8, 0xcd, 0x3f, 0xd9, 0x8b, 0x20,
  320. 0xf3, 0xa3, 0x9a, 0x82, 0xd4, 0xbd, 0xe5, 0x7d, 0xf3, 0xfd, 0xbc, 0x7c, 0x27, 0xef, 0x0d, 0x64,
  321. 0xa5, 0x94, 0x65, 0x85, 0x19, 0x6b, 0x78, 0xa6, 0xb0, 0x5d, 0xf3, 0x05, 0x2e, 0xa4, 0xd0, 0xad,
  322. 0xac, 0xb2, 0xf5, 0x49, 0x56, 0xa3, 0x6e, 0xf9, 0xe2, 0x7a, 0xcd, 0xaa, 0x15, 0xd2, 0xa6, 0x95,
  323. 0x5a, 0x46, 0x47, 0x0e, 0xa0, 0xac, 0xe1, 0x74, 0x17, 0xa0, 0xeb, 0x93, 0xc9, 0x51, 0xa7, 0x1d,
  324. 0x13, 0x42, 0x6a, 0xa6, 0xb9, 0x14, 0xca, 0xb1, 0x93, 0xfd, 0x1f, 0x5b, 0x72, 0xa5, 0x5b, 0x5e,
  325. 0xac, 0x0c, 0xe1, 0x81, 0xa9, 0x07, 0x6c, 0x55, 0xac, 0xbe, 0x66, 0x9a, 0xd7, 0xa8, 0x34, 0xab,
  326. 0x1b, 0x6f, 0x78, 0xe8, 0x0d, 0x7a, 0xd3, 0x60, 0x56, 0x4b, 0x81, 0x1b, 0xf7, 0xe2, 0xf8, 0x57,
  327. 0x00, 0xe1, 0x85, 0x4d, 0xff, 0xc9, 0x84, 0x8f, 0x2e, 0x60, 0x50, 0xb1, 0x02, 0x2b, 0x15, 0x93,
  328. 0x24, 0x48, 0xc3, 0xd3, 0x33, 0xba, 0xef, 0x1c, 0xb4, 0x83, 0xd2, 0xf7, 0x96, 0x7b, 0x2b, 0x74,
  329. 0xbb, 0xc9, 0x7d, 0x93, 0xe8, 0x1c, 0x40, 0x69, 0xd6, 0xea, 0x6b, 0x13, 0x28, 0xee, 0x27, 0x24,
  330. 0x0d, 0x4f, 0x27, 0xdb, 0x96, 0xdb, 0xb4, 0xf4, 0xe3, 0x36, 0x6d, 0x3e, 0xb6, 0x6e, 0x53, 0x47,
  331. 0x67, 0x30, 0x42, 0xb1, 0x74, 0x60, 0xf0, 0x5f, 0x70, 0x88, 0x62, 0x69, 0xb1, 0x29, 0x40, 0x21,
  332. 0x65, 0xe5, 0x66, 0x11, 0xdf, 0x4a, 0x48, 0x3a, 0x9a, 0xf7, 0xf2, 0xb1, 0xd1, 0xdc, 0x09, 0x1f,
  333. 0x41, 0xc8, 0x85, 0x7e, 0xf1, 0xdc, 0x3b, 0x0e, 0x12, 0x92, 0x06, 0xf3, 0x5e, 0x0e, 0x56, 0x74,
  334. 0x96, 0xc7, 0x70, 0xb8, 0x94, 0xab, 0xa2, 0x42, 0xef, 0x19, 0x24, 0x24, 0x25, 0xf3, 0x5e, 0x1e,
  335. 0x3a, 0xf5, 0x8f, 0xc9, 0xcc, 0x41, 0x94, 0xde, 0x34, 0x4c, 0x48, 0x3a, 0x36, 0x26, 0xa7, 0x3a,
  336. 0xd3, 0x17, 0x88, 0xba, 0xe3, 0xf2, 0xd6, 0x91, 0x3d, 0xce, 0xd3, 0xfd, 0xbf, 0xf6, 0x4d, 0x87,
  337. 0x9b, 0xf7, 0xf2, 0x7b, 0xdd, 0x3e, 0xb6, 0xf9, 0xe4, 0x1c, 0xc2, 0xce, 0x3f, 0x8f, 0xee, 0x42,
  338. 0xf0, 0x0d, 0x37, 0x31, 0x31, 0x39, 0x72, 0xf3, 0x18, 0x3d, 0x80, 0x03, 0xf7, 0xc1, 0xbe, 0xd5,
  339. 0x5c, 0xf1, 0xaa, 0xff, 0x92, 0xcc, 0x86, 0xfe, 0xcd, 0xf1, 0x77, 0x02, 0x77, 0x3a, 0x43, 0xfc,
  340. 0x80, 0x3a, 0x9a, 0x42, 0xe8, 0xf7, 0x59, 0xb0, 0x1a, 0x7d, 0x3f, 0x70, 0xd2, 0x25, 0xab, 0x31,
  341. 0xba, 0x84, 0xdb, 0xdd, 0x85, 0x57, 0x71, 0xdf, 0xae, 0xca, 0x93, 0x1b, 0xaf, 0x4a, 0x7e, 0x58,
  342. 0xff, 0x2d, 0xd4, 0xec, 0x07, 0x81, 0x64, 0x21, 0xeb, 0xbd, 0xf8, 0xec, 0xfe, 0x6e, 0xca, 0x2b,
  343. 0xb3, 0x02, 0x57, 0xe4, 0xf3, 0x3b, 0x0f, 0x95, 0xb2, 0x62, 0xa2, 0xa4, 0xb2, 0x2d, 0xb3, 0x12,
  344. 0x85, 0x5d, 0x10, 0x7f, 0x8b, 0x58, 0xc3, 0xd5, 0xbf, 0x6f, 0xd2, 0xeb, 0x5d, 0xe5, 0x27, 0x21,
  345. 0xc5, 0xc0, 0x92, 0xcf, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x00, 0x1a, 0xde, 0xef, 0x03,
  346. 0x00, 0x00,
  347. }