UnittestImportProto3.cs 7.4 KB

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