Stats.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673
  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. using pb = global::Google.Protobuf;
  8. using pbc = global::Google.Protobuf.Collections;
  9. using pbr = global::Google.Protobuf.Reflection;
  10. using scg = global::System.Collections.Generic;
  11. namespace Grpc.Core {
  12. /// <summary>Holder for reflection information generated from grpc/core/stats.proto</summary>
  13. public static partial class StatsReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for grpc/core/stats.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static StatsReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "ChVncnBjL2NvcmUvc3RhdHMucHJvdG8SCWdycGMuY29yZSImCgZCdWNrZXQS",
  24. "DQoFc3RhcnQYASABKAESDQoFY291bnQYAiABKAQiLwoJSGlzdG9ncmFtEiIK",
  25. "B2J1Y2tldHMYASADKAsyES5ncnBjLmNvcmUuQnVja2V0IlsKBk1ldHJpYxIM",
  26. "CgRuYW1lGAEgASgJEg8KBWNvdW50GAogASgESAASKQoJaGlzdG9ncmFtGAsg",
  27. "ASgLMhQuZ3JwYy5jb3JlLkhpc3RvZ3JhbUgAQgcKBXZhbHVlIisKBVN0YXRz",
  28. "EiIKB21ldHJpY3MYASADKAsyES5ncnBjLmNvcmUuTWV0cmljYgZwcm90bzM="));
  29. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  30. new pbr::FileDescriptor[] { },
  31. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  32. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Bucket), global::Grpc.Core.Bucket.Parser, new[]{ "Start", "Count" }, null, null, null),
  33. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Histogram), global::Grpc.Core.Histogram.Parser, new[]{ "Buckets" }, null, null, null),
  34. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Metric), global::Grpc.Core.Metric.Parser, new[]{ "Name", "Count", "Histogram" }, new[]{ "Value" }, null, null),
  35. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Core.Stats), global::Grpc.Core.Stats.Parser, new[]{ "Metrics" }, null, null, null)
  36. }));
  37. }
  38. #endregion
  39. }
  40. #region Messages
  41. public sealed partial class Bucket : pb::IMessage<Bucket> {
  42. private static readonly pb::MessageParser<Bucket> _parser = new pb::MessageParser<Bucket>(() => new Bucket());
  43. private pb::UnknownFieldSet _unknownFields;
  44. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  45. public static pb::MessageParser<Bucket> Parser { get { return _parser; } }
  46. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  47. public static pbr::MessageDescriptor Descriptor {
  48. get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[0]; }
  49. }
  50. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  51. pbr::MessageDescriptor pb::IMessage.Descriptor {
  52. get { return Descriptor; }
  53. }
  54. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  55. public Bucket() {
  56. OnConstruction();
  57. }
  58. partial void OnConstruction();
  59. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  60. public Bucket(Bucket other) : this() {
  61. start_ = other.start_;
  62. count_ = other.count_;
  63. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  64. }
  65. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  66. public Bucket Clone() {
  67. return new Bucket(this);
  68. }
  69. /// <summary>Field number for the "start" field.</summary>
  70. public const int StartFieldNumber = 1;
  71. private double start_;
  72. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  73. public double Start {
  74. get { return start_; }
  75. set {
  76. start_ = value;
  77. }
  78. }
  79. /// <summary>Field number for the "count" field.</summary>
  80. public const int CountFieldNumber = 2;
  81. private ulong count_;
  82. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  83. public ulong Count {
  84. get { return count_; }
  85. set {
  86. count_ = value;
  87. }
  88. }
  89. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  90. public override bool Equals(object other) {
  91. return Equals(other as Bucket);
  92. }
  93. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  94. public bool Equals(Bucket other) {
  95. if (ReferenceEquals(other, null)) {
  96. return false;
  97. }
  98. if (ReferenceEquals(other, this)) {
  99. return true;
  100. }
  101. if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Start, other.Start)) return false;
  102. if (Count != other.Count) return false;
  103. return Equals(_unknownFields, other._unknownFields);
  104. }
  105. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  106. public override int GetHashCode() {
  107. int hash = 1;
  108. if (Start != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Start);
  109. if (Count != 0UL) hash ^= Count.GetHashCode();
  110. if (_unknownFields != null) {
  111. hash ^= _unknownFields.GetHashCode();
  112. }
  113. return hash;
  114. }
  115. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  116. public override string ToString() {
  117. return pb::JsonFormatter.ToDiagnosticString(this);
  118. }
  119. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  120. public void WriteTo(pb::CodedOutputStream output) {
  121. if (Start != 0D) {
  122. output.WriteRawTag(9);
  123. output.WriteDouble(Start);
  124. }
  125. if (Count != 0UL) {
  126. output.WriteRawTag(16);
  127. output.WriteUInt64(Count);
  128. }
  129. if (_unknownFields != null) {
  130. _unknownFields.WriteTo(output);
  131. }
  132. }
  133. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  134. public int CalculateSize() {
  135. int size = 0;
  136. if (Start != 0D) {
  137. size += 1 + 8;
  138. }
  139. if (Count != 0UL) {
  140. size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Count);
  141. }
  142. if (_unknownFields != null) {
  143. size += _unknownFields.CalculateSize();
  144. }
  145. return size;
  146. }
  147. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  148. public void MergeFrom(Bucket other) {
  149. if (other == null) {
  150. return;
  151. }
  152. if (other.Start != 0D) {
  153. Start = other.Start;
  154. }
  155. if (other.Count != 0UL) {
  156. Count = other.Count;
  157. }
  158. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  159. }
  160. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  161. public void MergeFrom(pb::CodedInputStream input) {
  162. uint tag;
  163. while ((tag = input.ReadTag()) != 0) {
  164. switch(tag) {
  165. default:
  166. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  167. break;
  168. case 9: {
  169. Start = input.ReadDouble();
  170. break;
  171. }
  172. case 16: {
  173. Count = input.ReadUInt64();
  174. break;
  175. }
  176. }
  177. }
  178. }
  179. }
  180. public sealed partial class Histogram : pb::IMessage<Histogram> {
  181. private static readonly pb::MessageParser<Histogram> _parser = new pb::MessageParser<Histogram>(() => new Histogram());
  182. private pb::UnknownFieldSet _unknownFields;
  183. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  184. public static pb::MessageParser<Histogram> Parser { get { return _parser; } }
  185. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  186. public static pbr::MessageDescriptor Descriptor {
  187. get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[1]; }
  188. }
  189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  190. pbr::MessageDescriptor pb::IMessage.Descriptor {
  191. get { return Descriptor; }
  192. }
  193. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  194. public Histogram() {
  195. OnConstruction();
  196. }
  197. partial void OnConstruction();
  198. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  199. public Histogram(Histogram other) : this() {
  200. buckets_ = other.buckets_.Clone();
  201. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  202. }
  203. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  204. public Histogram Clone() {
  205. return new Histogram(this);
  206. }
  207. /// <summary>Field number for the "buckets" field.</summary>
  208. public const int BucketsFieldNumber = 1;
  209. private static readonly pb::FieldCodec<global::Grpc.Core.Bucket> _repeated_buckets_codec
  210. = pb::FieldCodec.ForMessage(10, global::Grpc.Core.Bucket.Parser);
  211. private readonly pbc::RepeatedField<global::Grpc.Core.Bucket> buckets_ = new pbc::RepeatedField<global::Grpc.Core.Bucket>();
  212. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  213. public pbc::RepeatedField<global::Grpc.Core.Bucket> Buckets {
  214. get { return buckets_; }
  215. }
  216. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  217. public override bool Equals(object other) {
  218. return Equals(other as Histogram);
  219. }
  220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  221. public bool Equals(Histogram other) {
  222. if (ReferenceEquals(other, null)) {
  223. return false;
  224. }
  225. if (ReferenceEquals(other, this)) {
  226. return true;
  227. }
  228. if(!buckets_.Equals(other.buckets_)) return false;
  229. return Equals(_unknownFields, other._unknownFields);
  230. }
  231. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  232. public override int GetHashCode() {
  233. int hash = 1;
  234. hash ^= buckets_.GetHashCode();
  235. if (_unknownFields != null) {
  236. hash ^= _unknownFields.GetHashCode();
  237. }
  238. return hash;
  239. }
  240. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  241. public override string ToString() {
  242. return pb::JsonFormatter.ToDiagnosticString(this);
  243. }
  244. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  245. public void WriteTo(pb::CodedOutputStream output) {
  246. buckets_.WriteTo(output, _repeated_buckets_codec);
  247. if (_unknownFields != null) {
  248. _unknownFields.WriteTo(output);
  249. }
  250. }
  251. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  252. public int CalculateSize() {
  253. int size = 0;
  254. size += buckets_.CalculateSize(_repeated_buckets_codec);
  255. if (_unknownFields != null) {
  256. size += _unknownFields.CalculateSize();
  257. }
  258. return size;
  259. }
  260. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  261. public void MergeFrom(Histogram other) {
  262. if (other == null) {
  263. return;
  264. }
  265. buckets_.Add(other.buckets_);
  266. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  267. }
  268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  269. public void MergeFrom(pb::CodedInputStream input) {
  270. uint tag;
  271. while ((tag = input.ReadTag()) != 0) {
  272. switch(tag) {
  273. default:
  274. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  275. break;
  276. case 10: {
  277. buckets_.AddEntriesFrom(input, _repeated_buckets_codec);
  278. break;
  279. }
  280. }
  281. }
  282. }
  283. }
  284. public sealed partial class Metric : pb::IMessage<Metric> {
  285. private static readonly pb::MessageParser<Metric> _parser = new pb::MessageParser<Metric>(() => new Metric());
  286. private pb::UnknownFieldSet _unknownFields;
  287. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  288. public static pb::MessageParser<Metric> Parser { get { return _parser; } }
  289. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  290. public static pbr::MessageDescriptor Descriptor {
  291. get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[2]; }
  292. }
  293. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  294. pbr::MessageDescriptor pb::IMessage.Descriptor {
  295. get { return Descriptor; }
  296. }
  297. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  298. public Metric() {
  299. OnConstruction();
  300. }
  301. partial void OnConstruction();
  302. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  303. public Metric(Metric other) : this() {
  304. name_ = other.name_;
  305. switch (other.ValueCase) {
  306. case ValueOneofCase.Count:
  307. Count = other.Count;
  308. break;
  309. case ValueOneofCase.Histogram:
  310. Histogram = other.Histogram.Clone();
  311. break;
  312. }
  313. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  314. }
  315. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  316. public Metric Clone() {
  317. return new Metric(this);
  318. }
  319. /// <summary>Field number for the "name" field.</summary>
  320. public const int NameFieldNumber = 1;
  321. private string name_ = "";
  322. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  323. public string Name {
  324. get { return name_; }
  325. set {
  326. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  327. }
  328. }
  329. /// <summary>Field number for the "count" field.</summary>
  330. public const int CountFieldNumber = 10;
  331. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  332. public ulong Count {
  333. get { return valueCase_ == ValueOneofCase.Count ? (ulong) value_ : 0UL; }
  334. set {
  335. value_ = value;
  336. valueCase_ = ValueOneofCase.Count;
  337. }
  338. }
  339. /// <summary>Field number for the "histogram" field.</summary>
  340. public const int HistogramFieldNumber = 11;
  341. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  342. public global::Grpc.Core.Histogram Histogram {
  343. get { return valueCase_ == ValueOneofCase.Histogram ? (global::Grpc.Core.Histogram) value_ : null; }
  344. set {
  345. value_ = value;
  346. valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.Histogram;
  347. }
  348. }
  349. private object value_;
  350. /// <summary>Enum of possible cases for the "value" oneof.</summary>
  351. public enum ValueOneofCase {
  352. None = 0,
  353. Count = 10,
  354. Histogram = 11,
  355. }
  356. private ValueOneofCase valueCase_ = ValueOneofCase.None;
  357. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  358. public ValueOneofCase ValueCase {
  359. get { return valueCase_; }
  360. }
  361. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  362. public void ClearValue() {
  363. valueCase_ = ValueOneofCase.None;
  364. value_ = null;
  365. }
  366. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  367. public override bool Equals(object other) {
  368. return Equals(other as Metric);
  369. }
  370. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  371. public bool Equals(Metric other) {
  372. if (ReferenceEquals(other, null)) {
  373. return false;
  374. }
  375. if (ReferenceEquals(other, this)) {
  376. return true;
  377. }
  378. if (Name != other.Name) return false;
  379. if (Count != other.Count) return false;
  380. if (!object.Equals(Histogram, other.Histogram)) return false;
  381. if (ValueCase != other.ValueCase) return false;
  382. return Equals(_unknownFields, other._unknownFields);
  383. }
  384. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  385. public override int GetHashCode() {
  386. int hash = 1;
  387. if (Name.Length != 0) hash ^= Name.GetHashCode();
  388. if (valueCase_ == ValueOneofCase.Count) hash ^= Count.GetHashCode();
  389. if (valueCase_ == ValueOneofCase.Histogram) hash ^= Histogram.GetHashCode();
  390. hash ^= (int) valueCase_;
  391. if (_unknownFields != null) {
  392. hash ^= _unknownFields.GetHashCode();
  393. }
  394. return hash;
  395. }
  396. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  397. public override string ToString() {
  398. return pb::JsonFormatter.ToDiagnosticString(this);
  399. }
  400. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  401. public void WriteTo(pb::CodedOutputStream output) {
  402. if (Name.Length != 0) {
  403. output.WriteRawTag(10);
  404. output.WriteString(Name);
  405. }
  406. if (valueCase_ == ValueOneofCase.Count) {
  407. output.WriteRawTag(80);
  408. output.WriteUInt64(Count);
  409. }
  410. if (valueCase_ == ValueOneofCase.Histogram) {
  411. output.WriteRawTag(90);
  412. output.WriteMessage(Histogram);
  413. }
  414. if (_unknownFields != null) {
  415. _unknownFields.WriteTo(output);
  416. }
  417. }
  418. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  419. public int CalculateSize() {
  420. int size = 0;
  421. if (Name.Length != 0) {
  422. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  423. }
  424. if (valueCase_ == ValueOneofCase.Count) {
  425. size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Count);
  426. }
  427. if (valueCase_ == ValueOneofCase.Histogram) {
  428. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Histogram);
  429. }
  430. if (_unknownFields != null) {
  431. size += _unknownFields.CalculateSize();
  432. }
  433. return size;
  434. }
  435. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  436. public void MergeFrom(Metric other) {
  437. if (other == null) {
  438. return;
  439. }
  440. if (other.Name.Length != 0) {
  441. Name = other.Name;
  442. }
  443. switch (other.ValueCase) {
  444. case ValueOneofCase.Count:
  445. Count = other.Count;
  446. break;
  447. case ValueOneofCase.Histogram:
  448. if (Histogram == null) {
  449. Histogram = new global::Grpc.Core.Histogram();
  450. }
  451. Histogram.MergeFrom(other.Histogram);
  452. break;
  453. }
  454. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  455. }
  456. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  457. public void MergeFrom(pb::CodedInputStream input) {
  458. uint tag;
  459. while ((tag = input.ReadTag()) != 0) {
  460. switch(tag) {
  461. default:
  462. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  463. break;
  464. case 10: {
  465. Name = input.ReadString();
  466. break;
  467. }
  468. case 80: {
  469. Count = input.ReadUInt64();
  470. break;
  471. }
  472. case 90: {
  473. global::Grpc.Core.Histogram subBuilder = new global::Grpc.Core.Histogram();
  474. if (valueCase_ == ValueOneofCase.Histogram) {
  475. subBuilder.MergeFrom(Histogram);
  476. }
  477. input.ReadMessage(subBuilder);
  478. Histogram = subBuilder;
  479. break;
  480. }
  481. }
  482. }
  483. }
  484. }
  485. public sealed partial class Stats : pb::IMessage<Stats> {
  486. private static readonly pb::MessageParser<Stats> _parser = new pb::MessageParser<Stats>(() => new Stats());
  487. private pb::UnknownFieldSet _unknownFields;
  488. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  489. public static pb::MessageParser<Stats> Parser { get { return _parser; } }
  490. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  491. public static pbr::MessageDescriptor Descriptor {
  492. get { return global::Grpc.Core.StatsReflection.Descriptor.MessageTypes[3]; }
  493. }
  494. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  495. pbr::MessageDescriptor pb::IMessage.Descriptor {
  496. get { return Descriptor; }
  497. }
  498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  499. public Stats() {
  500. OnConstruction();
  501. }
  502. partial void OnConstruction();
  503. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  504. public Stats(Stats other) : this() {
  505. metrics_ = other.metrics_.Clone();
  506. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  507. }
  508. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  509. public Stats Clone() {
  510. return new Stats(this);
  511. }
  512. /// <summary>Field number for the "metrics" field.</summary>
  513. public const int MetricsFieldNumber = 1;
  514. private static readonly pb::FieldCodec<global::Grpc.Core.Metric> _repeated_metrics_codec
  515. = pb::FieldCodec.ForMessage(10, global::Grpc.Core.Metric.Parser);
  516. private readonly pbc::RepeatedField<global::Grpc.Core.Metric> metrics_ = new pbc::RepeatedField<global::Grpc.Core.Metric>();
  517. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  518. public pbc::RepeatedField<global::Grpc.Core.Metric> Metrics {
  519. get { return metrics_; }
  520. }
  521. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  522. public override bool Equals(object other) {
  523. return Equals(other as Stats);
  524. }
  525. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  526. public bool Equals(Stats other) {
  527. if (ReferenceEquals(other, null)) {
  528. return false;
  529. }
  530. if (ReferenceEquals(other, this)) {
  531. return true;
  532. }
  533. if(!metrics_.Equals(other.metrics_)) return false;
  534. return Equals(_unknownFields, other._unknownFields);
  535. }
  536. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  537. public override int GetHashCode() {
  538. int hash = 1;
  539. hash ^= metrics_.GetHashCode();
  540. if (_unknownFields != null) {
  541. hash ^= _unknownFields.GetHashCode();
  542. }
  543. return hash;
  544. }
  545. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  546. public override string ToString() {
  547. return pb::JsonFormatter.ToDiagnosticString(this);
  548. }
  549. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  550. public void WriteTo(pb::CodedOutputStream output) {
  551. metrics_.WriteTo(output, _repeated_metrics_codec);
  552. if (_unknownFields != null) {
  553. _unknownFields.WriteTo(output);
  554. }
  555. }
  556. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  557. public int CalculateSize() {
  558. int size = 0;
  559. size += metrics_.CalculateSize(_repeated_metrics_codec);
  560. if (_unknownFields != null) {
  561. size += _unknownFields.CalculateSize();
  562. }
  563. return size;
  564. }
  565. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  566. public void MergeFrom(Stats other) {
  567. if (other == null) {
  568. return;
  569. }
  570. metrics_.Add(other.metrics_);
  571. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  572. }
  573. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  574. public void MergeFrom(pb::CodedInputStream input) {
  575. uint tag;
  576. while ((tag = input.ReadTag()) != 0) {
  577. switch(tag) {
  578. default:
  579. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  580. break;
  581. case 10: {
  582. metrics_.AddEntriesFrom(input, _repeated_metrics_codec);
  583. break;
  584. }
  585. }
  586. }
  587. }
  588. }
  589. #endregion
  590. }
  591. #endregion Designer generated code