UnitTestOptimizeForProtoFile.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. using pb = global::Google.ProtocolBuffers;
  3. using pbc = global::Google.ProtocolBuffers.Collections;
  4. using pbd = global::Google.ProtocolBuffers.Descriptors;
  5. using scg = global::System.Collections.Generic;
  6. namespace Google.ProtocolBuffers.TestProtos {
  7. public static partial class UnitTestOptimizeForProtoFile {
  8. #region Descriptor
  9. public static pbd::FileDescriptor Descriptor {
  10. get { return descriptor; }
  11. }
  12. private static readonly pbd::FileDescriptor descriptor = pbd::FileDescriptor.InternalBuildGeneratedFileFrom (
  13. new byte[] {
  14. 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x75, 0x6e,
  15. 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x2e,
  16. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74,
  17. 0x74, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
  18. 0x66, 0x2f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x01, 0x0a,
  19. 0x14, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x53, 0x69, 0x7a,
  20. 0x65, 0x12, 0x09, 0x0a, 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x12, 0x2e, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18,
  21. 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69,
  22. 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
  23. 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x32, 0x40, 0x0a, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x5f,
  24. 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
  25. 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69,
  26. 0x7a, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x18, 0xd2, 0x09, 0x20, 0x01, 0x28, 0x05, 0x42, 0x45, 0x48,
  27. 0x02, 0xc2, 0x3e, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42,
  28. 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xca, 0x3e, 0x1c,
  29. 0x55, 0x6e, 0x69, 0x74, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x50,
  30. 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65,
  31. }, new pbd::FileDescriptor[] {
  32. global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor,
  33. });
  34. #endregion
  35. #region Extensions
  36. #endregion
  37. #region Static variables
  38. internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor
  39. = Descriptor.MessageTypes[0];
  40. internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable
  41. = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor,
  42. new string[] { "I", "Msg", },
  43. typeof (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize),
  44. typeof (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder));
  45. #endregion
  46. }
  47. #region Enums
  48. #endregion
  49. #region Messages
  50. public sealed partial class TestOptimizedForSize : pb::ExtendableMessage<TestOptimizedForSize, TestOptimizedForSize.Builder> {
  51. private static readonly TestOptimizedForSize defaultInstance = new TestOptimizedForSize();
  52. public static TestOptimizedForSize DefaultInstance {
  53. get { return defaultInstance; }
  54. }
  55. public override TestOptimizedForSize DefaultInstanceForType {
  56. get { return defaultInstance; }
  57. }
  58. public static pbd::MessageDescriptor Descriptor {
  59. get { return global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor; }
  60. }
  61. protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
  62. get { return global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable; }
  63. }
  64. public static readonly pb::GeneratedExtensionBase<int> TestExtension =
  65. pb::GeneratedSingleExtension<int>.CreateInstance(Descriptor.Extensions[0]);
  66. #region Nested types
  67. public static class Types {
  68. }
  69. #endregion
  70. // optional int32 i = 1;
  71. private bool hasI;
  72. private int i_ = 0;
  73. public bool HasI {
  74. get { return hasI; }
  75. }
  76. public int I {
  77. get { return i_; }
  78. }
  79. // optional .protobuf_unittest.ForeignMessage msg = 19;
  80. private bool hasMsg;
  81. private global::Google.ProtocolBuffers.TestProtos.ForeignMessage msg_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance;
  82. public bool HasMsg {
  83. get { return hasMsg; }
  84. }
  85. public global::Google.ProtocolBuffers.TestProtos.ForeignMessage Msg {
  86. get { return msg_; }
  87. }
  88. public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(pb::ByteString data) {
  89. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  90. }
  91. public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(pb::ByteString data,
  92. pb::ExtensionRegistry extensionRegistry) {
  93. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
  94. .BuildParsed();
  95. }
  96. public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(byte[] data) {
  97. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  98. }
  99. public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(byte[] data,
  100. pb::ExtensionRegistry extensionRegistry) {
  101. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
  102. .BuildParsed();
  103. }
  104. public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(global::System.IO.Stream input) {
  105. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  106. }
  107. public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(
  108. global::System.IO.Stream input,
  109. pb::ExtensionRegistry extensionRegistry) {
  110. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
  111. .BuildParsed();
  112. }
  113. public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(pb::CodedInputStream input) {
  114. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  115. }
  116. public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(pb::CodedInputStream input,
  117. pb::ExtensionRegistry extensionRegistry) {
  118. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
  119. .BuildParsed();
  120. }
  121. public static Builder CreateBuilder() { return new Builder(); }
  122. public override Builder CreateBuilderForType() { return new Builder(); }
  123. public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize prototype) {
  124. return (Builder) new Builder().MergeFrom(prototype);
  125. }
  126. public sealed partial class Builder : pb::ExtendableBuilder<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder> {
  127. protected override Builder ThisBuilder {
  128. get { return this; }
  129. }
  130. // Construct using global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder()
  131. internal Builder() {}
  132. global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize result = new global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize();
  133. protected override global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize MessageBeingBuilt {
  134. get { return result; }
  135. }
  136. public override Builder Clear() {
  137. result = new global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize();
  138. return this;
  139. }
  140. public override Builder Clone() {
  141. return new Builder().MergeFrom(result);
  142. }
  143. public override pbd::MessageDescriptor DescriptorForType {
  144. get { return global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Descriptor; }
  145. }
  146. public override global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize DefaultInstanceForType {
  147. get { return global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance; }
  148. }
  149. public override global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize BuildPartial() {
  150. global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize returnMe = result;
  151. result = null;
  152. return returnMe;
  153. }
  154. // optional int32 i = 1;
  155. public bool HasI {
  156. get { return result.HasI; }
  157. }
  158. public int I {
  159. get { return result.I; }
  160. set { SetI(value); }
  161. }
  162. public Builder SetI(int value) {
  163. result.hasI = true;
  164. result.i_ = value;
  165. return this;
  166. }
  167. public Builder ClearI() {
  168. result.hasI = false;
  169. result.i_ = 0;
  170. return this;
  171. }
  172. // optional .protobuf_unittest.ForeignMessage msg = 19;
  173. public bool HasMsg {
  174. get { return result.HasMsg; }
  175. }
  176. public global::Google.ProtocolBuffers.TestProtos.ForeignMessage Msg {
  177. get { return result.Msg; }
  178. set { SetMsg(value); }
  179. }
  180. public Builder SetMsg(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
  181. result.hasMsg = true;
  182. result.msg_ = value;
  183. return this;
  184. }
  185. public Builder SetMsg(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
  186. result.hasMsg = true;
  187. result.msg_ = builderForValue.Build();
  188. return this;
  189. }
  190. public Builder MergeMsg(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
  191. if (result.HasMsg &&
  192. result.msg_ != global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) {
  193. result.msg_ =
  194. global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder(result.msg_).MergeFrom(value).BuildPartial();
  195. } else {
  196. result.msg_ = value;
  197. }
  198. result.hasMsg = true;
  199. return this;
  200. }
  201. public Builder ClearMsg() {
  202. result.hasMsg = false;
  203. result.msg_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance;
  204. return this;
  205. }
  206. }
  207. }
  208. #endregion
  209. #region Services
  210. #endregion
  211. }