MessageProtoStr.cs 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: MessageProto.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 Google.Protobuf.WellKnownTypes {
  12. /// <summary>Holder for reflection information generated from MessageProto.proto</summary>
  13. public static partial class MessageProtoReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for MessageProto.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static MessageProtoReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "ChJNZXNzYWdlUHJvdG8ucHJvdG8SEmNuLnNhZ2FjbG91ZC5wcm90byI3CgdN",
  24. "ZXNzYWdlEgsKA2NtZBgBIAEoCRIOCgZ0YXNrSWQYAiABKAkSDwoHY29udGVu",
  25. "dBgDIAEoCUI0Qg9NZXNzYWdlUHJvdG9TdHJIAaoCHkdvb2dsZS5Qcm90b2J1",
  26. "Zi5XZWxsS25vd25UeXBlc2IGcHJvdG8z"));
  27. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  28. new pbr::FileDescriptor[] { },
  29. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  30. new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Message), global::Google.Protobuf.WellKnownTypes.Message.Parser, new[]{ "Cmd", "TaskId", "Content" }, null, null, null, null)
  31. }));
  32. }
  33. #endregion
  34. }
  35. #region Messages
  36. public sealed partial class Message : pb::IMessage<Message> {
  37. private static readonly pb::MessageParser<Message> _parser = new pb::MessageParser<Message>(() => new Message());
  38. private pb::UnknownFieldSet _unknownFields;
  39. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  40. public static pb::MessageParser<Message> Parser { get { return _parser; } }
  41. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  42. public static pbr::MessageDescriptor Descriptor {
  43. get { return global::Google.Protobuf.WellKnownTypes.MessageProtoReflection.Descriptor.MessageTypes[0]; }
  44. }
  45. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  46. pbr::MessageDescriptor pb::IMessage.Descriptor {
  47. get { return Descriptor; }
  48. }
  49. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  50. public Message() {
  51. OnConstruction();
  52. }
  53. partial void OnConstruction();
  54. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  55. public Message(Message other) : this() {
  56. cmd_ = other.cmd_;
  57. taskId_ = other.taskId_;
  58. content_ = other.content_;
  59. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  60. }
  61. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  62. public Message Clone() {
  63. return new Message(this);
  64. }
  65. /// <summary>Field number for the "cmd" field.</summary>
  66. public const int CmdFieldNumber = 1;
  67. private string cmd_ = "";
  68. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  69. public string Cmd {
  70. get { return cmd_; }
  71. set {
  72. cmd_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  73. }
  74. }
  75. /// <summary>Field number for the "taskId" field.</summary>
  76. public const int TaskIdFieldNumber = 2;
  77. private string taskId_ = "";
  78. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  79. public string TaskId {
  80. get { return taskId_; }
  81. set {
  82. taskId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  83. }
  84. }
  85. /// <summary>Field number for the "content" field.</summary>
  86. public const int ContentFieldNumber = 3;
  87. private string content_ = "";
  88. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  89. public string Content {
  90. get { return content_; }
  91. set {
  92. content_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  93. }
  94. }
  95. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  96. public override bool Equals(object other) {
  97. return Equals(other as Message);
  98. }
  99. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  100. public bool Equals(Message other) {
  101. if (ReferenceEquals(other, null)) {
  102. return false;
  103. }
  104. if (ReferenceEquals(other, this)) {
  105. return true;
  106. }
  107. if (Cmd != other.Cmd) return false;
  108. if (TaskId != other.TaskId) return false;
  109. if (Content != other.Content) 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 (Cmd.Length != 0) hash ^= Cmd.GetHashCode();
  116. if (TaskId.Length != 0) hash ^= TaskId.GetHashCode();
  117. if (Content.Length != 0) hash ^= Content.GetHashCode();
  118. if (_unknownFields != null) {
  119. hash ^= _unknownFields.GetHashCode();
  120. }
  121. return hash;
  122. }
  123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  124. public override string ToString() {
  125. return pb::JsonFormatter.ToDiagnosticString(this);
  126. }
  127. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  128. public void WriteTo(pb::CodedOutputStream output) {
  129. if (Cmd.Length != 0) {
  130. output.WriteRawTag(10);
  131. output.WriteString(Cmd);
  132. }
  133. if (TaskId.Length != 0) {
  134. output.WriteRawTag(18);
  135. output.WriteString(TaskId);
  136. }
  137. if (Content.Length != 0) {
  138. output.WriteRawTag(26);
  139. output.WriteString(Content);
  140. }
  141. if (_unknownFields != null) {
  142. _unknownFields.WriteTo(output);
  143. }
  144. }
  145. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  146. public int CalculateSize() {
  147. int size = 0;
  148. if (Cmd.Length != 0) {
  149. size += 1 + pb::CodedOutputStream.ComputeStringSize(Cmd);
  150. }
  151. if (TaskId.Length != 0) {
  152. size += 1 + pb::CodedOutputStream.ComputeStringSize(TaskId);
  153. }
  154. if (Content.Length != 0) {
  155. size += 1 + pb::CodedOutputStream.ComputeStringSize(Content);
  156. }
  157. if (_unknownFields != null) {
  158. size += _unknownFields.CalculateSize();
  159. }
  160. return size;
  161. }
  162. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  163. public void MergeFrom(Message other) {
  164. if (other == null) {
  165. return;
  166. }
  167. if (other.Cmd.Length != 0) {
  168. Cmd = other.Cmd;
  169. }
  170. if (other.TaskId.Length != 0) {
  171. TaskId = other.TaskId;
  172. }
  173. if (other.Content.Length != 0) {
  174. Content = other.Content;
  175. }
  176. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  177. }
  178. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  179. public void MergeFrom(pb::CodedInputStream input) {
  180. uint tag;
  181. while ((tag = input.ReadTag()) != 0) {
  182. switch(tag) {
  183. default:
  184. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  185. break;
  186. case 10: {
  187. Cmd = input.ReadString();
  188. break;
  189. }
  190. case 18: {
  191. TaskId = input.ReadString();
  192. break;
  193. }
  194. case 26: {
  195. Content = input.ReadString();
  196. break;
  197. }
  198. }
  199. }
  200. }
  201. }
  202. #endregion
  203. }
  204. #endregion Designer generated code