1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/api/servicecontrol/v1/distribution.proto
6 import proto "github.com/golang/protobuf/proto"
10 // Reference imports to suppress errors if they are not otherwise used.
15 // Distribution represents a frequency distribution of double-valued sample
16 // points. It contains the size of the population of sample points plus
17 // additional optional information:
19 // - the arithmetic mean of the samples
20 // - the minimum and maximum of the samples
21 // - the sum-squared-deviation of the samples, used to compute variance
22 // - a histogram of the values of the sample points
23 type Distribution struct {
24 // The total number of samples in the distribution. Must be >= 0.
25 Count int64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"`
26 // The arithmetic mean of the samples in the distribution. If `count` is
27 // zero then this field must be zero.
28 Mean float64 `protobuf:"fixed64,2,opt,name=mean" json:"mean,omitempty"`
29 // The minimum of the population of values. Ignored if `count` is zero.
30 Minimum float64 `protobuf:"fixed64,3,opt,name=minimum" json:"minimum,omitempty"`
31 // The maximum of the population of values. Ignored if `count` is zero.
32 Maximum float64 `protobuf:"fixed64,4,opt,name=maximum" json:"maximum,omitempty"`
33 // The sum of squared deviations from the mean:
34 // Sum[i=1..count]((x_i - mean)^2)
35 // where each x_i is a sample values. If `count` is zero then this field
36 // must be zero, otherwise validation of the request fails.
37 SumOfSquaredDeviation float64 `protobuf:"fixed64,5,opt,name=sum_of_squared_deviation,json=sumOfSquaredDeviation" json:"sum_of_squared_deviation,omitempty"`
38 // The number of samples in each histogram bucket. `bucket_counts` are
39 // optional. If present, they must sum to the `count` value.
41 // The buckets are defined below in `bucket_option`. There are N buckets.
42 // `bucket_counts[0]` is the number of samples in the underflow bucket.
43 // `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
44 // in each of the finite buckets. And `bucket_counts[N] is the number
45 // of samples in the overflow bucket. See the comments of `bucket_option`
46 // below for more details.
48 // Any suffix of trailing zeros may be omitted.
49 BucketCounts []int64 `protobuf:"varint,6,rep,packed,name=bucket_counts,json=bucketCounts" json:"bucket_counts,omitempty"`
50 // Defines the buckets in the histogram. `bucket_option` and `bucket_counts`
51 // must be both set, or both unset.
53 // Buckets are numbered the the range of [0, N], with a total of N+1 buckets.
54 // There must be at least two buckets (a single-bucket histogram gives
55 // no information that isn't already provided by `count`).
57 // The first bucket is the underflow bucket which has a lower bound
58 // of -inf. The last bucket is the overflow bucket which has an
59 // upper bound of +inf. All other buckets (if any) are called "finite"
60 // buckets because they have finite lower and upper bounds. As described
61 // below, there are three ways to define the finite buckets.
63 // (1) Buckets with constant width.
64 // (2) Buckets with exponentially growing widths.
65 // (3) Buckets with arbitrary user-provided widths.
67 // In all cases, the buckets cover the entire real number line (-inf,
68 // +inf). Bucket upper bounds are exclusive and lower bounds are
69 // inclusive. The upper bound of the underflow bucket is equal to the
70 // lower bound of the smallest finite bucket; the lower bound of the
71 // overflow bucket is equal to the upper bound of the largest finite
74 // Types that are valid to be assigned to BucketOption:
75 // *Distribution_LinearBuckets_
76 // *Distribution_ExponentialBuckets_
77 // *Distribution_ExplicitBuckets_
78 BucketOption isDistribution_BucketOption `protobuf_oneof:"bucket_option"`
81 func (m *Distribution) Reset() { *m = Distribution{} }
82 func (m *Distribution) String() string { return proto.CompactTextString(m) }
83 func (*Distribution) ProtoMessage() {}
84 func (*Distribution) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
86 type isDistribution_BucketOption interface {
87 isDistribution_BucketOption()
90 type Distribution_LinearBuckets_ struct {
91 LinearBuckets *Distribution_LinearBuckets `protobuf:"bytes,7,opt,name=linear_buckets,json=linearBuckets,oneof"`
93 type Distribution_ExponentialBuckets_ struct {
94 ExponentialBuckets *Distribution_ExponentialBuckets `protobuf:"bytes,8,opt,name=exponential_buckets,json=exponentialBuckets,oneof"`
96 type Distribution_ExplicitBuckets_ struct {
97 ExplicitBuckets *Distribution_ExplicitBuckets `protobuf:"bytes,9,opt,name=explicit_buckets,json=explicitBuckets,oneof"`
100 func (*Distribution_LinearBuckets_) isDistribution_BucketOption() {}
101 func (*Distribution_ExponentialBuckets_) isDistribution_BucketOption() {}
102 func (*Distribution_ExplicitBuckets_) isDistribution_BucketOption() {}
104 func (m *Distribution) GetBucketOption() isDistribution_BucketOption {
106 return m.BucketOption
111 func (m *Distribution) GetCount() int64 {
118 func (m *Distribution) GetMean() float64 {
125 func (m *Distribution) GetMinimum() float64 {
132 func (m *Distribution) GetMaximum() float64 {
139 func (m *Distribution) GetSumOfSquaredDeviation() float64 {
141 return m.SumOfSquaredDeviation
146 func (m *Distribution) GetBucketCounts() []int64 {
148 return m.BucketCounts
153 func (m *Distribution) GetLinearBuckets() *Distribution_LinearBuckets {
154 if x, ok := m.GetBucketOption().(*Distribution_LinearBuckets_); ok {
155 return x.LinearBuckets
160 func (m *Distribution) GetExponentialBuckets() *Distribution_ExponentialBuckets {
161 if x, ok := m.GetBucketOption().(*Distribution_ExponentialBuckets_); ok {
162 return x.ExponentialBuckets
167 func (m *Distribution) GetExplicitBuckets() *Distribution_ExplicitBuckets {
168 if x, ok := m.GetBucketOption().(*Distribution_ExplicitBuckets_); ok {
169 return x.ExplicitBuckets
174 // XXX_OneofFuncs is for the internal use of the proto package.
175 func (*Distribution) 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{}) {
176 return _Distribution_OneofMarshaler, _Distribution_OneofUnmarshaler, _Distribution_OneofSizer, []interface{}{
177 (*Distribution_LinearBuckets_)(nil),
178 (*Distribution_ExponentialBuckets_)(nil),
179 (*Distribution_ExplicitBuckets_)(nil),
183 func _Distribution_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
184 m := msg.(*Distribution)
186 switch x := m.BucketOption.(type) {
187 case *Distribution_LinearBuckets_:
188 b.EncodeVarint(7<<3 | proto.WireBytes)
189 if err := b.EncodeMessage(x.LinearBuckets); err != nil {
192 case *Distribution_ExponentialBuckets_:
193 b.EncodeVarint(8<<3 | proto.WireBytes)
194 if err := b.EncodeMessage(x.ExponentialBuckets); err != nil {
197 case *Distribution_ExplicitBuckets_:
198 b.EncodeVarint(9<<3 | proto.WireBytes)
199 if err := b.EncodeMessage(x.ExplicitBuckets); err != nil {
204 return fmt.Errorf("Distribution.BucketOption has unexpected type %T", x)
209 func _Distribution_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
210 m := msg.(*Distribution)
212 case 7: // bucket_option.linear_buckets
213 if wire != proto.WireBytes {
214 return true, proto.ErrInternalBadWireType
216 msg := new(Distribution_LinearBuckets)
217 err := b.DecodeMessage(msg)
218 m.BucketOption = &Distribution_LinearBuckets_{msg}
220 case 8: // bucket_option.exponential_buckets
221 if wire != proto.WireBytes {
222 return true, proto.ErrInternalBadWireType
224 msg := new(Distribution_ExponentialBuckets)
225 err := b.DecodeMessage(msg)
226 m.BucketOption = &Distribution_ExponentialBuckets_{msg}
228 case 9: // bucket_option.explicit_buckets
229 if wire != proto.WireBytes {
230 return true, proto.ErrInternalBadWireType
232 msg := new(Distribution_ExplicitBuckets)
233 err := b.DecodeMessage(msg)
234 m.BucketOption = &Distribution_ExplicitBuckets_{msg}
241 func _Distribution_OneofSizer(msg proto.Message) (n int) {
242 m := msg.(*Distribution)
244 switch x := m.BucketOption.(type) {
245 case *Distribution_LinearBuckets_:
246 s := proto.Size(x.LinearBuckets)
247 n += proto.SizeVarint(7<<3 | proto.WireBytes)
248 n += proto.SizeVarint(uint64(s))
250 case *Distribution_ExponentialBuckets_:
251 s := proto.Size(x.ExponentialBuckets)
252 n += proto.SizeVarint(8<<3 | proto.WireBytes)
253 n += proto.SizeVarint(uint64(s))
255 case *Distribution_ExplicitBuckets_:
256 s := proto.Size(x.ExplicitBuckets)
257 n += proto.SizeVarint(9<<3 | proto.WireBytes)
258 n += proto.SizeVarint(uint64(s))
262 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
267 // Describing buckets with constant width.
268 type Distribution_LinearBuckets struct {
269 // The number of finite buckets. With the underflow and overflow buckets,
270 // the total number of buckets is `num_finite_buckets` + 2.
271 // See comments on `bucket_options` for details.
272 NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets" json:"num_finite_buckets,omitempty"`
273 // The i'th linear bucket covers the interval
274 // [offset + (i-1) * width, offset + i * width)
275 // where i ranges from 1 to num_finite_buckets, inclusive.
276 // Must be strictly positive.
277 Width float64 `protobuf:"fixed64,2,opt,name=width" json:"width,omitempty"`
278 // The i'th linear bucket covers the interval
279 // [offset + (i-1) * width, offset + i * width)
280 // where i ranges from 1 to num_finite_buckets, inclusive.
281 Offset float64 `protobuf:"fixed64,3,opt,name=offset" json:"offset,omitempty"`
284 func (m *Distribution_LinearBuckets) Reset() { *m = Distribution_LinearBuckets{} }
285 func (m *Distribution_LinearBuckets) String() string { return proto.CompactTextString(m) }
286 func (*Distribution_LinearBuckets) ProtoMessage() {}
287 func (*Distribution_LinearBuckets) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} }
289 func (m *Distribution_LinearBuckets) GetNumFiniteBuckets() int32 {
291 return m.NumFiniteBuckets
296 func (m *Distribution_LinearBuckets) GetWidth() float64 {
303 func (m *Distribution_LinearBuckets) GetOffset() float64 {
310 // Describing buckets with exponentially growing width.
311 type Distribution_ExponentialBuckets struct {
312 // The number of finite buckets. With the underflow and overflow buckets,
313 // the total number of buckets is `num_finite_buckets` + 2.
314 // See comments on `bucket_options` for details.
315 NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets" json:"num_finite_buckets,omitempty"`
316 // The i'th exponential bucket covers the interval
317 // [scale * growth_factor^(i-1), scale * growth_factor^i)
318 // where i ranges from 1 to num_finite_buckets inclusive.
319 // Must be larger than 1.0.
320 GrowthFactor float64 `protobuf:"fixed64,2,opt,name=growth_factor,json=growthFactor" json:"growth_factor,omitempty"`
321 // The i'th exponential bucket covers the interval
322 // [scale * growth_factor^(i-1), scale * growth_factor^i)
323 // where i ranges from 1 to num_finite_buckets inclusive.
325 Scale float64 `protobuf:"fixed64,3,opt,name=scale" json:"scale,omitempty"`
328 func (m *Distribution_ExponentialBuckets) Reset() { *m = Distribution_ExponentialBuckets{} }
329 func (m *Distribution_ExponentialBuckets) String() string { return proto.CompactTextString(m) }
330 func (*Distribution_ExponentialBuckets) ProtoMessage() {}
331 func (*Distribution_ExponentialBuckets) Descriptor() ([]byte, []int) {
332 return fileDescriptor1, []int{0, 1}
335 func (m *Distribution_ExponentialBuckets) GetNumFiniteBuckets() int32 {
337 return m.NumFiniteBuckets
342 func (m *Distribution_ExponentialBuckets) GetGrowthFactor() float64 {
344 return m.GrowthFactor
349 func (m *Distribution_ExponentialBuckets) GetScale() float64 {
356 // Describing buckets with arbitrary user-provided width.
357 type Distribution_ExplicitBuckets struct {
358 // 'bound' is a list of strictly increasing boundaries between
359 // buckets. Note that a list of length N-1 defines N buckets because
360 // of fenceposting. See comments on `bucket_options` for details.
362 // The i'th finite bucket covers the interval
363 // [bound[i-1], bound[i])
364 // where i ranges from 1 to bound_size() - 1. Note that there are no
365 // finite buckets at all if 'bound' only contains a single element; in
366 // that special case the single bound defines the boundary between the
367 // underflow and overflow buckets.
369 // bucket number lower bound upper bound
370 // i == 0 (underflow) -inf bound[i]
371 // 0 < i < bound_size() bound[i-1] bound[i]
372 // i == bound_size() (overflow) bound[i-1] +inf
373 Bounds []float64 `protobuf:"fixed64,1,rep,packed,name=bounds" json:"bounds,omitempty"`
376 func (m *Distribution_ExplicitBuckets) Reset() { *m = Distribution_ExplicitBuckets{} }
377 func (m *Distribution_ExplicitBuckets) String() string { return proto.CompactTextString(m) }
378 func (*Distribution_ExplicitBuckets) ProtoMessage() {}
379 func (*Distribution_ExplicitBuckets) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 2} }
381 func (m *Distribution_ExplicitBuckets) GetBounds() []float64 {
389 proto.RegisterType((*Distribution)(nil), "google.api.servicecontrol.v1.Distribution")
390 proto.RegisterType((*Distribution_LinearBuckets)(nil), "google.api.servicecontrol.v1.Distribution.LinearBuckets")
391 proto.RegisterType((*Distribution_ExponentialBuckets)(nil), "google.api.servicecontrol.v1.Distribution.ExponentialBuckets")
392 proto.RegisterType((*Distribution_ExplicitBuckets)(nil), "google.api.servicecontrol.v1.Distribution.ExplicitBuckets")
395 func init() { proto.RegisterFile("google/api/servicecontrol/v1/distribution.proto", fileDescriptor1) }
397 var fileDescriptor1 = []byte{
398 // 486 bytes of a gzipped FileDescriptorProto
399 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4d, 0x6f, 0xd3, 0x40,
400 0x10, 0x86, 0x31, 0x6e, 0x52, 0x18, 0x12, 0x52, 0x96, 0x82, 0xac, 0x88, 0x83, 0x45, 0x2f, 0x41,
401 0x42, 0xb6, 0x0a, 0x07, 0x10, 0x88, 0x4b, 0x28, 0x15, 0x42, 0x48, 0x54, 0xe6, 0xc6, 0xc5, 0xda,
402 0xd8, 0x6b, 0x77, 0x55, 0x7b, 0xc7, 0xec, 0x47, 0x9a, 0x0b, 0x57, 0x7e, 0x0f, 0x3f, 0x8f, 0x23,
403 0xf2, 0xae, 0xf3, 0x45, 0xab, 0x48, 0xb9, 0xf9, 0x7d, 0xc7, 0x33, 0xcf, 0xec, 0x68, 0x06, 0xe2,
404 0x12, 0xb1, 0xac, 0x58, 0x4c, 0x1b, 0x1e, 0x2b, 0x26, 0xe7, 0x3c, 0x63, 0x19, 0x0a, 0x2d, 0xb1,
405 0x8a, 0xe7, 0xa7, 0x71, 0xce, 0x95, 0x96, 0x7c, 0x66, 0x34, 0x47, 0x11, 0x35, 0x12, 0x35, 0x92,
406 0x67, 0x2e, 0x21, 0xa2, 0x0d, 0x8f, 0xb6, 0x13, 0xa2, 0xf9, 0xe9, 0xf3, 0x3f, 0x7d, 0x18, 0x9c,
407 0x6d, 0x24, 0x91, 0x63, 0xe8, 0x65, 0x68, 0x84, 0x0e, 0xbc, 0xd0, 0x9b, 0xf8, 0x89, 0x13, 0x84,
408 0x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