Result.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: result.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 Protos {
  10. /// <summary>Holder for reflection information generated from result.proto</summary>
  11. public static partial class ResultReflection {
  12. #region Descriptor
  13. /// <summary>File descriptor for result.proto</summary>
  14. public static pbr::FileDescriptor Descriptor {
  15. get { return descriptor; }
  16. }
  17. private static pbr::FileDescriptor descriptor;
  18. static ResultReflection() {
  19. byte[] descriptorData = global::System.Convert.FromBase64String(
  20. string.Concat(
  21. "CgxyZXN1bHQucHJvdG8SBnByb3RvcyIjCgZSZXN1bHQSDAoEQ29kZRgBIAEo",
  22. "BRILCgNNc2cYAiABKAliBnByb3RvMw=="));
  23. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  24. new pbr::FileDescriptor[] { },
  25. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  26. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.Result), global::Protos.Result.Parser, new[]{ "Code", "Msg" }, null, null, null)
  27. }));
  28. }
  29. #endregion
  30. }
  31. #region Messages
  32. public sealed partial class Result : pb::IMessage<Result> {
  33. private static readonly pb::MessageParser<Result> _parser = new pb::MessageParser<Result>(() => new Result());
  34. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  35. public static pb::MessageParser<Result> Parser { get { return _parser; } }
  36. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  37. public static pbr::MessageDescriptor Descriptor {
  38. get { return global::Protos.ResultReflection.Descriptor.MessageTypes[0]; }
  39. }
  40. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  41. pbr::MessageDescriptor pb::IMessage.Descriptor {
  42. get { return Descriptor; }
  43. }
  44. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  45. public Result() {
  46. OnConstruction();
  47. }
  48. partial void OnConstruction();
  49. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  50. public Result(Result other) : this() {
  51. code_ = other.code_;
  52. msg_ = other.msg_;
  53. }
  54. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  55. public Result Clone() {
  56. return new Result(this);
  57. }
  58. /// <summary>Field number for the "Code" field.</summary>
  59. public const int CodeFieldNumber = 1;
  60. private int code_;
  61. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  62. public int Code {
  63. get { return code_; }
  64. set {
  65. code_ = value;
  66. }
  67. }
  68. /// <summary>Field number for the "Msg" field.</summary>
  69. public const int MsgFieldNumber = 2;
  70. private string msg_ = "";
  71. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  72. public string Msg {
  73. get { return msg_; }
  74. set {
  75. msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  76. }
  77. }
  78. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  79. public override bool Equals(object other) {
  80. return Equals(other as Result);
  81. }
  82. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  83. public bool Equals(Result other) {
  84. if (ReferenceEquals(other, null)) {
  85. return false;
  86. }
  87. if (ReferenceEquals(other, this)) {
  88. return true;
  89. }
  90. if (Code != other.Code) return false;
  91. if (Msg != other.Msg) return false;
  92. return true;
  93. }
  94. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  95. public override int GetHashCode() {
  96. int hash = 1;
  97. if (Code != 0) hash ^= Code.GetHashCode();
  98. if (Msg.Length != 0) hash ^= Msg.GetHashCode();
  99. return hash;
  100. }
  101. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  102. public override string ToString() {
  103. return pb::JsonFormatter.ToDiagnosticString(this);
  104. }
  105. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  106. public void WriteTo(pb::CodedOutputStream output) {
  107. if (Code != 0) {
  108. output.WriteRawTag(8);
  109. output.WriteInt32(Code);
  110. }
  111. if (Msg.Length != 0) {
  112. output.WriteRawTag(18);
  113. output.WriteString(Msg);
  114. }
  115. }
  116. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  117. public int CalculateSize() {
  118. int size = 0;
  119. if (Code != 0) {
  120. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
  121. }
  122. if (Msg.Length != 0) {
  123. size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg);
  124. }
  125. return size;
  126. }
  127. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  128. public void MergeFrom(Result other) {
  129. if (other == null) {
  130. return;
  131. }
  132. if (other.Code != 0) {
  133. Code = other.Code;
  134. }
  135. if (other.Msg.Length != 0) {
  136. Msg = other.Msg;
  137. }
  138. }
  139. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  140. public void MergeFrom(pb::CodedInputStream input) {
  141. uint tag;
  142. while ((tag = input.ReadTag()) != 0) {
  143. switch(tag) {
  144. default:
  145. input.SkipLastField();
  146. break;
  147. case 8: {
  148. Code = input.ReadInt32();
  149. break;
  150. }
  151. case 18: {
  152. Msg = input.ReadString();
  153. break;
  154. }
  155. }
  156. }
  157. }
  158. }
  159. #endregion
  160. }
  161. #endregion Designer generated code