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