• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // <auto-generated>
2 //     Generated by the protocol buffer compiler.  DO NOT EDIT!
3 //     source: grpc/core/stats.proto
4 // </auto-generated>
5 #pragma warning disable 1591, 0612, 3021
6 #region Designer generated code
7 
8 using pb = global::Google.Protobuf;
9 using pbc = global::Google.Protobuf.Collections;
10 using pbr = global::Google.Protobuf.Reflection;
11 using scg = global::System.Collections.Generic;
12 namespace Grpc.Core {
13 
14   /// <summary>Holder for reflection information generated from grpc/core/stats.proto</summary>
15   public static partial class StatsReflection {
16 
17     #region Descriptor
18     /// <summary>File descriptor for grpc/core/stats.proto</summary>
19     public static pbr::FileDescriptor Descriptor {
20       get { return descriptor; }
21     }
22     private static pbr::FileDescriptor descriptor;
23 
StatsReflection()24     static StatsReflection() {
25       byte[] descriptorData = global::System.Convert.FromBase64String(
26           string.Concat(
27             "ChVncnBjL2NvcmUvc3RhdHMucHJvdG8SCWdycGMuY29yZSImCgZCdWNrZXQS",
28             "DQoFc3RhcnQYASABKAESDQoFY291bnQYAiABKAQiLwoJSGlzdG9ncmFtEiIK",
29             "B2J1Y2tldHMYASADKAsyES5ncnBjLmNvcmUuQnVja2V0IlsKBk1ldHJpYxIM",
30             "CgRuYW1lGAEgASgJEg8KBWNvdW50GAogASgESAASKQoJaGlzdG9ncmFtGAsg",
31             "ASgLMhQuZ3JwYy5jb3JlLkhpc3RvZ3JhbUgAQgcKBXZhbHVlIisKBVN0YXRz",
32             "EiIKB21ldHJpY3MYASADKAsyES5ncnBjLmNvcmUuTWV0cmljYgZwcm90bzM="));
33       descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
34           new pbr::FileDescriptor[] { },
35           new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
36             new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Bucket), global::Grpc.Core.Bucket.Parser, new[]{ "Start", "Count" }, null, null, null, null),
37             new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Histogram), global::Grpc.Core.Histogram.Parser, new[]{ "Buckets" }, null, null, null, null),
38             new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Metric), global::Grpc.Core.Metric.Parser, new[]{ "Name", "Count", "Histogram" }, new[]{ "Value" }, null, null, null),
39             new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Stats), global::Grpc.Core.Stats.Parser, new[]{ "Metrics" }, null, null, null, null)
40           }));
41     }
42     #endregion
43 
44   }
45   #region Messages
46   public sealed partial class Bucket : pb::IMessage<Bucket>
47   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
48       , pb::IBufferMessage
49   #endif
50   {
51     private static readonly pb::MessageParser<Bucket> _parser = new pb::MessageParser<Bucket>(() => new Bucket());
52     private pb::UnknownFieldSet _unknownFields;
53     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
54     public static pb::MessageParser<Bucket> Parser { get { return _parser; } }
55 
56     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
57     public static pbr::MessageDescriptor Descriptor {
58       get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[0]; }
59     }
60 
61     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
62     pbr::MessageDescriptor pb::IMessage.Descriptor {
63       get { return Descriptor; }
64     }
65 
66     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Bucket()67     public Bucket() {
68       OnConstruction();
69     }
70 
OnConstruction()71     partial void OnConstruction();
72 
73     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Bucket(Bucket other)74     public Bucket(Bucket other) : this() {
75       start_ = other.start_;
76       count_ = other.count_;
77       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
78     }
79 
80     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()81     public Bucket Clone() {
82       return new Bucket(this);
83     }
84 
85     /// <summary>Field number for the "start" field.</summary>
86     public const int StartFieldNumber = 1;
87     private double start_;
88     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
89     public double Start {
90       get { return start_; }
91       set {
92         start_ = value;
93       }
94     }
95 
96     /// <summary>Field number for the "count" field.</summary>
97     public const int CountFieldNumber = 2;
98     private ulong count_;
99     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
100     public ulong Count {
101       get { return count_; }
102       set {
103         count_ = value;
104       }
105     }
106 
107     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)108     public override bool Equals(object other) {
109       return Equals(other as Bucket);
110     }
111 
112     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(Bucket other)113     public bool Equals(Bucket other) {
114       if (ReferenceEquals(other, null)) {
115         return false;
116       }
117       if (ReferenceEquals(other, this)) {
118         return true;
119       }
120       if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Start, other.Start)) return false;
121       if (Count != other.Count) return false;
122       return Equals(_unknownFields, other._unknownFields);
123     }
124 
125     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()126     public override int GetHashCode() {
127       int hash = 1;
128       if (Start != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Start);
129       if (Count != 0UL) hash ^= Count.GetHashCode();
130       if (_unknownFields != null) {
131         hash ^= _unknownFields.GetHashCode();
132       }
133       return hash;
134     }
135 
136     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()137     public override string ToString() {
138       return pb::JsonFormatter.ToDiagnosticString(this);
139     }
140 
141     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)142     public void WriteTo(pb::CodedOutputStream output) {
143     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
144       output.WriteRawMessage(this);
145     #else
146       if (Start != 0D) {
147         output.WriteRawTag(9);
148         output.WriteDouble(Start);
149       }
150       if (Count != 0UL) {
151         output.WriteRawTag(16);
152         output.WriteUInt64(Count);
153       }
154       if (_unknownFields != null) {
155         _unknownFields.WriteTo(output);
156       }
157     #endif
158     }
159 
160     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
161     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)162     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
163       if (Start != 0D) {
164         output.WriteRawTag(9);
165         output.WriteDouble(Start);
166       }
167       if (Count != 0UL) {
168         output.WriteRawTag(16);
169         output.WriteUInt64(Count);
170       }
171       if (_unknownFields != null) {
172         _unknownFields.WriteTo(ref output);
173       }
174     }
175     #endif
176 
177     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()178     public int CalculateSize() {
179       int size = 0;
180       if (Start != 0D) {
181         size += 1 + 8;
182       }
183       if (Count != 0UL) {
184         size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Count);
185       }
186       if (_unknownFields != null) {
187         size += _unknownFields.CalculateSize();
188       }
189       return size;
190     }
191 
192     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(Bucket other)193     public void MergeFrom(Bucket other) {
194       if (other == null) {
195         return;
196       }
197       if (other.Start != 0D) {
198         Start = other.Start;
199       }
200       if (other.Count != 0UL) {
201         Count = other.Count;
202       }
203       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
204     }
205 
206     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)207     public void MergeFrom(pb::CodedInputStream input) {
208     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
209       input.ReadRawMessage(this);
210     #else
211       uint tag;
212       while ((tag = input.ReadTag()) != 0) {
213         switch(tag) {
214           default:
215             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
216             break;
217           case 9: {
218             Start = input.ReadDouble();
219             break;
220           }
221           case 16: {
222             Count = input.ReadUInt64();
223             break;
224           }
225         }
226       }
227     #endif
228     }
229 
230     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
231     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)232     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
233       uint tag;
234       while ((tag = input.ReadTag()) != 0) {
235         switch(tag) {
236           default:
237             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
238             break;
239           case 9: {
240             Start = input.ReadDouble();
241             break;
242           }
243           case 16: {
244             Count = input.ReadUInt64();
245             break;
246           }
247         }
248       }
249     }
250     #endif
251 
252   }
253 
254   public sealed partial class Histogram : pb::IMessage<Histogram>
255   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
256       , pb::IBufferMessage
257   #endif
258   {
259     private static readonly pb::MessageParser<Histogram> _parser = new pb::MessageParser<Histogram>(() => new Histogram());
260     private pb::UnknownFieldSet _unknownFields;
261     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
262     public static pb::MessageParser<Histogram> Parser { get { return _parser; } }
263 
264     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
265     public static pbr::MessageDescriptor Descriptor {
266       get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[1]; }
267     }
268 
269     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
270     pbr::MessageDescriptor pb::IMessage.Descriptor {
271       get { return Descriptor; }
272     }
273 
274     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Histogram()275     public Histogram() {
276       OnConstruction();
277     }
278 
OnConstruction()279     partial void OnConstruction();
280 
281     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Histogram(Histogram other)282     public Histogram(Histogram other) : this() {
283       buckets_ = other.buckets_.Clone();
284       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
285     }
286 
287     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()288     public Histogram Clone() {
289       return new Histogram(this);
290     }
291 
292     /// <summary>Field number for the "buckets" field.</summary>
293     public const int BucketsFieldNumber = 1;
294     private static readonly pb::FieldCodec<global::Grpc.Core.Bucket> _repeated_buckets_codec
295         = pb::FieldCodec.ForMessage(10, global::Grpc.Core.Bucket.Parser);
296     private readonly pbc::RepeatedField<global::Grpc.Core.Bucket> buckets_ = new pbc::RepeatedField<global::Grpc.Core.Bucket>();
297     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
298     public pbc::RepeatedField<global::Grpc.Core.Bucket> Buckets {
299       get { return buckets_; }
300     }
301 
302     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)303     public override bool Equals(object other) {
304       return Equals(other as Histogram);
305     }
306 
307     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(Histogram other)308     public bool Equals(Histogram other) {
309       if (ReferenceEquals(other, null)) {
310         return false;
311       }
312       if (ReferenceEquals(other, this)) {
313         return true;
314       }
315       if(!buckets_.Equals(other.buckets_)) return false;
316       return Equals(_unknownFields, other._unknownFields);
317     }
318 
319     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()320     public override int GetHashCode() {
321       int hash = 1;
322       hash ^= buckets_.GetHashCode();
323       if (_unknownFields != null) {
324         hash ^= _unknownFields.GetHashCode();
325       }
326       return hash;
327     }
328 
329     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()330     public override string ToString() {
331       return pb::JsonFormatter.ToDiagnosticString(this);
332     }
333 
334     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)335     public void WriteTo(pb::CodedOutputStream output) {
336     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
337       output.WriteRawMessage(this);
338     #else
339       buckets_.WriteTo(output, _repeated_buckets_codec);
340       if (_unknownFields != null) {
341         _unknownFields.WriteTo(output);
342       }
343     #endif
344     }
345 
346     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
347     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)348     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
349       buckets_.WriteTo(ref output, _repeated_buckets_codec);
350       if (_unknownFields != null) {
351         _unknownFields.WriteTo(ref output);
352       }
353     }
354     #endif
355 
356     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()357     public int CalculateSize() {
358       int size = 0;
359       size += buckets_.CalculateSize(_repeated_buckets_codec);
360       if (_unknownFields != null) {
361         size += _unknownFields.CalculateSize();
362       }
363       return size;
364     }
365 
366     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(Histogram other)367     public void MergeFrom(Histogram other) {
368       if (other == null) {
369         return;
370       }
371       buckets_.Add(other.buckets_);
372       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
373     }
374 
375     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)376     public void MergeFrom(pb::CodedInputStream input) {
377     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
378       input.ReadRawMessage(this);
379     #else
380       uint tag;
381       while ((tag = input.ReadTag()) != 0) {
382         switch(tag) {
383           default:
384             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
385             break;
386           case 10: {
387             buckets_.AddEntriesFrom(input, _repeated_buckets_codec);
388             break;
389           }
390         }
391       }
392     #endif
393     }
394 
395     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
396     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)397     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
398       uint tag;
399       while ((tag = input.ReadTag()) != 0) {
400         switch(tag) {
401           default:
402             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
403             break;
404           case 10: {
405             buckets_.AddEntriesFrom(ref input, _repeated_buckets_codec);
406             break;
407           }
408         }
409       }
410     }
411     #endif
412 
413   }
414 
415   public sealed partial class Metric : pb::IMessage<Metric>
416   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
417       , pb::IBufferMessage
418   #endif
419   {
420     private static readonly pb::MessageParser<Metric> _parser = new pb::MessageParser<Metric>(() => new Metric());
421     private pb::UnknownFieldSet _unknownFields;
422     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
423     public static pb::MessageParser<Metric> Parser { get { return _parser; } }
424 
425     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
426     public static pbr::MessageDescriptor Descriptor {
427       get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[2]; }
428     }
429 
430     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
431     pbr::MessageDescriptor pb::IMessage.Descriptor {
432       get { return Descriptor; }
433     }
434 
435     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Metric()436     public Metric() {
437       OnConstruction();
438     }
439 
OnConstruction()440     partial void OnConstruction();
441 
442     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Metric(Metric other)443     public Metric(Metric other) : this() {
444       name_ = other.name_;
445       switch (other.ValueCase) {
446         case ValueOneofCase.Count:
447           Count = other.Count;
448           break;
449         case ValueOneofCase.Histogram:
450           Histogram = other.Histogram.Clone();
451           break;
452       }
453 
454       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
455     }
456 
457     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()458     public Metric Clone() {
459       return new Metric(this);
460     }
461 
462     /// <summary>Field number for the "name" field.</summary>
463     public const int NameFieldNumber = 1;
464     private string name_ = "";
465     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
466     public string Name {
467       get { return name_; }
468       set {
469         name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
470       }
471     }
472 
473     /// <summary>Field number for the "count" field.</summary>
474     public const int CountFieldNumber = 10;
475     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
476     public ulong Count {
477       get { return valueCase_ == ValueOneofCase.Count ? (ulong) value_ : 0UL; }
478       set {
479         value_ = value;
480         valueCase_ = ValueOneofCase.Count;
481       }
482     }
483 
484     /// <summary>Field number for the "histogram" field.</summary>
485     public const int HistogramFieldNumber = 11;
486     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
487     public global::Grpc.Core.Histogram Histogram {
488       get { return valueCase_ == ValueOneofCase.Histogram ? (global::Grpc.Core.Histogram) value_ : null; }
489       set {
490         value_ = value;
491         valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.Histogram;
492       }
493     }
494 
495     private object value_;
496     /// <summary>Enum of possible cases for the "value" oneof.</summary>
497     public enum ValueOneofCase {
498       None = 0,
499       Count = 10,
500       Histogram = 11,
501     }
502     private ValueOneofCase valueCase_ = ValueOneofCase.None;
503     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
504     public ValueOneofCase ValueCase {
505       get { return valueCase_; }
506     }
507 
508     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ClearValue()509     public void ClearValue() {
510       valueCase_ = ValueOneofCase.None;
511       value_ = null;
512     }
513 
514     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)515     public override bool Equals(object other) {
516       return Equals(other as Metric);
517     }
518 
519     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(Metric other)520     public bool Equals(Metric other) {
521       if (ReferenceEquals(other, null)) {
522         return false;
523       }
524       if (ReferenceEquals(other, this)) {
525         return true;
526       }
527       if (Name != other.Name) return false;
528       if (Count != other.Count) return false;
529       if (!object.Equals(Histogram, other.Histogram)) return false;
530       if (ValueCase != other.ValueCase) return false;
531       return Equals(_unknownFields, other._unknownFields);
532     }
533 
534     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()535     public override int GetHashCode() {
536       int hash = 1;
537       if (Name.Length != 0) hash ^= Name.GetHashCode();
538       if (valueCase_ == ValueOneofCase.Count) hash ^= Count.GetHashCode();
539       if (valueCase_ == ValueOneofCase.Histogram) hash ^= Histogram.GetHashCode();
540       hash ^= (int) valueCase_;
541       if (_unknownFields != null) {
542         hash ^= _unknownFields.GetHashCode();
543       }
544       return hash;
545     }
546 
547     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()548     public override string ToString() {
549       return pb::JsonFormatter.ToDiagnosticString(this);
550     }
551 
552     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)553     public void WriteTo(pb::CodedOutputStream output) {
554     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
555       output.WriteRawMessage(this);
556     #else
557       if (Name.Length != 0) {
558         output.WriteRawTag(10);
559         output.WriteString(Name);
560       }
561       if (valueCase_ == ValueOneofCase.Count) {
562         output.WriteRawTag(80);
563         output.WriteUInt64(Count);
564       }
565       if (valueCase_ == ValueOneofCase.Histogram) {
566         output.WriteRawTag(90);
567         output.WriteMessage(Histogram);
568       }
569       if (_unknownFields != null) {
570         _unknownFields.WriteTo(output);
571       }
572     #endif
573     }
574 
575     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
576     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)577     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
578       if (Name.Length != 0) {
579         output.WriteRawTag(10);
580         output.WriteString(Name);
581       }
582       if (valueCase_ == ValueOneofCase.Count) {
583         output.WriteRawTag(80);
584         output.WriteUInt64(Count);
585       }
586       if (valueCase_ == ValueOneofCase.Histogram) {
587         output.WriteRawTag(90);
588         output.WriteMessage(Histogram);
589       }
590       if (_unknownFields != null) {
591         _unknownFields.WriteTo(ref output);
592       }
593     }
594     #endif
595 
596     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()597     public int CalculateSize() {
598       int size = 0;
599       if (Name.Length != 0) {
600         size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
601       }
602       if (valueCase_ == ValueOneofCase.Count) {
603         size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Count);
604       }
605       if (valueCase_ == ValueOneofCase.Histogram) {
606         size += 1 + pb::CodedOutputStream.ComputeMessageSize(Histogram);
607       }
608       if (_unknownFields != null) {
609         size += _unknownFields.CalculateSize();
610       }
611       return size;
612     }
613 
614     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(Metric other)615     public void MergeFrom(Metric other) {
616       if (other == null) {
617         return;
618       }
619       if (other.Name.Length != 0) {
620         Name = other.Name;
621       }
622       switch (other.ValueCase) {
623         case ValueOneofCase.Count:
624           Count = other.Count;
625           break;
626         case ValueOneofCase.Histogram:
627           if (Histogram == null) {
628             Histogram = new global::Grpc.Core.Histogram();
629           }
630           Histogram.MergeFrom(other.Histogram);
631           break;
632       }
633 
634       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
635     }
636 
637     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)638     public void MergeFrom(pb::CodedInputStream input) {
639     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
640       input.ReadRawMessage(this);
641     #else
642       uint tag;
643       while ((tag = input.ReadTag()) != 0) {
644         switch(tag) {
645           default:
646             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
647             break;
648           case 10: {
649             Name = input.ReadString();
650             break;
651           }
652           case 80: {
653             Count = input.ReadUInt64();
654             break;
655           }
656           case 90: {
657             global::Grpc.Core.Histogram subBuilder = new global::Grpc.Core.Histogram();
658             if (valueCase_ == ValueOneofCase.Histogram) {
659               subBuilder.MergeFrom(Histogram);
660             }
661             input.ReadMessage(subBuilder);
662             Histogram = subBuilder;
663             break;
664           }
665         }
666       }
667     #endif
668     }
669 
670     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
671     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)672     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
673       uint tag;
674       while ((tag = input.ReadTag()) != 0) {
675         switch(tag) {
676           default:
677             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
678             break;
679           case 10: {
680             Name = input.ReadString();
681             break;
682           }
683           case 80: {
684             Count = input.ReadUInt64();
685             break;
686           }
687           case 90: {
688             global::Grpc.Core.Histogram subBuilder = new global::Grpc.Core.Histogram();
689             if (valueCase_ == ValueOneofCase.Histogram) {
690               subBuilder.MergeFrom(Histogram);
691             }
692             input.ReadMessage(subBuilder);
693             Histogram = subBuilder;
694             break;
695           }
696         }
697       }
698     }
699     #endif
700 
701   }
702 
703   public sealed partial class Stats : pb::IMessage<Stats>
704   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
705       , pb::IBufferMessage
706   #endif
707   {
708     private static readonly pb::MessageParser<Stats> _parser = new pb::MessageParser<Stats>(() => new Stats());
709     private pb::UnknownFieldSet _unknownFields;
710     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
711     public static pb::MessageParser<Stats> Parser { get { return _parser; } }
712 
713     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
714     public static pbr::MessageDescriptor Descriptor {
715       get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[3]; }
716     }
717 
718     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
719     pbr::MessageDescriptor pb::IMessage.Descriptor {
720       get { return Descriptor; }
721     }
722 
723     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Stats()724     public Stats() {
725       OnConstruction();
726     }
727 
OnConstruction()728     partial void OnConstruction();
729 
730     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Stats(Stats other)731     public Stats(Stats other) : this() {
732       metrics_ = other.metrics_.Clone();
733       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
734     }
735 
736     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()737     public Stats Clone() {
738       return new Stats(this);
739     }
740 
741     /// <summary>Field number for the "metrics" field.</summary>
742     public const int MetricsFieldNumber = 1;
743     private static readonly pb::FieldCodec<global::Grpc.Core.Metric> _repeated_metrics_codec
744         = pb::FieldCodec.ForMessage(10, global::Grpc.Core.Metric.Parser);
745     private readonly pbc::RepeatedField<global::Grpc.Core.Metric> metrics_ = new pbc::RepeatedField<global::Grpc.Core.Metric>();
746     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
747     public pbc::RepeatedField<global::Grpc.Core.Metric> Metrics {
748       get { return metrics_; }
749     }
750 
751     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)752     public override bool Equals(object other) {
753       return Equals(other as Stats);
754     }
755 
756     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(Stats other)757     public bool Equals(Stats other) {
758       if (ReferenceEquals(other, null)) {
759         return false;
760       }
761       if (ReferenceEquals(other, this)) {
762         return true;
763       }
764       if(!metrics_.Equals(other.metrics_)) return false;
765       return Equals(_unknownFields, other._unknownFields);
766     }
767 
768     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()769     public override int GetHashCode() {
770       int hash = 1;
771       hash ^= metrics_.GetHashCode();
772       if (_unknownFields != null) {
773         hash ^= _unknownFields.GetHashCode();
774       }
775       return hash;
776     }
777 
778     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()779     public override string ToString() {
780       return pb::JsonFormatter.ToDiagnosticString(this);
781     }
782 
783     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)784     public void WriteTo(pb::CodedOutputStream output) {
785     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
786       output.WriteRawMessage(this);
787     #else
788       metrics_.WriteTo(output, _repeated_metrics_codec);
789       if (_unknownFields != null) {
790         _unknownFields.WriteTo(output);
791       }
792     #endif
793     }
794 
795     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
796     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)797     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
798       metrics_.WriteTo(ref output, _repeated_metrics_codec);
799       if (_unknownFields != null) {
800         _unknownFields.WriteTo(ref output);
801       }
802     }
803     #endif
804 
805     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()806     public int CalculateSize() {
807       int size = 0;
808       size += metrics_.CalculateSize(_repeated_metrics_codec);
809       if (_unknownFields != null) {
810         size += _unknownFields.CalculateSize();
811       }
812       return size;
813     }
814 
815     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(Stats other)816     public void MergeFrom(Stats other) {
817       if (other == null) {
818         return;
819       }
820       metrics_.Add(other.metrics_);
821       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
822     }
823 
824     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)825     public void MergeFrom(pb::CodedInputStream input) {
826     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
827       input.ReadRawMessage(this);
828     #else
829       uint tag;
830       while ((tag = input.ReadTag()) != 0) {
831         switch(tag) {
832           default:
833             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
834             break;
835           case 10: {
836             metrics_.AddEntriesFrom(input, _repeated_metrics_codec);
837             break;
838           }
839         }
840       }
841     #endif
842     }
843 
844     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
845     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)846     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
847       uint tag;
848       while ((tag = input.ReadTag()) != 0) {
849         switch(tag) {
850           default:
851             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
852             break;
853           case 10: {
854             metrics_.AddEntriesFrom(ref input, _repeated_metrics_codec);
855             break;
856           }
857         }
858       }
859     }
860     #endif
861 
862   }
863 
864   #endregion
865 
866 }
867 
868 #endregion Designer generated code
869