Metrics.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: src/proto/grpc/testing/metrics.proto
  3. #pragma warning disable 1591, 0612, 3021
  4. #region Designer generated code
  5. using pb = global::Google.Protobuf;
  6. using pbc = global::Google.Protobuf.Collections;
  7. using pbr = global::Google.Protobuf.Reflection;
  8. using scg = global::System.Collections.Generic;
  9. namespace Grpc.Testing {
  10. /// <summary>Holder for reflection information generated from src/proto/grpc/testing/metrics.proto</summary>
  11. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  12. public static partial class MetricsReflection {
  13. #region Descriptor
  14. /// <summary>File descriptor for src/proto/grpc/testing/metrics.proto</summary>
  15. public static pbr::FileDescriptor Descriptor {
  16. get { return descriptor; }
  17. }
  18. private static pbr::FileDescriptor descriptor;
  19. static MetricsReflection() {
  20. byte[] descriptorData = global::System.Convert.FromBase64String(
  21. string.Concat(
  22. "CiRzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL21ldHJpY3MucHJvdG8SDGdycGMu",
  23. "dGVzdGluZyJsCg1HYXVnZVJlc3BvbnNlEgwKBG5hbWUYASABKAkSFAoKbG9u",
  24. "Z192YWx1ZRgCIAEoA0gAEhYKDGRvdWJsZV92YWx1ZRgDIAEoAUgAEhYKDHN0",
  25. "cmluZ192YWx1ZRgEIAEoCUgAQgcKBXZhbHVlIhwKDEdhdWdlUmVxdWVzdBIM",
  26. "CgRuYW1lGAEgASgJIg4KDEVtcHR5TWVzc2FnZTKgAQoOTWV0cmljc1NlcnZp",
  27. "Y2USSQoMR2V0QWxsR2F1Z2VzEhouZ3JwYy50ZXN0aW5nLkVtcHR5TWVzc2Fn",
  28. "ZRobLmdycGMudGVzdGluZy5HYXVnZVJlc3BvbnNlMAESQwoIR2V0R2F1Z2US",
  29. "Gi5ncnBjLnRlc3RpbmcuR2F1Z2VSZXF1ZXN0GhsuZ3JwYy50ZXN0aW5nLkdh",
  30. "dWdlUmVzcG9uc2ViBnByb3RvMw=="));
  31. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  32. new pbr::FileDescriptor[] { },
  33. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  34. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.GaugeResponse), global::Grpc.Testing.GaugeResponse.Parser, new[]{ "Name", "LongValue", "DoubleValue", "StringValue" }, new[]{ "Value" }, null, null),
  35. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.GaugeRequest), global::Grpc.Testing.GaugeRequest.Parser, new[]{ "Name" }, null, null, null),
  36. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.EmptyMessage), global::Grpc.Testing.EmptyMessage.Parser, null, null, null, null)
  37. }));
  38. }
  39. #endregion
  40. }
  41. #region Messages
  42. /// <summary>
  43. /// Reponse message containing the gauge name and value
  44. /// </summary>
  45. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  46. public sealed partial class GaugeResponse : pb::IMessage<GaugeResponse> {
  47. private static readonly pb::MessageParser<GaugeResponse> _parser = new pb::MessageParser<GaugeResponse>(() => new GaugeResponse());
  48. public static pb::MessageParser<GaugeResponse> Parser { get { return _parser; } }
  49. public static pbr::MessageDescriptor Descriptor {
  50. get { return global::Grpc.Testing.MetricsReflection.Descriptor.MessageTypes[0]; }
  51. }
  52. pbr::MessageDescriptor pb::IMessage.Descriptor {
  53. get { return Descriptor; }
  54. }
  55. public GaugeResponse() {
  56. OnConstruction();
  57. }
  58. partial void OnConstruction();
  59. public GaugeResponse(GaugeResponse other) : this() {
  60. name_ = other.name_;
  61. switch (other.ValueCase) {
  62. case ValueOneofCase.LongValue:
  63. LongValue = other.LongValue;
  64. break;
  65. case ValueOneofCase.DoubleValue:
  66. DoubleValue = other.DoubleValue;
  67. break;
  68. case ValueOneofCase.StringValue:
  69. StringValue = other.StringValue;
  70. break;
  71. }
  72. }
  73. public GaugeResponse Clone() {
  74. return new GaugeResponse(this);
  75. }
  76. /// <summary>Field number for the "name" field.</summary>
  77. public const int NameFieldNumber = 1;
  78. private string name_ = "";
  79. public string Name {
  80. get { return name_; }
  81. set {
  82. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  83. }
  84. }
  85. /// <summary>Field number for the "long_value" field.</summary>
  86. public const int LongValueFieldNumber = 2;
  87. public long LongValue {
  88. get { return valueCase_ == ValueOneofCase.LongValue ? (long) value_ : 0L; }
  89. set {
  90. value_ = value;
  91. valueCase_ = ValueOneofCase.LongValue;
  92. }
  93. }
  94. /// <summary>Field number for the "double_value" field.</summary>
  95. public const int DoubleValueFieldNumber = 3;
  96. public double DoubleValue {
  97. get { return valueCase_ == ValueOneofCase.DoubleValue ? (double) value_ : 0D; }
  98. set {
  99. value_ = value;
  100. valueCase_ = ValueOneofCase.DoubleValue;
  101. }
  102. }
  103. /// <summary>Field number for the "string_value" field.</summary>
  104. public const int StringValueFieldNumber = 4;
  105. public string StringValue {
  106. get { return valueCase_ == ValueOneofCase.StringValue ? (string) value_ : ""; }
  107. set {
  108. value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  109. valueCase_ = ValueOneofCase.StringValue;
  110. }
  111. }
  112. private object value_;
  113. /// <summary>Enum of possible cases for the "value" oneof.</summary>
  114. public enum ValueOneofCase {
  115. None = 0,
  116. LongValue = 2,
  117. DoubleValue = 3,
  118. StringValue = 4,
  119. }
  120. private ValueOneofCase valueCase_ = ValueOneofCase.None;
  121. public ValueOneofCase ValueCase {
  122. get { return valueCase_; }
  123. }
  124. public void ClearValue() {
  125. valueCase_ = ValueOneofCase.None;
  126. value_ = null;
  127. }
  128. public override bool Equals(object other) {
  129. return Equals(other as GaugeResponse);
  130. }
  131. public bool Equals(GaugeResponse other) {
  132. if (ReferenceEquals(other, null)) {
  133. return false;
  134. }
  135. if (ReferenceEquals(other, this)) {
  136. return true;
  137. }
  138. if (Name != other.Name) return false;
  139. if (LongValue != other.LongValue) return false;
  140. if (DoubleValue != other.DoubleValue) return false;
  141. if (StringValue != other.StringValue) return false;
  142. if (ValueCase != other.ValueCase) return false;
  143. return true;
  144. }
  145. public override int GetHashCode() {
  146. int hash = 1;
  147. if (Name.Length != 0) hash ^= Name.GetHashCode();
  148. if (valueCase_ == ValueOneofCase.LongValue) hash ^= LongValue.GetHashCode();
  149. if (valueCase_ == ValueOneofCase.DoubleValue) hash ^= DoubleValue.GetHashCode();
  150. if (valueCase_ == ValueOneofCase.StringValue) hash ^= StringValue.GetHashCode();
  151. hash ^= (int) valueCase_;
  152. return hash;
  153. }
  154. public override string ToString() {
  155. return pb::JsonFormatter.ToDiagnosticString(this);
  156. }
  157. public void WriteTo(pb::CodedOutputStream output) {
  158. if (Name.Length != 0) {
  159. output.WriteRawTag(10);
  160. output.WriteString(Name);
  161. }
  162. if (valueCase_ == ValueOneofCase.LongValue) {
  163. output.WriteRawTag(16);
  164. output.WriteInt64(LongValue);
  165. }
  166. if (valueCase_ == ValueOneofCase.DoubleValue) {
  167. output.WriteRawTag(25);
  168. output.WriteDouble(DoubleValue);
  169. }
  170. if (valueCase_ == ValueOneofCase.StringValue) {
  171. output.WriteRawTag(34);
  172. output.WriteString(StringValue);
  173. }
  174. }
  175. public int CalculateSize() {
  176. int size = 0;
  177. if (Name.Length != 0) {
  178. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  179. }
  180. if (valueCase_ == ValueOneofCase.LongValue) {
  181. size += 1 + pb::CodedOutputStream.ComputeInt64Size(LongValue);
  182. }
  183. if (valueCase_ == ValueOneofCase.DoubleValue) {
  184. size += 1 + 8;
  185. }
  186. if (valueCase_ == ValueOneofCase.StringValue) {
  187. size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
  188. }
  189. return size;
  190. }
  191. public void MergeFrom(GaugeResponse other) {
  192. if (other == null) {
  193. return;
  194. }
  195. if (other.Name.Length != 0) {
  196. Name = other.Name;
  197. }
  198. switch (other.ValueCase) {
  199. case ValueOneofCase.LongValue:
  200. LongValue = other.LongValue;
  201. break;
  202. case ValueOneofCase.DoubleValue:
  203. DoubleValue = other.DoubleValue;
  204. break;
  205. case ValueOneofCase.StringValue:
  206. StringValue = other.StringValue;
  207. break;
  208. }
  209. }
  210. public void MergeFrom(pb::CodedInputStream input) {
  211. uint tag;
  212. while ((tag = input.ReadTag()) != 0) {
  213. switch(tag) {
  214. default:
  215. input.SkipLastField();
  216. break;
  217. case 10: {
  218. Name = input.ReadString();
  219. break;
  220. }
  221. case 16: {
  222. LongValue = input.ReadInt64();
  223. break;
  224. }
  225. case 25: {
  226. DoubleValue = input.ReadDouble();
  227. break;
  228. }
  229. case 34: {
  230. StringValue = input.ReadString();
  231. break;
  232. }
  233. }
  234. }
  235. }
  236. }
  237. /// <summary>
  238. /// Request message containing the gauge name
  239. /// </summary>
  240. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  241. public sealed partial class GaugeRequest : pb::IMessage<GaugeRequest> {
  242. private static readonly pb::MessageParser<GaugeRequest> _parser = new pb::MessageParser<GaugeRequest>(() => new GaugeRequest());
  243. public static pb::MessageParser<GaugeRequest> Parser { get { return _parser; } }
  244. public static pbr::MessageDescriptor Descriptor {
  245. get { return global::Grpc.Testing.MetricsReflection.Descriptor.MessageTypes[1]; }
  246. }
  247. pbr::MessageDescriptor pb::IMessage.Descriptor {
  248. get { return Descriptor; }
  249. }
  250. public GaugeRequest() {
  251. OnConstruction();
  252. }
  253. partial void OnConstruction();
  254. public GaugeRequest(GaugeRequest other) : this() {
  255. name_ = other.name_;
  256. }
  257. public GaugeRequest Clone() {
  258. return new GaugeRequest(this);
  259. }
  260. /// <summary>Field number for the "name" field.</summary>
  261. public const int NameFieldNumber = 1;
  262. private string name_ = "";
  263. public string Name {
  264. get { return name_; }
  265. set {
  266. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  267. }
  268. }
  269. public override bool Equals(object other) {
  270. return Equals(other as GaugeRequest);
  271. }
  272. public bool Equals(GaugeRequest other) {
  273. if (ReferenceEquals(other, null)) {
  274. return false;
  275. }
  276. if (ReferenceEquals(other, this)) {
  277. return true;
  278. }
  279. if (Name != other.Name) return false;
  280. return true;
  281. }
  282. public override int GetHashCode() {
  283. int hash = 1;
  284. if (Name.Length != 0) hash ^= Name.GetHashCode();
  285. return hash;
  286. }
  287. public override string ToString() {
  288. return pb::JsonFormatter.ToDiagnosticString(this);
  289. }
  290. public void WriteTo(pb::CodedOutputStream output) {
  291. if (Name.Length != 0) {
  292. output.WriteRawTag(10);
  293. output.WriteString(Name);
  294. }
  295. }
  296. public int CalculateSize() {
  297. int size = 0;
  298. if (Name.Length != 0) {
  299. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  300. }
  301. return size;
  302. }
  303. public void MergeFrom(GaugeRequest other) {
  304. if (other == null) {
  305. return;
  306. }
  307. if (other.Name.Length != 0) {
  308. Name = other.Name;
  309. }
  310. }
  311. public void MergeFrom(pb::CodedInputStream input) {
  312. uint tag;
  313. while ((tag = input.ReadTag()) != 0) {
  314. switch(tag) {
  315. default:
  316. input.SkipLastField();
  317. break;
  318. case 10: {
  319. Name = input.ReadString();
  320. break;
  321. }
  322. }
  323. }
  324. }
  325. }
  326. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  327. public sealed partial class EmptyMessage : pb::IMessage<EmptyMessage> {
  328. private static readonly pb::MessageParser<EmptyMessage> _parser = new pb::MessageParser<EmptyMessage>(() => new EmptyMessage());
  329. public static pb::MessageParser<EmptyMessage> Parser { get { return _parser; } }
  330. public static pbr::MessageDescriptor Descriptor {
  331. get { return global::Grpc.Testing.MetricsReflection.Descriptor.MessageTypes[2]; }
  332. }
  333. pbr::MessageDescriptor pb::IMessage.Descriptor {
  334. get { return Descriptor; }
  335. }
  336. public EmptyMessage() {
  337. OnConstruction();
  338. }
  339. partial void OnConstruction();
  340. public EmptyMessage(EmptyMessage other) : this() {
  341. }
  342. public EmptyMessage Clone() {
  343. return new EmptyMessage(this);
  344. }
  345. public override bool Equals(object other) {
  346. return Equals(other as EmptyMessage);
  347. }
  348. public bool Equals(EmptyMessage other) {
  349. if (ReferenceEquals(other, null)) {
  350. return false;
  351. }
  352. if (ReferenceEquals(other, this)) {
  353. return true;
  354. }
  355. return true;
  356. }
  357. public override int GetHashCode() {
  358. int hash = 1;
  359. return hash;
  360. }
  361. public override string ToString() {
  362. return pb::JsonFormatter.ToDiagnosticString(this);
  363. }
  364. public void WriteTo(pb::CodedOutputStream output) {
  365. }
  366. public int CalculateSize() {
  367. int size = 0;
  368. return size;
  369. }
  370. public void MergeFrom(EmptyMessage other) {
  371. if (other == null) {
  372. return;
  373. }
  374. }
  375. public void MergeFrom(pb::CodedInputStream input) {
  376. uint tag;
  377. while ((tag = input.ReadTag()) != 0) {
  378. switch(tag) {
  379. default:
  380. input.SkipLastField();
  381. break;
  382. }
  383. }
  384. }
  385. }
  386. #endregion
  387. }
  388. #endregion Designer generated code