1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432
|
// Code generated by protoc-gen-go.
// source: google.golang.org/genproto/googleapis/api/servicecontrol/v1/distribution.proto
// DO NOT EDIT!
package google_api_servicecontrol_v1
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Distribution represents a frequency distribution of double-valued sample
// points. It contains the size of the population of sample points plus
// additional optional information:
//
// - the arithmetic mean of the samples
// - the minimum and maximum of the samples
// - the sum-squared-deviation of the samples, used to compute variance
// - a histogram of the values of the sample points
type Distribution struct {
// The total number of samples in the distribution. Must be >= 0.
Count int64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"`
// The arithmetic mean of the samples in the distribution. If `count` is
// zero then this field must be zero.
Mean float64 `protobuf:"fixed64,2,opt,name=mean" json:"mean,omitempty"`
// The minimum of the population of values. Ignored if `count` is zero.
Minimum float64 `protobuf:"fixed64,3,opt,name=minimum" json:"minimum,omitempty"`
// The maximum of the population of values. Ignored if `count` is zero.
Maximum float64 `protobuf:"fixed64,4,opt,name=maximum" json:"maximum,omitempty"`
// The sum of squared deviations from the mean:
// Sum[i=1..count]((x_i - mean)^2)
// where each x_i is a sample values. If `count` is zero then this field
// must be zero, otherwise validation of the request fails.
SumOfSquaredDeviation float64 `protobuf:"fixed64,5,opt,name=sum_of_squared_deviation,json=sumOfSquaredDeviation" json:"sum_of_squared_deviation,omitempty"`
// The number of samples in each histogram bucket. `bucket_counts` are
// optional. If present, they must sum to the `count` value.
//
// The buckets are defined below in `bucket_option`. There are N buckets.
// `bucket_counts[0]` is the number of samples in the underflow bucket.
// `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
// in each of the finite buckets. And `bucket_counts[N] is the number
// of samples in the overflow bucket. See the comments of `bucket_option`
// below for more details.
//
// Any suffix of trailing zeros may be omitted.
BucketCounts []int64 `protobuf:"varint,6,rep,packed,name=bucket_counts,json=bucketCounts" json:"bucket_counts,omitempty"`
// Defines the buckets in the histogram. `bucket_option` and `bucket_counts`
// must be both set, or both unset.
//
// Buckets are numbered the the range of [0, N], with a total of N+1 buckets.
// There must be at least two buckets (a single-bucket histogram gives
// no information that isn't already provided by `count`).
//
// The first bucket is the underflow bucket which has a lower bound
// of -inf. The last bucket is the overflow bucket which has an
// upper bound of +inf. All other buckets (if any) are called "finite"
// buckets because they have finite lower and upper bounds. As described
// below, there are three ways to define the finite buckets.
//
// (1) Buckets with constant width.
// (2) Buckets with exponentially growing widths.
// (3) Buckets with arbitrary user-provided widths.
//
// In all cases, the buckets cover the entire real number line (-inf,
// +inf). Bucket upper bounds are exclusive and lower bounds are
// inclusive. The upper bound of the underflow bucket is equal to the
// lower bound of the smallest finite bucket; the lower bound of the
// overflow bucket is equal to the upper bound of the largest finite
// bucket.
//
// Types that are valid to be assigned to BucketOption:
// *Distribution_LinearBuckets_
// *Distribution_ExponentialBuckets_
// *Distribution_ExplicitBuckets_
BucketOption isDistribution_BucketOption `protobuf_oneof:"bucket_option"`
}
func (m *Distribution) Reset() { *m = Distribution{} }
func (m *Distribution) String() string { return proto.CompactTextString(m) }
func (*Distribution) ProtoMessage() {}
func (*Distribution) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
type isDistribution_BucketOption interface {
isDistribution_BucketOption()
}
type Distribution_LinearBuckets_ struct {
LinearBuckets *Distribution_LinearBuckets `protobuf:"bytes,7,opt,name=linear_buckets,json=linearBuckets,oneof"`
}
type Distribution_ExponentialBuckets_ struct {
ExponentialBuckets *Distribution_ExponentialBuckets `protobuf:"bytes,8,opt,name=exponential_buckets,json=exponentialBuckets,oneof"`
}
type Distribution_ExplicitBuckets_ struct {
ExplicitBuckets *Distribution_ExplicitBuckets `protobuf:"bytes,9,opt,name=explicit_buckets,json=explicitBuckets,oneof"`
}
func (*Distribution_LinearBuckets_) isDistribution_BucketOption() {}
func (*Distribution_ExponentialBuckets_) isDistribution_BucketOption() {}
func (*Distribution_ExplicitBuckets_) isDistribution_BucketOption() {}
func (m *Distribution) GetBucketOption() isDistribution_BucketOption {
if m != nil {
return m.BucketOption
}
return nil
}
func (m *Distribution) GetCount() int64 {
if m != nil {
return m.Count
}
return 0
}
func (m *Distribution) GetMean() float64 {
if m != nil {
return m.Mean
}
return 0
}
func (m *Distribution) GetMinimum() float64 {
if m != nil {
return m.Minimum
}
return 0
}
func (m *Distribution) GetMaximum() float64 {
if m != nil {
return m.Maximum
}
return 0
}
func (m *Distribution) GetSumOfSquaredDeviation() float64 {
if m != nil {
return m.SumOfSquaredDeviation
}
return 0
}
func (m *Distribution) GetBucketCounts() []int64 {
if m != nil {
return m.BucketCounts
}
return nil
}
func (m *Distribution) GetLinearBuckets() *Distribution_LinearBuckets {
if x, ok := m.GetBucketOption().(*Distribution_LinearBuckets_); ok {
return x.LinearBuckets
}
return nil
}
func (m *Distribution) GetExponentialBuckets() *Distribution_ExponentialBuckets {
if x, ok := m.GetBucketOption().(*Distribution_ExponentialBuckets_); ok {
return x.ExponentialBuckets
}
return nil
}
func (m *Distribution) GetExplicitBuckets() *Distribution_ExplicitBuckets {
if x, ok := m.GetBucketOption().(*Distribution_ExplicitBuckets_); ok {
return x.ExplicitBuckets
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
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{}) {
return _Distribution_OneofMarshaler, _Distribution_OneofUnmarshaler, _Distribution_OneofSizer, []interface{}{
(*Distribution_LinearBuckets_)(nil),
(*Distribution_ExponentialBuckets_)(nil),
(*Distribution_ExplicitBuckets_)(nil),
}
}
func _Distribution_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Distribution)
// bucket_option
switch x := m.BucketOption.(type) {
case *Distribution_LinearBuckets_:
b.EncodeVarint(7<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.LinearBuckets); err != nil {
return err
}
case *Distribution_ExponentialBuckets_:
b.EncodeVarint(8<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ExponentialBuckets); err != nil {
return err
}
case *Distribution_ExplicitBuckets_:
b.EncodeVarint(9<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ExplicitBuckets); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Distribution.BucketOption has unexpected type %T", x)
}
return nil
}
func _Distribution_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Distribution)
switch tag {
case 7: // bucket_option.linear_buckets
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Distribution_LinearBuckets)
err := b.DecodeMessage(msg)
m.BucketOption = &Distribution_LinearBuckets_{msg}
return true, err
case 8: // bucket_option.exponential_buckets
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Distribution_ExponentialBuckets)
err := b.DecodeMessage(msg)
m.BucketOption = &Distribution_ExponentialBuckets_{msg}
return true, err
case 9: // bucket_option.explicit_buckets
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Distribution_ExplicitBuckets)
err := b.DecodeMessage(msg)
m.BucketOption = &Distribution_ExplicitBuckets_{msg}
return true, err
default:
return false, nil
}
}
func _Distribution_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Distribution)
// bucket_option
switch x := m.BucketOption.(type) {
case *Distribution_LinearBuckets_:
s := proto.Size(x.LinearBuckets)
n += proto.SizeVarint(7<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Distribution_ExponentialBuckets_:
s := proto.Size(x.ExponentialBuckets)
n += proto.SizeVarint(8<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Distribution_ExplicitBuckets_:
s := proto.Size(x.ExplicitBuckets)
n += proto.SizeVarint(9<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Describing buckets with constant width.
type Distribution_LinearBuckets struct {
// The number of finite buckets. With the underflow and overflow buckets,
// the total number of buckets is `num_finite_buckets` + 2.
// See comments on `bucket_options` for details.
NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets" json:"num_finite_buckets,omitempty"`
// The i'th linear bucket covers the interval
// [offset + (i-1) * width, offset + i * width)
// where i ranges from 1 to num_finite_buckets, inclusive.
// Must be strictly positive.
Width float64 `protobuf:"fixed64,2,opt,name=width" json:"width,omitempty"`
// The i'th linear bucket covers the interval
// [offset + (i-1) * width, offset + i * width)
// where i ranges from 1 to num_finite_buckets, inclusive.
Offset float64 `protobuf:"fixed64,3,opt,name=offset" json:"offset,omitempty"`
}
func (m *Distribution_LinearBuckets) Reset() { *m = Distribution_LinearBuckets{} }
func (m *Distribution_LinearBuckets) String() string { return proto.CompactTextString(m) }
func (*Distribution_LinearBuckets) ProtoMessage() {}
func (*Distribution_LinearBuckets) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} }
func (m *Distribution_LinearBuckets) GetNumFiniteBuckets() int32 {
if m != nil {
return m.NumFiniteBuckets
}
return 0
}
func (m *Distribution_LinearBuckets) GetWidth() float64 {
if m != nil {
return m.Width
}
return 0
}
func (m *Distribution_LinearBuckets) GetOffset() float64 {
if m != nil {
return m.Offset
}
return 0
}
// Describing buckets with exponentially growing width.
type Distribution_ExponentialBuckets struct {
// The number of finite buckets. With the underflow and overflow buckets,
// the total number of buckets is `num_finite_buckets` + 2.
// See comments on `bucket_options` for details.
NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets" json:"num_finite_buckets,omitempty"`
// The i'th exponential bucket covers the interval
// [scale * growth_factor^(i-1), scale * growth_factor^i)
// where i ranges from 1 to num_finite_buckets inclusive.
// Must be larger than 1.0.
GrowthFactor float64 `protobuf:"fixed64,2,opt,name=growth_factor,json=growthFactor" json:"growth_factor,omitempty"`
// The i'th exponential bucket covers the interval
// [scale * growth_factor^(i-1), scale * growth_factor^i)
// where i ranges from 1 to num_finite_buckets inclusive.
// Must be > 0.
Scale float64 `protobuf:"fixed64,3,opt,name=scale" json:"scale,omitempty"`
}
func (m *Distribution_ExponentialBuckets) Reset() { *m = Distribution_ExponentialBuckets{} }
func (m *Distribution_ExponentialBuckets) String() string { return proto.CompactTextString(m) }
func (*Distribution_ExponentialBuckets) ProtoMessage() {}
func (*Distribution_ExponentialBuckets) Descriptor() ([]byte, []int) {
return fileDescriptor1, []int{0, 1}
}
func (m *Distribution_ExponentialBuckets) GetNumFiniteBuckets() int32 {
if m != nil {
return m.NumFiniteBuckets
}
return 0
}
func (m *Distribution_ExponentialBuckets) GetGrowthFactor() float64 {
if m != nil {
return m.GrowthFactor
}
return 0
}
func (m *Distribution_ExponentialBuckets) GetScale() float64 {
if m != nil {
return m.Scale
}
return 0
}
// Describing buckets with arbitrary user-provided width.
type Distribution_ExplicitBuckets struct {
// 'bound' is a list of strictly increasing boundaries between
// buckets. Note that a list of length N-1 defines N buckets because
// of fenceposting. See comments on `bucket_options` for details.
//
// The i'th finite bucket covers the interval
// [bound[i-1], bound[i])
// where i ranges from 1 to bound_size() - 1. Note that there are no
// finite buckets at all if 'bound' only contains a single element; in
// that special case the single bound defines the boundary between the
// underflow and overflow buckets.
//
// bucket number lower bound upper bound
// i == 0 (underflow) -inf bound[i]
// 0 < i < bound_size() bound[i-1] bound[i]
// i == bound_size() (overflow) bound[i-1] +inf
Bounds []float64 `protobuf:"fixed64,1,rep,packed,name=bounds" json:"bounds,omitempty"`
}
func (m *Distribution_ExplicitBuckets) Reset() { *m = Distribution_ExplicitBuckets{} }
func (m *Distribution_ExplicitBuckets) String() string { return proto.CompactTextString(m) }
func (*Distribution_ExplicitBuckets) ProtoMessage() {}
func (*Distribution_ExplicitBuckets) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 2} }
func (m *Distribution_ExplicitBuckets) GetBounds() []float64 {
if m != nil {
return m.Bounds
}
return nil
}
func init() {
proto.RegisterType((*Distribution)(nil), "google.api.servicecontrol.v1.Distribution")
proto.RegisterType((*Distribution_LinearBuckets)(nil), "google.api.servicecontrol.v1.Distribution.LinearBuckets")
proto.RegisterType((*Distribution_ExponentialBuckets)(nil), "google.api.servicecontrol.v1.Distribution.ExponentialBuckets")
proto.RegisterType((*Distribution_ExplicitBuckets)(nil), "google.api.servicecontrol.v1.Distribution.ExplicitBuckets")
}
func init() {
proto.RegisterFile("google.golang.org/genproto/googleapis/api/servicecontrol/v1/distribution.proto", fileDescriptor1)
}
var fileDescriptor1 = []byte{
// 474 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x93, 0xcf, 0x6e, 0xd3, 0x40,
0x10, 0xc6, 0x31, 0x6e, 0x52, 0x18, 0x1a, 0x52, 0x96, 0x82, 0xac, 0x88, 0x83, 0x45, 0x2f, 0x41,
0x42, 0xb6, 0x0a, 0x07, 0x50, 0x25, 0x2e, 0xa1, 0x54, 0x1c, 0x10, 0x54, 0xe6, 0x01, 0xac, 0x8d,
0xbd, 0x76, 0x57, 0xf5, 0xee, 0x98, 0xfd, 0x93, 0xe6, 0xc2, 0x3b, 0xf1, 0x78, 0x1c, 0x91, 0x77,
0x9d, 0x7f, 0x54, 0xaa, 0x94, 0x9b, 0xbf, 0xef, 0xf3, 0xcc, 0x6f, 0x3c, 0x1a, 0xc3, 0xf7, 0x1a,
0xb1, 0x6e, 0x58, 0x52, 0x63, 0x43, 0x65, 0x9d, 0xa0, 0xaa, 0xd3, 0x9a, 0xc9, 0x56, 0xa1, 0xc1,
0xd4, 0x47, 0xb4, 0xe5, 0x3a, 0xa5, 0x2d, 0x4f, 0x35, 0x53, 0x0b, 0x5e, 0xb0, 0x02, 0xa5, 0x51,
0xd8, 0xa4, 0x8b, 0xb3, 0xb4, 0xe4, 0xda, 0x28, 0x3e, 0xb7, 0x86, 0xa3, 0x4c, 0x5c, 0x0d, 0x79,
0xd5, 0xf7, 0xa3, 0x2d, 0x4f, 0x76, 0x0b, 0x92, 0xc5, 0xd9, 0xeb, 0x3f, 0x43, 0x38, 0xba, 0xd8,
0x2a, 0x22, 0x27, 0x30, 0x28, 0xd0, 0x4a, 0x13, 0x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