Payloads.cs 31 KB

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