github.com/m3db/m3@v1.5.0/src/metrics/generated/proto/metricpb/composite.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/m3db/m3/src/metrics/generated/proto/metricpb/composite.proto 3 4 // Copyright (c) 2021 Uber Technologies, Inc. 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in 14 // all copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 // THE SOFTWARE. 23 24 /* 25 Package metricpb is a generated protocol buffer package. 26 27 It is generated from these files: 28 github.com/m3db/m3/src/metrics/generated/proto/metricpb/composite.proto 29 github.com/m3db/m3/src/metrics/generated/proto/metricpb/metadata.proto 30 github.com/m3db/m3/src/metrics/generated/proto/metricpb/metric.proto 31 32 It has these top-level messages: 33 CounterWithMetadatas 34 BatchTimerWithMetadatas 35 GaugeWithMetadatas 36 ForwardedMetricWithMetadata 37 TimedMetricWithMetadata 38 TimedMetricWithMetadatas 39 TimedMetricWithStoragePolicy 40 AggregatedMetric 41 MetricWithMetadatas 42 PipelineMetadata 43 Metadata 44 StagedMetadata 45 StagedMetadatas 46 ForwardMetadata 47 TimedMetadata 48 Counter 49 BatchTimer 50 Gauge 51 TimedMetric 52 ForwardedMetric 53 Tag 54 */ 55 package metricpb 56 57 import proto "github.com/gogo/protobuf/proto" 58 import fmt "fmt" 59 import math "math" 60 import _ "github.com/gogo/protobuf/gogoproto" 61 import policypb "github.com/m3db/m3/src/metrics/generated/proto/policypb" 62 63 import io "io" 64 65 // Reference imports to suppress errors if they are not otherwise used. 66 var _ = proto.Marshal 67 var _ = fmt.Errorf 68 var _ = math.Inf 69 70 // This is a compile-time assertion to ensure that this generated file 71 // is compatible with the proto package it is being compiled against. 72 // A compilation error at this line likely means your copy of the 73 // proto package needs to be updated. 74 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 75 76 type MetricWithMetadatas_Type int32 77 78 const ( 79 MetricWithMetadatas_UNKNOWN MetricWithMetadatas_Type = 0 80 MetricWithMetadatas_COUNTER_WITH_METADATAS MetricWithMetadatas_Type = 1 81 MetricWithMetadatas_BATCH_TIMER_WITH_METADATAS MetricWithMetadatas_Type = 2 82 MetricWithMetadatas_GAUGE_WITH_METADATAS MetricWithMetadatas_Type = 3 83 MetricWithMetadatas_FORWARDED_METRIC_WITH_METADATA MetricWithMetadatas_Type = 4 84 MetricWithMetadatas_TIMED_METRIC_WITH_METADATA MetricWithMetadatas_Type = 5 85 MetricWithMetadatas_TIMED_METRIC_WITH_METADATAS MetricWithMetadatas_Type = 6 86 MetricWithMetadatas_TIMED_METRIC_WITH_STORAGE_POLICY MetricWithMetadatas_Type = 7 87 ) 88 89 var MetricWithMetadatas_Type_name = map[int32]string{ 90 0: "UNKNOWN", 91 1: "COUNTER_WITH_METADATAS", 92 2: "BATCH_TIMER_WITH_METADATAS", 93 3: "GAUGE_WITH_METADATAS", 94 4: "FORWARDED_METRIC_WITH_METADATA", 95 5: "TIMED_METRIC_WITH_METADATA", 96 6: "TIMED_METRIC_WITH_METADATAS", 97 7: "TIMED_METRIC_WITH_STORAGE_POLICY", 98 } 99 var MetricWithMetadatas_Type_value = map[string]int32{ 100 "UNKNOWN": 0, 101 "COUNTER_WITH_METADATAS": 1, 102 "BATCH_TIMER_WITH_METADATAS": 2, 103 "GAUGE_WITH_METADATAS": 3, 104 "FORWARDED_METRIC_WITH_METADATA": 4, 105 "TIMED_METRIC_WITH_METADATA": 5, 106 "TIMED_METRIC_WITH_METADATAS": 6, 107 "TIMED_METRIC_WITH_STORAGE_POLICY": 7, 108 } 109 110 func (x MetricWithMetadatas_Type) String() string { 111 return proto.EnumName(MetricWithMetadatas_Type_name, int32(x)) 112 } 113 func (MetricWithMetadatas_Type) EnumDescriptor() ([]byte, []int) { 114 return fileDescriptorComposite, []int{8, 0} 115 } 116 117 type CounterWithMetadatas struct { 118 Counter Counter `protobuf:"bytes,1,opt,name=counter" json:"counter"` 119 Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas" json:"metadatas"` 120 } 121 122 func (m *CounterWithMetadatas) Reset() { *m = CounterWithMetadatas{} } 123 func (m *CounterWithMetadatas) String() string { return proto.CompactTextString(m) } 124 func (*CounterWithMetadatas) ProtoMessage() {} 125 func (*CounterWithMetadatas) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{0} } 126 127 func (m *CounterWithMetadatas) GetCounter() Counter { 128 if m != nil { 129 return m.Counter 130 } 131 return Counter{} 132 } 133 134 func (m *CounterWithMetadatas) GetMetadatas() StagedMetadatas { 135 if m != nil { 136 return m.Metadatas 137 } 138 return StagedMetadatas{} 139 } 140 141 type BatchTimerWithMetadatas struct { 142 BatchTimer BatchTimer `protobuf:"bytes,1,opt,name=batch_timer,json=batchTimer" json:"batch_timer"` 143 Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas" json:"metadatas"` 144 } 145 146 func (m *BatchTimerWithMetadatas) Reset() { *m = BatchTimerWithMetadatas{} } 147 func (m *BatchTimerWithMetadatas) String() string { return proto.CompactTextString(m) } 148 func (*BatchTimerWithMetadatas) ProtoMessage() {} 149 func (*BatchTimerWithMetadatas) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{1} } 150 151 func (m *BatchTimerWithMetadatas) GetBatchTimer() BatchTimer { 152 if m != nil { 153 return m.BatchTimer 154 } 155 return BatchTimer{} 156 } 157 158 func (m *BatchTimerWithMetadatas) GetMetadatas() StagedMetadatas { 159 if m != nil { 160 return m.Metadatas 161 } 162 return StagedMetadatas{} 163 } 164 165 type GaugeWithMetadatas struct { 166 Gauge Gauge `protobuf:"bytes,1,opt,name=gauge" json:"gauge"` 167 Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas" json:"metadatas"` 168 } 169 170 func (m *GaugeWithMetadatas) Reset() { *m = GaugeWithMetadatas{} } 171 func (m *GaugeWithMetadatas) String() string { return proto.CompactTextString(m) } 172 func (*GaugeWithMetadatas) ProtoMessage() {} 173 func (*GaugeWithMetadatas) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{2} } 174 175 func (m *GaugeWithMetadatas) GetGauge() Gauge { 176 if m != nil { 177 return m.Gauge 178 } 179 return Gauge{} 180 } 181 182 func (m *GaugeWithMetadatas) GetMetadatas() StagedMetadatas { 183 if m != nil { 184 return m.Metadatas 185 } 186 return StagedMetadatas{} 187 } 188 189 type ForwardedMetricWithMetadata struct { 190 Metric ForwardedMetric `protobuf:"bytes,1,opt,name=metric" json:"metric"` 191 Metadata ForwardMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata"` 192 } 193 194 func (m *ForwardedMetricWithMetadata) Reset() { *m = ForwardedMetricWithMetadata{} } 195 func (m *ForwardedMetricWithMetadata) String() string { return proto.CompactTextString(m) } 196 func (*ForwardedMetricWithMetadata) ProtoMessage() {} 197 func (*ForwardedMetricWithMetadata) Descriptor() ([]byte, []int) { 198 return fileDescriptorComposite, []int{3} 199 } 200 201 func (m *ForwardedMetricWithMetadata) GetMetric() ForwardedMetric { 202 if m != nil { 203 return m.Metric 204 } 205 return ForwardedMetric{} 206 } 207 208 func (m *ForwardedMetricWithMetadata) GetMetadata() ForwardMetadata { 209 if m != nil { 210 return m.Metadata 211 } 212 return ForwardMetadata{} 213 } 214 215 type TimedMetricWithMetadata struct { 216 Metric TimedMetric `protobuf:"bytes,1,opt,name=metric" json:"metric"` 217 Metadata TimedMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata"` 218 } 219 220 func (m *TimedMetricWithMetadata) Reset() { *m = TimedMetricWithMetadata{} } 221 func (m *TimedMetricWithMetadata) String() string { return proto.CompactTextString(m) } 222 func (*TimedMetricWithMetadata) ProtoMessage() {} 223 func (*TimedMetricWithMetadata) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{4} } 224 225 func (m *TimedMetricWithMetadata) GetMetric() TimedMetric { 226 if m != nil { 227 return m.Metric 228 } 229 return TimedMetric{} 230 } 231 232 func (m *TimedMetricWithMetadata) GetMetadata() TimedMetadata { 233 if m != nil { 234 return m.Metadata 235 } 236 return TimedMetadata{} 237 } 238 239 type TimedMetricWithMetadatas struct { 240 Metric TimedMetric `protobuf:"bytes,1,opt,name=metric" json:"metric"` 241 Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas" json:"metadatas"` 242 } 243 244 func (m *TimedMetricWithMetadatas) Reset() { *m = TimedMetricWithMetadatas{} } 245 func (m *TimedMetricWithMetadatas) String() string { return proto.CompactTextString(m) } 246 func (*TimedMetricWithMetadatas) ProtoMessage() {} 247 func (*TimedMetricWithMetadatas) Descriptor() ([]byte, []int) { 248 return fileDescriptorComposite, []int{5} 249 } 250 251 func (m *TimedMetricWithMetadatas) GetMetric() TimedMetric { 252 if m != nil { 253 return m.Metric 254 } 255 return TimedMetric{} 256 } 257 258 func (m *TimedMetricWithMetadatas) GetMetadatas() StagedMetadatas { 259 if m != nil { 260 return m.Metadatas 261 } 262 return StagedMetadatas{} 263 } 264 265 type TimedMetricWithStoragePolicy struct { 266 TimedMetric TimedMetric `protobuf:"bytes,1,opt,name=timed_metric,json=timedMetric" json:"timed_metric"` 267 StoragePolicy policypb.StoragePolicy `protobuf:"bytes,2,opt,name=storage_policy,json=storagePolicy" json:"storage_policy"` 268 } 269 270 func (m *TimedMetricWithStoragePolicy) Reset() { *m = TimedMetricWithStoragePolicy{} } 271 func (m *TimedMetricWithStoragePolicy) String() string { return proto.CompactTextString(m) } 272 func (*TimedMetricWithStoragePolicy) ProtoMessage() {} 273 func (*TimedMetricWithStoragePolicy) Descriptor() ([]byte, []int) { 274 return fileDescriptorComposite, []int{6} 275 } 276 277 func (m *TimedMetricWithStoragePolicy) GetTimedMetric() TimedMetric { 278 if m != nil { 279 return m.TimedMetric 280 } 281 return TimedMetric{} 282 } 283 284 func (m *TimedMetricWithStoragePolicy) GetStoragePolicy() policypb.StoragePolicy { 285 if m != nil { 286 return m.StoragePolicy 287 } 288 return policypb.StoragePolicy{} 289 } 290 291 type AggregatedMetric struct { 292 Metric TimedMetricWithStoragePolicy `protobuf:"bytes,1,opt,name=metric" json:"metric"` 293 EncodeNanos int64 `protobuf:"varint,2,opt,name=encode_nanos,json=encodeNanos,proto3" json:"encode_nanos,omitempty"` 294 } 295 296 func (m *AggregatedMetric) Reset() { *m = AggregatedMetric{} } 297 func (m *AggregatedMetric) String() string { return proto.CompactTextString(m) } 298 func (*AggregatedMetric) ProtoMessage() {} 299 func (*AggregatedMetric) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{7} } 300 301 func (m *AggregatedMetric) GetMetric() TimedMetricWithStoragePolicy { 302 if m != nil { 303 return m.Metric 304 } 305 return TimedMetricWithStoragePolicy{} 306 } 307 308 func (m *AggregatedMetric) GetEncodeNanos() int64 { 309 if m != nil { 310 return m.EncodeNanos 311 } 312 return 0 313 } 314 315 // NB: we intentionally choose to explicitly define the message type as well 316 // as the corresponding payload as opposed to use `oneof` protobuf type here. 317 // This is because the generated `Unmarshal` method of `oneof` types doesn't 318 // permit reusing existing protobuf messages for decoding, thus incurring a 319 // significant performance hit when such message type is used for encoding 320 // and decoding high volume traffic. 321 type MetricWithMetadatas struct { 322 Type MetricWithMetadatas_Type `protobuf:"varint,1,opt,name=type,proto3,enum=metricpb.MetricWithMetadatas_Type" json:"type,omitempty"` 323 CounterWithMetadatas *CounterWithMetadatas `protobuf:"bytes,2,opt,name=counter_with_metadatas,json=counterWithMetadatas" json:"counter_with_metadatas,omitempty"` 324 BatchTimerWithMetadatas *BatchTimerWithMetadatas `protobuf:"bytes,3,opt,name=batch_timer_with_metadatas,json=batchTimerWithMetadatas" json:"batch_timer_with_metadatas,omitempty"` 325 GaugeWithMetadatas *GaugeWithMetadatas `protobuf:"bytes,4,opt,name=gauge_with_metadatas,json=gaugeWithMetadatas" json:"gauge_with_metadatas,omitempty"` 326 ForwardedMetricWithMetadata *ForwardedMetricWithMetadata `protobuf:"bytes,5,opt,name=forwarded_metric_with_metadata,json=forwardedMetricWithMetadata" json:"forwarded_metric_with_metadata,omitempty"` 327 TimedMetricWithMetadata *TimedMetricWithMetadata `protobuf:"bytes,6,opt,name=timed_metric_with_metadata,json=timedMetricWithMetadata" json:"timed_metric_with_metadata,omitempty"` 328 TimedMetricWithMetadatas *TimedMetricWithMetadatas `protobuf:"bytes,7,opt,name=timed_metric_with_metadatas,json=timedMetricWithMetadatas" json:"timed_metric_with_metadatas,omitempty"` 329 TimedMetricWithStoragePolicy *TimedMetricWithStoragePolicy `protobuf:"bytes,8,opt,name=timed_metric_with_storage_policy,json=timedMetricWithStoragePolicy" json:"timed_metric_with_storage_policy,omitempty"` 330 } 331 332 func (m *MetricWithMetadatas) Reset() { *m = MetricWithMetadatas{} } 333 func (m *MetricWithMetadatas) String() string { return proto.CompactTextString(m) } 334 func (*MetricWithMetadatas) ProtoMessage() {} 335 func (*MetricWithMetadatas) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{8} } 336 337 func (m *MetricWithMetadatas) GetType() MetricWithMetadatas_Type { 338 if m != nil { 339 return m.Type 340 } 341 return MetricWithMetadatas_UNKNOWN 342 } 343 344 func (m *MetricWithMetadatas) GetCounterWithMetadatas() *CounterWithMetadatas { 345 if m != nil { 346 return m.CounterWithMetadatas 347 } 348 return nil 349 } 350 351 func (m *MetricWithMetadatas) GetBatchTimerWithMetadatas() *BatchTimerWithMetadatas { 352 if m != nil { 353 return m.BatchTimerWithMetadatas 354 } 355 return nil 356 } 357 358 func (m *MetricWithMetadatas) GetGaugeWithMetadatas() *GaugeWithMetadatas { 359 if m != nil { 360 return m.GaugeWithMetadatas 361 } 362 return nil 363 } 364 365 func (m *MetricWithMetadatas) GetForwardedMetricWithMetadata() *ForwardedMetricWithMetadata { 366 if m != nil { 367 return m.ForwardedMetricWithMetadata 368 } 369 return nil 370 } 371 372 func (m *MetricWithMetadatas) GetTimedMetricWithMetadata() *TimedMetricWithMetadata { 373 if m != nil { 374 return m.TimedMetricWithMetadata 375 } 376 return nil 377 } 378 379 func (m *MetricWithMetadatas) GetTimedMetricWithMetadatas() *TimedMetricWithMetadatas { 380 if m != nil { 381 return m.TimedMetricWithMetadatas 382 } 383 return nil 384 } 385 386 func (m *MetricWithMetadatas) GetTimedMetricWithStoragePolicy() *TimedMetricWithStoragePolicy { 387 if m != nil { 388 return m.TimedMetricWithStoragePolicy 389 } 390 return nil 391 } 392 393 func init() { 394 proto.RegisterType((*CounterWithMetadatas)(nil), "metricpb.CounterWithMetadatas") 395 proto.RegisterType((*BatchTimerWithMetadatas)(nil), "metricpb.BatchTimerWithMetadatas") 396 proto.RegisterType((*GaugeWithMetadatas)(nil), "metricpb.GaugeWithMetadatas") 397 proto.RegisterType((*ForwardedMetricWithMetadata)(nil), "metricpb.ForwardedMetricWithMetadata") 398 proto.RegisterType((*TimedMetricWithMetadata)(nil), "metricpb.TimedMetricWithMetadata") 399 proto.RegisterType((*TimedMetricWithMetadatas)(nil), "metricpb.TimedMetricWithMetadatas") 400 proto.RegisterType((*TimedMetricWithStoragePolicy)(nil), "metricpb.TimedMetricWithStoragePolicy") 401 proto.RegisterType((*AggregatedMetric)(nil), "metricpb.AggregatedMetric") 402 proto.RegisterType((*MetricWithMetadatas)(nil), "metricpb.MetricWithMetadatas") 403 proto.RegisterEnum("metricpb.MetricWithMetadatas_Type", MetricWithMetadatas_Type_name, MetricWithMetadatas_Type_value) 404 } 405 func (m *CounterWithMetadatas) Marshal() (dAtA []byte, err error) { 406 size := m.Size() 407 dAtA = make([]byte, size) 408 n, err := m.MarshalTo(dAtA) 409 if err != nil { 410 return nil, err 411 } 412 return dAtA[:n], nil 413 } 414 415 func (m *CounterWithMetadatas) MarshalTo(dAtA []byte) (int, error) { 416 var i int 417 _ = i 418 var l int 419 _ = l 420 dAtA[i] = 0xa 421 i++ 422 i = encodeVarintComposite(dAtA, i, uint64(m.Counter.Size())) 423 n1, err := m.Counter.MarshalTo(dAtA[i:]) 424 if err != nil { 425 return 0, err 426 } 427 i += n1 428 dAtA[i] = 0x12 429 i++ 430 i = encodeVarintComposite(dAtA, i, uint64(m.Metadatas.Size())) 431 n2, err := m.Metadatas.MarshalTo(dAtA[i:]) 432 if err != nil { 433 return 0, err 434 } 435 i += n2 436 return i, nil 437 } 438 439 func (m *BatchTimerWithMetadatas) Marshal() (dAtA []byte, err error) { 440 size := m.Size() 441 dAtA = make([]byte, size) 442 n, err := m.MarshalTo(dAtA) 443 if err != nil { 444 return nil, err 445 } 446 return dAtA[:n], nil 447 } 448 449 func (m *BatchTimerWithMetadatas) MarshalTo(dAtA []byte) (int, error) { 450 var i int 451 _ = i 452 var l int 453 _ = l 454 dAtA[i] = 0xa 455 i++ 456 i = encodeVarintComposite(dAtA, i, uint64(m.BatchTimer.Size())) 457 n3, err := m.BatchTimer.MarshalTo(dAtA[i:]) 458 if err != nil { 459 return 0, err 460 } 461 i += n3 462 dAtA[i] = 0x12 463 i++ 464 i = encodeVarintComposite(dAtA, i, uint64(m.Metadatas.Size())) 465 n4, err := m.Metadatas.MarshalTo(dAtA[i:]) 466 if err != nil { 467 return 0, err 468 } 469 i += n4 470 return i, nil 471 } 472 473 func (m *GaugeWithMetadatas) Marshal() (dAtA []byte, err error) { 474 size := m.Size() 475 dAtA = make([]byte, size) 476 n, err := m.MarshalTo(dAtA) 477 if err != nil { 478 return nil, err 479 } 480 return dAtA[:n], nil 481 } 482 483 func (m *GaugeWithMetadatas) MarshalTo(dAtA []byte) (int, error) { 484 var i int 485 _ = i 486 var l int 487 _ = l 488 dAtA[i] = 0xa 489 i++ 490 i = encodeVarintComposite(dAtA, i, uint64(m.Gauge.Size())) 491 n5, err := m.Gauge.MarshalTo(dAtA[i:]) 492 if err != nil { 493 return 0, err 494 } 495 i += n5 496 dAtA[i] = 0x12 497 i++ 498 i = encodeVarintComposite(dAtA, i, uint64(m.Metadatas.Size())) 499 n6, err := m.Metadatas.MarshalTo(dAtA[i:]) 500 if err != nil { 501 return 0, err 502 } 503 i += n6 504 return i, nil 505 } 506 507 func (m *ForwardedMetricWithMetadata) Marshal() (dAtA []byte, err error) { 508 size := m.Size() 509 dAtA = make([]byte, size) 510 n, err := m.MarshalTo(dAtA) 511 if err != nil { 512 return nil, err 513 } 514 return dAtA[:n], nil 515 } 516 517 func (m *ForwardedMetricWithMetadata) MarshalTo(dAtA []byte) (int, error) { 518 var i int 519 _ = i 520 var l int 521 _ = l 522 dAtA[i] = 0xa 523 i++ 524 i = encodeVarintComposite(dAtA, i, uint64(m.Metric.Size())) 525 n7, err := m.Metric.MarshalTo(dAtA[i:]) 526 if err != nil { 527 return 0, err 528 } 529 i += n7 530 dAtA[i] = 0x12 531 i++ 532 i = encodeVarintComposite(dAtA, i, uint64(m.Metadata.Size())) 533 n8, err := m.Metadata.MarshalTo(dAtA[i:]) 534 if err != nil { 535 return 0, err 536 } 537 i += n8 538 return i, nil 539 } 540 541 func (m *TimedMetricWithMetadata) Marshal() (dAtA []byte, err error) { 542 size := m.Size() 543 dAtA = make([]byte, size) 544 n, err := m.MarshalTo(dAtA) 545 if err != nil { 546 return nil, err 547 } 548 return dAtA[:n], nil 549 } 550 551 func (m *TimedMetricWithMetadata) MarshalTo(dAtA []byte) (int, error) { 552 var i int 553 _ = i 554 var l int 555 _ = l 556 dAtA[i] = 0xa 557 i++ 558 i = encodeVarintComposite(dAtA, i, uint64(m.Metric.Size())) 559 n9, err := m.Metric.MarshalTo(dAtA[i:]) 560 if err != nil { 561 return 0, err 562 } 563 i += n9 564 dAtA[i] = 0x12 565 i++ 566 i = encodeVarintComposite(dAtA, i, uint64(m.Metadata.Size())) 567 n10, err := m.Metadata.MarshalTo(dAtA[i:]) 568 if err != nil { 569 return 0, err 570 } 571 i += n10 572 return i, nil 573 } 574 575 func (m *TimedMetricWithMetadatas) Marshal() (dAtA []byte, err error) { 576 size := m.Size() 577 dAtA = make([]byte, size) 578 n, err := m.MarshalTo(dAtA) 579 if err != nil { 580 return nil, err 581 } 582 return dAtA[:n], nil 583 } 584 585 func (m *TimedMetricWithMetadatas) MarshalTo(dAtA []byte) (int, error) { 586 var i int 587 _ = i 588 var l int 589 _ = l 590 dAtA[i] = 0xa 591 i++ 592 i = encodeVarintComposite(dAtA, i, uint64(m.Metric.Size())) 593 n11, err := m.Metric.MarshalTo(dAtA[i:]) 594 if err != nil { 595 return 0, err 596 } 597 i += n11 598 dAtA[i] = 0x12 599 i++ 600 i = encodeVarintComposite(dAtA, i, uint64(m.Metadatas.Size())) 601 n12, err := m.Metadatas.MarshalTo(dAtA[i:]) 602 if err != nil { 603 return 0, err 604 } 605 i += n12 606 return i, nil 607 } 608 609 func (m *TimedMetricWithStoragePolicy) Marshal() (dAtA []byte, err error) { 610 size := m.Size() 611 dAtA = make([]byte, size) 612 n, err := m.MarshalTo(dAtA) 613 if err != nil { 614 return nil, err 615 } 616 return dAtA[:n], nil 617 } 618 619 func (m *TimedMetricWithStoragePolicy) MarshalTo(dAtA []byte) (int, error) { 620 var i int 621 _ = i 622 var l int 623 _ = l 624 dAtA[i] = 0xa 625 i++ 626 i = encodeVarintComposite(dAtA, i, uint64(m.TimedMetric.Size())) 627 n13, err := m.TimedMetric.MarshalTo(dAtA[i:]) 628 if err != nil { 629 return 0, err 630 } 631 i += n13 632 dAtA[i] = 0x12 633 i++ 634 i = encodeVarintComposite(dAtA, i, uint64(m.StoragePolicy.Size())) 635 n14, err := m.StoragePolicy.MarshalTo(dAtA[i:]) 636 if err != nil { 637 return 0, err 638 } 639 i += n14 640 return i, nil 641 } 642 643 func (m *AggregatedMetric) Marshal() (dAtA []byte, err error) { 644 size := m.Size() 645 dAtA = make([]byte, size) 646 n, err := m.MarshalTo(dAtA) 647 if err != nil { 648 return nil, err 649 } 650 return dAtA[:n], nil 651 } 652 653 func (m *AggregatedMetric) MarshalTo(dAtA []byte) (int, error) { 654 var i int 655 _ = i 656 var l int 657 _ = l 658 dAtA[i] = 0xa 659 i++ 660 i = encodeVarintComposite(dAtA, i, uint64(m.Metric.Size())) 661 n15, err := m.Metric.MarshalTo(dAtA[i:]) 662 if err != nil { 663 return 0, err 664 } 665 i += n15 666 if m.EncodeNanos != 0 { 667 dAtA[i] = 0x10 668 i++ 669 i = encodeVarintComposite(dAtA, i, uint64(m.EncodeNanos)) 670 } 671 return i, nil 672 } 673 674 func (m *MetricWithMetadatas) Marshal() (dAtA []byte, err error) { 675 size := m.Size() 676 dAtA = make([]byte, size) 677 n, err := m.MarshalTo(dAtA) 678 if err != nil { 679 return nil, err 680 } 681 return dAtA[:n], nil 682 } 683 684 func (m *MetricWithMetadatas) MarshalTo(dAtA []byte) (int, error) { 685 var i int 686 _ = i 687 var l int 688 _ = l 689 if m.Type != 0 { 690 dAtA[i] = 0x8 691 i++ 692 i = encodeVarintComposite(dAtA, i, uint64(m.Type)) 693 } 694 if m.CounterWithMetadatas != nil { 695 dAtA[i] = 0x12 696 i++ 697 i = encodeVarintComposite(dAtA, i, uint64(m.CounterWithMetadatas.Size())) 698 n16, err := m.CounterWithMetadatas.MarshalTo(dAtA[i:]) 699 if err != nil { 700 return 0, err 701 } 702 i += n16 703 } 704 if m.BatchTimerWithMetadatas != nil { 705 dAtA[i] = 0x1a 706 i++ 707 i = encodeVarintComposite(dAtA, i, uint64(m.BatchTimerWithMetadatas.Size())) 708 n17, err := m.BatchTimerWithMetadatas.MarshalTo(dAtA[i:]) 709 if err != nil { 710 return 0, err 711 } 712 i += n17 713 } 714 if m.GaugeWithMetadatas != nil { 715 dAtA[i] = 0x22 716 i++ 717 i = encodeVarintComposite(dAtA, i, uint64(m.GaugeWithMetadatas.Size())) 718 n18, err := m.GaugeWithMetadatas.MarshalTo(dAtA[i:]) 719 if err != nil { 720 return 0, err 721 } 722 i += n18 723 } 724 if m.ForwardedMetricWithMetadata != nil { 725 dAtA[i] = 0x2a 726 i++ 727 i = encodeVarintComposite(dAtA, i, uint64(m.ForwardedMetricWithMetadata.Size())) 728 n19, err := m.ForwardedMetricWithMetadata.MarshalTo(dAtA[i:]) 729 if err != nil { 730 return 0, err 731 } 732 i += n19 733 } 734 if m.TimedMetricWithMetadata != nil { 735 dAtA[i] = 0x32 736 i++ 737 i = encodeVarintComposite(dAtA, i, uint64(m.TimedMetricWithMetadata.Size())) 738 n20, err := m.TimedMetricWithMetadata.MarshalTo(dAtA[i:]) 739 if err != nil { 740 return 0, err 741 } 742 i += n20 743 } 744 if m.TimedMetricWithMetadatas != nil { 745 dAtA[i] = 0x3a 746 i++ 747 i = encodeVarintComposite(dAtA, i, uint64(m.TimedMetricWithMetadatas.Size())) 748 n21, err := m.TimedMetricWithMetadatas.MarshalTo(dAtA[i:]) 749 if err != nil { 750 return 0, err 751 } 752 i += n21 753 } 754 if m.TimedMetricWithStoragePolicy != nil { 755 dAtA[i] = 0x42 756 i++ 757 i = encodeVarintComposite(dAtA, i, uint64(m.TimedMetricWithStoragePolicy.Size())) 758 n22, err := m.TimedMetricWithStoragePolicy.MarshalTo(dAtA[i:]) 759 if err != nil { 760 return 0, err 761 } 762 i += n22 763 } 764 return i, nil 765 } 766 767 func encodeVarintComposite(dAtA []byte, offset int, v uint64) int { 768 for v >= 1<<7 { 769 dAtA[offset] = uint8(v&0x7f | 0x80) 770 v >>= 7 771 offset++ 772 } 773 dAtA[offset] = uint8(v) 774 return offset + 1 775 } 776 func (m *CounterWithMetadatas) Size() (n int) { 777 var l int 778 _ = l 779 l = m.Counter.Size() 780 n += 1 + l + sovComposite(uint64(l)) 781 l = m.Metadatas.Size() 782 n += 1 + l + sovComposite(uint64(l)) 783 return n 784 } 785 786 func (m *BatchTimerWithMetadatas) Size() (n int) { 787 var l int 788 _ = l 789 l = m.BatchTimer.Size() 790 n += 1 + l + sovComposite(uint64(l)) 791 l = m.Metadatas.Size() 792 n += 1 + l + sovComposite(uint64(l)) 793 return n 794 } 795 796 func (m *GaugeWithMetadatas) Size() (n int) { 797 var l int 798 _ = l 799 l = m.Gauge.Size() 800 n += 1 + l + sovComposite(uint64(l)) 801 l = m.Metadatas.Size() 802 n += 1 + l + sovComposite(uint64(l)) 803 return n 804 } 805 806 func (m *ForwardedMetricWithMetadata) Size() (n int) { 807 var l int 808 _ = l 809 l = m.Metric.Size() 810 n += 1 + l + sovComposite(uint64(l)) 811 l = m.Metadata.Size() 812 n += 1 + l + sovComposite(uint64(l)) 813 return n 814 } 815 816 func (m *TimedMetricWithMetadata) Size() (n int) { 817 var l int 818 _ = l 819 l = m.Metric.Size() 820 n += 1 + l + sovComposite(uint64(l)) 821 l = m.Metadata.Size() 822 n += 1 + l + sovComposite(uint64(l)) 823 return n 824 } 825 826 func (m *TimedMetricWithMetadatas) Size() (n int) { 827 var l int 828 _ = l 829 l = m.Metric.Size() 830 n += 1 + l + sovComposite(uint64(l)) 831 l = m.Metadatas.Size() 832 n += 1 + l + sovComposite(uint64(l)) 833 return n 834 } 835 836 func (m *TimedMetricWithStoragePolicy) Size() (n int) { 837 var l int 838 _ = l 839 l = m.TimedMetric.Size() 840 n += 1 + l + sovComposite(uint64(l)) 841 l = m.StoragePolicy.Size() 842 n += 1 + l + sovComposite(uint64(l)) 843 return n 844 } 845 846 func (m *AggregatedMetric) Size() (n int) { 847 var l int 848 _ = l 849 l = m.Metric.Size() 850 n += 1 + l + sovComposite(uint64(l)) 851 if m.EncodeNanos != 0 { 852 n += 1 + sovComposite(uint64(m.EncodeNanos)) 853 } 854 return n 855 } 856 857 func (m *MetricWithMetadatas) Size() (n int) { 858 var l int 859 _ = l 860 if m.Type != 0 { 861 n += 1 + sovComposite(uint64(m.Type)) 862 } 863 if m.CounterWithMetadatas != nil { 864 l = m.CounterWithMetadatas.Size() 865 n += 1 + l + sovComposite(uint64(l)) 866 } 867 if m.BatchTimerWithMetadatas != nil { 868 l = m.BatchTimerWithMetadatas.Size() 869 n += 1 + l + sovComposite(uint64(l)) 870 } 871 if m.GaugeWithMetadatas != nil { 872 l = m.GaugeWithMetadatas.Size() 873 n += 1 + l + sovComposite(uint64(l)) 874 } 875 if m.ForwardedMetricWithMetadata != nil { 876 l = m.ForwardedMetricWithMetadata.Size() 877 n += 1 + l + sovComposite(uint64(l)) 878 } 879 if m.TimedMetricWithMetadata != nil { 880 l = m.TimedMetricWithMetadata.Size() 881 n += 1 + l + sovComposite(uint64(l)) 882 } 883 if m.TimedMetricWithMetadatas != nil { 884 l = m.TimedMetricWithMetadatas.Size() 885 n += 1 + l + sovComposite(uint64(l)) 886 } 887 if m.TimedMetricWithStoragePolicy != nil { 888 l = m.TimedMetricWithStoragePolicy.Size() 889 n += 1 + l + sovComposite(uint64(l)) 890 } 891 return n 892 } 893 894 func sovComposite(x uint64) (n int) { 895 for { 896 n++ 897 x >>= 7 898 if x == 0 { 899 break 900 } 901 } 902 return n 903 } 904 func sozComposite(x uint64) (n int) { 905 return sovComposite(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 906 } 907 func (m *CounterWithMetadatas) Unmarshal(dAtA []byte) error { 908 l := len(dAtA) 909 iNdEx := 0 910 for iNdEx < l { 911 preIndex := iNdEx 912 var wire uint64 913 for shift := uint(0); ; shift += 7 { 914 if shift >= 64 { 915 return ErrIntOverflowComposite 916 } 917 if iNdEx >= l { 918 return io.ErrUnexpectedEOF 919 } 920 b := dAtA[iNdEx] 921 iNdEx++ 922 wire |= (uint64(b) & 0x7F) << shift 923 if b < 0x80 { 924 break 925 } 926 } 927 fieldNum := int32(wire >> 3) 928 wireType := int(wire & 0x7) 929 if wireType == 4 { 930 return fmt.Errorf("proto: CounterWithMetadatas: wiretype end group for non-group") 931 } 932 if fieldNum <= 0 { 933 return fmt.Errorf("proto: CounterWithMetadatas: illegal tag %d (wire type %d)", fieldNum, wire) 934 } 935 switch fieldNum { 936 case 1: 937 if wireType != 2 { 938 return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) 939 } 940 var msglen int 941 for shift := uint(0); ; shift += 7 { 942 if shift >= 64 { 943 return ErrIntOverflowComposite 944 } 945 if iNdEx >= l { 946 return io.ErrUnexpectedEOF 947 } 948 b := dAtA[iNdEx] 949 iNdEx++ 950 msglen |= (int(b) & 0x7F) << shift 951 if b < 0x80 { 952 break 953 } 954 } 955 if msglen < 0 { 956 return ErrInvalidLengthComposite 957 } 958 postIndex := iNdEx + msglen 959 if postIndex > l { 960 return io.ErrUnexpectedEOF 961 } 962 if err := m.Counter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 963 return err 964 } 965 iNdEx = postIndex 966 case 2: 967 if wireType != 2 { 968 return fmt.Errorf("proto: wrong wireType = %d for field Metadatas", wireType) 969 } 970 var msglen int 971 for shift := uint(0); ; shift += 7 { 972 if shift >= 64 { 973 return ErrIntOverflowComposite 974 } 975 if iNdEx >= l { 976 return io.ErrUnexpectedEOF 977 } 978 b := dAtA[iNdEx] 979 iNdEx++ 980 msglen |= (int(b) & 0x7F) << shift 981 if b < 0x80 { 982 break 983 } 984 } 985 if msglen < 0 { 986 return ErrInvalidLengthComposite 987 } 988 postIndex := iNdEx + msglen 989 if postIndex > l { 990 return io.ErrUnexpectedEOF 991 } 992 if err := m.Metadatas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 993 return err 994 } 995 iNdEx = postIndex 996 default: 997 iNdEx = preIndex 998 skippy, err := skipComposite(dAtA[iNdEx:]) 999 if err != nil { 1000 return err 1001 } 1002 if skippy < 0 { 1003 return ErrInvalidLengthComposite 1004 } 1005 if (iNdEx + skippy) > l { 1006 return io.ErrUnexpectedEOF 1007 } 1008 iNdEx += skippy 1009 } 1010 } 1011 1012 if iNdEx > l { 1013 return io.ErrUnexpectedEOF 1014 } 1015 return nil 1016 } 1017 func (m *BatchTimerWithMetadatas) Unmarshal(dAtA []byte) error { 1018 l := len(dAtA) 1019 iNdEx := 0 1020 for iNdEx < l { 1021 preIndex := iNdEx 1022 var wire uint64 1023 for shift := uint(0); ; shift += 7 { 1024 if shift >= 64 { 1025 return ErrIntOverflowComposite 1026 } 1027 if iNdEx >= l { 1028 return io.ErrUnexpectedEOF 1029 } 1030 b := dAtA[iNdEx] 1031 iNdEx++ 1032 wire |= (uint64(b) & 0x7F) << shift 1033 if b < 0x80 { 1034 break 1035 } 1036 } 1037 fieldNum := int32(wire >> 3) 1038 wireType := int(wire & 0x7) 1039 if wireType == 4 { 1040 return fmt.Errorf("proto: BatchTimerWithMetadatas: wiretype end group for non-group") 1041 } 1042 if fieldNum <= 0 { 1043 return fmt.Errorf("proto: BatchTimerWithMetadatas: illegal tag %d (wire type %d)", fieldNum, wire) 1044 } 1045 switch fieldNum { 1046 case 1: 1047 if wireType != 2 { 1048 return fmt.Errorf("proto: wrong wireType = %d for field BatchTimer", wireType) 1049 } 1050 var msglen int 1051 for shift := uint(0); ; shift += 7 { 1052 if shift >= 64 { 1053 return ErrIntOverflowComposite 1054 } 1055 if iNdEx >= l { 1056 return io.ErrUnexpectedEOF 1057 } 1058 b := dAtA[iNdEx] 1059 iNdEx++ 1060 msglen |= (int(b) & 0x7F) << shift 1061 if b < 0x80 { 1062 break 1063 } 1064 } 1065 if msglen < 0 { 1066 return ErrInvalidLengthComposite 1067 } 1068 postIndex := iNdEx + msglen 1069 if postIndex > l { 1070 return io.ErrUnexpectedEOF 1071 } 1072 if err := m.BatchTimer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1073 return err 1074 } 1075 iNdEx = postIndex 1076 case 2: 1077 if wireType != 2 { 1078 return fmt.Errorf("proto: wrong wireType = %d for field Metadatas", wireType) 1079 } 1080 var msglen int 1081 for shift := uint(0); ; shift += 7 { 1082 if shift >= 64 { 1083 return ErrIntOverflowComposite 1084 } 1085 if iNdEx >= l { 1086 return io.ErrUnexpectedEOF 1087 } 1088 b := dAtA[iNdEx] 1089 iNdEx++ 1090 msglen |= (int(b) & 0x7F) << shift 1091 if b < 0x80 { 1092 break 1093 } 1094 } 1095 if msglen < 0 { 1096 return ErrInvalidLengthComposite 1097 } 1098 postIndex := iNdEx + msglen 1099 if postIndex > l { 1100 return io.ErrUnexpectedEOF 1101 } 1102 if err := m.Metadatas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1103 return err 1104 } 1105 iNdEx = postIndex 1106 default: 1107 iNdEx = preIndex 1108 skippy, err := skipComposite(dAtA[iNdEx:]) 1109 if err != nil { 1110 return err 1111 } 1112 if skippy < 0 { 1113 return ErrInvalidLengthComposite 1114 } 1115 if (iNdEx + skippy) > l { 1116 return io.ErrUnexpectedEOF 1117 } 1118 iNdEx += skippy 1119 } 1120 } 1121 1122 if iNdEx > l { 1123 return io.ErrUnexpectedEOF 1124 } 1125 return nil 1126 } 1127 func (m *GaugeWithMetadatas) Unmarshal(dAtA []byte) error { 1128 l := len(dAtA) 1129 iNdEx := 0 1130 for iNdEx < l { 1131 preIndex := iNdEx 1132 var wire uint64 1133 for shift := uint(0); ; shift += 7 { 1134 if shift >= 64 { 1135 return ErrIntOverflowComposite 1136 } 1137 if iNdEx >= l { 1138 return io.ErrUnexpectedEOF 1139 } 1140 b := dAtA[iNdEx] 1141 iNdEx++ 1142 wire |= (uint64(b) & 0x7F) << shift 1143 if b < 0x80 { 1144 break 1145 } 1146 } 1147 fieldNum := int32(wire >> 3) 1148 wireType := int(wire & 0x7) 1149 if wireType == 4 { 1150 return fmt.Errorf("proto: GaugeWithMetadatas: wiretype end group for non-group") 1151 } 1152 if fieldNum <= 0 { 1153 return fmt.Errorf("proto: GaugeWithMetadatas: illegal tag %d (wire type %d)", fieldNum, wire) 1154 } 1155 switch fieldNum { 1156 case 1: 1157 if wireType != 2 { 1158 return fmt.Errorf("proto: wrong wireType = %d for field Gauge", wireType) 1159 } 1160 var msglen int 1161 for shift := uint(0); ; shift += 7 { 1162 if shift >= 64 { 1163 return ErrIntOverflowComposite 1164 } 1165 if iNdEx >= l { 1166 return io.ErrUnexpectedEOF 1167 } 1168 b := dAtA[iNdEx] 1169 iNdEx++ 1170 msglen |= (int(b) & 0x7F) << shift 1171 if b < 0x80 { 1172 break 1173 } 1174 } 1175 if msglen < 0 { 1176 return ErrInvalidLengthComposite 1177 } 1178 postIndex := iNdEx + msglen 1179 if postIndex > l { 1180 return io.ErrUnexpectedEOF 1181 } 1182 if err := m.Gauge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1183 return err 1184 } 1185 iNdEx = postIndex 1186 case 2: 1187 if wireType != 2 { 1188 return fmt.Errorf("proto: wrong wireType = %d for field Metadatas", wireType) 1189 } 1190 var msglen int 1191 for shift := uint(0); ; shift += 7 { 1192 if shift >= 64 { 1193 return ErrIntOverflowComposite 1194 } 1195 if iNdEx >= l { 1196 return io.ErrUnexpectedEOF 1197 } 1198 b := dAtA[iNdEx] 1199 iNdEx++ 1200 msglen |= (int(b) & 0x7F) << shift 1201 if b < 0x80 { 1202 break 1203 } 1204 } 1205 if msglen < 0 { 1206 return ErrInvalidLengthComposite 1207 } 1208 postIndex := iNdEx + msglen 1209 if postIndex > l { 1210 return io.ErrUnexpectedEOF 1211 } 1212 if err := m.Metadatas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1213 return err 1214 } 1215 iNdEx = postIndex 1216 default: 1217 iNdEx = preIndex 1218 skippy, err := skipComposite(dAtA[iNdEx:]) 1219 if err != nil { 1220 return err 1221 } 1222 if skippy < 0 { 1223 return ErrInvalidLengthComposite 1224 } 1225 if (iNdEx + skippy) > l { 1226 return io.ErrUnexpectedEOF 1227 } 1228 iNdEx += skippy 1229 } 1230 } 1231 1232 if iNdEx > l { 1233 return io.ErrUnexpectedEOF 1234 } 1235 return nil 1236 } 1237 func (m *ForwardedMetricWithMetadata) Unmarshal(dAtA []byte) error { 1238 l := len(dAtA) 1239 iNdEx := 0 1240 for iNdEx < l { 1241 preIndex := iNdEx 1242 var wire uint64 1243 for shift := uint(0); ; shift += 7 { 1244 if shift >= 64 { 1245 return ErrIntOverflowComposite 1246 } 1247 if iNdEx >= l { 1248 return io.ErrUnexpectedEOF 1249 } 1250 b := dAtA[iNdEx] 1251 iNdEx++ 1252 wire |= (uint64(b) & 0x7F) << shift 1253 if b < 0x80 { 1254 break 1255 } 1256 } 1257 fieldNum := int32(wire >> 3) 1258 wireType := int(wire & 0x7) 1259 if wireType == 4 { 1260 return fmt.Errorf("proto: ForwardedMetricWithMetadata: wiretype end group for non-group") 1261 } 1262 if fieldNum <= 0 { 1263 return fmt.Errorf("proto: ForwardedMetricWithMetadata: illegal tag %d (wire type %d)", fieldNum, wire) 1264 } 1265 switch fieldNum { 1266 case 1: 1267 if wireType != 2 { 1268 return fmt.Errorf("proto: wrong wireType = %d for field Metric", wireType) 1269 } 1270 var msglen int 1271 for shift := uint(0); ; shift += 7 { 1272 if shift >= 64 { 1273 return ErrIntOverflowComposite 1274 } 1275 if iNdEx >= l { 1276 return io.ErrUnexpectedEOF 1277 } 1278 b := dAtA[iNdEx] 1279 iNdEx++ 1280 msglen |= (int(b) & 0x7F) << shift 1281 if b < 0x80 { 1282 break 1283 } 1284 } 1285 if msglen < 0 { 1286 return ErrInvalidLengthComposite 1287 } 1288 postIndex := iNdEx + msglen 1289 if postIndex > l { 1290 return io.ErrUnexpectedEOF 1291 } 1292 if err := m.Metric.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1293 return err 1294 } 1295 iNdEx = postIndex 1296 case 2: 1297 if wireType != 2 { 1298 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 1299 } 1300 var msglen int 1301 for shift := uint(0); ; shift += 7 { 1302 if shift >= 64 { 1303 return ErrIntOverflowComposite 1304 } 1305 if iNdEx >= l { 1306 return io.ErrUnexpectedEOF 1307 } 1308 b := dAtA[iNdEx] 1309 iNdEx++ 1310 msglen |= (int(b) & 0x7F) << shift 1311 if b < 0x80 { 1312 break 1313 } 1314 } 1315 if msglen < 0 { 1316 return ErrInvalidLengthComposite 1317 } 1318 postIndex := iNdEx + msglen 1319 if postIndex > l { 1320 return io.ErrUnexpectedEOF 1321 } 1322 if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1323 return err 1324 } 1325 iNdEx = postIndex 1326 default: 1327 iNdEx = preIndex 1328 skippy, err := skipComposite(dAtA[iNdEx:]) 1329 if err != nil { 1330 return err 1331 } 1332 if skippy < 0 { 1333 return ErrInvalidLengthComposite 1334 } 1335 if (iNdEx + skippy) > l { 1336 return io.ErrUnexpectedEOF 1337 } 1338 iNdEx += skippy 1339 } 1340 } 1341 1342 if iNdEx > l { 1343 return io.ErrUnexpectedEOF 1344 } 1345 return nil 1346 } 1347 func (m *TimedMetricWithMetadata) Unmarshal(dAtA []byte) error { 1348 l := len(dAtA) 1349 iNdEx := 0 1350 for iNdEx < l { 1351 preIndex := iNdEx 1352 var wire uint64 1353 for shift := uint(0); ; shift += 7 { 1354 if shift >= 64 { 1355 return ErrIntOverflowComposite 1356 } 1357 if iNdEx >= l { 1358 return io.ErrUnexpectedEOF 1359 } 1360 b := dAtA[iNdEx] 1361 iNdEx++ 1362 wire |= (uint64(b) & 0x7F) << shift 1363 if b < 0x80 { 1364 break 1365 } 1366 } 1367 fieldNum := int32(wire >> 3) 1368 wireType := int(wire & 0x7) 1369 if wireType == 4 { 1370 return fmt.Errorf("proto: TimedMetricWithMetadata: wiretype end group for non-group") 1371 } 1372 if fieldNum <= 0 { 1373 return fmt.Errorf("proto: TimedMetricWithMetadata: illegal tag %d (wire type %d)", fieldNum, wire) 1374 } 1375 switch fieldNum { 1376 case 1: 1377 if wireType != 2 { 1378 return fmt.Errorf("proto: wrong wireType = %d for field Metric", wireType) 1379 } 1380 var msglen int 1381 for shift := uint(0); ; shift += 7 { 1382 if shift >= 64 { 1383 return ErrIntOverflowComposite 1384 } 1385 if iNdEx >= l { 1386 return io.ErrUnexpectedEOF 1387 } 1388 b := dAtA[iNdEx] 1389 iNdEx++ 1390 msglen |= (int(b) & 0x7F) << shift 1391 if b < 0x80 { 1392 break 1393 } 1394 } 1395 if msglen < 0 { 1396 return ErrInvalidLengthComposite 1397 } 1398 postIndex := iNdEx + msglen 1399 if postIndex > l { 1400 return io.ErrUnexpectedEOF 1401 } 1402 if err := m.Metric.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1403 return err 1404 } 1405 iNdEx = postIndex 1406 case 2: 1407 if wireType != 2 { 1408 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 1409 } 1410 var msglen int 1411 for shift := uint(0); ; shift += 7 { 1412 if shift >= 64 { 1413 return ErrIntOverflowComposite 1414 } 1415 if iNdEx >= l { 1416 return io.ErrUnexpectedEOF 1417 } 1418 b := dAtA[iNdEx] 1419 iNdEx++ 1420 msglen |= (int(b) & 0x7F) << shift 1421 if b < 0x80 { 1422 break 1423 } 1424 } 1425 if msglen < 0 { 1426 return ErrInvalidLengthComposite 1427 } 1428 postIndex := iNdEx + msglen 1429 if postIndex > l { 1430 return io.ErrUnexpectedEOF 1431 } 1432 if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1433 return err 1434 } 1435 iNdEx = postIndex 1436 default: 1437 iNdEx = preIndex 1438 skippy, err := skipComposite(dAtA[iNdEx:]) 1439 if err != nil { 1440 return err 1441 } 1442 if skippy < 0 { 1443 return ErrInvalidLengthComposite 1444 } 1445 if (iNdEx + skippy) > l { 1446 return io.ErrUnexpectedEOF 1447 } 1448 iNdEx += skippy 1449 } 1450 } 1451 1452 if iNdEx > l { 1453 return io.ErrUnexpectedEOF 1454 } 1455 return nil 1456 } 1457 func (m *TimedMetricWithMetadatas) Unmarshal(dAtA []byte) error { 1458 l := len(dAtA) 1459 iNdEx := 0 1460 for iNdEx < l { 1461 preIndex := iNdEx 1462 var wire uint64 1463 for shift := uint(0); ; shift += 7 { 1464 if shift >= 64 { 1465 return ErrIntOverflowComposite 1466 } 1467 if iNdEx >= l { 1468 return io.ErrUnexpectedEOF 1469 } 1470 b := dAtA[iNdEx] 1471 iNdEx++ 1472 wire |= (uint64(b) & 0x7F) << shift 1473 if b < 0x80 { 1474 break 1475 } 1476 } 1477 fieldNum := int32(wire >> 3) 1478 wireType := int(wire & 0x7) 1479 if wireType == 4 { 1480 return fmt.Errorf("proto: TimedMetricWithMetadatas: wiretype end group for non-group") 1481 } 1482 if fieldNum <= 0 { 1483 return fmt.Errorf("proto: TimedMetricWithMetadatas: illegal tag %d (wire type %d)", fieldNum, wire) 1484 } 1485 switch fieldNum { 1486 case 1: 1487 if wireType != 2 { 1488 return fmt.Errorf("proto: wrong wireType = %d for field Metric", wireType) 1489 } 1490 var msglen int 1491 for shift := uint(0); ; shift += 7 { 1492 if shift >= 64 { 1493 return ErrIntOverflowComposite 1494 } 1495 if iNdEx >= l { 1496 return io.ErrUnexpectedEOF 1497 } 1498 b := dAtA[iNdEx] 1499 iNdEx++ 1500 msglen |= (int(b) & 0x7F) << shift 1501 if b < 0x80 { 1502 break 1503 } 1504 } 1505 if msglen < 0 { 1506 return ErrInvalidLengthComposite 1507 } 1508 postIndex := iNdEx + msglen 1509 if postIndex > l { 1510 return io.ErrUnexpectedEOF 1511 } 1512 if err := m.Metric.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1513 return err 1514 } 1515 iNdEx = postIndex 1516 case 2: 1517 if wireType != 2 { 1518 return fmt.Errorf("proto: wrong wireType = %d for field Metadatas", wireType) 1519 } 1520 var msglen int 1521 for shift := uint(0); ; shift += 7 { 1522 if shift >= 64 { 1523 return ErrIntOverflowComposite 1524 } 1525 if iNdEx >= l { 1526 return io.ErrUnexpectedEOF 1527 } 1528 b := dAtA[iNdEx] 1529 iNdEx++ 1530 msglen |= (int(b) & 0x7F) << shift 1531 if b < 0x80 { 1532 break 1533 } 1534 } 1535 if msglen < 0 { 1536 return ErrInvalidLengthComposite 1537 } 1538 postIndex := iNdEx + msglen 1539 if postIndex > l { 1540 return io.ErrUnexpectedEOF 1541 } 1542 if err := m.Metadatas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1543 return err 1544 } 1545 iNdEx = postIndex 1546 default: 1547 iNdEx = preIndex 1548 skippy, err := skipComposite(dAtA[iNdEx:]) 1549 if err != nil { 1550 return err 1551 } 1552 if skippy < 0 { 1553 return ErrInvalidLengthComposite 1554 } 1555 if (iNdEx + skippy) > l { 1556 return io.ErrUnexpectedEOF 1557 } 1558 iNdEx += skippy 1559 } 1560 } 1561 1562 if iNdEx > l { 1563 return io.ErrUnexpectedEOF 1564 } 1565 return nil 1566 } 1567 func (m *TimedMetricWithStoragePolicy) Unmarshal(dAtA []byte) error { 1568 l := len(dAtA) 1569 iNdEx := 0 1570 for iNdEx < l { 1571 preIndex := iNdEx 1572 var wire uint64 1573 for shift := uint(0); ; shift += 7 { 1574 if shift >= 64 { 1575 return ErrIntOverflowComposite 1576 } 1577 if iNdEx >= l { 1578 return io.ErrUnexpectedEOF 1579 } 1580 b := dAtA[iNdEx] 1581 iNdEx++ 1582 wire |= (uint64(b) & 0x7F) << shift 1583 if b < 0x80 { 1584 break 1585 } 1586 } 1587 fieldNum := int32(wire >> 3) 1588 wireType := int(wire & 0x7) 1589 if wireType == 4 { 1590 return fmt.Errorf("proto: TimedMetricWithStoragePolicy: wiretype end group for non-group") 1591 } 1592 if fieldNum <= 0 { 1593 return fmt.Errorf("proto: TimedMetricWithStoragePolicy: illegal tag %d (wire type %d)", fieldNum, wire) 1594 } 1595 switch fieldNum { 1596 case 1: 1597 if wireType != 2 { 1598 return fmt.Errorf("proto: wrong wireType = %d for field TimedMetric", wireType) 1599 } 1600 var msglen int 1601 for shift := uint(0); ; shift += 7 { 1602 if shift >= 64 { 1603 return ErrIntOverflowComposite 1604 } 1605 if iNdEx >= l { 1606 return io.ErrUnexpectedEOF 1607 } 1608 b := dAtA[iNdEx] 1609 iNdEx++ 1610 msglen |= (int(b) & 0x7F) << shift 1611 if b < 0x80 { 1612 break 1613 } 1614 } 1615 if msglen < 0 { 1616 return ErrInvalidLengthComposite 1617 } 1618 postIndex := iNdEx + msglen 1619 if postIndex > l { 1620 return io.ErrUnexpectedEOF 1621 } 1622 if err := m.TimedMetric.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1623 return err 1624 } 1625 iNdEx = postIndex 1626 case 2: 1627 if wireType != 2 { 1628 return fmt.Errorf("proto: wrong wireType = %d for field StoragePolicy", wireType) 1629 } 1630 var msglen int 1631 for shift := uint(0); ; shift += 7 { 1632 if shift >= 64 { 1633 return ErrIntOverflowComposite 1634 } 1635 if iNdEx >= l { 1636 return io.ErrUnexpectedEOF 1637 } 1638 b := dAtA[iNdEx] 1639 iNdEx++ 1640 msglen |= (int(b) & 0x7F) << shift 1641 if b < 0x80 { 1642 break 1643 } 1644 } 1645 if msglen < 0 { 1646 return ErrInvalidLengthComposite 1647 } 1648 postIndex := iNdEx + msglen 1649 if postIndex > l { 1650 return io.ErrUnexpectedEOF 1651 } 1652 if err := m.StoragePolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1653 return err 1654 } 1655 iNdEx = postIndex 1656 default: 1657 iNdEx = preIndex 1658 skippy, err := skipComposite(dAtA[iNdEx:]) 1659 if err != nil { 1660 return err 1661 } 1662 if skippy < 0 { 1663 return ErrInvalidLengthComposite 1664 } 1665 if (iNdEx + skippy) > l { 1666 return io.ErrUnexpectedEOF 1667 } 1668 iNdEx += skippy 1669 } 1670 } 1671 1672 if iNdEx > l { 1673 return io.ErrUnexpectedEOF 1674 } 1675 return nil 1676 } 1677 func (m *AggregatedMetric) Unmarshal(dAtA []byte) error { 1678 l := len(dAtA) 1679 iNdEx := 0 1680 for iNdEx < l { 1681 preIndex := iNdEx 1682 var wire uint64 1683 for shift := uint(0); ; shift += 7 { 1684 if shift >= 64 { 1685 return ErrIntOverflowComposite 1686 } 1687 if iNdEx >= l { 1688 return io.ErrUnexpectedEOF 1689 } 1690 b := dAtA[iNdEx] 1691 iNdEx++ 1692 wire |= (uint64(b) & 0x7F) << shift 1693 if b < 0x80 { 1694 break 1695 } 1696 } 1697 fieldNum := int32(wire >> 3) 1698 wireType := int(wire & 0x7) 1699 if wireType == 4 { 1700 return fmt.Errorf("proto: AggregatedMetric: wiretype end group for non-group") 1701 } 1702 if fieldNum <= 0 { 1703 return fmt.Errorf("proto: AggregatedMetric: illegal tag %d (wire type %d)", fieldNum, wire) 1704 } 1705 switch fieldNum { 1706 case 1: 1707 if wireType != 2 { 1708 return fmt.Errorf("proto: wrong wireType = %d for field Metric", wireType) 1709 } 1710 var msglen int 1711 for shift := uint(0); ; shift += 7 { 1712 if shift >= 64 { 1713 return ErrIntOverflowComposite 1714 } 1715 if iNdEx >= l { 1716 return io.ErrUnexpectedEOF 1717 } 1718 b := dAtA[iNdEx] 1719 iNdEx++ 1720 msglen |= (int(b) & 0x7F) << shift 1721 if b < 0x80 { 1722 break 1723 } 1724 } 1725 if msglen < 0 { 1726 return ErrInvalidLengthComposite 1727 } 1728 postIndex := iNdEx + msglen 1729 if postIndex > l { 1730 return io.ErrUnexpectedEOF 1731 } 1732 if err := m.Metric.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1733 return err 1734 } 1735 iNdEx = postIndex 1736 case 2: 1737 if wireType != 0 { 1738 return fmt.Errorf("proto: wrong wireType = %d for field EncodeNanos", wireType) 1739 } 1740 m.EncodeNanos = 0 1741 for shift := uint(0); ; shift += 7 { 1742 if shift >= 64 { 1743 return ErrIntOverflowComposite 1744 } 1745 if iNdEx >= l { 1746 return io.ErrUnexpectedEOF 1747 } 1748 b := dAtA[iNdEx] 1749 iNdEx++ 1750 m.EncodeNanos |= (int64(b) & 0x7F) << shift 1751 if b < 0x80 { 1752 break 1753 } 1754 } 1755 default: 1756 iNdEx = preIndex 1757 skippy, err := skipComposite(dAtA[iNdEx:]) 1758 if err != nil { 1759 return err 1760 } 1761 if skippy < 0 { 1762 return ErrInvalidLengthComposite 1763 } 1764 if (iNdEx + skippy) > l { 1765 return io.ErrUnexpectedEOF 1766 } 1767 iNdEx += skippy 1768 } 1769 } 1770 1771 if iNdEx > l { 1772 return io.ErrUnexpectedEOF 1773 } 1774 return nil 1775 } 1776 func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { 1777 l := len(dAtA) 1778 iNdEx := 0 1779 for iNdEx < l { 1780 preIndex := iNdEx 1781 var wire uint64 1782 for shift := uint(0); ; shift += 7 { 1783 if shift >= 64 { 1784 return ErrIntOverflowComposite 1785 } 1786 if iNdEx >= l { 1787 return io.ErrUnexpectedEOF 1788 } 1789 b := dAtA[iNdEx] 1790 iNdEx++ 1791 wire |= (uint64(b) & 0x7F) << shift 1792 if b < 0x80 { 1793 break 1794 } 1795 } 1796 fieldNum := int32(wire >> 3) 1797 wireType := int(wire & 0x7) 1798 if wireType == 4 { 1799 return fmt.Errorf("proto: MetricWithMetadatas: wiretype end group for non-group") 1800 } 1801 if fieldNum <= 0 { 1802 return fmt.Errorf("proto: MetricWithMetadatas: illegal tag %d (wire type %d)", fieldNum, wire) 1803 } 1804 switch fieldNum { 1805 case 1: 1806 if wireType != 0 { 1807 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 1808 } 1809 m.Type = 0 1810 for shift := uint(0); ; shift += 7 { 1811 if shift >= 64 { 1812 return ErrIntOverflowComposite 1813 } 1814 if iNdEx >= l { 1815 return io.ErrUnexpectedEOF 1816 } 1817 b := dAtA[iNdEx] 1818 iNdEx++ 1819 m.Type |= (MetricWithMetadatas_Type(b) & 0x7F) << shift 1820 if b < 0x80 { 1821 break 1822 } 1823 } 1824 case 2: 1825 if wireType != 2 { 1826 return fmt.Errorf("proto: wrong wireType = %d for field CounterWithMetadatas", wireType) 1827 } 1828 var msglen int 1829 for shift := uint(0); ; shift += 7 { 1830 if shift >= 64 { 1831 return ErrIntOverflowComposite 1832 } 1833 if iNdEx >= l { 1834 return io.ErrUnexpectedEOF 1835 } 1836 b := dAtA[iNdEx] 1837 iNdEx++ 1838 msglen |= (int(b) & 0x7F) << shift 1839 if b < 0x80 { 1840 break 1841 } 1842 } 1843 if msglen < 0 { 1844 return ErrInvalidLengthComposite 1845 } 1846 postIndex := iNdEx + msglen 1847 if postIndex > l { 1848 return io.ErrUnexpectedEOF 1849 } 1850 if m.CounterWithMetadatas == nil { 1851 m.CounterWithMetadatas = &CounterWithMetadatas{} 1852 } 1853 if err := m.CounterWithMetadatas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1854 return err 1855 } 1856 iNdEx = postIndex 1857 case 3: 1858 if wireType != 2 { 1859 return fmt.Errorf("proto: wrong wireType = %d for field BatchTimerWithMetadatas", wireType) 1860 } 1861 var msglen int 1862 for shift := uint(0); ; shift += 7 { 1863 if shift >= 64 { 1864 return ErrIntOverflowComposite 1865 } 1866 if iNdEx >= l { 1867 return io.ErrUnexpectedEOF 1868 } 1869 b := dAtA[iNdEx] 1870 iNdEx++ 1871 msglen |= (int(b) & 0x7F) << shift 1872 if b < 0x80 { 1873 break 1874 } 1875 } 1876 if msglen < 0 { 1877 return ErrInvalidLengthComposite 1878 } 1879 postIndex := iNdEx + msglen 1880 if postIndex > l { 1881 return io.ErrUnexpectedEOF 1882 } 1883 if m.BatchTimerWithMetadatas == nil { 1884 m.BatchTimerWithMetadatas = &BatchTimerWithMetadatas{} 1885 } 1886 if err := m.BatchTimerWithMetadatas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1887 return err 1888 } 1889 iNdEx = postIndex 1890 case 4: 1891 if wireType != 2 { 1892 return fmt.Errorf("proto: wrong wireType = %d for field GaugeWithMetadatas", wireType) 1893 } 1894 var msglen int 1895 for shift := uint(0); ; shift += 7 { 1896 if shift >= 64 { 1897 return ErrIntOverflowComposite 1898 } 1899 if iNdEx >= l { 1900 return io.ErrUnexpectedEOF 1901 } 1902 b := dAtA[iNdEx] 1903 iNdEx++ 1904 msglen |= (int(b) & 0x7F) << shift 1905 if b < 0x80 { 1906 break 1907 } 1908 } 1909 if msglen < 0 { 1910 return ErrInvalidLengthComposite 1911 } 1912 postIndex := iNdEx + msglen 1913 if postIndex > l { 1914 return io.ErrUnexpectedEOF 1915 } 1916 if m.GaugeWithMetadatas == nil { 1917 m.GaugeWithMetadatas = &GaugeWithMetadatas{} 1918 } 1919 if err := m.GaugeWithMetadatas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1920 return err 1921 } 1922 iNdEx = postIndex 1923 case 5: 1924 if wireType != 2 { 1925 return fmt.Errorf("proto: wrong wireType = %d for field ForwardedMetricWithMetadata", wireType) 1926 } 1927 var msglen int 1928 for shift := uint(0); ; shift += 7 { 1929 if shift >= 64 { 1930 return ErrIntOverflowComposite 1931 } 1932 if iNdEx >= l { 1933 return io.ErrUnexpectedEOF 1934 } 1935 b := dAtA[iNdEx] 1936 iNdEx++ 1937 msglen |= (int(b) & 0x7F) << shift 1938 if b < 0x80 { 1939 break 1940 } 1941 } 1942 if msglen < 0 { 1943 return ErrInvalidLengthComposite 1944 } 1945 postIndex := iNdEx + msglen 1946 if postIndex > l { 1947 return io.ErrUnexpectedEOF 1948 } 1949 if m.ForwardedMetricWithMetadata == nil { 1950 m.ForwardedMetricWithMetadata = &ForwardedMetricWithMetadata{} 1951 } 1952 if err := m.ForwardedMetricWithMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1953 return err 1954 } 1955 iNdEx = postIndex 1956 case 6: 1957 if wireType != 2 { 1958 return fmt.Errorf("proto: wrong wireType = %d for field TimedMetricWithMetadata", wireType) 1959 } 1960 var msglen int 1961 for shift := uint(0); ; shift += 7 { 1962 if shift >= 64 { 1963 return ErrIntOverflowComposite 1964 } 1965 if iNdEx >= l { 1966 return io.ErrUnexpectedEOF 1967 } 1968 b := dAtA[iNdEx] 1969 iNdEx++ 1970 msglen |= (int(b) & 0x7F) << shift 1971 if b < 0x80 { 1972 break 1973 } 1974 } 1975 if msglen < 0 { 1976 return ErrInvalidLengthComposite 1977 } 1978 postIndex := iNdEx + msglen 1979 if postIndex > l { 1980 return io.ErrUnexpectedEOF 1981 } 1982 if m.TimedMetricWithMetadata == nil { 1983 m.TimedMetricWithMetadata = &TimedMetricWithMetadata{} 1984 } 1985 if err := m.TimedMetricWithMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1986 return err 1987 } 1988 iNdEx = postIndex 1989 case 7: 1990 if wireType != 2 { 1991 return fmt.Errorf("proto: wrong wireType = %d for field TimedMetricWithMetadatas", wireType) 1992 } 1993 var msglen int 1994 for shift := uint(0); ; shift += 7 { 1995 if shift >= 64 { 1996 return ErrIntOverflowComposite 1997 } 1998 if iNdEx >= l { 1999 return io.ErrUnexpectedEOF 2000 } 2001 b := dAtA[iNdEx] 2002 iNdEx++ 2003 msglen |= (int(b) & 0x7F) << shift 2004 if b < 0x80 { 2005 break 2006 } 2007 } 2008 if msglen < 0 { 2009 return ErrInvalidLengthComposite 2010 } 2011 postIndex := iNdEx + msglen 2012 if postIndex > l { 2013 return io.ErrUnexpectedEOF 2014 } 2015 if m.TimedMetricWithMetadatas == nil { 2016 m.TimedMetricWithMetadatas = &TimedMetricWithMetadatas{} 2017 } 2018 if err := m.TimedMetricWithMetadatas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2019 return err 2020 } 2021 iNdEx = postIndex 2022 case 8: 2023 if wireType != 2 { 2024 return fmt.Errorf("proto: wrong wireType = %d for field TimedMetricWithStoragePolicy", wireType) 2025 } 2026 var msglen int 2027 for shift := uint(0); ; shift += 7 { 2028 if shift >= 64 { 2029 return ErrIntOverflowComposite 2030 } 2031 if iNdEx >= l { 2032 return io.ErrUnexpectedEOF 2033 } 2034 b := dAtA[iNdEx] 2035 iNdEx++ 2036 msglen |= (int(b) & 0x7F) << shift 2037 if b < 0x80 { 2038 break 2039 } 2040 } 2041 if msglen < 0 { 2042 return ErrInvalidLengthComposite 2043 } 2044 postIndex := iNdEx + msglen 2045 if postIndex > l { 2046 return io.ErrUnexpectedEOF 2047 } 2048 if m.TimedMetricWithStoragePolicy == nil { 2049 m.TimedMetricWithStoragePolicy = &TimedMetricWithStoragePolicy{} 2050 } 2051 if err := m.TimedMetricWithStoragePolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2052 return err 2053 } 2054 iNdEx = postIndex 2055 default: 2056 iNdEx = preIndex 2057 skippy, err := skipComposite(dAtA[iNdEx:]) 2058 if err != nil { 2059 return err 2060 } 2061 if skippy < 0 { 2062 return ErrInvalidLengthComposite 2063 } 2064 if (iNdEx + skippy) > l { 2065 return io.ErrUnexpectedEOF 2066 } 2067 iNdEx += skippy 2068 } 2069 } 2070 2071 if iNdEx > l { 2072 return io.ErrUnexpectedEOF 2073 } 2074 return nil 2075 } 2076 func skipComposite(dAtA []byte) (n int, err error) { 2077 l := len(dAtA) 2078 iNdEx := 0 2079 for iNdEx < l { 2080 var wire uint64 2081 for shift := uint(0); ; shift += 7 { 2082 if shift >= 64 { 2083 return 0, ErrIntOverflowComposite 2084 } 2085 if iNdEx >= l { 2086 return 0, io.ErrUnexpectedEOF 2087 } 2088 b := dAtA[iNdEx] 2089 iNdEx++ 2090 wire |= (uint64(b) & 0x7F) << shift 2091 if b < 0x80 { 2092 break 2093 } 2094 } 2095 wireType := int(wire & 0x7) 2096 switch wireType { 2097 case 0: 2098 for shift := uint(0); ; shift += 7 { 2099 if shift >= 64 { 2100 return 0, ErrIntOverflowComposite 2101 } 2102 if iNdEx >= l { 2103 return 0, io.ErrUnexpectedEOF 2104 } 2105 iNdEx++ 2106 if dAtA[iNdEx-1] < 0x80 { 2107 break 2108 } 2109 } 2110 return iNdEx, nil 2111 case 1: 2112 iNdEx += 8 2113 return iNdEx, nil 2114 case 2: 2115 var length int 2116 for shift := uint(0); ; shift += 7 { 2117 if shift >= 64 { 2118 return 0, ErrIntOverflowComposite 2119 } 2120 if iNdEx >= l { 2121 return 0, io.ErrUnexpectedEOF 2122 } 2123 b := dAtA[iNdEx] 2124 iNdEx++ 2125 length |= (int(b) & 0x7F) << shift 2126 if b < 0x80 { 2127 break 2128 } 2129 } 2130 iNdEx += length 2131 if length < 0 { 2132 return 0, ErrInvalidLengthComposite 2133 } 2134 return iNdEx, nil 2135 case 3: 2136 for { 2137 var innerWire uint64 2138 var start int = iNdEx 2139 for shift := uint(0); ; shift += 7 { 2140 if shift >= 64 { 2141 return 0, ErrIntOverflowComposite 2142 } 2143 if iNdEx >= l { 2144 return 0, io.ErrUnexpectedEOF 2145 } 2146 b := dAtA[iNdEx] 2147 iNdEx++ 2148 innerWire |= (uint64(b) & 0x7F) << shift 2149 if b < 0x80 { 2150 break 2151 } 2152 } 2153 innerWireType := int(innerWire & 0x7) 2154 if innerWireType == 4 { 2155 break 2156 } 2157 next, err := skipComposite(dAtA[start:]) 2158 if err != nil { 2159 return 0, err 2160 } 2161 iNdEx = start + next 2162 } 2163 return iNdEx, nil 2164 case 4: 2165 return iNdEx, nil 2166 case 5: 2167 iNdEx += 4 2168 return iNdEx, nil 2169 default: 2170 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2171 } 2172 } 2173 panic("unreachable") 2174 } 2175 2176 var ( 2177 ErrInvalidLengthComposite = fmt.Errorf("proto: negative length found during unmarshaling") 2178 ErrIntOverflowComposite = fmt.Errorf("proto: integer overflow") 2179 ) 2180 2181 func init() { 2182 proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/metricpb/composite.proto", fileDescriptorComposite) 2183 } 2184 2185 var fileDescriptorComposite = []byte{ 2186 // 808 bytes of a gzipped FileDescriptorProto 2187 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xcd, 0x6e, 0xd3, 0x58, 2188 0x14, 0xc7, 0xeb, 0x36, 0x4d, 0x3a, 0x27, 0x9d, 0x4e, 0xe6, 0x4e, 0xa6, 0xc9, 0x24, 0x95, 0xdb, 2189 0x5a, 0x33, 0x23, 0x24, 0x44, 0x22, 0x1a, 0x89, 0x0a, 0x55, 0x20, 0x39, 0x1f, 0x4d, 0x23, 0x68, 2190 0x52, 0x39, 0xae, 0x22, 0x58, 0xd4, 0xb2, 0x1d, 0xd7, 0x31, 0x22, 0x71, 0x64, 0xdf, 0xa8, 0xaa, 2191 0xd8, 0xb0, 0x84, 0x0d, 0x42, 0x42, 0xbc, 0x01, 0x0f, 0xd3, 0x25, 0x4f, 0x80, 0x50, 0x59, 0xb1, 2192 0xe7, 0x01, 0x90, 0xed, 0xeb, 0xf8, 0x2b, 0x2e, 0x90, 0xec, 0xec, 0xf3, 0xf1, 0x3b, 0xff, 0x5c, 2193 0xdf, 0xf3, 0x57, 0xa0, 0xa9, 0x6a, 0x78, 0x30, 0x91, 0x4a, 0xb2, 0x3e, 0x2c, 0x0f, 0x2b, 0x7d, 2194 0xa9, 0x3c, 0xac, 0x94, 0x4d, 0x43, 0x2e, 0x0f, 0x15, 0x6c, 0x68, 0xb2, 0x59, 0x56, 0x95, 0x91, 2195 0x62, 0x88, 0x58, 0xe9, 0x97, 0xc7, 0x86, 0x8e, 0x75, 0x12, 0x1f, 0x4b, 0x65, 0x59, 0x1f, 0x8e, 2196 0x75, 0x53, 0xc3, 0x4a, 0xc9, 0x4e, 0xa0, 0x35, 0x37, 0x53, 0xb8, 0xe3, 0x43, 0xaa, 0xba, 0xaa, 2197 0x3b, 0x9d, 0xd2, 0xe4, 0xdc, 0x7e, 0x73, 0x30, 0xd6, 0x93, 0xd3, 0x58, 0xa8, 0xcf, 0xab, 0xc0, 2198 0x79, 0x20, 0x94, 0xc3, 0x05, 0x28, 0x62, 0x5f, 0xc4, 0xe2, 0x9c, 0x6a, 0xc6, 0xfa, 0x73, 0x4d, 2199 0xbe, 0x1c, 0x4b, 0xe4, 0xc1, 0xa1, 0x30, 0xaf, 0x28, 0xc8, 0xd6, 0xf4, 0xc9, 0x08, 0x2b, 0x46, 2200 0x4f, 0xc3, 0x83, 0x63, 0x32, 0xc3, 0x44, 0x77, 0x21, 0x25, 0x3b, 0xf1, 0x3c, 0xb5, 0x43, 0xdd, 2201 0x4a, 0xef, 0xfd, 0x59, 0x72, 0x95, 0x94, 0x48, 0x43, 0x35, 0x71, 0xf5, 0x69, 0x7b, 0x89, 0x73, 2202 0xeb, 0xd0, 0x03, 0xf8, 0xcd, 0xd5, 0x68, 0xe6, 0x97, 0xed, 0xa6, 0x7f, 0xbc, 0xa6, 0x2e, 0x16, 2203 0x55, 0xa5, 0x3f, 0x1d, 0x40, 0x9a, 0xbd, 0x0e, 0xe6, 0x3d, 0x05, 0xb9, 0xaa, 0x88, 0xe5, 0x01, 2204 0xaf, 0x0d, 0xc3, 0x6a, 0x0e, 0x20, 0x2d, 0x59, 0x29, 0x01, 0x5b, 0x39, 0xa2, 0x28, 0xeb, 0xc1, 2205 0xbd, 0x3e, 0xc2, 0x05, 0x69, 0x1a, 0x59, 0x54, 0xd7, 0x4b, 0x0a, 0x50, 0x53, 0x9c, 0xa8, 0x4a, 2206 0x50, 0xd2, 0x6d, 0x58, 0x55, 0xad, 0x28, 0x11, 0xf3, 0x87, 0x47, 0xb4, 0x8b, 0x09, 0xc7, 0xa9, 2207 0x59, 0x54, 0xc2, 0x3b, 0x0a, 0x8a, 0x87, 0xba, 0x71, 0x21, 0x1a, 0x7d, 0xbb, 0xce, 0xd0, 0x64, 2208 0xbf, 0x18, 0xb4, 0x0f, 0x49, 0x07, 0x46, 0xc4, 0xf8, 0xd8, 0xa1, 0x36, 0xc2, 0x26, 0xe5, 0xe8, 2209 0x00, 0xd6, 0xdc, 0x29, 0x51, 0x59, 0xa4, 0xd5, 0x9d, 0x42, 0x5a, 0xa7, 0x0d, 0xcc, 0x6b, 0x0a, 2210 0x72, 0xd6, 0x09, 0xcf, 0x52, 0x54, 0x09, 0x29, 0xfa, 0xdb, 0xc3, 0xfa, 0x5a, 0x42, 0x6a, 0xee, 2211 0x47, 0xd4, 0xe4, 0xa2, 0x6d, 0xb3, 0xb5, 0xbc, 0xa1, 0x20, 0x1f, 0xa3, 0xc5, 0x9c, 0x4f, 0xcc, 2212 0x82, 0x9f, 0xec, 0x03, 0x05, 0x5b, 0x21, 0x41, 0x5d, 0xac, 0x1b, 0xa2, 0xaa, 0x9c, 0xd8, 0xfb, 2213 0x87, 0x1e, 0xc2, 0xba, 0x75, 0x99, 0xfb, 0xc2, 0xcf, 0x4b, 0x4b, 0x63, 0x2f, 0x84, 0xea, 0xb0, 2214 0x61, 0x3a, 0x40, 0xc1, 0xd9, 0xe8, 0xe9, 0x91, 0xb9, 0x9b, 0x5e, 0x0a, 0x0c, 0x24, 0x8c, 0xdf, 2215 0x4d, 0x7f, 0x90, 0x79, 0x01, 0x19, 0x56, 0x55, 0x0d, 0x45, 0xb5, 0x9c, 0x62, 0x4a, 0x0e, 0x1e, 2216 0xd7, 0xff, 0x33, 0x35, 0x45, 0x7e, 0x51, 0xe8, 0xfc, 0x76, 0x61, 0x5d, 0x19, 0xc9, 0x7a, 0x5f, 2217 0x11, 0x46, 0xe2, 0x48, 0x77, 0x8e, 0x70, 0x85, 0x4b, 0x3b, 0xb1, 0xb6, 0x15, 0x62, 0xbe, 0xa6, 2218 0xe0, 0xaf, 0x59, 0xdf, 0xeb, 0x1e, 0x24, 0xf0, 0xe5, 0xd8, 0xd9, 0xac, 0x8d, 0x3d, 0xc6, 0x1b, 2219 0x3f, 0xa3, 0xb8, 0xc4, 0x5f, 0x8e, 0x15, 0xce, 0xae, 0x47, 0x3c, 0x6c, 0x12, 0x2f, 0x12, 0x2e, 2220 0x34, 0x3c, 0x10, 0xc2, 0xdf, 0x8f, 0x8e, 0x58, 0x58, 0x00, 0xc5, 0x65, 0xe5, 0x59, 0x4e, 0x78, 2221 0x06, 0x05, 0x9f, 0xf7, 0x84, 0xc9, 0x2b, 0x36, 0x79, 0x77, 0x96, 0x15, 0x05, 0xe1, 0x39, 0x29, 2222 0xc6, 0xdb, 0xda, 0x90, 0xb5, 0x4d, 0x22, 0x4c, 0x4e, 0xd8, 0xe4, 0xad, 0x90, 0xaf, 0x04, 0xa1, 2223 0x48, 0x8d, 0x1a, 0xd3, 0x33, 0xa0, 0xcf, 0xdd, 0xa5, 0x27, 0x97, 0x2b, 0x88, 0xce, 0xaf, 0xda, 2224 0xe4, 0xff, 0x62, 0x4d, 0xc2, 0xcf, 0xe3, 0x8a, 0xe7, 0x37, 0x18, 0xcf, 0x19, 0x14, 0xfc, 0x97, 2225 0x38, 0x34, 0x27, 0x19, 0x3e, 0x9b, 0x98, 0x0d, 0xe5, 0x72, 0x38, 0xc6, 0x46, 0x44, 0x28, 0xc6, 2226 0xf3, 0xcd, 0x7c, 0xca, 0x1e, 0xc0, 0xfc, 0x70, 0x80, 0xc9, 0xe5, 0x71, 0x9c, 0x39, 0x8c, 0x60, 2227 0x27, 0x3a, 0x22, 0xb4, 0x59, 0x6b, 0xbf, 0xb2, 0x07, 0xdc, 0x16, 0xbe, 0x21, 0xcb, 0x7c, 0xa3, 2228 0x20, 0x61, 0xdd, 0x59, 0x94, 0x86, 0xd4, 0x69, 0xfb, 0x51, 0xbb, 0xd3, 0x6b, 0x67, 0x96, 0x50, 2229 0x01, 0x36, 0x6b, 0x9d, 0xd3, 0x36, 0xdf, 0xe0, 0x84, 0x5e, 0x8b, 0x3f, 0x12, 0x8e, 0x1b, 0x3c, 2230 0x5b, 0x67, 0x79, 0xb6, 0x9b, 0xa1, 0x10, 0x0d, 0x85, 0x2a, 0xcb, 0xd7, 0x8e, 0x04, 0xbe, 0x75, 2231 0x1c, 0xcd, 0x2f, 0xa3, 0x3c, 0x64, 0x9b, 0xec, 0x69, 0xb3, 0x11, 0xce, 0xac, 0x20, 0x06, 0xe8, 2232 0xc3, 0x0e, 0xd7, 0x63, 0xb9, 0x7a, 0xa3, 0x6e, 0x25, 0xb8, 0x56, 0x2d, 0x58, 0x94, 0x49, 0x58, 2233 0x74, 0x8b, 0x1b, 0x93, 0x5f, 0x45, 0xdb, 0x50, 0x8c, 0xcf, 0x77, 0x33, 0x49, 0xf4, 0x2f, 0xec, 2234 0x44, 0x0b, 0xba, 0x7c, 0x87, 0x63, 0x9b, 0x0d, 0xe1, 0xa4, 0xf3, 0xb8, 0x55, 0x7b, 0x92, 0x49, 2235 0x55, 0x5b, 0x57, 0xd7, 0x34, 0xf5, 0xf1, 0x9a, 0xa6, 0x3e, 0x5f, 0xd3, 0xd4, 0xdb, 0x2f, 0xf4, 2236 0xd2, 0xd3, 0xfd, 0x39, 0xff, 0x08, 0x49, 0x49, 0xfb, 0xbd, 0xf2, 0x3d, 0x00, 0x00, 0xff, 0xff, 2237 0x34, 0x3f, 0x09, 0x4f, 0x12, 0x0a, 0x00, 0x00, 2238 }