1 // <auto-generated> 2 // Generated by the protocol buffer compiler. DO NOT EDIT! 3 // source: google/protobuf/unittest_proto3_optional.proto 4 // </auto-generated> 5 #pragma warning disable 1591, 0612, 3021, 8981 6 #region Designer generated code 7 8 using pb = global::Google.Protobuf; 9 using pbc = global::Google.Protobuf.Collections; 10 using pbr = global::Google.Protobuf.Reflection; 11 using scg = global::System.Collections.Generic; 12 namespace ProtobufUnittest { 13 14 /// <summary>Holder for reflection information generated from google/protobuf/unittest_proto3_optional.proto</summary> 15 public static partial class UnittestProto3OptionalReflection { 16 17 #region Descriptor 18 /// <summary>File descriptor for google/protobuf/unittest_proto3_optional.proto</summary> 19 public static pbr::FileDescriptor Descriptor { 20 get { return descriptor; } 21 } 22 private static pbr::FileDescriptor descriptor; 23 UnittestProto3OptionalReflection()24 static UnittestProto3OptionalReflection() { 25 byte[] descriptorData = global::System.Convert.FromBase64String( 26 string.Concat( 27 "Ci5nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfcHJvdG8zX29wdGlvbmFsLnBy", 28 "b3RvEhFwcm90b2J1Zl91bml0dGVzdBogZ29vZ2xlL3Byb3RvYnVmL2Rlc2Ny", 29 "aXB0b3IucHJvdG8isQoKElRlc3RQcm90bzNPcHRpb25hbBIbCg5vcHRpb25h", 30 "bF9pbnQzMhgBIAEoBUgAiAEBEhsKDm9wdGlvbmFsX2ludDY0GAIgASgDSAGI", 31 "AQESHAoPb3B0aW9uYWxfdWludDMyGAMgASgNSAKIAQESHAoPb3B0aW9uYWxf", 32 "dWludDY0GAQgASgESAOIAQESHAoPb3B0aW9uYWxfc2ludDMyGAUgASgRSASI", 33 "AQESHAoPb3B0aW9uYWxfc2ludDY0GAYgASgSSAWIAQESHQoQb3B0aW9uYWxf", 34 "Zml4ZWQzMhgHIAEoB0gGiAEBEh0KEG9wdGlvbmFsX2ZpeGVkNjQYCCABKAZI", 35 "B4gBARIeChFvcHRpb25hbF9zZml4ZWQzMhgJIAEoD0gIiAEBEh4KEW9wdGlv", 36 "bmFsX3NmaXhlZDY0GAogASgQSAmIAQESGwoOb3B0aW9uYWxfZmxvYXQYCyAB", 37 "KAJICogBARIcCg9vcHRpb25hbF9kb3VibGUYDCABKAFIC4gBARIaCg1vcHRp", 38 "b25hbF9ib29sGA0gASgISAyIAQESHAoPb3B0aW9uYWxfc3RyaW5nGA4gASgJ", 39 "SA2IAQESGwoOb3B0aW9uYWxfYnl0ZXMYDyABKAxIDogBARIeCg1vcHRpb25h", 40 "bF9jb3JkGBAgASgJQgIIAUgPiAEBElkKF29wdGlvbmFsX25lc3RlZF9tZXNz", 41 "YWdlGBIgASgLMjMucHJvdG9idWZfdW5pdHRlc3QuVGVzdFByb3RvM09wdGlv", 42 "bmFsLk5lc3RlZE1lc3NhZ2VIEIgBARJZChNsYXp5X25lc3RlZF9tZXNzYWdl", 43 "GBMgASgLMjMucHJvdG9idWZfdW5pdHRlc3QuVGVzdFByb3RvM09wdGlvbmFs", 44 "Lk5lc3RlZE1lc3NhZ2VCAigBSBGIAQESUwoUb3B0aW9uYWxfbmVzdGVkX2Vu", 45 "dW0YFSABKA4yMC5wcm90b2J1Zl91bml0dGVzdC5UZXN0UHJvdG8zT3B0aW9u", 46 "YWwuTmVzdGVkRW51bUgSiAEBEhYKDnNpbmd1bGFyX2ludDMyGBYgASgFEhYK", 47 "DnNpbmd1bGFyX2ludDY0GBcgASgDGicKDU5lc3RlZE1lc3NhZ2USDwoCYmIY", 48 "ASABKAVIAIgBAUIFCgNfYmIiSgoKTmVzdGVkRW51bRIPCgtVTlNQRUNJRklF", 49 "RBAAEgcKA0ZPTxABEgcKA0JBUhACEgcKA0JBWhADEhAKA05FRxD/////////", 50 "//8BQhEKD19vcHRpb25hbF9pbnQzMkIRCg9fb3B0aW9uYWxfaW50NjRCEgoQ", 51 "X29wdGlvbmFsX3VpbnQzMkISChBfb3B0aW9uYWxfdWludDY0QhIKEF9vcHRp", 52 "b25hbF9zaW50MzJCEgoQX29wdGlvbmFsX3NpbnQ2NEITChFfb3B0aW9uYWxf", 53 "Zml4ZWQzMkITChFfb3B0aW9uYWxfZml4ZWQ2NEIUChJfb3B0aW9uYWxfc2Zp", 54 "eGVkMzJCFAoSX29wdGlvbmFsX3NmaXhlZDY0QhEKD19vcHRpb25hbF9mbG9h", 55 "dEISChBfb3B0aW9uYWxfZG91YmxlQhAKDl9vcHRpb25hbF9ib29sQhIKEF9v", 56 "cHRpb25hbF9zdHJpbmdCEQoPX29wdGlvbmFsX2J5dGVzQhAKDl9vcHRpb25h", 57 "bF9jb3JkQhoKGF9vcHRpb25hbF9uZXN0ZWRfbWVzc2FnZUIWChRfbGF6eV9u", 58 "ZXN0ZWRfbWVzc2FnZUIXChVfb3B0aW9uYWxfbmVzdGVkX2VudW0iiQIKGVRl", 59 "c3RQcm90bzNPcHRpb25hbE1lc3NhZ2USUgoObmVzdGVkX21lc3NhZ2UYASAB", 60 "KAsyOi5wcm90b2J1Zl91bml0dGVzdC5UZXN0UHJvdG8zT3B0aW9uYWxNZXNz", 61 "YWdlLk5lc3RlZE1lc3NhZ2USYAoXb3B0aW9uYWxfbmVzdGVkX21lc3NhZ2UY", 62 "AiABKAsyOi5wcm90b2J1Zl91bml0dGVzdC5UZXN0UHJvdG8zT3B0aW9uYWxN", 63 "ZXNzYWdlLk5lc3RlZE1lc3NhZ2VIAIgBARoaCg1OZXN0ZWRNZXNzYWdlEgkK", 64 "AXMYASABKAlCGgoYX29wdGlvbmFsX25lc3RlZF9tZXNzYWdlIqkBChhQcm90", 65 "bzNPcHRpb25hbEV4dGVuc2lvbnMyPAoPZXh0X25vX29wdGlvbmFsEh8uZ29v", 66 "Z2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGIjN2akBIAEoBTJBChFleHRf", 67 "d2l0aF9vcHRpb25hbBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9u", 68 "cxiJzdmpASABKAWIAQE6DMDozM0KCMjozM0KEEIlCiFjb20uZ29vZ2xlLnBy", 69 "b3RvYnVmLnRlc3RpbmcucHJvdG9QAWIGcHJvdG8z")); 70 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 71 new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, }, 72 new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 73 new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.TestProto3Optional), global::ProtobufUnittest.TestProto3Optional.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalCord", "OptionalNestedMessage", "LazyNestedMessage", "OptionalNestedEnum", "SingularInt32", "SingularInt64" }, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalCord", "OptionalNestedMessage", "LazyNestedMessage", "OptionalNestedEnum" }, new[]{ typeof(global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage), global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage.Parser, new[]{ "Bb" }, new[]{ "Bb" }, null, null, null)}), 74 new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.TestProto3OptionalMessage), global::ProtobufUnittest.TestProto3OptionalMessage.Parser, new[]{ "NestedMessage", "OptionalNestedMessage" }, new[]{ "OptionalNestedMessage" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage), global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage.Parser, new[]{ "S" }, null, null, null, null)}), 75 new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.Proto3OptionalExtensions), global::ProtobufUnittest.Proto3OptionalExtensions.Parser, null, null, null, new pb::Extension[] { global::ProtobufUnittest.Proto3OptionalExtensions.Extensions.ExtNoOptional, global::ProtobufUnittest.Proto3OptionalExtensions.Extensions.ExtWithOptional }, null) 76 })); 77 } 78 #endregion 79 80 } 81 #region Messages 82 public sealed partial class TestProto3Optional : pb::IMessage<TestProto3Optional> 83 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 84 , pb::IBufferMessage 85 #endif 86 { 87 private static readonly pb::MessageParser<TestProto3Optional> _parser = new pb::MessageParser<TestProto3Optional>(() => new TestProto3Optional()); 88 private pb::UnknownFieldSet _unknownFields; 89 private int _hasBits0; 90 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 91 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 92 public static pb::MessageParser<TestProto3Optional> Parser { get { return _parser; } } 93 94 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 95 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 96 public static pbr::MessageDescriptor Descriptor { 97 get { return global::ProtobufUnittest.UnittestProto3OptionalReflection.Descriptor.MessageTypes[0]; } 98 } 99 100 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 101 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 102 pbr::MessageDescriptor pb::IMessage.Descriptor { 103 get { return Descriptor; } 104 } 105 106 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 107 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] TestProto3Optional()108 public TestProto3Optional() { 109 OnConstruction(); 110 } 111 OnConstruction()112 partial void OnConstruction(); 113 114 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 115 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] TestProto3Optional(TestProto3Optional other)116 public TestProto3Optional(TestProto3Optional other) : this() { 117 _hasBits0 = other._hasBits0; 118 optionalInt32_ = other.optionalInt32_; 119 optionalInt64_ = other.optionalInt64_; 120 optionalUint32_ = other.optionalUint32_; 121 optionalUint64_ = other.optionalUint64_; 122 optionalSint32_ = other.optionalSint32_; 123 optionalSint64_ = other.optionalSint64_; 124 optionalFixed32_ = other.optionalFixed32_; 125 optionalFixed64_ = other.optionalFixed64_; 126 optionalSfixed32_ = other.optionalSfixed32_; 127 optionalSfixed64_ = other.optionalSfixed64_; 128 optionalFloat_ = other.optionalFloat_; 129 optionalDouble_ = other.optionalDouble_; 130 optionalBool_ = other.optionalBool_; 131 optionalString_ = other.optionalString_; 132 optionalBytes_ = other.optionalBytes_; 133 optionalCord_ = other.optionalCord_; 134 optionalNestedMessage_ = other.optionalNestedMessage_ != null ? other.optionalNestedMessage_.Clone() : null; 135 lazyNestedMessage_ = other.lazyNestedMessage_ != null ? other.lazyNestedMessage_.Clone() : null; 136 optionalNestedEnum_ = other.optionalNestedEnum_; 137 singularInt32_ = other.singularInt32_; 138 singularInt64_ = other.singularInt64_; 139 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 140 } 141 142 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 143 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()144 public TestProto3Optional Clone() { 145 return new TestProto3Optional(this); 146 } 147 148 /// <summary>Field number for the "optional_int32" field.</summary> 149 public const int OptionalInt32FieldNumber = 1; 150 private int optionalInt32_; 151 /// <summary> 152 /// Singular 153 /// </summary> 154 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 155 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 156 public int OptionalInt32 { 157 get { if ((_hasBits0 & 1) != 0) { return optionalInt32_; } else { return 0; } } 158 set { 159 _hasBits0 |= 1; 160 optionalInt32_ = value; 161 } 162 } 163 /// <summary>Gets whether the "optional_int32" field is set</summary> 164 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 165 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 166 public bool HasOptionalInt32 { 167 get { return (_hasBits0 & 1) != 0; } 168 } 169 /// <summary>Clears the value of the "optional_int32" field</summary> 170 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 171 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalInt32()172 public void ClearOptionalInt32() { 173 _hasBits0 &= ~1; 174 } 175 176 /// <summary>Field number for the "optional_int64" field.</summary> 177 public const int OptionalInt64FieldNumber = 2; 178 private long optionalInt64_; 179 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 180 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 181 public long OptionalInt64 { 182 get { if ((_hasBits0 & 2) != 0) { return optionalInt64_; } else { return 0L; } } 183 set { 184 _hasBits0 |= 2; 185 optionalInt64_ = value; 186 } 187 } 188 /// <summary>Gets whether the "optional_int64" field is set</summary> 189 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 190 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 191 public bool HasOptionalInt64 { 192 get { return (_hasBits0 & 2) != 0; } 193 } 194 /// <summary>Clears the value of the "optional_int64" field</summary> 195 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 196 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalInt64()197 public void ClearOptionalInt64() { 198 _hasBits0 &= ~2; 199 } 200 201 /// <summary>Field number for the "optional_uint32" field.</summary> 202 public const int OptionalUint32FieldNumber = 3; 203 private uint optionalUint32_; 204 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 205 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 206 public uint OptionalUint32 { 207 get { if ((_hasBits0 & 4) != 0) { return optionalUint32_; } else { return 0; } } 208 set { 209 _hasBits0 |= 4; 210 optionalUint32_ = value; 211 } 212 } 213 /// <summary>Gets whether the "optional_uint32" field is set</summary> 214 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 215 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 216 public bool HasOptionalUint32 { 217 get { return (_hasBits0 & 4) != 0; } 218 } 219 /// <summary>Clears the value of the "optional_uint32" field</summary> 220 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 221 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalUint32()222 public void ClearOptionalUint32() { 223 _hasBits0 &= ~4; 224 } 225 226 /// <summary>Field number for the "optional_uint64" field.</summary> 227 public const int OptionalUint64FieldNumber = 4; 228 private ulong optionalUint64_; 229 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 230 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 231 public ulong OptionalUint64 { 232 get { if ((_hasBits0 & 8) != 0) { return optionalUint64_; } else { return 0UL; } } 233 set { 234 _hasBits0 |= 8; 235 optionalUint64_ = value; 236 } 237 } 238 /// <summary>Gets whether the "optional_uint64" field is set</summary> 239 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 240 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 241 public bool HasOptionalUint64 { 242 get { return (_hasBits0 & 8) != 0; } 243 } 244 /// <summary>Clears the value of the "optional_uint64" field</summary> 245 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 246 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalUint64()247 public void ClearOptionalUint64() { 248 _hasBits0 &= ~8; 249 } 250 251 /// <summary>Field number for the "optional_sint32" field.</summary> 252 public const int OptionalSint32FieldNumber = 5; 253 private int optionalSint32_; 254 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 255 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 256 public int OptionalSint32 { 257 get { if ((_hasBits0 & 16) != 0) { return optionalSint32_; } else { return 0; } } 258 set { 259 _hasBits0 |= 16; 260 optionalSint32_ = value; 261 } 262 } 263 /// <summary>Gets whether the "optional_sint32" field is set</summary> 264 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 265 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 266 public bool HasOptionalSint32 { 267 get { return (_hasBits0 & 16) != 0; } 268 } 269 /// <summary>Clears the value of the "optional_sint32" field</summary> 270 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 271 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalSint32()272 public void ClearOptionalSint32() { 273 _hasBits0 &= ~16; 274 } 275 276 /// <summary>Field number for the "optional_sint64" field.</summary> 277 public const int OptionalSint64FieldNumber = 6; 278 private long optionalSint64_; 279 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 280 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 281 public long OptionalSint64 { 282 get { if ((_hasBits0 & 32) != 0) { return optionalSint64_; } else { return 0L; } } 283 set { 284 _hasBits0 |= 32; 285 optionalSint64_ = value; 286 } 287 } 288 /// <summary>Gets whether the "optional_sint64" field is set</summary> 289 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 290 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 291 public bool HasOptionalSint64 { 292 get { return (_hasBits0 & 32) != 0; } 293 } 294 /// <summary>Clears the value of the "optional_sint64" field</summary> 295 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 296 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalSint64()297 public void ClearOptionalSint64() { 298 _hasBits0 &= ~32; 299 } 300 301 /// <summary>Field number for the "optional_fixed32" field.</summary> 302 public const int OptionalFixed32FieldNumber = 7; 303 private uint optionalFixed32_; 304 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 305 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 306 public uint OptionalFixed32 { 307 get { if ((_hasBits0 & 64) != 0) { return optionalFixed32_; } else { return 0; } } 308 set { 309 _hasBits0 |= 64; 310 optionalFixed32_ = value; 311 } 312 } 313 /// <summary>Gets whether the "optional_fixed32" field is set</summary> 314 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 315 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 316 public bool HasOptionalFixed32 { 317 get { return (_hasBits0 & 64) != 0; } 318 } 319 /// <summary>Clears the value of the "optional_fixed32" field</summary> 320 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 321 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalFixed32()322 public void ClearOptionalFixed32() { 323 _hasBits0 &= ~64; 324 } 325 326 /// <summary>Field number for the "optional_fixed64" field.</summary> 327 public const int OptionalFixed64FieldNumber = 8; 328 private ulong optionalFixed64_; 329 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 330 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 331 public ulong OptionalFixed64 { 332 get { if ((_hasBits0 & 128) != 0) { return optionalFixed64_; } else { return 0UL; } } 333 set { 334 _hasBits0 |= 128; 335 optionalFixed64_ = value; 336 } 337 } 338 /// <summary>Gets whether the "optional_fixed64" field is set</summary> 339 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 340 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 341 public bool HasOptionalFixed64 { 342 get { return (_hasBits0 & 128) != 0; } 343 } 344 /// <summary>Clears the value of the "optional_fixed64" field</summary> 345 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 346 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalFixed64()347 public void ClearOptionalFixed64() { 348 _hasBits0 &= ~128; 349 } 350 351 /// <summary>Field number for the "optional_sfixed32" field.</summary> 352 public const int OptionalSfixed32FieldNumber = 9; 353 private int optionalSfixed32_; 354 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 355 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 356 public int OptionalSfixed32 { 357 get { if ((_hasBits0 & 256) != 0) { return optionalSfixed32_; } else { return 0; } } 358 set { 359 _hasBits0 |= 256; 360 optionalSfixed32_ = value; 361 } 362 } 363 /// <summary>Gets whether the "optional_sfixed32" field is set</summary> 364 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 365 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 366 public bool HasOptionalSfixed32 { 367 get { return (_hasBits0 & 256) != 0; } 368 } 369 /// <summary>Clears the value of the "optional_sfixed32" field</summary> 370 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 371 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalSfixed32()372 public void ClearOptionalSfixed32() { 373 _hasBits0 &= ~256; 374 } 375 376 /// <summary>Field number for the "optional_sfixed64" field.</summary> 377 public const int OptionalSfixed64FieldNumber = 10; 378 private long optionalSfixed64_; 379 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 380 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 381 public long OptionalSfixed64 { 382 get { if ((_hasBits0 & 512) != 0) { return optionalSfixed64_; } else { return 0L; } } 383 set { 384 _hasBits0 |= 512; 385 optionalSfixed64_ = value; 386 } 387 } 388 /// <summary>Gets whether the "optional_sfixed64" field is set</summary> 389 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 390 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 391 public bool HasOptionalSfixed64 { 392 get { return (_hasBits0 & 512) != 0; } 393 } 394 /// <summary>Clears the value of the "optional_sfixed64" field</summary> 395 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 396 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalSfixed64()397 public void ClearOptionalSfixed64() { 398 _hasBits0 &= ~512; 399 } 400 401 /// <summary>Field number for the "optional_float" field.</summary> 402 public const int OptionalFloatFieldNumber = 11; 403 private float optionalFloat_; 404 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 405 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 406 public float OptionalFloat { 407 get { if ((_hasBits0 & 1024) != 0) { return optionalFloat_; } else { return 0F; } } 408 set { 409 _hasBits0 |= 1024; 410 optionalFloat_ = value; 411 } 412 } 413 /// <summary>Gets whether the "optional_float" field is set</summary> 414 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 415 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 416 public bool HasOptionalFloat { 417 get { return (_hasBits0 & 1024) != 0; } 418 } 419 /// <summary>Clears the value of the "optional_float" field</summary> 420 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 421 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalFloat()422 public void ClearOptionalFloat() { 423 _hasBits0 &= ~1024; 424 } 425 426 /// <summary>Field number for the "optional_double" field.</summary> 427 public const int OptionalDoubleFieldNumber = 12; 428 private double optionalDouble_; 429 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 430 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 431 public double OptionalDouble { 432 get { if ((_hasBits0 & 2048) != 0) { return optionalDouble_; } else { return 0D; } } 433 set { 434 _hasBits0 |= 2048; 435 optionalDouble_ = value; 436 } 437 } 438 /// <summary>Gets whether the "optional_double" field is set</summary> 439 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 440 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 441 public bool HasOptionalDouble { 442 get { return (_hasBits0 & 2048) != 0; } 443 } 444 /// <summary>Clears the value of the "optional_double" field</summary> 445 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 446 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalDouble()447 public void ClearOptionalDouble() { 448 _hasBits0 &= ~2048; 449 } 450 451 /// <summary>Field number for the "optional_bool" field.</summary> 452 public const int OptionalBoolFieldNumber = 13; 453 private bool optionalBool_; 454 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 455 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 456 public bool OptionalBool { 457 get { if ((_hasBits0 & 4096) != 0) { return optionalBool_; } else { return false; } } 458 set { 459 _hasBits0 |= 4096; 460 optionalBool_ = value; 461 } 462 } 463 /// <summary>Gets whether the "optional_bool" field is set</summary> 464 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 465 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 466 public bool HasOptionalBool { 467 get { return (_hasBits0 & 4096) != 0; } 468 } 469 /// <summary>Clears the value of the "optional_bool" field</summary> 470 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 471 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalBool()472 public void ClearOptionalBool() { 473 _hasBits0 &= ~4096; 474 } 475 476 /// <summary>Field number for the "optional_string" field.</summary> 477 public const int OptionalStringFieldNumber = 14; 478 private string optionalString_; 479 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 480 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 481 public string OptionalString { 482 get { return optionalString_ ?? ""; } 483 set { 484 optionalString_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 485 } 486 } 487 /// <summary>Gets whether the "optional_string" field is set</summary> 488 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 489 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 490 public bool HasOptionalString { 491 get { return optionalString_ != null; } 492 } 493 /// <summary>Clears the value of the "optional_string" field</summary> 494 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 495 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalString()496 public void ClearOptionalString() { 497 optionalString_ = null; 498 } 499 500 /// <summary>Field number for the "optional_bytes" field.</summary> 501 public const int OptionalBytesFieldNumber = 15; 502 private pb::ByteString optionalBytes_; 503 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 504 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 505 public pb::ByteString OptionalBytes { 506 get { return optionalBytes_ ?? pb::ByteString.Empty; } 507 set { 508 optionalBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 509 } 510 } 511 /// <summary>Gets whether the "optional_bytes" field is set</summary> 512 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 513 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 514 public bool HasOptionalBytes { 515 get { return optionalBytes_ != null; } 516 } 517 /// <summary>Clears the value of the "optional_bytes" field</summary> 518 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 519 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalBytes()520 public void ClearOptionalBytes() { 521 optionalBytes_ = null; 522 } 523 524 /// <summary>Field number for the "optional_cord" field.</summary> 525 public const int OptionalCordFieldNumber = 16; 526 private string optionalCord_; 527 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 528 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 529 public string OptionalCord { 530 get { return optionalCord_ ?? ""; } 531 set { 532 optionalCord_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 533 } 534 } 535 /// <summary>Gets whether the "optional_cord" field is set</summary> 536 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 537 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 538 public bool HasOptionalCord { 539 get { return optionalCord_ != null; } 540 } 541 /// <summary>Clears the value of the "optional_cord" field</summary> 542 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 543 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalCord()544 public void ClearOptionalCord() { 545 optionalCord_ = null; 546 } 547 548 /// <summary>Field number for the "optional_nested_message" field.</summary> 549 public const int OptionalNestedMessageFieldNumber = 18; 550 private global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage optionalNestedMessage_; 551 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 552 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 553 public global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage OptionalNestedMessage { 554 get { return optionalNestedMessage_; } 555 set { 556 optionalNestedMessage_ = value; 557 } 558 } 559 560 /// <summary>Field number for the "lazy_nested_message" field.</summary> 561 public const int LazyNestedMessageFieldNumber = 19; 562 private global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage lazyNestedMessage_; 563 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 564 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 565 public global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage LazyNestedMessage { 566 get { return lazyNestedMessage_; } 567 set { 568 lazyNestedMessage_ = value; 569 } 570 } 571 572 /// <summary>Field number for the "optional_nested_enum" field.</summary> 573 public const int OptionalNestedEnumFieldNumber = 21; 574 private global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum optionalNestedEnum_; 575 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 576 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 577 public global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum OptionalNestedEnum { 578 get { if ((_hasBits0 & 8192) != 0) { return optionalNestedEnum_; } else { return global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum.Unspecified; } } 579 set { 580 _hasBits0 |= 8192; 581 optionalNestedEnum_ = value; 582 } 583 } 584 /// <summary>Gets whether the "optional_nested_enum" field is set</summary> 585 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 586 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 587 public bool HasOptionalNestedEnum { 588 get { return (_hasBits0 & 8192) != 0; } 589 } 590 /// <summary>Clears the value of the "optional_nested_enum" field</summary> 591 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 592 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearOptionalNestedEnum()593 public void ClearOptionalNestedEnum() { 594 _hasBits0 &= ~8192; 595 } 596 597 /// <summary>Field number for the "singular_int32" field.</summary> 598 public const int SingularInt32FieldNumber = 22; 599 private int singularInt32_; 600 /// <summary> 601 /// Add some non-optional fields to verify we can mix them. 602 /// </summary> 603 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 604 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 605 public int SingularInt32 { 606 get { return singularInt32_; } 607 set { 608 singularInt32_ = value; 609 } 610 } 611 612 /// <summary>Field number for the "singular_int64" field.</summary> 613 public const int SingularInt64FieldNumber = 23; 614 private long singularInt64_; 615 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 616 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 617 public long SingularInt64 { 618 get { return singularInt64_; } 619 set { 620 singularInt64_ = value; 621 } 622 } 623 624 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 625 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)626 public override bool Equals(object other) { 627 return Equals(other as TestProto3Optional); 628 } 629 630 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 631 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(TestProto3Optional other)632 public bool Equals(TestProto3Optional other) { 633 if (ReferenceEquals(other, null)) { 634 return false; 635 } 636 if (ReferenceEquals(other, this)) { 637 return true; 638 } 639 if (OptionalInt32 != other.OptionalInt32) return false; 640 if (OptionalInt64 != other.OptionalInt64) return false; 641 if (OptionalUint32 != other.OptionalUint32) return false; 642 if (OptionalUint64 != other.OptionalUint64) return false; 643 if (OptionalSint32 != other.OptionalSint32) return false; 644 if (OptionalSint64 != other.OptionalSint64) return false; 645 if (OptionalFixed32 != other.OptionalFixed32) return false; 646 if (OptionalFixed64 != other.OptionalFixed64) return false; 647 if (OptionalSfixed32 != other.OptionalSfixed32) return false; 648 if (OptionalSfixed64 != other.OptionalSfixed64) return false; 649 if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OptionalFloat, other.OptionalFloat)) return false; 650 if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(OptionalDouble, other.OptionalDouble)) return false; 651 if (OptionalBool != other.OptionalBool) return false; 652 if (OptionalString != other.OptionalString) return false; 653 if (OptionalBytes != other.OptionalBytes) return false; 654 if (OptionalCord != other.OptionalCord) return false; 655 if (!object.Equals(OptionalNestedMessage, other.OptionalNestedMessage)) return false; 656 if (!object.Equals(LazyNestedMessage, other.LazyNestedMessage)) return false; 657 if (OptionalNestedEnum != other.OptionalNestedEnum) return false; 658 if (SingularInt32 != other.SingularInt32) return false; 659 if (SingularInt64 != other.SingularInt64) return false; 660 return Equals(_unknownFields, other._unknownFields); 661 } 662 663 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 664 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()665 public override int GetHashCode() { 666 int hash = 1; 667 if (HasOptionalInt32) hash ^= OptionalInt32.GetHashCode(); 668 if (HasOptionalInt64) hash ^= OptionalInt64.GetHashCode(); 669 if (HasOptionalUint32) hash ^= OptionalUint32.GetHashCode(); 670 if (HasOptionalUint64) hash ^= OptionalUint64.GetHashCode(); 671 if (HasOptionalSint32) hash ^= OptionalSint32.GetHashCode(); 672 if (HasOptionalSint64) hash ^= OptionalSint64.GetHashCode(); 673 if (HasOptionalFixed32) hash ^= OptionalFixed32.GetHashCode(); 674 if (HasOptionalFixed64) hash ^= OptionalFixed64.GetHashCode(); 675 if (HasOptionalSfixed32) hash ^= OptionalSfixed32.GetHashCode(); 676 if (HasOptionalSfixed64) hash ^= OptionalSfixed64.GetHashCode(); 677 if (HasOptionalFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OptionalFloat); 678 if (HasOptionalDouble) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(OptionalDouble); 679 if (HasOptionalBool) hash ^= OptionalBool.GetHashCode(); 680 if (HasOptionalString) hash ^= OptionalString.GetHashCode(); 681 if (HasOptionalBytes) hash ^= OptionalBytes.GetHashCode(); 682 if (HasOptionalCord) hash ^= OptionalCord.GetHashCode(); 683 if (optionalNestedMessage_ != null) hash ^= OptionalNestedMessage.GetHashCode(); 684 if (lazyNestedMessage_ != null) hash ^= LazyNestedMessage.GetHashCode(); 685 if (HasOptionalNestedEnum) hash ^= OptionalNestedEnum.GetHashCode(); 686 if (SingularInt32 != 0) hash ^= SingularInt32.GetHashCode(); 687 if (SingularInt64 != 0L) hash ^= SingularInt64.GetHashCode(); 688 if (_unknownFields != null) { 689 hash ^= _unknownFields.GetHashCode(); 690 } 691 return hash; 692 } 693 694 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 695 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()696 public override string ToString() { 697 return pb::JsonFormatter.ToDiagnosticString(this); 698 } 699 700 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 701 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)702 public void WriteTo(pb::CodedOutputStream output) { 703 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 704 output.WriteRawMessage(this); 705 #else 706 if (HasOptionalInt32) { 707 output.WriteRawTag(8); 708 output.WriteInt32(OptionalInt32); 709 } 710 if (HasOptionalInt64) { 711 output.WriteRawTag(16); 712 output.WriteInt64(OptionalInt64); 713 } 714 if (HasOptionalUint32) { 715 output.WriteRawTag(24); 716 output.WriteUInt32(OptionalUint32); 717 } 718 if (HasOptionalUint64) { 719 output.WriteRawTag(32); 720 output.WriteUInt64(OptionalUint64); 721 } 722 if (HasOptionalSint32) { 723 output.WriteRawTag(40); 724 output.WriteSInt32(OptionalSint32); 725 } 726 if (HasOptionalSint64) { 727 output.WriteRawTag(48); 728 output.WriteSInt64(OptionalSint64); 729 } 730 if (HasOptionalFixed32) { 731 output.WriteRawTag(61); 732 output.WriteFixed32(OptionalFixed32); 733 } 734 if (HasOptionalFixed64) { 735 output.WriteRawTag(65); 736 output.WriteFixed64(OptionalFixed64); 737 } 738 if (HasOptionalSfixed32) { 739 output.WriteRawTag(77); 740 output.WriteSFixed32(OptionalSfixed32); 741 } 742 if (HasOptionalSfixed64) { 743 output.WriteRawTag(81); 744 output.WriteSFixed64(OptionalSfixed64); 745 } 746 if (HasOptionalFloat) { 747 output.WriteRawTag(93); 748 output.WriteFloat(OptionalFloat); 749 } 750 if (HasOptionalDouble) { 751 output.WriteRawTag(97); 752 output.WriteDouble(OptionalDouble); 753 } 754 if (HasOptionalBool) { 755 output.WriteRawTag(104); 756 output.WriteBool(OptionalBool); 757 } 758 if (HasOptionalString) { 759 output.WriteRawTag(114); 760 output.WriteString(OptionalString); 761 } 762 if (HasOptionalBytes) { 763 output.WriteRawTag(122); 764 output.WriteBytes(OptionalBytes); 765 } 766 if (HasOptionalCord) { 767 output.WriteRawTag(130, 1); 768 output.WriteString(OptionalCord); 769 } 770 if (optionalNestedMessage_ != null) { 771 output.WriteRawTag(146, 1); 772 output.WriteMessage(OptionalNestedMessage); 773 } 774 if (lazyNestedMessage_ != null) { 775 output.WriteRawTag(154, 1); 776 output.WriteMessage(LazyNestedMessage); 777 } 778 if (HasOptionalNestedEnum) { 779 output.WriteRawTag(168, 1); 780 output.WriteEnum((int) OptionalNestedEnum); 781 } 782 if (SingularInt32 != 0) { 783 output.WriteRawTag(176, 1); 784 output.WriteInt32(SingularInt32); 785 } 786 if (SingularInt64 != 0L) { 787 output.WriteRawTag(184, 1); 788 output.WriteInt64(SingularInt64); 789 } 790 if (_unknownFields != null) { 791 _unknownFields.WriteTo(output); 792 } 793 #endif 794 } 795 796 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 797 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 798 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)799 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 800 if (HasOptionalInt32) { 801 output.WriteRawTag(8); 802 output.WriteInt32(OptionalInt32); 803 } 804 if (HasOptionalInt64) { 805 output.WriteRawTag(16); 806 output.WriteInt64(OptionalInt64); 807 } 808 if (HasOptionalUint32) { 809 output.WriteRawTag(24); 810 output.WriteUInt32(OptionalUint32); 811 } 812 if (HasOptionalUint64) { 813 output.WriteRawTag(32); 814 output.WriteUInt64(OptionalUint64); 815 } 816 if (HasOptionalSint32) { 817 output.WriteRawTag(40); 818 output.WriteSInt32(OptionalSint32); 819 } 820 if (HasOptionalSint64) { 821 output.WriteRawTag(48); 822 output.WriteSInt64(OptionalSint64); 823 } 824 if (HasOptionalFixed32) { 825 output.WriteRawTag(61); 826 output.WriteFixed32(OptionalFixed32); 827 } 828 if (HasOptionalFixed64) { 829 output.WriteRawTag(65); 830 output.WriteFixed64(OptionalFixed64); 831 } 832 if (HasOptionalSfixed32) { 833 output.WriteRawTag(77); 834 output.WriteSFixed32(OptionalSfixed32); 835 } 836 if (HasOptionalSfixed64) { 837 output.WriteRawTag(81); 838 output.WriteSFixed64(OptionalSfixed64); 839 } 840 if (HasOptionalFloat) { 841 output.WriteRawTag(93); 842 output.WriteFloat(OptionalFloat); 843 } 844 if (HasOptionalDouble) { 845 output.WriteRawTag(97); 846 output.WriteDouble(OptionalDouble); 847 } 848 if (HasOptionalBool) { 849 output.WriteRawTag(104); 850 output.WriteBool(OptionalBool); 851 } 852 if (HasOptionalString) { 853 output.WriteRawTag(114); 854 output.WriteString(OptionalString); 855 } 856 if (HasOptionalBytes) { 857 output.WriteRawTag(122); 858 output.WriteBytes(OptionalBytes); 859 } 860 if (HasOptionalCord) { 861 output.WriteRawTag(130, 1); 862 output.WriteString(OptionalCord); 863 } 864 if (optionalNestedMessage_ != null) { 865 output.WriteRawTag(146, 1); 866 output.WriteMessage(OptionalNestedMessage); 867 } 868 if (lazyNestedMessage_ != null) { 869 output.WriteRawTag(154, 1); 870 output.WriteMessage(LazyNestedMessage); 871 } 872 if (HasOptionalNestedEnum) { 873 output.WriteRawTag(168, 1); 874 output.WriteEnum((int) OptionalNestedEnum); 875 } 876 if (SingularInt32 != 0) { 877 output.WriteRawTag(176, 1); 878 output.WriteInt32(SingularInt32); 879 } 880 if (SingularInt64 != 0L) { 881 output.WriteRawTag(184, 1); 882 output.WriteInt64(SingularInt64); 883 } 884 if (_unknownFields != null) { 885 _unknownFields.WriteTo(ref output); 886 } 887 } 888 #endif 889 890 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 891 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()892 public int CalculateSize() { 893 int size = 0; 894 if (HasOptionalInt32) { 895 size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32); 896 } 897 if (HasOptionalInt64) { 898 size += 1 + pb::CodedOutputStream.ComputeInt64Size(OptionalInt64); 899 } 900 if (HasOptionalUint32) { 901 size += 1 + pb::CodedOutputStream.ComputeUInt32Size(OptionalUint32); 902 } 903 if (HasOptionalUint64) { 904 size += 1 + pb::CodedOutputStream.ComputeUInt64Size(OptionalUint64); 905 } 906 if (HasOptionalSint32) { 907 size += 1 + pb::CodedOutputStream.ComputeSInt32Size(OptionalSint32); 908 } 909 if (HasOptionalSint64) { 910 size += 1 + pb::CodedOutputStream.ComputeSInt64Size(OptionalSint64); 911 } 912 if (HasOptionalFixed32) { 913 size += 1 + 4; 914 } 915 if (HasOptionalFixed64) { 916 size += 1 + 8; 917 } 918 if (HasOptionalSfixed32) { 919 size += 1 + 4; 920 } 921 if (HasOptionalSfixed64) { 922 size += 1 + 8; 923 } 924 if (HasOptionalFloat) { 925 size += 1 + 4; 926 } 927 if (HasOptionalDouble) { 928 size += 1 + 8; 929 } 930 if (HasOptionalBool) { 931 size += 1 + 1; 932 } 933 if (HasOptionalString) { 934 size += 1 + pb::CodedOutputStream.ComputeStringSize(OptionalString); 935 } 936 if (HasOptionalBytes) { 937 size += 1 + pb::CodedOutputStream.ComputeBytesSize(OptionalBytes); 938 } 939 if (HasOptionalCord) { 940 size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalCord); 941 } 942 if (optionalNestedMessage_ != null) { 943 size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage); 944 } 945 if (lazyNestedMessage_ != null) { 946 size += 2 + pb::CodedOutputStream.ComputeMessageSize(LazyNestedMessage); 947 } 948 if (HasOptionalNestedEnum) { 949 size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalNestedEnum); 950 } 951 if (SingularInt32 != 0) { 952 size += 2 + pb::CodedOutputStream.ComputeInt32Size(SingularInt32); 953 } 954 if (SingularInt64 != 0L) { 955 size += 2 + pb::CodedOutputStream.ComputeInt64Size(SingularInt64); 956 } 957 if (_unknownFields != null) { 958 size += _unknownFields.CalculateSize(); 959 } 960 return size; 961 } 962 963 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 964 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(TestProto3Optional other)965 public void MergeFrom(TestProto3Optional other) { 966 if (other == null) { 967 return; 968 } 969 if (other.HasOptionalInt32) { 970 OptionalInt32 = other.OptionalInt32; 971 } 972 if (other.HasOptionalInt64) { 973 OptionalInt64 = other.OptionalInt64; 974 } 975 if (other.HasOptionalUint32) { 976 OptionalUint32 = other.OptionalUint32; 977 } 978 if (other.HasOptionalUint64) { 979 OptionalUint64 = other.OptionalUint64; 980 } 981 if (other.HasOptionalSint32) { 982 OptionalSint32 = other.OptionalSint32; 983 } 984 if (other.HasOptionalSint64) { 985 OptionalSint64 = other.OptionalSint64; 986 } 987 if (other.HasOptionalFixed32) { 988 OptionalFixed32 = other.OptionalFixed32; 989 } 990 if (other.HasOptionalFixed64) { 991 OptionalFixed64 = other.OptionalFixed64; 992 } 993 if (other.HasOptionalSfixed32) { 994 OptionalSfixed32 = other.OptionalSfixed32; 995 } 996 if (other.HasOptionalSfixed64) { 997 OptionalSfixed64 = other.OptionalSfixed64; 998 } 999 if (other.HasOptionalFloat) { 1000 OptionalFloat = other.OptionalFloat; 1001 } 1002 if (other.HasOptionalDouble) { 1003 OptionalDouble = other.OptionalDouble; 1004 } 1005 if (other.HasOptionalBool) { 1006 OptionalBool = other.OptionalBool; 1007 } 1008 if (other.HasOptionalString) { 1009 OptionalString = other.OptionalString; 1010 } 1011 if (other.HasOptionalBytes) { 1012 OptionalBytes = other.OptionalBytes; 1013 } 1014 if (other.HasOptionalCord) { 1015 OptionalCord = other.OptionalCord; 1016 } 1017 if (other.optionalNestedMessage_ != null) { 1018 if (optionalNestedMessage_ == null) { 1019 OptionalNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage(); 1020 } 1021 OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage); 1022 } 1023 if (other.lazyNestedMessage_ != null) { 1024 if (lazyNestedMessage_ == null) { 1025 LazyNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage(); 1026 } 1027 LazyNestedMessage.MergeFrom(other.LazyNestedMessage); 1028 } 1029 if (other.HasOptionalNestedEnum) { 1030 OptionalNestedEnum = other.OptionalNestedEnum; 1031 } 1032 if (other.SingularInt32 != 0) { 1033 SingularInt32 = other.SingularInt32; 1034 } 1035 if (other.SingularInt64 != 0L) { 1036 SingularInt64 = other.SingularInt64; 1037 } 1038 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1039 } 1040 1041 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1042 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)1043 public void MergeFrom(pb::CodedInputStream input) { 1044 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1045 input.ReadRawMessage(this); 1046 #else 1047 uint tag; 1048 while ((tag = input.ReadTag()) != 0) { 1049 switch(tag) { 1050 default: 1051 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1052 break; 1053 case 8: { 1054 OptionalInt32 = input.ReadInt32(); 1055 break; 1056 } 1057 case 16: { 1058 OptionalInt64 = input.ReadInt64(); 1059 break; 1060 } 1061 case 24: { 1062 OptionalUint32 = input.ReadUInt32(); 1063 break; 1064 } 1065 case 32: { 1066 OptionalUint64 = input.ReadUInt64(); 1067 break; 1068 } 1069 case 40: { 1070 OptionalSint32 = input.ReadSInt32(); 1071 break; 1072 } 1073 case 48: { 1074 OptionalSint64 = input.ReadSInt64(); 1075 break; 1076 } 1077 case 61: { 1078 OptionalFixed32 = input.ReadFixed32(); 1079 break; 1080 } 1081 case 65: { 1082 OptionalFixed64 = input.ReadFixed64(); 1083 break; 1084 } 1085 case 77: { 1086 OptionalSfixed32 = input.ReadSFixed32(); 1087 break; 1088 } 1089 case 81: { 1090 OptionalSfixed64 = input.ReadSFixed64(); 1091 break; 1092 } 1093 case 93: { 1094 OptionalFloat = input.ReadFloat(); 1095 break; 1096 } 1097 case 97: { 1098 OptionalDouble = input.ReadDouble(); 1099 break; 1100 } 1101 case 104: { 1102 OptionalBool = input.ReadBool(); 1103 break; 1104 } 1105 case 114: { 1106 OptionalString = input.ReadString(); 1107 break; 1108 } 1109 case 122: { 1110 OptionalBytes = input.ReadBytes(); 1111 break; 1112 } 1113 case 130: { 1114 OptionalCord = input.ReadString(); 1115 break; 1116 } 1117 case 146: { 1118 if (optionalNestedMessage_ == null) { 1119 OptionalNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage(); 1120 } 1121 input.ReadMessage(OptionalNestedMessage); 1122 break; 1123 } 1124 case 154: { 1125 if (lazyNestedMessage_ == null) { 1126 LazyNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage(); 1127 } 1128 input.ReadMessage(LazyNestedMessage); 1129 break; 1130 } 1131 case 168: { 1132 OptionalNestedEnum = (global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum) input.ReadEnum(); 1133 break; 1134 } 1135 case 176: { 1136 SingularInt32 = input.ReadInt32(); 1137 break; 1138 } 1139 case 184: { 1140 SingularInt64 = input.ReadInt64(); 1141 break; 1142 } 1143 } 1144 } 1145 #endif 1146 } 1147 1148 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1149 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1150 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1151 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 1152 uint tag; 1153 while ((tag = input.ReadTag()) != 0) { 1154 switch(tag) { 1155 default: 1156 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 1157 break; 1158 case 8: { 1159 OptionalInt32 = input.ReadInt32(); 1160 break; 1161 } 1162 case 16: { 1163 OptionalInt64 = input.ReadInt64(); 1164 break; 1165 } 1166 case 24: { 1167 OptionalUint32 = input.ReadUInt32(); 1168 break; 1169 } 1170 case 32: { 1171 OptionalUint64 = input.ReadUInt64(); 1172 break; 1173 } 1174 case 40: { 1175 OptionalSint32 = input.ReadSInt32(); 1176 break; 1177 } 1178 case 48: { 1179 OptionalSint64 = input.ReadSInt64(); 1180 break; 1181 } 1182 case 61: { 1183 OptionalFixed32 = input.ReadFixed32(); 1184 break; 1185 } 1186 case 65: { 1187 OptionalFixed64 = input.ReadFixed64(); 1188 break; 1189 } 1190 case 77: { 1191 OptionalSfixed32 = input.ReadSFixed32(); 1192 break; 1193 } 1194 case 81: { 1195 OptionalSfixed64 = input.ReadSFixed64(); 1196 break; 1197 } 1198 case 93: { 1199 OptionalFloat = input.ReadFloat(); 1200 break; 1201 } 1202 case 97: { 1203 OptionalDouble = input.ReadDouble(); 1204 break; 1205 } 1206 case 104: { 1207 OptionalBool = input.ReadBool(); 1208 break; 1209 } 1210 case 114: { 1211 OptionalString = input.ReadString(); 1212 break; 1213 } 1214 case 122: { 1215 OptionalBytes = input.ReadBytes(); 1216 break; 1217 } 1218 case 130: { 1219 OptionalCord = input.ReadString(); 1220 break; 1221 } 1222 case 146: { 1223 if (optionalNestedMessage_ == null) { 1224 OptionalNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage(); 1225 } 1226 input.ReadMessage(OptionalNestedMessage); 1227 break; 1228 } 1229 case 154: { 1230 if (lazyNestedMessage_ == null) { 1231 LazyNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage(); 1232 } 1233 input.ReadMessage(LazyNestedMessage); 1234 break; 1235 } 1236 case 168: { 1237 OptionalNestedEnum = (global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum) input.ReadEnum(); 1238 break; 1239 } 1240 case 176: { 1241 SingularInt32 = input.ReadInt32(); 1242 break; 1243 } 1244 case 184: { 1245 SingularInt64 = input.ReadInt64(); 1246 break; 1247 } 1248 } 1249 } 1250 } 1251 #endif 1252 1253 #region Nested types 1254 /// <summary>Container for nested types declared in the TestProto3Optional message type.</summary> 1255 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1256 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1257 public static partial class Types { 1258 public enum NestedEnum { 1259 [pbr::OriginalName("UNSPECIFIED")] Unspecified = 0, 1260 [pbr::OriginalName("FOO")] Foo = 1, 1261 [pbr::OriginalName("BAR")] Bar = 2, 1262 [pbr::OriginalName("BAZ")] Baz = 3, 1263 /// <summary> 1264 /// Intentionally negative. 1265 /// </summary> 1266 [pbr::OriginalName("NEG")] Neg = -1, 1267 } 1268 1269 public sealed partial class NestedMessage : pb::IMessage<NestedMessage> 1270 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1271 , pb::IBufferMessage 1272 #endif 1273 { 1274 private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage()); 1275 private pb::UnknownFieldSet _unknownFields; 1276 private int _hasBits0; 1277 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1278 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1279 public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } } 1280 1281 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1282 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1283 public static pbr::MessageDescriptor Descriptor { 1284 get { return global::ProtobufUnittest.TestProto3Optional.Descriptor.NestedTypes[0]; } 1285 } 1286 1287 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1288 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1289 pbr::MessageDescriptor pb::IMessage.Descriptor { 1290 get { return Descriptor; } 1291 } 1292 1293 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1294 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] NestedMessage()1295 public NestedMessage() { 1296 OnConstruction(); 1297 } 1298 OnConstruction()1299 partial void OnConstruction(); 1300 1301 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1302 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] NestedMessage(NestedMessage other)1303 public NestedMessage(NestedMessage other) : this() { 1304 _hasBits0 = other._hasBits0; 1305 bb_ = other.bb_; 1306 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 1307 } 1308 1309 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1310 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()1311 public NestedMessage Clone() { 1312 return new NestedMessage(this); 1313 } 1314 1315 /// <summary>Field number for the "bb" field.</summary> 1316 public const int BbFieldNumber = 1; 1317 private int bb_; 1318 /// <summary> 1319 /// The field name "b" fails to compile in proto1 because it conflicts with 1320 /// a local variable named "b" in one of the generated methods. Doh. 1321 /// This file needs to compile in proto1 to test backwards-compatibility. 1322 /// </summary> 1323 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1324 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1325 public int Bb { 1326 get { if ((_hasBits0 & 1) != 0) { return bb_; } else { return 0; } } 1327 set { 1328 _hasBits0 |= 1; 1329 bb_ = value; 1330 } 1331 } 1332 /// <summary>Gets whether the "bb" field is set</summary> 1333 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1334 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1335 public bool HasBb { 1336 get { return (_hasBits0 & 1) != 0; } 1337 } 1338 /// <summary>Clears the value of the "bb" field</summary> 1339 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1340 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearBb()1341 public void ClearBb() { 1342 _hasBits0 &= ~1; 1343 } 1344 1345 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1346 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)1347 public override bool Equals(object other) { 1348 return Equals(other as NestedMessage); 1349 } 1350 1351 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1352 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(NestedMessage other)1353 public bool Equals(NestedMessage other) { 1354 if (ReferenceEquals(other, null)) { 1355 return false; 1356 } 1357 if (ReferenceEquals(other, this)) { 1358 return true; 1359 } 1360 if (Bb != other.Bb) return false; 1361 return Equals(_unknownFields, other._unknownFields); 1362 } 1363 1364 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1365 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()1366 public override int GetHashCode() { 1367 int hash = 1; 1368 if (HasBb) hash ^= Bb.GetHashCode(); 1369 if (_unknownFields != null) { 1370 hash ^= _unknownFields.GetHashCode(); 1371 } 1372 return hash; 1373 } 1374 1375 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1376 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()1377 public override string ToString() { 1378 return pb::JsonFormatter.ToDiagnosticString(this); 1379 } 1380 1381 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1382 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)1383 public void WriteTo(pb::CodedOutputStream output) { 1384 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1385 output.WriteRawMessage(this); 1386 #else 1387 if (HasBb) { 1388 output.WriteRawTag(8); 1389 output.WriteInt32(Bb); 1390 } 1391 if (_unknownFields != null) { 1392 _unknownFields.WriteTo(output); 1393 } 1394 #endif 1395 } 1396 1397 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1398 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1399 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1400 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 1401 if (HasBb) { 1402 output.WriteRawTag(8); 1403 output.WriteInt32(Bb); 1404 } 1405 if (_unknownFields != null) { 1406 _unknownFields.WriteTo(ref output); 1407 } 1408 } 1409 #endif 1410 1411 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1412 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()1413 public int CalculateSize() { 1414 int size = 0; 1415 if (HasBb) { 1416 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb); 1417 } 1418 if (_unknownFields != null) { 1419 size += _unknownFields.CalculateSize(); 1420 } 1421 return size; 1422 } 1423 1424 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1425 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(NestedMessage other)1426 public void MergeFrom(NestedMessage other) { 1427 if (other == null) { 1428 return; 1429 } 1430 if (other.HasBb) { 1431 Bb = other.Bb; 1432 } 1433 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1434 } 1435 1436 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1437 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)1438 public void MergeFrom(pb::CodedInputStream input) { 1439 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1440 input.ReadRawMessage(this); 1441 #else 1442 uint tag; 1443 while ((tag = input.ReadTag()) != 0) { 1444 switch(tag) { 1445 default: 1446 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1447 break; 1448 case 8: { 1449 Bb = input.ReadInt32(); 1450 break; 1451 } 1452 } 1453 } 1454 #endif 1455 } 1456 1457 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1458 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1459 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1460 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 1461 uint tag; 1462 while ((tag = input.ReadTag()) != 0) { 1463 switch(tag) { 1464 default: 1465 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 1466 break; 1467 case 8: { 1468 Bb = input.ReadInt32(); 1469 break; 1470 } 1471 } 1472 } 1473 } 1474 #endif 1475 1476 } 1477 1478 } 1479 #endregion 1480 1481 } 1482 1483 public sealed partial class TestProto3OptionalMessage : pb::IMessage<TestProto3OptionalMessage> 1484 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1485 , pb::IBufferMessage 1486 #endif 1487 { 1488 private static readonly pb::MessageParser<TestProto3OptionalMessage> _parser = new pb::MessageParser<TestProto3OptionalMessage>(() => new TestProto3OptionalMessage()); 1489 private pb::UnknownFieldSet _unknownFields; 1490 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1491 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1492 public static pb::MessageParser<TestProto3OptionalMessage> Parser { get { return _parser; } } 1493 1494 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1495 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1496 public static pbr::MessageDescriptor Descriptor { 1497 get { return global::ProtobufUnittest.UnittestProto3OptionalReflection.Descriptor.MessageTypes[1]; } 1498 } 1499 1500 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1501 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1502 pbr::MessageDescriptor pb::IMessage.Descriptor { 1503 get { return Descriptor; } 1504 } 1505 1506 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1507 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] TestProto3OptionalMessage()1508 public TestProto3OptionalMessage() { 1509 OnConstruction(); 1510 } 1511 OnConstruction()1512 partial void OnConstruction(); 1513 1514 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1515 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] TestProto3OptionalMessage(TestProto3OptionalMessage other)1516 public TestProto3OptionalMessage(TestProto3OptionalMessage other) : this() { 1517 nestedMessage_ = other.nestedMessage_ != null ? other.nestedMessage_.Clone() : null; 1518 optionalNestedMessage_ = other.optionalNestedMessage_ != null ? other.optionalNestedMessage_.Clone() : null; 1519 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 1520 } 1521 1522 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1523 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()1524 public TestProto3OptionalMessage Clone() { 1525 return new TestProto3OptionalMessage(this); 1526 } 1527 1528 /// <summary>Field number for the "nested_message" field.</summary> 1529 public const int NestedMessageFieldNumber = 1; 1530 private global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage nestedMessage_; 1531 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1532 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1533 public global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage NestedMessage { 1534 get { return nestedMessage_; } 1535 set { 1536 nestedMessage_ = value; 1537 } 1538 } 1539 1540 /// <summary>Field number for the "optional_nested_message" field.</summary> 1541 public const int OptionalNestedMessageFieldNumber = 2; 1542 private global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage optionalNestedMessage_; 1543 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1544 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1545 public global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage OptionalNestedMessage { 1546 get { return optionalNestedMessage_; } 1547 set { 1548 optionalNestedMessage_ = value; 1549 } 1550 } 1551 1552 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1553 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)1554 public override bool Equals(object other) { 1555 return Equals(other as TestProto3OptionalMessage); 1556 } 1557 1558 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1559 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(TestProto3OptionalMessage other)1560 public bool Equals(TestProto3OptionalMessage other) { 1561 if (ReferenceEquals(other, null)) { 1562 return false; 1563 } 1564 if (ReferenceEquals(other, this)) { 1565 return true; 1566 } 1567 if (!object.Equals(NestedMessage, other.NestedMessage)) return false; 1568 if (!object.Equals(OptionalNestedMessage, other.OptionalNestedMessage)) return false; 1569 return Equals(_unknownFields, other._unknownFields); 1570 } 1571 1572 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1573 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()1574 public override int GetHashCode() { 1575 int hash = 1; 1576 if (nestedMessage_ != null) hash ^= NestedMessage.GetHashCode(); 1577 if (optionalNestedMessage_ != null) hash ^= OptionalNestedMessage.GetHashCode(); 1578 if (_unknownFields != null) { 1579 hash ^= _unknownFields.GetHashCode(); 1580 } 1581 return hash; 1582 } 1583 1584 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1585 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()1586 public override string ToString() { 1587 return pb::JsonFormatter.ToDiagnosticString(this); 1588 } 1589 1590 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1591 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)1592 public void WriteTo(pb::CodedOutputStream output) { 1593 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1594 output.WriteRawMessage(this); 1595 #else 1596 if (nestedMessage_ != null) { 1597 output.WriteRawTag(10); 1598 output.WriteMessage(NestedMessage); 1599 } 1600 if (optionalNestedMessage_ != null) { 1601 output.WriteRawTag(18); 1602 output.WriteMessage(OptionalNestedMessage); 1603 } 1604 if (_unknownFields != null) { 1605 _unknownFields.WriteTo(output); 1606 } 1607 #endif 1608 } 1609 1610 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1611 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1612 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1613 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 1614 if (nestedMessage_ != null) { 1615 output.WriteRawTag(10); 1616 output.WriteMessage(NestedMessage); 1617 } 1618 if (optionalNestedMessage_ != null) { 1619 output.WriteRawTag(18); 1620 output.WriteMessage(OptionalNestedMessage); 1621 } 1622 if (_unknownFields != null) { 1623 _unknownFields.WriteTo(ref output); 1624 } 1625 } 1626 #endif 1627 1628 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1629 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()1630 public int CalculateSize() { 1631 int size = 0; 1632 if (nestedMessage_ != null) { 1633 size += 1 + pb::CodedOutputStream.ComputeMessageSize(NestedMessage); 1634 } 1635 if (optionalNestedMessage_ != null) { 1636 size += 1 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage); 1637 } 1638 if (_unknownFields != null) { 1639 size += _unknownFields.CalculateSize(); 1640 } 1641 return size; 1642 } 1643 1644 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1645 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(TestProto3OptionalMessage other)1646 public void MergeFrom(TestProto3OptionalMessage other) { 1647 if (other == null) { 1648 return; 1649 } 1650 if (other.nestedMessage_ != null) { 1651 if (nestedMessage_ == null) { 1652 NestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage(); 1653 } 1654 NestedMessage.MergeFrom(other.NestedMessage); 1655 } 1656 if (other.optionalNestedMessage_ != null) { 1657 if (optionalNestedMessage_ == null) { 1658 OptionalNestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage(); 1659 } 1660 OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage); 1661 } 1662 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1663 } 1664 1665 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1666 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)1667 public void MergeFrom(pb::CodedInputStream input) { 1668 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1669 input.ReadRawMessage(this); 1670 #else 1671 uint tag; 1672 while ((tag = input.ReadTag()) != 0) { 1673 switch(tag) { 1674 default: 1675 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1676 break; 1677 case 10: { 1678 if (nestedMessage_ == null) { 1679 NestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage(); 1680 } 1681 input.ReadMessage(NestedMessage); 1682 break; 1683 } 1684 case 18: { 1685 if (optionalNestedMessage_ == null) { 1686 OptionalNestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage(); 1687 } 1688 input.ReadMessage(OptionalNestedMessage); 1689 break; 1690 } 1691 } 1692 } 1693 #endif 1694 } 1695 1696 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1697 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1698 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1699 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 1700 uint tag; 1701 while ((tag = input.ReadTag()) != 0) { 1702 switch(tag) { 1703 default: 1704 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 1705 break; 1706 case 10: { 1707 if (nestedMessage_ == null) { 1708 NestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage(); 1709 } 1710 input.ReadMessage(NestedMessage); 1711 break; 1712 } 1713 case 18: { 1714 if (optionalNestedMessage_ == null) { 1715 OptionalNestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage(); 1716 } 1717 input.ReadMessage(OptionalNestedMessage); 1718 break; 1719 } 1720 } 1721 } 1722 } 1723 #endif 1724 1725 #region Nested types 1726 /// <summary>Container for nested types declared in the TestProto3OptionalMessage message type.</summary> 1727 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1728 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1729 public static partial class Types { 1730 public sealed partial class NestedMessage : pb::IMessage<NestedMessage> 1731 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1732 , pb::IBufferMessage 1733 #endif 1734 { 1735 private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage()); 1736 private pb::UnknownFieldSet _unknownFields; 1737 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1738 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1739 public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } } 1740 1741 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1742 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1743 public static pbr::MessageDescriptor Descriptor { 1744 get { return global::ProtobufUnittest.TestProto3OptionalMessage.Descriptor.NestedTypes[0]; } 1745 } 1746 1747 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1748 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1749 pbr::MessageDescriptor pb::IMessage.Descriptor { 1750 get { return Descriptor; } 1751 } 1752 1753 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1754 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] NestedMessage()1755 public NestedMessage() { 1756 OnConstruction(); 1757 } 1758 OnConstruction()1759 partial void OnConstruction(); 1760 1761 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1762 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] NestedMessage(NestedMessage other)1763 public NestedMessage(NestedMessage other) : this() { 1764 s_ = other.s_; 1765 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 1766 } 1767 1768 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1769 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()1770 public NestedMessage Clone() { 1771 return new NestedMessage(this); 1772 } 1773 1774 /// <summary>Field number for the "s" field.</summary> 1775 public const int SFieldNumber = 1; 1776 private string s_ = ""; 1777 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1778 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1779 public string S { 1780 get { return s_; } 1781 set { 1782 s_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 1783 } 1784 } 1785 1786 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1787 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)1788 public override bool Equals(object other) { 1789 return Equals(other as NestedMessage); 1790 } 1791 1792 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1793 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(NestedMessage other)1794 public bool Equals(NestedMessage other) { 1795 if (ReferenceEquals(other, null)) { 1796 return false; 1797 } 1798 if (ReferenceEquals(other, this)) { 1799 return true; 1800 } 1801 if (S != other.S) return false; 1802 return Equals(_unknownFields, other._unknownFields); 1803 } 1804 1805 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1806 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()1807 public override int GetHashCode() { 1808 int hash = 1; 1809 if (S.Length != 0) hash ^= S.GetHashCode(); 1810 if (_unknownFields != null) { 1811 hash ^= _unknownFields.GetHashCode(); 1812 } 1813 return hash; 1814 } 1815 1816 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1817 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()1818 public override string ToString() { 1819 return pb::JsonFormatter.ToDiagnosticString(this); 1820 } 1821 1822 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1823 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)1824 public void WriteTo(pb::CodedOutputStream output) { 1825 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1826 output.WriteRawMessage(this); 1827 #else 1828 if (S.Length != 0) { 1829 output.WriteRawTag(10); 1830 output.WriteString(S); 1831 } 1832 if (_unknownFields != null) { 1833 _unknownFields.WriteTo(output); 1834 } 1835 #endif 1836 } 1837 1838 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1839 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1840 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1841 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 1842 if (S.Length != 0) { 1843 output.WriteRawTag(10); 1844 output.WriteString(S); 1845 } 1846 if (_unknownFields != null) { 1847 _unknownFields.WriteTo(ref output); 1848 } 1849 } 1850 #endif 1851 1852 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1853 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()1854 public int CalculateSize() { 1855 int size = 0; 1856 if (S.Length != 0) { 1857 size += 1 + pb::CodedOutputStream.ComputeStringSize(S); 1858 } 1859 if (_unknownFields != null) { 1860 size += _unknownFields.CalculateSize(); 1861 } 1862 return size; 1863 } 1864 1865 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1866 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(NestedMessage other)1867 public void MergeFrom(NestedMessage other) { 1868 if (other == null) { 1869 return; 1870 } 1871 if (other.S.Length != 0) { 1872 S = other.S; 1873 } 1874 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1875 } 1876 1877 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1878 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)1879 public void MergeFrom(pb::CodedInputStream input) { 1880 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1881 input.ReadRawMessage(this); 1882 #else 1883 uint tag; 1884 while ((tag = input.ReadTag()) != 0) { 1885 switch(tag) { 1886 default: 1887 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1888 break; 1889 case 10: { 1890 S = input.ReadString(); 1891 break; 1892 } 1893 } 1894 } 1895 #endif 1896 } 1897 1898 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1899 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1900 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1901 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 1902 uint tag; 1903 while ((tag = input.ReadTag()) != 0) { 1904 switch(tag) { 1905 default: 1906 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 1907 break; 1908 case 10: { 1909 S = input.ReadString(); 1910 break; 1911 } 1912 } 1913 } 1914 } 1915 #endif 1916 1917 } 1918 1919 } 1920 #endregion 1921 1922 } 1923 1924 public sealed partial class Proto3OptionalExtensions : pb::IMessage<Proto3OptionalExtensions> 1925 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1926 , pb::IBufferMessage 1927 #endif 1928 { 1929 private static readonly pb::MessageParser<Proto3OptionalExtensions> _parser = new pb::MessageParser<Proto3OptionalExtensions>(() => new Proto3OptionalExtensions()); 1930 private pb::UnknownFieldSet _unknownFields; 1931 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1932 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1933 public static pb::MessageParser<Proto3OptionalExtensions> Parser { get { return _parser; } } 1934 1935 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1936 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1937 public static pbr::MessageDescriptor Descriptor { 1938 get { return global::ProtobufUnittest.UnittestProto3OptionalReflection.Descriptor.MessageTypes[2]; } 1939 } 1940 1941 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1942 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1943 pbr::MessageDescriptor pb::IMessage.Descriptor { 1944 get { return Descriptor; } 1945 } 1946 1947 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1948 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Proto3OptionalExtensions()1949 public Proto3OptionalExtensions() { 1950 OnConstruction(); 1951 } 1952 OnConstruction()1953 partial void OnConstruction(); 1954 1955 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1956 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Proto3OptionalExtensions(Proto3OptionalExtensions other)1957 public Proto3OptionalExtensions(Proto3OptionalExtensions other) : this() { 1958 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 1959 } 1960 1961 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1962 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()1963 public Proto3OptionalExtensions Clone() { 1964 return new Proto3OptionalExtensions(this); 1965 } 1966 1967 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1968 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)1969 public override bool Equals(object other) { 1970 return Equals(other as Proto3OptionalExtensions); 1971 } 1972 1973 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1974 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(Proto3OptionalExtensions other)1975 public bool Equals(Proto3OptionalExtensions other) { 1976 if (ReferenceEquals(other, null)) { 1977 return false; 1978 } 1979 if (ReferenceEquals(other, this)) { 1980 return true; 1981 } 1982 return Equals(_unknownFields, other._unknownFields); 1983 } 1984 1985 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1986 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()1987 public override int GetHashCode() { 1988 int hash = 1; 1989 if (_unknownFields != null) { 1990 hash ^= _unknownFields.GetHashCode(); 1991 } 1992 return hash; 1993 } 1994 1995 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1996 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()1997 public override string ToString() { 1998 return pb::JsonFormatter.ToDiagnosticString(this); 1999 } 2000 2001 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 2002 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)2003 public void WriteTo(pb::CodedOutputStream output) { 2004 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 2005 output.WriteRawMessage(this); 2006 #else 2007 if (_unknownFields != null) { 2008 _unknownFields.WriteTo(output); 2009 } 2010 #endif 2011 } 2012 2013 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 2014 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 2015 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)2016 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 2017 if (_unknownFields != null) { 2018 _unknownFields.WriteTo(ref output); 2019 } 2020 } 2021 #endif 2022 2023 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 2024 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()2025 public int CalculateSize() { 2026 int size = 0; 2027 if (_unknownFields != null) { 2028 size += _unknownFields.CalculateSize(); 2029 } 2030 return size; 2031 } 2032 2033 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 2034 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(Proto3OptionalExtensions other)2035 public void MergeFrom(Proto3OptionalExtensions other) { 2036 if (other == null) { 2037 return; 2038 } 2039 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 2040 } 2041 2042 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 2043 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)2044 public void MergeFrom(pb::CodedInputStream input) { 2045 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 2046 input.ReadRawMessage(this); 2047 #else 2048 uint tag; 2049 while ((tag = input.ReadTag()) != 0) { 2050 switch(tag) { 2051 default: 2052 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 2053 break; 2054 } 2055 } 2056 #endif 2057 } 2058 2059 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 2060 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 2061 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)2062 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 2063 uint tag; 2064 while ((tag = input.ReadTag()) != 0) { 2065 switch(tag) { 2066 default: 2067 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 2068 break; 2069 } 2070 } 2071 } 2072 #endif 2073 2074 #region Extensions 2075 /// <summary>Container for extensions for other messages declared in the Proto3OptionalExtensions message type.</summary> 2076 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 2077 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 2078 public static partial class Extensions { 2079 public static readonly pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, int> ExtNoOptional = 2080 new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, int>(355886728, pb::FieldCodec.ForInt32(2847093824, 0)); 2081 public static readonly pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, int> ExtWithOptional = 2082 new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, int>(355886729, pb::FieldCodec.ForInt32(2847093832, 0)); 2083 } 2084 #endregion 2085 2086 } 2087 2088 #endregion 2089 2090 } 2091 2092 #endregion Designer generated code 2093