-
Notifications
You must be signed in to change notification settings - Fork 1
/
metric_descriptor.pb.go
1323 lines (1177 loc) · 57.1 KB
/
metric_descriptor.pb.go
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
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-goten-go
// File: edgelq/monitoring/proto/v4/metric_descriptor.proto
// DO NOT EDIT!!!
package metric_descriptor
import (
"fmt"
"reflect"
"sync"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
preflect "google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/runtime/protoimpl"
)
// proto imports
import (
api "github.com/cloudwan/edgelq-sdk/common/api"
common "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/common"
monitored_resource_descriptor "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/monitored_resource_descriptor"
project "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/project"
meta "github.com/cloudwan/goten-sdk/types/meta"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = fmt.Errorf
_ = reflect.Method{}
_ = sync.Once{}
_ = protojson.MarshalOptions{}
_ = proto.MarshalOptions{}
_ = preflect.Value{}
_ = protoimpl.DescBuilder{}
)
// make sure we're using proto imports
var (
_ = api.LaunchStage(0)
_ = &common.LabelDescriptor{}
_ = &monitored_resource_descriptor.MonitoredResourceDescriptor{}
_ = &project.Project{}
_ = &meta.Meta{}
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// The kind of measurement. It describes how the data is reported.
type MetricDescriptor_MetricKind int32
const (
// Do not use this default value.
MetricDescriptor_METRIC_KIND_UNSPECIFIED MetricDescriptor_MetricKind = 0
// An instantaneous measurement of a value.
MetricDescriptor_GAUGE MetricDescriptor_MetricKind = 1
// The change in a value during a time interval.
MetricDescriptor_DELTA MetricDescriptor_MetricKind = 2
// A value accumulated over a time interval. Cumulative
// measurements in a time series should have the same start time
// and increasing end times, until an event resets the cumulative
// value to zero and sets a new start time for the following
// points.
MetricDescriptor_CUMULATIVE MetricDescriptor_MetricKind = 3
)
var (
MetricDescriptor_MetricKind_name = map[int32]string{
0: "METRIC_KIND_UNSPECIFIED",
1: "GAUGE",
2: "DELTA",
3: "CUMULATIVE",
}
MetricDescriptor_MetricKind_value = map[string]int32{
"METRIC_KIND_UNSPECIFIED": 0,
"GAUGE": 1,
"DELTA": 2,
"CUMULATIVE": 3,
}
)
func (x MetricDescriptor_MetricKind) Enum() *MetricDescriptor_MetricKind {
p := new(MetricDescriptor_MetricKind)
*p = x
return p
}
func (x MetricDescriptor_MetricKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), preflect.EnumNumber(x))
}
func (MetricDescriptor_MetricKind) Descriptor() preflect.EnumDescriptor {
return edgelq_monitoring_proto_v4_metric_descriptor_proto_enumTypes[0].Descriptor()
}
func (MetricDescriptor_MetricKind) Type() preflect.EnumType {
return &edgelq_monitoring_proto_v4_metric_descriptor_proto_enumTypes[0]
}
func (x MetricDescriptor_MetricKind) Number() preflect.EnumNumber {
return preflect.EnumNumber(x)
}
// Deprecated, Use MetricDescriptor_MetricKind.ProtoReflect.Descriptor instead.
func (MetricDescriptor_MetricKind) EnumDescriptor() ([]byte, []int) {
return edgelq_monitoring_proto_v4_metric_descriptor_proto_rawDescGZIP(), []int{0, 0}
}
// The value type of a metric.
type MetricDescriptor_ValueType int32
const (
// Do not use this default value.
MetricDescriptor_VALUE_TYPE_UNSPECIFIED MetricDescriptor_ValueType = 0
// The value is a boolean.
// This value type can be used only if the metric kind is `GAUGE`.
MetricDescriptor_BOOL MetricDescriptor_ValueType = 1
// The value is a signed 64-bit integer.
MetricDescriptor_INT64 MetricDescriptor_ValueType = 2
// The value is a double precision floating point number.
MetricDescriptor_DOUBLE MetricDescriptor_ValueType = 3
// The value is a text string.
// This value type can be used only if the metric kind is `GAUGE`.
MetricDescriptor_STRING MetricDescriptor_ValueType = 4
// The value is a [`Distribution`][google.api.Distribution].
MetricDescriptor_DISTRIBUTION MetricDescriptor_ValueType = 5
// The value is money.
MetricDescriptor_MONEY MetricDescriptor_ValueType = 6
)
var (
MetricDescriptor_ValueType_name = map[int32]string{
0: "VALUE_TYPE_UNSPECIFIED",
1: "BOOL",
2: "INT64",
3: "DOUBLE",
4: "STRING",
5: "DISTRIBUTION",
6: "MONEY",
}
MetricDescriptor_ValueType_value = map[string]int32{
"VALUE_TYPE_UNSPECIFIED": 0,
"BOOL": 1,
"INT64": 2,
"DOUBLE": 3,
"STRING": 4,
"DISTRIBUTION": 5,
"MONEY": 6,
}
)
func (x MetricDescriptor_ValueType) Enum() *MetricDescriptor_ValueType {
p := new(MetricDescriptor_ValueType)
*p = x
return p
}
func (x MetricDescriptor_ValueType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), preflect.EnumNumber(x))
}
func (MetricDescriptor_ValueType) Descriptor() preflect.EnumDescriptor {
return edgelq_monitoring_proto_v4_metric_descriptor_proto_enumTypes[1].Descriptor()
}
func (MetricDescriptor_ValueType) Type() preflect.EnumType {
return &edgelq_monitoring_proto_v4_metric_descriptor_proto_enumTypes[1]
}
func (x MetricDescriptor_ValueType) Number() preflect.EnumNumber {
return preflect.EnumNumber(x)
}
// Deprecated, Use MetricDescriptor_ValueType.ProtoReflect.Descriptor instead.
func (MetricDescriptor_ValueType) EnumDescriptor() ([]byte, []int) {
return edgelq_monitoring_proto_v4_metric_descriptor_proto_rawDescGZIP(), []int{0, 1}
}
// Defines a metric type and its schema. Once a metric descriptor is created,
// deleting or altering it stops data collection and makes the metric type's
// existing data unusable.
type MetricDescriptor struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of MetricDescriptor
// When creating a new instance, this field is optional and if not provided,
// it will be generated automatically. Last ID segment must conform to the
// following regex: [\\w./-]{4,128}
Name *Name `protobuf:"bytes,1,opt,customtype=Name,name=name,proto3" json:"name,omitempty" firestore:"name"`
// Metadata is an object with information like create, update and delete time
// (for async deleted resources), has user labels/annotations, sharding
// information, multi-region syncing information and may have non-schema
// owners (useful for taking ownership of resources belonging to lower level
// services by higher ones).
Metadata *meta.Meta `protobuf:"bytes,35,opt,name=metadata,proto3" json:"metadata,omitempty" firestore:"metadata"`
// The metric type, including its DNS name prefix. The type is not
// URL-encoded. All user-defined metric types have the DNS name
// `custom.googleapis.com` or `external.googleapis.com`. Metric types should
// use a natural hierarchical grouping. For example:
//
// "custom.googleapis.com/invoice/paid/amount"
// "external.googleapis.com/prometheus/up"
// "appengine.googleapis.com/http/server/response_latencies"
Type string `protobuf:"bytes,8,opt,name=type,proto3" json:"type,omitempty" firestore:"type"`
// associated resource_types (also used to infer defaults)
// examples, devices.edgelq.com/Device, watchdog.edgelq.com/Agent
// if not set, defaults to "global" resource type.
ResourceTypes []string `protobuf:"bytes,34,rep,name=resource_types,json=resourceTypes,proto3" json:"resource_types,omitempty" firestore:"resourceTypes"`
// The set of labels that can be used to describe a specific
// instance of this metric type. For example, the
// `appengine.googleapis.com/http/server/response_latencies` metric
// type has a label for the HTTP response code, `response_code`, so
// you can look at latencies for successful responses or just
// for responses that failed.
Labels []*common.LabelDescriptor `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" firestore:"labels"`
// Whether the metric records instantaneous values, changes to a value, etc.
// Some combinations of `metric_kind` and `value_type` might not be supported.
MetricKind MetricDescriptor_MetricKind `protobuf:"varint,3,opt,name=metric_kind,json=metricKind,proto3,enum=ntt.monitoring.v4.MetricDescriptor_MetricKind" json:"metric_kind,omitempty" firestore:"metricKind"`
// Whether the measurement is an integer, a floating-point number, etc.
// Some combinations of `metric_kind` and `value_type` might not be supported.
ValueType MetricDescriptor_ValueType `protobuf:"varint,4,opt,name=value_type,json=valueType,proto3,enum=ntt.monitoring.v4.MetricDescriptor_ValueType" json:"value_type,omitempty" firestore:"valueType"`
// The unit in which the metric value is reported. It is only applicable
// if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
// supported units are a subset of [The Unified Code for Units of
// Measure](http://unitsofmeasure.org/ucum.html) standard:
//
// **Basic units (UNIT)**
//
// * `bit` bit
// * `By` byte
// * `s` second
// * `min` minute
// * `h` hour
// * `d` day
//
// **Prefixes (PREFIX)**
//
// * `k` kilo (10**3)
// * `M` mega (10**6)
// * `G` giga (10**9)
// * `T` tera (10**12)
// * `P` peta (10**15)
// * `E` exa (10**18)
// * `Z` zetta (10**21)
// * `Y` yotta (10**24)
// * `m` milli (10**-3)
// * `u` micro (10**-6)
// * `n` nano (10**-9)
// * `p` pico (10**-12)
// * `f` femto (10**-15)
// * `a` atto (10**-18)
// * `z` zepto (10**-21)
// * `y` yocto (10**-24)
// * `Ki` kibi (2**10)
// * `Mi` mebi (2**20)
// * `Gi` gibi (2**30)
// * `Ti` tebi (2**40)
//
// **Grammar**
//
// The grammar also includes these connectors:
//
// * `/` division (as an infix operator, e.g. `1/s`).
// * `.` multiplication (as an infix operator, e.g. `GBy.d`)
//
// The grammar for a unit is as follows:
//
// Expression = Component { "." Component } { "/" Component } ;
//
// Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
// | Annotation
// | "1"
// ;
//
// Annotation = "{" NAME "}" ;
//
// Notes:
//
// * `Annotation` is just a comment if it follows a `UNIT` and is
// equivalent to `1` if it is used alone. For examples,
// `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
// * `NAME` is a sequence of non-blank printable ASCII characters not
// containing '{' or '}'.
// * `1` represents dimensionless value 1, such as in `1/s`.
// * `%` represents dimensionless value 1/100, and annotates values giving
// a percentage.
Unit string `protobuf:"bytes,5,opt,name=unit,proto3" json:"unit,omitempty" firestore:"unit"`
// A detailed description of the metric, which can be used in documentation.
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty" firestore:"description"`
// A concise name for the metric, which can be displayed in user interfaces.
// Use sentence case without an ending period, for example "Request count".
// This field is optional but it is recommended to be set for any metrics
// associated with user-visible concepts, such as Quota.
DisplayName string `protobuf:"bytes,7,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty" firestore:"displayName"`
// Optional. Metadata which can be used to guide usage of the metric.
MetricDescriptorMetadata *MetricDescriptor_MetricDescriptorMetadata `protobuf:"bytes,10,opt,name=metric_descriptor_metadata,json=metricDescriptorMetadata,proto3" json:"metric_descriptor_metadata,omitempty" firestore:"metricDescriptorMetadata"`
// Distribution bucketing options - define only when ValueType is
// Distribution. Used for validating input.
DistributionBucketOptions *common.Distribution_BucketOptions `protobuf:"bytes,31,opt,name=distribution_bucket_options,json=distributionBucketOptions,proto3" json:"distribution_bucket_options,omitempty" firestore:"distributionBucketOptions"`
// Promoted Label Key Sets allow defining multiple indexing rules for
// underlying backend enabling query optimizations. Metric promoted label sets
// are combined with MonitoredResource promoted label sets and result in
// PromotedKeySet.
PromotedLabelKeySets []*common.LabelKeySet `protobuf:"bytes,32,rep,name=promoted_label_key_sets,json=promotedLabelKeySets,proto3" json:"promoted_label_key_sets,omitempty" firestore:"promotedLabelKeySets"`
// Indexing allows tweaking storage usage by tweaking amount of "duplicate"
// data with different promotion criteria. It's important consideration for
// balancing time series query performance and storage cost.
IndexSpec *MetricDescriptor_IndexSpec `protobuf:"bytes,36,opt,name=index_spec,json=indexSpec,proto3" json:"index_spec,omitempty" firestore:"indexSpec"`
// Storage settings
StorageConfig *MetricDescriptor_StorageConfig `protobuf:"bytes,33,opt,name=storage_config,json=storageConfig,proto3" json:"storage_config,omitempty" firestore:"storageConfig"`
}
func (m *MetricDescriptor) Reset() {
*m = MetricDescriptor{}
if protoimpl.UnsafeEnabled {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
ms.StoreMessageInfo(mi)
}
}
func (m *MetricDescriptor) String() string {
return protoimpl.X.MessageStringOf(m)
}
func (*MetricDescriptor) ProtoMessage() {}
func (m *MetricDescriptor) ProtoReflect() preflect.Message {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && m != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(m)
}
func (*MetricDescriptor) GotenMessage() {}
// Deprecated, Use MetricDescriptor.ProtoReflect.Descriptor instead.
func (*MetricDescriptor) Descriptor() ([]byte, []int) {
return edgelq_monitoring_proto_v4_metric_descriptor_proto_rawDescGZIP(), []int{0}
}
func (m *MetricDescriptor) Unmarshal(b []byte) error {
return proto.Unmarshal(b, m)
}
func (m *MetricDescriptor) Marshal() ([]byte, error) {
return proto.Marshal(m)
}
func (m *MetricDescriptor) MarshalJSON() ([]byte, error) {
return protojson.MarshalOptions{}.Marshal(m)
}
func (m *MetricDescriptor) UnmarshalJSON(data []byte) error {
return protojson.Unmarshal(data, m)
}
func (m *MetricDescriptor) GetName() *Name {
if m != nil {
return m.Name
}
return nil
}
func (m *MetricDescriptor) GetMetadata() *meta.Meta {
if m != nil {
return m.Metadata
}
return nil
}
func (m *MetricDescriptor) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *MetricDescriptor) GetResourceTypes() []string {
if m != nil {
return m.ResourceTypes
}
return nil
}
func (m *MetricDescriptor) GetLabels() []*common.LabelDescriptor {
if m != nil {
return m.Labels
}
return nil
}
func (m *MetricDescriptor) GetMetricKind() MetricDescriptor_MetricKind {
if m != nil {
return m.MetricKind
}
return MetricDescriptor_METRIC_KIND_UNSPECIFIED
}
func (m *MetricDescriptor) GetValueType() MetricDescriptor_ValueType {
if m != nil {
return m.ValueType
}
return MetricDescriptor_VALUE_TYPE_UNSPECIFIED
}
func (m *MetricDescriptor) GetUnit() string {
if m != nil {
return m.Unit
}
return ""
}
func (m *MetricDescriptor) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *MetricDescriptor) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func (m *MetricDescriptor) GetMetricDescriptorMetadata() *MetricDescriptor_MetricDescriptorMetadata {
if m != nil {
return m.MetricDescriptorMetadata
}
return nil
}
func (m *MetricDescriptor) GetDistributionBucketOptions() *common.Distribution_BucketOptions {
if m != nil {
return m.DistributionBucketOptions
}
return nil
}
func (m *MetricDescriptor) GetPromotedLabelKeySets() []*common.LabelKeySet {
if m != nil {
return m.PromotedLabelKeySets
}
return nil
}
func (m *MetricDescriptor) GetIndexSpec() *MetricDescriptor_IndexSpec {
if m != nil {
return m.IndexSpec
}
return nil
}
func (m *MetricDescriptor) GetStorageConfig() *MetricDescriptor_StorageConfig {
if m != nil {
return m.StorageConfig
}
return nil
}
func (m *MetricDescriptor) SetName(fv *Name) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "Name", "MetricDescriptor"))
}
m.Name = fv
}
func (m *MetricDescriptor) SetMetadata(fv *meta.Meta) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "Metadata", "MetricDescriptor"))
}
m.Metadata = fv
}
func (m *MetricDescriptor) SetType(fv string) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "Type", "MetricDescriptor"))
}
m.Type = fv
}
func (m *MetricDescriptor) SetResourceTypes(fv []string) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "ResourceTypes", "MetricDescriptor"))
}
m.ResourceTypes = fv
}
func (m *MetricDescriptor) SetLabels(fv []*common.LabelDescriptor) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "Labels", "MetricDescriptor"))
}
m.Labels = fv
}
func (m *MetricDescriptor) SetMetricKind(fv MetricDescriptor_MetricKind) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "MetricKind", "MetricDescriptor"))
}
m.MetricKind = fv
}
func (m *MetricDescriptor) SetValueType(fv MetricDescriptor_ValueType) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "ValueType", "MetricDescriptor"))
}
m.ValueType = fv
}
func (m *MetricDescriptor) SetUnit(fv string) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "Unit", "MetricDescriptor"))
}
m.Unit = fv
}
func (m *MetricDescriptor) SetDescription(fv string) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "Description", "MetricDescriptor"))
}
m.Description = fv
}
func (m *MetricDescriptor) SetDisplayName(fv string) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "DisplayName", "MetricDescriptor"))
}
m.DisplayName = fv
}
func (m *MetricDescriptor) SetMetricDescriptorMetadata(fv *MetricDescriptor_MetricDescriptorMetadata) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "MetricDescriptorMetadata", "MetricDescriptor"))
}
m.MetricDescriptorMetadata = fv
}
func (m *MetricDescriptor) SetDistributionBucketOptions(fv *common.Distribution_BucketOptions) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "DistributionBucketOptions", "MetricDescriptor"))
}
m.DistributionBucketOptions = fv
}
func (m *MetricDescriptor) SetPromotedLabelKeySets(fv []*common.LabelKeySet) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "PromotedLabelKeySets", "MetricDescriptor"))
}
m.PromotedLabelKeySets = fv
}
func (m *MetricDescriptor) SetIndexSpec(fv *MetricDescriptor_IndexSpec) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "IndexSpec", "MetricDescriptor"))
}
m.IndexSpec = fv
}
func (m *MetricDescriptor) SetStorageConfig(fv *MetricDescriptor_StorageConfig) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "StorageConfig", "MetricDescriptor"))
}
m.StorageConfig = fv
}
// Additional annotations that can be used to guide the usage of a metric.
type MetricDescriptor_MetricDescriptorMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The launch stage of the metric definition.
LaunchStage api.LaunchStage `protobuf:"varint,1,opt,name=launch_stage,json=launchStage,proto3,enum=ntt.api.LaunchStage" json:"launch_stage,omitempty" firestore:"launchStage"`
}
func (m *MetricDescriptor_MetricDescriptorMetadata) Reset() {
*m = MetricDescriptor_MetricDescriptorMetadata{}
if protoimpl.UnsafeEnabled {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
ms.StoreMessageInfo(mi)
}
}
func (m *MetricDescriptor_MetricDescriptorMetadata) String() string {
return protoimpl.X.MessageStringOf(m)
}
func (*MetricDescriptor_MetricDescriptorMetadata) ProtoMessage() {}
func (m *MetricDescriptor_MetricDescriptorMetadata) ProtoReflect() preflect.Message {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && m != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(m)
}
func (*MetricDescriptor_MetricDescriptorMetadata) GotenMessage() {}
// Deprecated, Use MetricDescriptor_MetricDescriptorMetadata.ProtoReflect.Descriptor instead.
func (*MetricDescriptor_MetricDescriptorMetadata) Descriptor() ([]byte, []int) {
return edgelq_monitoring_proto_v4_metric_descriptor_proto_rawDescGZIP(), []int{0, 0}
}
func (m *MetricDescriptor_MetricDescriptorMetadata) Unmarshal(b []byte) error {
return proto.Unmarshal(b, m)
}
func (m *MetricDescriptor_MetricDescriptorMetadata) Marshal() ([]byte, error) {
return proto.Marshal(m)
}
func (m *MetricDescriptor_MetricDescriptorMetadata) MarshalJSON() ([]byte, error) {
return protojson.MarshalOptions{}.Marshal(m)
}
func (m *MetricDescriptor_MetricDescriptorMetadata) UnmarshalJSON(data []byte) error {
return protojson.Unmarshal(data, m)
}
func (m *MetricDescriptor_MetricDescriptorMetadata) GetLaunchStage() api.LaunchStage {
if m != nil {
return m.LaunchStage
}
return api.LaunchStage_LAUNCH_STAGE_UNSPECIFIED
}
func (m *MetricDescriptor_MetricDescriptorMetadata) SetLaunchStage(fv api.LaunchStage) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "LaunchStage", "MetricDescriptor_MetricDescriptorMetadata"))
}
m.LaunchStage = fv
}
type MetricDescriptor_IndexSpec struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// PerResource index
PerResource []*MetricDescriptor_IndexSpec_PerMonitoredResource `protobuf:"bytes,1,rep,name=per_resource,json=perResource,proto3" json:"per_resource,omitempty" firestore:"perResource"`
}
func (m *MetricDescriptor_IndexSpec) Reset() {
*m = MetricDescriptor_IndexSpec{}
if protoimpl.UnsafeEnabled {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
ms.StoreMessageInfo(mi)
}
}
func (m *MetricDescriptor_IndexSpec) String() string {
return protoimpl.X.MessageStringOf(m)
}
func (*MetricDescriptor_IndexSpec) ProtoMessage() {}
func (m *MetricDescriptor_IndexSpec) ProtoReflect() preflect.Message {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && m != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(m)
}
func (*MetricDescriptor_IndexSpec) GotenMessage() {}
// Deprecated, Use MetricDescriptor_IndexSpec.ProtoReflect.Descriptor instead.
func (*MetricDescriptor_IndexSpec) Descriptor() ([]byte, []int) {
return edgelq_monitoring_proto_v4_metric_descriptor_proto_rawDescGZIP(), []int{0, 1}
}
func (m *MetricDescriptor_IndexSpec) Unmarshal(b []byte) error {
return proto.Unmarshal(b, m)
}
func (m *MetricDescriptor_IndexSpec) Marshal() ([]byte, error) {
return proto.Marshal(m)
}
func (m *MetricDescriptor_IndexSpec) MarshalJSON() ([]byte, error) {
return protojson.MarshalOptions{}.Marshal(m)
}
func (m *MetricDescriptor_IndexSpec) UnmarshalJSON(data []byte) error {
return protojson.Unmarshal(data, m)
}
func (m *MetricDescriptor_IndexSpec) GetPerResource() []*MetricDescriptor_IndexSpec_PerMonitoredResource {
if m != nil {
return m.PerResource
}
return nil
}
func (m *MetricDescriptor_IndexSpec) SetPerResource(fv []*MetricDescriptor_IndexSpec_PerMonitoredResource) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "PerResource", "MetricDescriptor_IndexSpec"))
}
m.PerResource = fv
}
// Backend storage config
type MetricDescriptor_StorageConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// whether to store raw points
StoreRawPoints bool `protobuf:"varint,1,opt,name=store_raw_points,json=storeRawPoints,proto3" json:"store_raw_points,omitempty" firestore:"storeRawPoints"`
}
func (m *MetricDescriptor_StorageConfig) Reset() {
*m = MetricDescriptor_StorageConfig{}
if protoimpl.UnsafeEnabled {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
ms.StoreMessageInfo(mi)
}
}
func (m *MetricDescriptor_StorageConfig) String() string {
return protoimpl.X.MessageStringOf(m)
}
func (*MetricDescriptor_StorageConfig) ProtoMessage() {}
func (m *MetricDescriptor_StorageConfig) ProtoReflect() preflect.Message {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && m != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(m)
}
func (*MetricDescriptor_StorageConfig) GotenMessage() {}
// Deprecated, Use MetricDescriptor_StorageConfig.ProtoReflect.Descriptor instead.
func (*MetricDescriptor_StorageConfig) Descriptor() ([]byte, []int) {
return edgelq_monitoring_proto_v4_metric_descriptor_proto_rawDescGZIP(), []int{0, 2}
}
func (m *MetricDescriptor_StorageConfig) Unmarshal(b []byte) error {
return proto.Unmarshal(b, m)
}
func (m *MetricDescriptor_StorageConfig) Marshal() ([]byte, error) {
return proto.Marshal(m)
}
func (m *MetricDescriptor_StorageConfig) MarshalJSON() ([]byte, error) {
return protojson.MarshalOptions{}.Marshal(m)
}
func (m *MetricDescriptor_StorageConfig) UnmarshalJSON(data []byte) error {
return protojson.Unmarshal(data, m)
}
func (m *MetricDescriptor_StorageConfig) GetStoreRawPoints() bool {
if m != nil {
return m.StoreRawPoints
}
return false
}
func (m *MetricDescriptor_StorageConfig) SetStoreRawPoints(fv bool) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "StoreRawPoints", "MetricDescriptor_StorageConfig"))
}
m.StoreRawPoints = fv
}
type MetricDescriptor_IndexSpec_Index struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// each label is of format: `{metric,resource}.labels.<label-key>`.
// since resource and metric labels are mixed. Full path is required.
PromotedLabels []string `protobuf:"bytes,2,rep,name=promoted_labels,json=promotedLabels,proto3" json:"promoted_labels,omitempty" firestore:"promotedLabels"`
// whether this index is write-only and not usable for querying
WriteOnly bool `protobuf:"varint,3,opt,name=write_only,json=writeOnly,proto3" json:"write_only,omitempty" firestore:"writeOnly"`
}
func (m *MetricDescriptor_IndexSpec_Index) Reset() {
*m = MetricDescriptor_IndexSpec_Index{}
if protoimpl.UnsafeEnabled {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
ms.StoreMessageInfo(mi)
}
}
func (m *MetricDescriptor_IndexSpec_Index) String() string {
return protoimpl.X.MessageStringOf(m)
}
func (*MetricDescriptor_IndexSpec_Index) ProtoMessage() {}
func (m *MetricDescriptor_IndexSpec_Index) ProtoReflect() preflect.Message {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && m != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(m)
}
func (*MetricDescriptor_IndexSpec_Index) GotenMessage() {}
// Deprecated, Use MetricDescriptor_IndexSpec_Index.ProtoReflect.Descriptor instead.
func (*MetricDescriptor_IndexSpec_Index) Descriptor() ([]byte, []int) {
return edgelq_monitoring_proto_v4_metric_descriptor_proto_rawDescGZIP(), []int{0, 1, 0}
}
func (m *MetricDescriptor_IndexSpec_Index) Unmarshal(b []byte) error {
return proto.Unmarshal(b, m)
}
func (m *MetricDescriptor_IndexSpec_Index) Marshal() ([]byte, error) {
return proto.Marshal(m)
}
func (m *MetricDescriptor_IndexSpec_Index) MarshalJSON() ([]byte, error) {
return protojson.MarshalOptions{}.Marshal(m)
}
func (m *MetricDescriptor_IndexSpec_Index) UnmarshalJSON(data []byte) error {
return protojson.Unmarshal(data, m)
}
func (m *MetricDescriptor_IndexSpec_Index) GetPromotedLabels() []string {
if m != nil {
return m.PromotedLabels
}
return nil
}
func (m *MetricDescriptor_IndexSpec_Index) GetWriteOnly() bool {
if m != nil {
return m.WriteOnly
}
return false
}
func (m *MetricDescriptor_IndexSpec_Index) SetPromotedLabels(fv []string) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "PromotedLabels", "MetricDescriptor_IndexSpec_Index"))
}
m.PromotedLabels = fv
}
func (m *MetricDescriptor_IndexSpec_Index) SetWriteOnly(fv bool) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "WriteOnly", "MetricDescriptor_IndexSpec_Index"))
}
m.WriteOnly = fv
}
type MetricDescriptor_IndexSpec_PerMonitoredResource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Resource *monitored_resource_descriptor.Reference `protobuf:"bytes,1,opt,customtype=Reference,name=resource,proto3" json:"resource,omitempty" firestore:"resource"`
// List of indices for given metric and resource pair
Indices []*MetricDescriptor_IndexSpec_Index `protobuf:"bytes,2,rep,name=indices,proto3" json:"indices,omitempty" firestore:"indices"`
}
func (m *MetricDescriptor_IndexSpec_PerMonitoredResource) Reset() {
*m = MetricDescriptor_IndexSpec_PerMonitoredResource{}
if protoimpl.UnsafeEnabled {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
ms.StoreMessageInfo(mi)
}
}
func (m *MetricDescriptor_IndexSpec_PerMonitoredResource) String() string {
return protoimpl.X.MessageStringOf(m)
}
func (*MetricDescriptor_IndexSpec_PerMonitoredResource) ProtoMessage() {}
func (m *MetricDescriptor_IndexSpec_PerMonitoredResource) ProtoReflect() preflect.Message {
mi := &edgelq_monitoring_proto_v4_metric_descriptor_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && m != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(m)
}
func (*MetricDescriptor_IndexSpec_PerMonitoredResource) GotenMessage() {}
// Deprecated, Use MetricDescriptor_IndexSpec_PerMonitoredResource.ProtoReflect.Descriptor instead.
func (*MetricDescriptor_IndexSpec_PerMonitoredResource) Descriptor() ([]byte, []int) {
return edgelq_monitoring_proto_v4_metric_descriptor_proto_rawDescGZIP(), []int{0, 1, 1}
}
func (m *MetricDescriptor_IndexSpec_PerMonitoredResource) Unmarshal(b []byte) error {
return proto.Unmarshal(b, m)
}
func (m *MetricDescriptor_IndexSpec_PerMonitoredResource) Marshal() ([]byte, error) {
return proto.Marshal(m)
}
func (m *MetricDescriptor_IndexSpec_PerMonitoredResource) MarshalJSON() ([]byte, error) {
return protojson.MarshalOptions{}.Marshal(m)
}
func (m *MetricDescriptor_IndexSpec_PerMonitoredResource) UnmarshalJSON(data []byte) error {
return protojson.Unmarshal(data, m)
}
func (m *MetricDescriptor_IndexSpec_PerMonitoredResource) GetResource() *monitored_resource_descriptor.Reference {
if m != nil {
return m.Resource
}
return nil
}
func (m *MetricDescriptor_IndexSpec_PerMonitoredResource) GetIndices() []*MetricDescriptor_IndexSpec_Index {
if m != nil {
return m.Indices
}
return nil
}
func (m *MetricDescriptor_IndexSpec_PerMonitoredResource) SetResource(fv *monitored_resource_descriptor.Reference) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "Resource", "MetricDescriptor_IndexSpec_PerMonitoredResource"))
}
m.Resource = fv
}
func (m *MetricDescriptor_IndexSpec_PerMonitoredResource) SetIndices(fv []*MetricDescriptor_IndexSpec_Index) {
if m == nil {
panic(fmt.Errorf("can't set %s on nil %s", "Indices", "MetricDescriptor_IndexSpec_PerMonitoredResource"))
}
m.Indices = fv
}
var edgelq_monitoring_proto_v4_metric_descriptor_proto preflect.FileDescriptor
var edgelq_monitoring_proto_v4_metric_descriptor_proto_rawDesc = []byte{
0x0a, 0x32, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x71, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72,
0x69, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x34, 0x2f, 0x6d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x74, 0x74, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f,
0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x34, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x74, 0x65, 0x6e, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x6f, 0x74, 0x65, 0x6e, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x67, 0x6f, 0x74, 0x65, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x74, 0x65, 0x6e, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x6f, 0x74, 0x65, 0x6e, 0x2f, 0x61, 0x6e, 0x6e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x74, 0x65, 0x6e, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x67, 0x6f, 0x74, 0x65, 0x6e, 0x2f, 0x61, 0x6e, 0x6e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x72,
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x64, 0x67,
0x65, 0x6c, 0x71, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x16, 0x67, 0x6f, 0x74, 0x65, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x6d,