UnittestImportPublic.cs 7.4 KB

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