-
Notifications
You must be signed in to change notification settings - Fork 51
/
Metric.g.cs
1386 lines (1305 loc) · 55 KB
/
Metric.g.cs
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
/*
* Copyright 2021 Google LLC All Rights Reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file or at
* https://developers.google.com/open-source/licenses/bsd
*/
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/metric.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021, 8981
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Api {
/// <summary>Holder for reflection information generated from google/api/metric.proto</summary>
public static partial class MetricReflection {
#region Descriptor
/// <summary>File descriptor for google/api/metric.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static MetricReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Chdnb29nbGUvYXBpL21ldHJpYy5wcm90bxIKZ29vZ2xlLmFwaRoWZ29vZ2xl",
"L2FwaS9sYWJlbC5wcm90bxodZ29vZ2xlL2FwaS9sYXVuY2hfc3RhZ2UucHJv",
"dG8aHmdvb2dsZS9wcm90b2J1Zi9kdXJhdGlvbi5wcm90byKfBgoQTWV0cmlj",
"RGVzY3JpcHRvchIMCgRuYW1lGAEgASgJEgwKBHR5cGUYCCABKAkSKwoGbGFi",
"ZWxzGAIgAygLMhsuZ29vZ2xlLmFwaS5MYWJlbERlc2NyaXB0b3ISPAoLbWV0",
"cmljX2tpbmQYAyABKA4yJy5nb29nbGUuYXBpLk1ldHJpY0Rlc2NyaXB0b3Iu",
"TWV0cmljS2luZBI6Cgp2YWx1ZV90eXBlGAQgASgOMiYuZ29vZ2xlLmFwaS5N",
"ZXRyaWNEZXNjcmlwdG9yLlZhbHVlVHlwZRIMCgR1bml0GAUgASgJEhMKC2Rl",
"c2NyaXB0aW9uGAYgASgJEhQKDGRpc3BsYXlfbmFtZRgHIAEoCRJHCghtZXRh",
"ZGF0YRgKIAEoCzI1Lmdvb2dsZS5hcGkuTWV0cmljRGVzY3JpcHRvci5NZXRy",
"aWNEZXNjcmlwdG9yTWV0YWRhdGESLQoMbGF1bmNoX3N0YWdlGAwgASgOMhcu",
"Z29vZ2xlLmFwaS5MYXVuY2hTdGFnZRIgChhtb25pdG9yZWRfcmVzb3VyY2Vf",
"dHlwZXMYDSADKAkasAEKGE1ldHJpY0Rlc2NyaXB0b3JNZXRhZGF0YRIxCgxs",
"YXVuY2hfc3RhZ2UYASABKA4yFy5nb29nbGUuYXBpLkxhdW5jaFN0YWdlQgIY",
"ARIwCg1zYW1wbGVfcGVyaW9kGAIgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1",
"cmF0aW9uEi8KDGluZ2VzdF9kZWxheRgDIAEoCzIZLmdvb2dsZS5wcm90b2J1",
"Zi5EdXJhdGlvbiJPCgpNZXRyaWNLaW5kEhsKF01FVFJJQ19LSU5EX1VOU1BF",
"Q0lGSUVEEAASCQoFR0FVR0UQARIJCgVERUxUQRACEg4KCkNVTVVMQVRJVkUQ",
"AyJxCglWYWx1ZVR5cGUSGgoWVkFMVUVfVFlQRV9VTlNQRUNJRklFRBAAEggK",
"BEJPT0wQARIJCgVJTlQ2NBACEgoKBkRPVUJMRRADEgoKBlNUUklORxAEEhAK",
"DERJU1RSSUJVVElPThAFEgkKBU1PTkVZEAYidQoGTWV0cmljEgwKBHR5cGUY",
"AyABKAkSLgoGbGFiZWxzGAIgAygLMh4uZ29vZ2xlLmFwaS5NZXRyaWMuTGFi",
"ZWxzRW50cnkaLQoLTGFiZWxzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVl",
"GAIgASgJOgI4AUJfCg5jb20uZ29vZ2xlLmFwaUILTWV0cmljUHJvdG9QAVo3",
"Z29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vZ29vZ2xlYXBpcy9hcGkvbWV0",
"cmljO21ldHJpY6ICBEdBUEliBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Api.LabelReflection.Descriptor, global::Google.Api.LaunchStageReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.MetricDescriptor), global::Google.Api.MetricDescriptor.Parser, new[]{ "Name", "Type", "Labels", "MetricKind", "ValueType", "Unit", "Description", "DisplayName", "Metadata", "LaunchStage", "MonitoredResourceTypes" }, null, new[]{ typeof(global::Google.Api.MetricDescriptor.Types.MetricKind), typeof(global::Google.Api.MetricDescriptor.Types.ValueType) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.MetricDescriptor.Types.MetricDescriptorMetadata), global::Google.Api.MetricDescriptor.Types.MetricDescriptorMetadata.Parser, new[]{ "LaunchStage", "SamplePeriod", "IngestDelay" }, null, null, null, null)}),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.Metric), global::Google.Api.Metric.Parser, new[]{ "Type", "Labels" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
}));
}
#endregion
}
#region Messages
/// <summary>
/// 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.
/// </summary>
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class MetricDescriptor : pb::IMessage<MetricDescriptor>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<MetricDescriptor> _parser = new pb::MessageParser<MetricDescriptor>(() => new MetricDescriptor());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<MetricDescriptor> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Api.MetricReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public MetricDescriptor() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public MetricDescriptor(MetricDescriptor other) : this() {
name_ = other.name_;
type_ = other.type_;
labels_ = other.labels_.Clone();
metricKind_ = other.metricKind_;
valueType_ = other.valueType_;
unit_ = other.unit_;
description_ = other.description_;
displayName_ = other.displayName_;
metadata_ = other.metadata_ != null ? other.metadata_.Clone() : null;
launchStage_ = other.launchStage_;
monitoredResourceTypes_ = other.monitoredResourceTypes_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public MetricDescriptor Clone() {
return new MetricDescriptor(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
/// The resource name of the metric descriptor.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string Name {
get { return name_; }
set {
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "type" field.</summary>
public const int TypeFieldNumber = 8;
private string type_ = "";
/// <summary>
/// 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"
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string Type {
get { return type_; }
set {
type_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "labels" field.</summary>
public const int LabelsFieldNumber = 2;
private static readonly pb::FieldCodec<global::Google.Api.LabelDescriptor> _repeated_labels_codec
= pb::FieldCodec.ForMessage(18, global::Google.Api.LabelDescriptor.Parser);
private readonly pbc::RepeatedField<global::Google.Api.LabelDescriptor> labels_ = new pbc::RepeatedField<global::Google.Api.LabelDescriptor>();
/// <summary>
/// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::RepeatedField<global::Google.Api.LabelDescriptor> Labels {
get { return labels_; }
}
/// <summary>Field number for the "metric_kind" field.</summary>
public const int MetricKindFieldNumber = 3;
private global::Google.Api.MetricDescriptor.Types.MetricKind metricKind_ = global::Google.Api.MetricDescriptor.Types.MetricKind.Unspecified;
/// <summary>
/// Whether the metric records instantaneous values, changes to a value, etc.
/// Some combinations of `metric_kind` and `value_type` might not be supported.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Google.Api.MetricDescriptor.Types.MetricKind MetricKind {
get { return metricKind_; }
set {
metricKind_ = value;
}
}
/// <summary>Field number for the "value_type" field.</summary>
public const int ValueTypeFieldNumber = 4;
private global::Google.Api.MetricDescriptor.Types.ValueType valueType_ = global::Google.Api.MetricDescriptor.Types.ValueType.Unspecified;
/// <summary>
/// Whether the measurement is an integer, a floating-point number, etc.
/// Some combinations of `metric_kind` and `value_type` might not be supported.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Google.Api.MetricDescriptor.Types.ValueType ValueType {
get { return valueType_; }
set {
valueType_ = value;
}
}
/// <summary>Field number for the "unit" field.</summary>
public const int UnitFieldNumber = 5;
private string unit_ = "";
/// <summary>
/// The units in which the metric value is reported. It is only applicable
/// if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
/// defines the representation of the stored metric values.
///
/// Different systems might scale the values to be more easily displayed (so a
/// value of `0.02kBy` _might_ be displayed as `20By`, and a value of
/// `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
/// `kBy`, then the value of the metric is always in thousands of bytes, no
/// matter how it might be displayed.
///
/// If you want a custom metric to record the exact number of CPU-seconds used
/// by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
/// `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
/// CPU-seconds, then the value is written as `12005`.
///
/// Alternatively, if you want a custom metric to record data in a more
/// granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
/// `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
/// or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
///
/// The supported units are a subset of [The Unified Code for Units of
/// Measure](https://unitsofmeasure.org/ucum.html) standard:
///
/// **Basic units (UNIT)**
///
/// * `bit` bit
/// * `By` byte
/// * `s` second
/// * `min` minute
/// * `h` hour
/// * `d` day
/// * `1` dimensionless
///
/// **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)
/// * `Pi` pebi (2^50)
///
/// **Grammar**
///
/// The grammar also includes these connectors:
///
/// * `/` division or ratio (as an infix operator). For examples,
/// `kBy/{email}` or `MiBy/10ms` (although you should almost never
/// have `/s` in a metric `unit`; rates should always be computed at
/// query time from the underlying cumulative or delta value).
/// * `.` multiplication or composition (as an infix operator). For
/// examples, `GBy.d` or `k{watt}.h`.
///
/// 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`. If the annotation
/// is used alone, then the unit is equivalent to `1`. For examples,
/// `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
/// * `NAME` is a sequence of non-blank printable ASCII characters not
/// containing `{` or `}`.
/// * `1` represents a unitary [dimensionless
/// unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
/// as in `1/s`. It is typically used when none of the basic units are
/// appropriate. For example, "new users per day" can be represented as
/// `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
/// users). Alternatively, "thousands of page views per day" would be
/// represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
/// value of `5.3` would mean "5300 page views per day").
/// * `%` represents dimensionless value of 1/100, and annotates values giving
/// a percentage (so the metric values are typically in the range of 0..100,
/// and a metric value `3` means "3 percent").
/// * `10^2.%` indicates a metric contains a ratio, typically in the range
/// 0..1, that will be multiplied by 100 and displayed as a percentage
/// (so a metric value `0.03` means "3 percent").
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string Unit {
get { return unit_; }
set {
unit_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "description" field.</summary>
public const int DescriptionFieldNumber = 6;
private string description_ = "";
/// <summary>
/// A detailed description of the metric, which can be used in documentation.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string Description {
get { return description_; }
set {
description_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "display_name" field.</summary>
public const int DisplayNameFieldNumber = 7;
private string displayName_ = "";
/// <summary>
/// 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.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string DisplayName {
get { return displayName_; }
set {
displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "metadata" field.</summary>
public const int MetadataFieldNumber = 10;
private global::Google.Api.MetricDescriptor.Types.MetricDescriptorMetadata metadata_;
/// <summary>
/// Optional. Metadata which can be used to guide usage of the metric.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Google.Api.MetricDescriptor.Types.MetricDescriptorMetadata Metadata {
get { return metadata_; }
set {
metadata_ = value;
}
}
/// <summary>Field number for the "launch_stage" field.</summary>
public const int LaunchStageFieldNumber = 12;
private global::Google.Api.LaunchStage launchStage_ = global::Google.Api.LaunchStage.Unspecified;
/// <summary>
/// Optional. The launch stage of the metric definition.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Google.Api.LaunchStage LaunchStage {
get { return launchStage_; }
set {
launchStage_ = value;
}
}
/// <summary>Field number for the "monitored_resource_types" field.</summary>
public const int MonitoredResourceTypesFieldNumber = 13;
private static readonly pb::FieldCodec<string> _repeated_monitoredResourceTypes_codec
= pb::FieldCodec.ForString(106);
private readonly pbc::RepeatedField<string> monitoredResourceTypes_ = new pbc::RepeatedField<string>();
/// <summary>
/// Read-only. If present, then a [time
/// series][google.monitoring.v3.TimeSeries], which is identified partially by
/// a metric type and a
/// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
/// is associated with this metric type can only be associated with one of the
/// monitored resource types listed here.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::RepeatedField<string> MonitoredResourceTypes {
get { return monitoredResourceTypes_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as MetricDescriptor);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(MetricDescriptor other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Name != other.Name) return false;
if (Type != other.Type) return false;
if(!labels_.Equals(other.labels_)) return false;
if (MetricKind != other.MetricKind) return false;
if (ValueType != other.ValueType) return false;
if (Unit != other.Unit) return false;
if (Description != other.Description) return false;
if (DisplayName != other.DisplayName) return false;
if (!object.Equals(Metadata, other.Metadata)) return false;
if (LaunchStage != other.LaunchStage) return false;
if(!monitoredResourceTypes_.Equals(other.monitoredResourceTypes_)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (Name.Length != 0) hash ^= Name.GetHashCode();
if (Type.Length != 0) hash ^= Type.GetHashCode();
hash ^= labels_.GetHashCode();
if (MetricKind != global::Google.Api.MetricDescriptor.Types.MetricKind.Unspecified) hash ^= MetricKind.GetHashCode();
if (ValueType != global::Google.Api.MetricDescriptor.Types.ValueType.Unspecified) hash ^= ValueType.GetHashCode();
if (Unit.Length != 0) hash ^= Unit.GetHashCode();
if (Description.Length != 0) hash ^= Description.GetHashCode();
if (DisplayName.Length != 0) hash ^= DisplayName.GetHashCode();
if (metadata_ != null) hash ^= Metadata.GetHashCode();
if (LaunchStage != global::Google.Api.LaunchStage.Unspecified) hash ^= LaunchStage.GetHashCode();
hash ^= monitoredResourceTypes_.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
labels_.WriteTo(output, _repeated_labels_codec);
if (MetricKind != global::Google.Api.MetricDescriptor.Types.MetricKind.Unspecified) {
output.WriteRawTag(24);
output.WriteEnum((int) MetricKind);
}
if (ValueType != global::Google.Api.MetricDescriptor.Types.ValueType.Unspecified) {
output.WriteRawTag(32);
output.WriteEnum((int) ValueType);
}
if (Unit.Length != 0) {
output.WriteRawTag(42);
output.WriteString(Unit);
}
if (Description.Length != 0) {
output.WriteRawTag(50);
output.WriteString(Description);
}
if (DisplayName.Length != 0) {
output.WriteRawTag(58);
output.WriteString(DisplayName);
}
if (Type.Length != 0) {
output.WriteRawTag(66);
output.WriteString(Type);
}
if (metadata_ != null) {
output.WriteRawTag(82);
output.WriteMessage(Metadata);
}
if (LaunchStage != global::Google.Api.LaunchStage.Unspecified) {
output.WriteRawTag(96);
output.WriteEnum((int) LaunchStage);
}
monitoredResourceTypes_.WriteTo(output, _repeated_monitoredResourceTypes_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Name.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Name);
}
labels_.WriteTo(ref output, _repeated_labels_codec);
if (MetricKind != global::Google.Api.MetricDescriptor.Types.MetricKind.Unspecified) {
output.WriteRawTag(24);
output.WriteEnum((int) MetricKind);
}
if (ValueType != global::Google.Api.MetricDescriptor.Types.ValueType.Unspecified) {
output.WriteRawTag(32);
output.WriteEnum((int) ValueType);
}
if (Unit.Length != 0) {
output.WriteRawTag(42);
output.WriteString(Unit);
}
if (Description.Length != 0) {
output.WriteRawTag(50);
output.WriteString(Description);
}
if (DisplayName.Length != 0) {
output.WriteRawTag(58);
output.WriteString(DisplayName);
}
if (Type.Length != 0) {
output.WriteRawTag(66);
output.WriteString(Type);
}
if (metadata_ != null) {
output.WriteRawTag(82);
output.WriteMessage(Metadata);
}
if (LaunchStage != global::Google.Api.LaunchStage.Unspecified) {
output.WriteRawTag(96);
output.WriteEnum((int) LaunchStage);
}
monitoredResourceTypes_.WriteTo(ref output, _repeated_monitoredResourceTypes_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (Name.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
}
if (Type.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Type);
}
size += labels_.CalculateSize(_repeated_labels_codec);
if (MetricKind != global::Google.Api.MetricDescriptor.Types.MetricKind.Unspecified) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MetricKind);
}
if (ValueType != global::Google.Api.MetricDescriptor.Types.ValueType.Unspecified) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ValueType);
}
if (Unit.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Unit);
}
if (Description.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
}
if (DisplayName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName);
}
if (metadata_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Metadata);
}
if (LaunchStage != global::Google.Api.LaunchStage.Unspecified) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LaunchStage);
}
size += monitoredResourceTypes_.CalculateSize(_repeated_monitoredResourceTypes_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(MetricDescriptor other) {
if (other == null) {
return;
}
if (other.Name.Length != 0) {
Name = other.Name;
}
if (other.Type.Length != 0) {
Type = other.Type;
}
labels_.Add(other.labels_);
if (other.MetricKind != global::Google.Api.MetricDescriptor.Types.MetricKind.Unspecified) {
MetricKind = other.MetricKind;
}
if (other.ValueType != global::Google.Api.MetricDescriptor.Types.ValueType.Unspecified) {
ValueType = other.ValueType;
}
if (other.Unit.Length != 0) {
Unit = other.Unit;
}
if (other.Description.Length != 0) {
Description = other.Description;
}
if (other.DisplayName.Length != 0) {
DisplayName = other.DisplayName;
}
if (other.metadata_ != null) {
if (metadata_ == null) {
Metadata = new global::Google.Api.MetricDescriptor.Types.MetricDescriptorMetadata();
}
Metadata.MergeFrom(other.Metadata);
}
if (other.LaunchStage != global::Google.Api.LaunchStage.Unspecified) {
LaunchStage = other.LaunchStage;
}
monitoredResourceTypes_.Add(other.monitoredResourceTypes_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
labels_.AddEntriesFrom(input, _repeated_labels_codec);
break;
}
case 24: {
MetricKind = (global::Google.Api.MetricDescriptor.Types.MetricKind) input.ReadEnum();
break;
}
case 32: {
ValueType = (global::Google.Api.MetricDescriptor.Types.ValueType) input.ReadEnum();
break;
}
case 42: {
Unit = input.ReadString();
break;
}
case 50: {
Description = input.ReadString();
break;
}
case 58: {
DisplayName = input.ReadString();
break;
}
case 66: {
Type = input.ReadString();
break;
}
case 82: {
if (metadata_ == null) {
Metadata = new global::Google.Api.MetricDescriptor.Types.MetricDescriptorMetadata();
}
input.ReadMessage(Metadata);
break;
}
case 96: {
LaunchStage = (global::Google.Api.LaunchStage) input.ReadEnum();
break;
}
case 106: {
monitoredResourceTypes_.AddEntriesFrom(input, _repeated_monitoredResourceTypes_codec);
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
labels_.AddEntriesFrom(ref input, _repeated_labels_codec);
break;
}
case 24: {
MetricKind = (global::Google.Api.MetricDescriptor.Types.MetricKind) input.ReadEnum();
break;
}
case 32: {
ValueType = (global::Google.Api.MetricDescriptor.Types.ValueType) input.ReadEnum();
break;
}
case 42: {
Unit = input.ReadString();
break;
}
case 50: {
Description = input.ReadString();
break;
}
case 58: {
DisplayName = input.ReadString();
break;
}
case 66: {
Type = input.ReadString();
break;
}
case 82: {
if (metadata_ == null) {
Metadata = new global::Google.Api.MetricDescriptor.Types.MetricDescriptorMetadata();
}
input.ReadMessage(Metadata);
break;
}
case 96: {
LaunchStage = (global::Google.Api.LaunchStage) input.ReadEnum();
break;
}
case 106: {
monitoredResourceTypes_.AddEntriesFrom(ref input, _repeated_monitoredResourceTypes_codec);
break;
}
}
}
}
#endif
#region Nested types
/// <summary>Container for nested types declared in the MetricDescriptor message type.</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static partial class Types {
/// <summary>
/// The kind of measurement. It describes how the data is reported.
/// For information on setting the start time and end time based on
/// the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval].
/// </summary>
public enum MetricKind {
/// <summary>
/// Do not use this default value.
/// </summary>
[pbr::OriginalName("METRIC_KIND_UNSPECIFIED")] Unspecified = 0,
/// <summary>
/// An instantaneous measurement of a value.
/// </summary>
[pbr::OriginalName("GAUGE")] Gauge = 1,
/// <summary>
/// The change in a value during a time interval.
/// </summary>
[pbr::OriginalName("DELTA")] Delta = 2,
/// <summary>
/// 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.
/// </summary>
[pbr::OriginalName("CUMULATIVE")] Cumulative = 3,
}
/// <summary>
/// The value type of a metric.
/// </summary>
public enum ValueType {
/// <summary>
/// Do not use this default value.
/// </summary>
[pbr::OriginalName("VALUE_TYPE_UNSPECIFIED")] Unspecified = 0,
/// <summary>
/// The value is a boolean.
/// This value type can be used only if the metric kind is `GAUGE`.
/// </summary>
[pbr::OriginalName("BOOL")] Bool = 1,
/// <summary>
/// The value is a signed 64-bit integer.
/// </summary>
[pbr::OriginalName("INT64")] Int64 = 2,
/// <summary>
/// The value is a double precision floating point number.
/// </summary>
[pbr::OriginalName("DOUBLE")] Double = 3,
/// <summary>
/// The value is a text string.
/// This value type can be used only if the metric kind is `GAUGE`.
/// </summary>
[pbr::OriginalName("STRING")] String = 4,
/// <summary>
/// The value is a [`Distribution`][google.api.Distribution].
/// </summary>
[pbr::OriginalName("DISTRIBUTION")] Distribution = 5,
/// <summary>
/// The value is money.
/// </summary>
[pbr::OriginalName("MONEY")] Money = 6,
}
/// <summary>
/// Additional annotations that can be used to guide the usage of a metric.
/// </summary>
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class MetricDescriptorMetadata : pb::IMessage<MetricDescriptorMetadata>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<MetricDescriptorMetadata> _parser = new pb::MessageParser<MetricDescriptorMetadata>(() => new MetricDescriptorMetadata());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<MetricDescriptorMetadata> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Api.MetricDescriptor.Descriptor.NestedTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public MetricDescriptorMetadata() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public MetricDescriptorMetadata(MetricDescriptorMetadata other) : this() {
launchStage_ = other.launchStage_;
samplePeriod_ = other.samplePeriod_ != null ? other.samplePeriod_.Clone() : null;
ingestDelay_ = other.ingestDelay_ != null ? other.ingestDelay_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public MetricDescriptorMetadata Clone() {
return new MetricDescriptorMetadata(this);
}
/// <summary>Field number for the "launch_stage" field.</summary>
public const int LaunchStageFieldNumber = 1;
private global::Google.Api.LaunchStage launchStage_ = global::Google.Api.LaunchStage.Unspecified;
/// <summary>
/// Deprecated. Must use the
/// [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
/// instead.
/// </summary>
[global::System.ObsoleteAttribute]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Google.Api.LaunchStage LaunchStage {
get { return launchStage_; }
set {
launchStage_ = value;
}
}
/// <summary>Field number for the "sample_period" field.</summary>
public const int SamplePeriodFieldNumber = 2;
private global::Google.Protobuf.WellKnownTypes.Duration samplePeriod_;
/// <summary>
/// The sampling period of metric data points. For metrics which are written
/// periodically, consecutive data points are stored at this time interval,
/// excluding data loss due to errors. Metrics with a higher granularity have
/// a smaller sampling period.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Google.Protobuf.WellKnownTypes.Duration SamplePeriod {
get { return samplePeriod_; }
set {
samplePeriod_ = value;
}
}
/// <summary>Field number for the "ingest_delay" field.</summary>
public const int IngestDelayFieldNumber = 3;
private global::Google.Protobuf.WellKnownTypes.Duration ingestDelay_;
/// <summary>
/// The delay of data points caused by ingestion. Data points older than this
/// age are guaranteed to be ingested and available to be read, excluding
/// data loss due to errors.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Google.Protobuf.WellKnownTypes.Duration IngestDelay {
get { return ingestDelay_; }
set {
ingestDelay_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as MetricDescriptorMetadata);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(MetricDescriptorMetadata other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (LaunchStage != other.LaunchStage) return false;
if (!object.Equals(SamplePeriod, other.SamplePeriod)) return false;
if (!object.Equals(IngestDelay, other.IngestDelay)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (LaunchStage != global::Google.Api.LaunchStage.Unspecified) hash ^= LaunchStage.GetHashCode();
if (samplePeriod_ != null) hash ^= SamplePeriod.GetHashCode();
if (ingestDelay_ != null) hash ^= IngestDelay.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (LaunchStage != global::Google.Api.LaunchStage.Unspecified) {
output.WriteRawTag(8);
output.WriteEnum((int) LaunchStage);
}
if (samplePeriod_ != null) {
output.WriteRawTag(18);