1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: google/api/servicecontrol/v1/distribution.proto 3 4package servicecontrol 5 6import proto "github.com/golang/protobuf/proto" 7import fmt "fmt" 8import math "math" 9 10// Reference imports to suppress errors if they are not otherwise used. 11var _ = proto.Marshal 12var _ = fmt.Errorf 13var _ = math.Inf 14 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: 18// 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 23type 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. 40 // 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. 47 // 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. 52 // 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`). 56 // 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. 62 // 63 // (1) Buckets with constant width. 64 // (2) Buckets with exponentially growing widths. 65 // (3) Buckets with arbitrary user-provided widths. 66 // 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 72 // bucket. 73 // 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"` 79} 80 81func (m *Distribution) Reset() { *m = Distribution{} } 82func (m *Distribution) String() string { return proto.CompactTextString(m) } 83func (*Distribution) ProtoMessage() {} 84func (*Distribution) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } 85 86type isDistribution_BucketOption interface { 87 isDistribution_BucketOption() 88} 89 90type Distribution_LinearBuckets_ struct { 91 LinearBuckets *Distribution_LinearBuckets `protobuf:"bytes,7,opt,name=linear_buckets,json=linearBuckets,oneof"` 92} 93type Distribution_ExponentialBuckets_ struct { 94 ExponentialBuckets *Distribution_ExponentialBuckets `protobuf:"bytes,8,opt,name=exponential_buckets,json=exponentialBuckets,oneof"` 95} 96type Distribution_ExplicitBuckets_ struct { 97 ExplicitBuckets *Distribution_ExplicitBuckets `protobuf:"bytes,9,opt,name=explicit_buckets,json=explicitBuckets,oneof"` 98} 99 100func (*Distribution_LinearBuckets_) isDistribution_BucketOption() {} 101func (*Distribution_ExponentialBuckets_) isDistribution_BucketOption() {} 102func (*Distribution_ExplicitBuckets_) isDistribution_BucketOption() {} 103 104func (m *Distribution) GetBucketOption() isDistribution_BucketOption { 105 if m != nil { 106 return m.BucketOption 107 } 108 return nil 109} 110 111func (m *Distribution) GetCount() int64 { 112 if m != nil { 113 return m.Count 114 } 115 return 0 116} 117 118func (m *Distribution) GetMean() float64 { 119 if m != nil { 120 return m.Mean 121 } 122 return 0 123} 124 125func (m *Distribution) GetMinimum() float64 { 126 if m != nil { 127 return m.Minimum 128 } 129 return 0 130} 131 132func (m *Distribution) GetMaximum() float64 { 133 if m != nil { 134 return m.Maximum 135 } 136 return 0 137} 138 139func (m *Distribution) GetSumOfSquaredDeviation() float64 { 140 if m != nil { 141 return m.SumOfSquaredDeviation 142 } 143 return 0 144} 145 146func (m *Distribution) GetBucketCounts() []int64 { 147 if m != nil { 148 return m.BucketCounts 149 } 150 return nil 151} 152 153func (m *Distribution) GetLinearBuckets() *Distribution_LinearBuckets { 154 if x, ok := m.GetBucketOption().(*Distribution_LinearBuckets_); ok { 155 return x.LinearBuckets 156 } 157 return nil 158} 159 160func (m *Distribution) GetExponentialBuckets() *Distribution_ExponentialBuckets { 161 if x, ok := m.GetBucketOption().(*Distribution_ExponentialBuckets_); ok { 162 return x.ExponentialBuckets 163 } 164 return nil 165} 166 167func (m *Distribution) GetExplicitBuckets() *Distribution_ExplicitBuckets { 168 if x, ok := m.GetBucketOption().(*Distribution_ExplicitBuckets_); ok { 169 return x.ExplicitBuckets 170 } 171 return nil 172} 173 174// XXX_OneofFuncs is for the internal use of the proto package. 175func (*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), 180 } 181} 182 183func _Distribution_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { 184 m := msg.(*Distribution) 185 // bucket_option 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 { 190 return err 191 } 192 case *Distribution_ExponentialBuckets_: 193 b.EncodeVarint(8<<3 | proto.WireBytes) 194 if err := b.EncodeMessage(x.ExponentialBuckets); err != nil { 195 return err 196 } 197 case *Distribution_ExplicitBuckets_: 198 b.EncodeVarint(9<<3 | proto.WireBytes) 199 if err := b.EncodeMessage(x.ExplicitBuckets); err != nil { 200 return err 201 } 202 case nil: 203 default: 204 return fmt.Errorf("Distribution.BucketOption has unexpected type %T", x) 205 } 206 return nil 207} 208 209func _Distribution_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { 210 m := msg.(*Distribution) 211 switch tag { 212 case 7: // bucket_option.linear_buckets 213 if wire != proto.WireBytes { 214 return true, proto.ErrInternalBadWireType 215 } 216 msg := new(Distribution_LinearBuckets) 217 err := b.DecodeMessage(msg) 218 m.BucketOption = &Distribution_LinearBuckets_{msg} 219 return true, err 220 case 8: // bucket_option.exponential_buckets 221 if wire != proto.WireBytes { 222 return true, proto.ErrInternalBadWireType 223 } 224 msg := new(Distribution_ExponentialBuckets) 225 err := b.DecodeMessage(msg) 226 m.BucketOption = &Distribution_ExponentialBuckets_{msg} 227 return true, err 228 case 9: // bucket_option.explicit_buckets 229 if wire != proto.WireBytes { 230 return true, proto.ErrInternalBadWireType 231 } 232 msg := new(Distribution_ExplicitBuckets) 233 err := b.DecodeMessage(msg) 234 m.BucketOption = &Distribution_ExplicitBuckets_{msg} 235 return true, err 236 default: 237 return false, nil 238 } 239} 240 241func _Distribution_OneofSizer(msg proto.Message) (n int) { 242 m := msg.(*Distribution) 243 // bucket_option 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)) 249 n += 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)) 254 n += 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)) 259 n += s 260 case nil: 261 default: 262 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) 263 } 264 return n 265} 266 267// Describing buckets with constant width. 268type 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"` 282} 283 284func (m *Distribution_LinearBuckets) Reset() { *m = Distribution_LinearBuckets{} } 285func (m *Distribution_LinearBuckets) String() string { return proto.CompactTextString(m) } 286func (*Distribution_LinearBuckets) ProtoMessage() {} 287func (*Distribution_LinearBuckets) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} } 288 289func (m *Distribution_LinearBuckets) GetNumFiniteBuckets() int32 { 290 if m != nil { 291 return m.NumFiniteBuckets 292 } 293 return 0 294} 295 296func (m *Distribution_LinearBuckets) GetWidth() float64 { 297 if m != nil { 298 return m.Width 299 } 300 return 0 301} 302 303func (m *Distribution_LinearBuckets) GetOffset() float64 { 304 if m != nil { 305 return m.Offset 306 } 307 return 0 308} 309 310// Describing buckets with exponentially growing width. 311type 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. 324 // Must be > 0. 325 Scale float64 `protobuf:"fixed64,3,opt,name=scale" json:"scale,omitempty"` 326} 327 328func (m *Distribution_ExponentialBuckets) Reset() { *m = Distribution_ExponentialBuckets{} } 329func (m *Distribution_ExponentialBuckets) String() string { return proto.CompactTextString(m) } 330func (*Distribution_ExponentialBuckets) ProtoMessage() {} 331func (*Distribution_ExponentialBuckets) Descriptor() ([]byte, []int) { 332 return fileDescriptor1, []int{0, 1} 333} 334 335func (m *Distribution_ExponentialBuckets) GetNumFiniteBuckets() int32 { 336 if m != nil { 337 return m.NumFiniteBuckets 338 } 339 return 0 340} 341 342func (m *Distribution_ExponentialBuckets) GetGrowthFactor() float64 { 343 if m != nil { 344 return m.GrowthFactor 345 } 346 return 0 347} 348 349func (m *Distribution_ExponentialBuckets) GetScale() float64 { 350 if m != nil { 351 return m.Scale 352 } 353 return 0 354} 355 356// Describing buckets with arbitrary user-provided width. 357type 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. 361 // 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. 368 // 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"` 374} 375 376func (m *Distribution_ExplicitBuckets) Reset() { *m = Distribution_ExplicitBuckets{} } 377func (m *Distribution_ExplicitBuckets) String() string { return proto.CompactTextString(m) } 378func (*Distribution_ExplicitBuckets) ProtoMessage() {} 379func (*Distribution_ExplicitBuckets) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 2} } 380 381func (m *Distribution_ExplicitBuckets) GetBounds() []float64 { 382 if m != nil { 383 return m.Bounds 384 } 385 return nil 386} 387 388func init() { 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") 393} 394 395func init() { proto.RegisterFile("google/api/servicecontrol/v1/distribution.proto", fileDescriptor1) } 396 397var 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 0xc0, 0x41, 0xcd, 0xa8, 0x08, 0xee, 0x86, 0xde, 0xc4, 0x4b, 0xec, 0x37, 0x09, 0xe0, 0xb0, 0xe6, 409 0x82, 0xd7, 0xa6, 0x0e, 0x7c, 0x6b, 0x2f, 0xa5, 0x8d, 0xd0, 0x85, 0x8d, 0x1c, 0x74, 0x11, 0x27, 410 0xc9, 0x1b, 0x08, 0x94, 0xa9, 0x53, 0x2c, 0x52, 0xf5, 0xd3, 0x50, 0x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