UnittestIssues.cs 41.6 KB
Newer Older
1 2 3 4 5
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: unittest_issues.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

6 7
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
8
using pbr = global::Google.Protobuf.Reflection;
9 10 11 12 13 14 15
using scg = global::System.Collections.Generic;
namespace UnitTest.Issues.TestProtos {

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public static partial class UnittestIssues {

    #region Descriptor
16
    public static pbr::FileDescriptor Descriptor {
17 18
      get { return descriptor; }
    }
19
    private static pbr::FileDescriptor descriptor;
20 21 22 23

    static UnittestIssues() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
            "ChV1bml0dGVzdF9pc3N1ZXMucHJvdG8SD3VuaXR0ZXN0X2lzc3VlcyInCghJ",
            "c3N1ZTMwNxobCgpOZXN0ZWRPbmNlGg0KC05lc3RlZFR3aWNlIrABChNOZWdh",
            "dGl2ZUVudW1NZXNzYWdlEiwKBXZhbHVlGAEgASgOMh0udW5pdHRlc3RfaXNz",
            "dWVzLk5lZ2F0aXZlRW51bRIxCgZ2YWx1ZXMYAiADKA4yHS51bml0dGVzdF9p",
            "c3N1ZXMuTmVnYXRpdmVFbnVtQgIQABI4Cg1wYWNrZWRfdmFsdWVzGAMgAygO",
            "Mh0udW5pdHRlc3RfaXNzdWVzLk5lZ2F0aXZlRW51bUICEAEiEQoPRGVwcmVj",
            "YXRlZENoaWxkIrkCChdEZXByZWNhdGVkRmllbGRzTWVzc2FnZRIaCg5Qcmlt",
            "aXRpdmVWYWx1ZRgBIAEoBUICGAESGgoOUHJpbWl0aXZlQXJyYXkYAiADKAVC",
            "AhgBEjoKDE1lc3NhZ2VWYWx1ZRgDIAEoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5E",
            "ZXByZWNhdGVkQ2hpbGRCAhgBEjoKDE1lc3NhZ2VBcnJheRgEIAMoCzIgLnVu",
            "aXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkQ2hpbGRCAhgBEjYKCUVudW1WYWx1",
            "ZRgFIAEoDjIfLnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkRW51bUICGAES",
            "NgoJRW51bUFycmF5GAYgAygOMh8udW5pdHRlc3RfaXNzdWVzLkRlcHJlY2F0",
            "ZWRFbnVtQgIYASIZCglJdGVtRmllbGQSDAoEaXRlbRgBIAEoBSJECg1SZXNl",
            "cnZlZE5hbWVzEg0KBXR5cGVzGAEgASgFEhIKCmRlc2NyaXB0b3IYAiABKAUa",
            "EAoOU29tZU5lc3RlZFR5cGUioAEKFVRlc3RKc29uRmllbGRPcmRlcmluZxIT",
            "CgtwbGFpbl9pbnQzMhgEIAEoBRITCglvMV9zdHJpbmcYAiABKAlIABISCghv",
            "MV9pbnQzMhgFIAEoBUgAEhQKDHBsYWluX3N0cmluZxgBIAEoCRISCghvMl9p",
            "bnQzMhgGIAEoBUgBEhMKCW8yX3N0cmluZxgDIAEoCUgBQgQKAm8xQgQKAm8y",
            "KlUKDE5lZ2F0aXZlRW51bRIWChJORUdBVElWRV9FTlVNX1pFUk8QABIWCglG",
            "aXZlQmVsb3cQ+///////////ARIVCghNaW51c09uZRD///////////8BKi4K",
            "DkRlcHJlY2F0ZWRFbnVtEhMKD0RFUFJFQ0FURURfWkVSTxAAEgcKA29uZRAB",
46
            "Qh9IAaoCGlVuaXRUZXN0Lklzc3Vlcy5UZXN0UHJvdG9zYgZwcm90bzM="));
47
      descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
48
          new pbr::FileDescriptor[] { },
49 50 51 52 53
          new pbr::GeneratedCodeInfo(new[] {typeof(global::UnitTest.Issues.TestProtos.NegativeEnum), typeof(global::UnitTest.Issues.TestProtos.DeprecatedEnum), }, new pbr::GeneratedCodeInfo[] {
            new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307), null, null, null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce), null, null, null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice), null, null, null, null)})}),
            new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos.NegativeEnumMessage), new[]{ "Value", "Values", "PackedValues" }, null, null, null),
            new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos.DeprecatedChild), null, null, null, null),
            new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage), new[]{ "PrimitiveValue", "PrimitiveArray", "MessageValue", "MessageArray", "EnumValue", "EnumArray" }, null, null, null),
54
            new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos.ItemField), new[]{ "Item" }, null, null, null),
55 56
            new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames), new[]{ "Types_", "Descriptor_" }, null, null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames.Types.SomeNestedType), null, null, null, null)}),
            new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonFieldOrdering), new[]{ "PlainInt32", "O1String", "O1Int32", "PlainString", "O2Int32", "O2String" }, new[]{ "O1", "O2" }, null, null)
57
          }));
58 59 60 61 62
    }
    #endregion

  }
  #region Enums
63
  public enum NegativeEnum {
64
    NEGATIVE_ENUM_ZERO = 0,
65 66 67 68
    FiveBelow = -5,
    MinusOne = -1,
  }

69
  public enum DeprecatedEnum {
70
    DEPRECATED_ZERO = 0,
71 72 73 74 75 76
    one = 1,
  }

  #endregion

  #region Messages
77 78 79 80 81
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class Issue307 : pb::IMessage<Issue307> {
    private static readonly pb::MessageParser<Issue307> _parser = new pb::MessageParser<Issue307>(() => new Issue307());
    public static pb::MessageParser<Issue307> Parser { get { return _parser; } }

82
    public static pbr::MessageDescriptor Descriptor {
83
      get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[0]; }
84 85
    }

86 87
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
88 89
    }

90 91 92 93 94
    public Issue307() {
      OnConstruction();
    }

    partial void OnConstruction();
95

96
    public Issue307(Issue307 other) : this() {
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
    }

    public Issue307 Clone() {
      return new Issue307(this);
    }

    public override bool Equals(object other) {
      return Equals(other as Issue307);
    }

    public bool Equals(Issue307 other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      return hash;
    }

122 123 124 125
    public override string ToString() {
      return pb::JsonFormatter.Default.Format(this);
    }

126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
    public void WriteTo(pb::CodedOutputStream output) {
    }

    public int CalculateSize() {
      int size = 0;
      return size;
    }

    public void MergeFrom(Issue307 other) {
      if (other == null) {
        return;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
142
      while ((tag = input.ReadTag()) != 0) {
143 144
        switch(tag) {
          default:
145
            input.SkipLastField();
146 147 148 149 150 151 152 153 154 155 156 157 158
            break;
        }
      }
    }

    #region Nested types
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    public static partial class Types {
      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
      public sealed partial class NestedOnce : pb::IMessage<NestedOnce> {
        private static readonly pb::MessageParser<NestedOnce> _parser = new pb::MessageParser<NestedOnce>(() => new NestedOnce());
        public static pb::MessageParser<NestedOnce> Parser { get { return _parser; } }

159
        public static pbr::MessageDescriptor Descriptor {
160
          get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.NestedTypes[0]; }
161 162
        }

163 164
        pbr::MessageDescriptor pb::IMessage.Descriptor {
          get { return Descriptor; }
165 166
        }

167 168 169 170 171
        public NestedOnce() {
          OnConstruction();
        }

        partial void OnConstruction();
172

173
        public NestedOnce(NestedOnce other) : this() {
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
        }

        public NestedOnce Clone() {
          return new NestedOnce(this);
        }

        public override bool Equals(object other) {
          return Equals(other as NestedOnce);
        }

        public bool Equals(NestedOnce other) {
          if (ReferenceEquals(other, null)) {
            return false;
          }
          if (ReferenceEquals(other, this)) {
            return true;
          }
          return true;
        }

        public override int GetHashCode() {
          int hash = 1;
          return hash;
        }

199 200 201 202
        public override string ToString() {
          return pb::JsonFormatter.Default.Format(this);
        }

203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
        public void WriteTo(pb::CodedOutputStream output) {
        }

        public int CalculateSize() {
          int size = 0;
          return size;
        }

        public void MergeFrom(NestedOnce other) {
          if (other == null) {
            return;
          }
        }

        public void MergeFrom(pb::CodedInputStream input) {
          uint tag;
219
          while ((tag = input.ReadTag()) != 0) {
220 221
            switch(tag) {
              default:
222
                input.SkipLastField();
223 224 225 226 227 228 229 230 231 232 233 234 235
                break;
            }
          }
        }

        #region Nested types
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public static partial class Types {
          [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
          public sealed partial class NestedTwice : pb::IMessage<NestedTwice> {
            private static readonly pb::MessageParser<NestedTwice> _parser = new pb::MessageParser<NestedTwice>(() => new NestedTwice());
            public static pb::MessageParser<NestedTwice> Parser { get { return _parser; } }

236
            public static pbr::MessageDescriptor Descriptor {
237
              get { return global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Descriptor.NestedTypes[0]; }
238 239
            }

240 241
            pbr::MessageDescriptor pb::IMessage.Descriptor {
              get { return Descriptor; }
242 243
            }

244 245 246 247 248
            public NestedTwice() {
              OnConstruction();
            }

            partial void OnConstruction();
249

250
            public NestedTwice(NestedTwice other) : this() {
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
            }

            public NestedTwice Clone() {
              return new NestedTwice(this);
            }

            public override bool Equals(object other) {
              return Equals(other as NestedTwice);
            }

            public bool Equals(NestedTwice other) {
              if (ReferenceEquals(other, null)) {
                return false;
              }
              if (ReferenceEquals(other, this)) {
                return true;
              }
              return true;
            }

            public override int GetHashCode() {
              int hash = 1;
              return hash;
            }

276 277 278 279
            public override string ToString() {
              return pb::JsonFormatter.Default.Format(this);
            }

280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
            public void WriteTo(pb::CodedOutputStream output) {
            }

            public int CalculateSize() {
              int size = 0;
              return size;
            }

            public void MergeFrom(NestedTwice other) {
              if (other == null) {
                return;
              }
            }

            public void MergeFrom(pb::CodedInputStream input) {
              uint tag;
296
              while ((tag = input.ReadTag()) != 0) {
297 298
                switch(tag) {
                  default:
299
                    input.SkipLastField();
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
                    break;
                }
              }
            }

          }

        }
        #endregion

      }

    }
    #endregion

  }

317
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
318
  public sealed partial class NegativeEnumMessage : pb::IMessage<NegativeEnumMessage> {
319 320
    private static readonly pb::MessageParser<NegativeEnumMessage> _parser = new pb::MessageParser<NegativeEnumMessage>(() => new NegativeEnumMessage());
    public static pb::MessageParser<NegativeEnumMessage> Parser { get { return _parser; } }
321

322
    public static pbr::MessageDescriptor Descriptor {
323
      get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[1]; }
324 325
    }

326 327
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
328 329
    }

330 331 332 333 334
    public NegativeEnumMessage() {
      OnConstruction();
    }

    partial void OnConstruction();
Jon Skeet's avatar
Jon Skeet committed
335

336
    public NegativeEnumMessage(NegativeEnumMessage other) : this() {
Jon Skeet's avatar
Jon Skeet committed
337 338 339 340 341 342 343
      value_ = other.value_;
      values_ = other.values_.Clone();
      packedValues_ = other.packedValues_.Clone();
    }

    public NegativeEnumMessage Clone() {
      return new NegativeEnumMessage(this);
344
    }
Jon Skeet's avatar
Jon Skeet committed
345

346 347 348 349
    public const int ValueFieldNumber = 1;
    private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO;
    public global::UnitTest.Issues.TestProtos.NegativeEnum Value {
      get { return value_; }
350 351 352
      set {
        value_ = value;
      }
353 354
    }

355
    public const int ValuesFieldNumber = 2;
356
    private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_values_codec
357 358
        = pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);
    private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> values_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
359 360
    public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> Values {
      get { return values_; }
361 362
    }

363
    public const int PackedValuesFieldNumber = 3;
364
    private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_packedValues_codec
365 366
        = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);
    private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> packedValues_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
367 368
    public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> PackedValues {
      get { return packedValues_; }
369 370
    }

371 372
    public override bool Equals(object other) {
      return Equals(other as NegativeEnumMessage);
373 374
    }

375 376 377
    public bool Equals(NegativeEnumMessage other) {
      if (ReferenceEquals(other, null)) {
        return false;
378
      }
379 380
      if (ReferenceEquals(other, this)) {
        return true;
381
      }
382 383 384 385 386
      if (Value != other.Value) return false;
      if(!values_.Equals(other.values_)) return false;
      if(!packedValues_.Equals(other.packedValues_)) return false;
      return true;
    }
387

388
    public override int GetHashCode() {
389
      int hash = 1;
390 391 392 393 394
      if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) hash ^= Value.GetHashCode();
      hash ^= values_.GetHashCode();
      hash ^= packedValues_.GetHashCode();
      return hash;
    }
395

396 397 398 399
    public override string ToString() {
      return pb::JsonFormatter.Default.Format(this);
    }

Jon Skeet's avatar
Jon Skeet committed
400
    public void WriteTo(pb::CodedOutputStream output) {
401
      if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) {
402 403
        output.WriteRawTag(8);
        output.WriteEnum((int) Value);
404
      }
405 406
      values_.WriteTo(output, _repeated_values_codec);
      packedValues_.WriteTo(output, _repeated_packedValues_codec);
407
    }
408

409 410 411
    public int CalculateSize() {
      int size = 0;
      if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) {
412
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value);
413
      }
414 415
      size += values_.CalculateSize(_repeated_values_codec);
      size += packedValues_.CalculateSize(_repeated_packedValues_codec);
416 417
      return size;
    }
418

419 420 421
    public void MergeFrom(NegativeEnumMessage other) {
      if (other == null) {
        return;
422
      }
423 424
      if (other.Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) {
        Value = other.Value;
425
      }
426 427 428
      values_.Add(other.values_);
      packedValues_.Add(other.packedValues_);
    }
429

Jon Skeet's avatar
Jon Skeet committed
430
    public void MergeFrom(pb::CodedInputStream input) {
431
      uint tag;
432
      while ((tag = input.ReadTag()) != 0) {
433 434
        switch(tag) {
          default:
435
            input.SkipLastField();
436 437
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
438 439
            value_ = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum();
            break;
440 441 442
          }
          case 18:
          case 16: {
443
            values_.AddEntriesFrom(input, _repeated_values_codec);
444 445 446 447
            break;
          }
          case 26:
          case 24: {
448
            packedValues_.AddEntriesFrom(input, _repeated_packedValues_codec);
449
            break;
450 451 452 453
          }
        }
      }
    }
454

455 456 457
  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
458
  public sealed partial class DeprecatedChild : pb::IMessage<DeprecatedChild> {
459 460
    private static readonly pb::MessageParser<DeprecatedChild> _parser = new pb::MessageParser<DeprecatedChild>(() => new DeprecatedChild());
    public static pb::MessageParser<DeprecatedChild> Parser { get { return _parser; } }
461

462
    public static pbr::MessageDescriptor Descriptor {
463
      get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[2]; }
464 465
    }

466 467
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
468 469
    }

470 471 472 473 474
    public DeprecatedChild() {
      OnConstruction();
    }

    partial void OnConstruction();
Jon Skeet's avatar
Jon Skeet committed
475

476
    public DeprecatedChild(DeprecatedChild other) : this() {
477
    }
Jon Skeet's avatar
Jon Skeet committed
478 479 480 481 482

    public DeprecatedChild Clone() {
      return new DeprecatedChild(this);
    }

483 484
    public override bool Equals(object other) {
      return Equals(other as DeprecatedChild);
485 486
    }

487 488 489 490 491
    public bool Equals(DeprecatedChild other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
492 493
        return true;
      }
494
      return true;
495 496
    }

497
    public override int GetHashCode() {
498
      int hash = 1;
499
      return hash;
500 501
    }

502 503 504 505
    public override string ToString() {
      return pb::JsonFormatter.Default.Format(this);
    }

Jon Skeet's avatar
Jon Skeet committed
506
    public void WriteTo(pb::CodedOutputStream output) {
507 508
    }

509 510
    public int CalculateSize() {
      int size = 0;
511 512
      return size;
    }
513

514 515 516 517
    public void MergeFrom(DeprecatedChild other) {
      if (other == null) {
        return;
      }
518
    }
519

Jon Skeet's avatar
Jon Skeet committed
520
    public void MergeFrom(pb::CodedInputStream input) {
521
      uint tag;
522
      while ((tag = input.ReadTag()) != 0) {
523 524
        switch(tag) {
          default:
525
            input.SkipLastField();
526 527 528
            break;
        }
      }
529
    }
530 531 532 533

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
534
  public sealed partial class DeprecatedFieldsMessage : pb::IMessage<DeprecatedFieldsMessage> {
535 536 537
    private static readonly pb::MessageParser<DeprecatedFieldsMessage> _parser = new pb::MessageParser<DeprecatedFieldsMessage>(() => new DeprecatedFieldsMessage());
    public static pb::MessageParser<DeprecatedFieldsMessage> Parser { get { return _parser; } }

538
    public static pbr::MessageDescriptor Descriptor {
539
      get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[3]; }
540
    }
541

542 543
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
544
    }
545

546 547 548
    public DeprecatedFieldsMessage() {
      OnConstruction();
    }
Jon Skeet's avatar
Jon Skeet committed
549

550 551 552
    partial void OnConstruction();

    public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) : this() {
Jon Skeet's avatar
Jon Skeet committed
553 554 555 556 557 558 559 560 561 562
      primitiveValue_ = other.primitiveValue_;
      primitiveArray_ = other.primitiveArray_.Clone();
      MessageValue = other.messageValue_ != null ? other.MessageValue.Clone() : null;
      messageArray_ = other.messageArray_.Clone();
      enumValue_ = other.enumValue_;
      enumArray_ = other.enumArray_.Clone();
    }

    public DeprecatedFieldsMessage Clone() {
      return new DeprecatedFieldsMessage(this);
563
    }
Jon Skeet's avatar
Jon Skeet committed
564

565 566 567 568 569
    public const int PrimitiveValueFieldNumber = 1;
    private int primitiveValue_;
    [global::System.ObsoleteAttribute()]
    public int PrimitiveValue {
      get { return primitiveValue_; }
570 571 572
      set {
        primitiveValue_ = value;
      }
573
    }
574 575

    public const int PrimitiveArrayFieldNumber = 2;
576 577
    private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec
        = pb::FieldCodec.ForInt32(18);
578 579 580 581
    private readonly pbc::RepeatedField<int> primitiveArray_ = new pbc::RepeatedField<int>();
    [global::System.ObsoleteAttribute()]
    public pbc::RepeatedField<int> PrimitiveArray {
      get { return primitiveArray_; }
582
    }
583 584 585 586 587 588

    public const int MessageValueFieldNumber = 3;
    private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_;
    [global::System.ObsoleteAttribute()]
    public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue {
      get { return messageValue_; }
589 590 591
      set {
        messageValue_ = value;
      }
592
    }
593 594

    public const int MessageArrayFieldNumber = 4;
595 596
    private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedChild> _repeated_messageArray_codec
        = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser);
597 598 599 600
    private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> messageArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild>();
    [global::System.ObsoleteAttribute()]
    public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArray {
      get { return messageArray_; }
601
    }
602 603 604 605 606 607

    public const int EnumValueFieldNumber = 5;
    private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO;
    [global::System.ObsoleteAttribute()]
    public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue {
      get { return enumValue_; }
608 609 610
      set {
        enumValue_ = value;
      }
611
    }
612 613

    public const int EnumArrayFieldNumber = 6;
614
    private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedEnum> _repeated_enumArray_codec
615 616
        = pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues.TestProtos.DeprecatedEnum) x);
    private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> enumArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum>();
617 618 619
    [global::System.ObsoleteAttribute()]
    public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArray {
      get { return enumArray_; }
620 621
    }

622 623
    public override bool Equals(object other) {
      return Equals(other as DeprecatedFieldsMessage);
624 625
    }

626 627 628
    public bool Equals(DeprecatedFieldsMessage other) {
      if (ReferenceEquals(other, null)) {
        return false;
629
      }
630 631
      if (ReferenceEquals(other, this)) {
        return true;
632
      }
633 634
      if (PrimitiveValue != other.PrimitiveValue) return false;
      if(!primitiveArray_.Equals(other.primitiveArray_)) return false;
635 636
      if (!object.Equals(MessageValue, other.MessageValue)) return false;
      if(!messageArray_.Equals(other.messageArray_)) return false;
637 638 639 640
      if (EnumValue != other.EnumValue) return false;
      if(!enumArray_.Equals(other.enumArray_)) return false;
      return true;
    }
641

642
    public override int GetHashCode() {
643
      int hash = 1;
644 645 646 647 648 649 650 651
      if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode();
      hash ^= primitiveArray_.GetHashCode();
      if (messageValue_ != null) hash ^= MessageValue.GetHashCode();
      hash ^= messageArray_.GetHashCode();
      if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) hash ^= EnumValue.GetHashCode();
      hash ^= enumArray_.GetHashCode();
      return hash;
    }
652

653 654 655 656
    public override string ToString() {
      return pb::JsonFormatter.Default.Format(this);
    }

Jon Skeet's avatar
Jon Skeet committed
657
    public void WriteTo(pb::CodedOutputStream output) {
658
      if (PrimitiveValue != 0) {
659 660
        output.WriteRawTag(8);
        output.WriteInt32(PrimitiveValue);
661
      }
662
      primitiveArray_.WriteTo(output, _repeated_primitiveArray_codec);
663
      if (messageValue_ != null) {
664 665
        output.WriteRawTag(26);
        output.WriteMessage(MessageValue);
666
      }
667
      messageArray_.WriteTo(output, _repeated_messageArray_codec);
668
      if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) {
669 670
        output.WriteRawTag(40);
        output.WriteEnum((int) EnumValue);
671
      }
672
      enumArray_.WriteTo(output, _repeated_enumArray_codec);
673
    }
674

675 676 677
    public int CalculateSize() {
      int size = 0;
      if (PrimitiveValue != 0) {
678
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveValue);
679
      }
680
      size += primitiveArray_.CalculateSize(_repeated_primitiveArray_codec);
681
      if (messageValue_ != null) {
682
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageValue);
683
      }
684
      size += messageArray_.CalculateSize(_repeated_messageArray_codec);
685
      if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) {
686
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumValue);
687
      }
688
      size += enumArray_.CalculateSize(_repeated_enumArray_codec);
689 690
      return size;
    }
691

692 693 694 695 696 697 698 699 700 701 702
    public void MergeFrom(DeprecatedFieldsMessage other) {
      if (other == null) {
        return;
      }
      if (other.PrimitiveValue != 0) {
        PrimitiveValue = other.PrimitiveValue;
      }
      primitiveArray_.Add(other.primitiveArray_);
      if (other.messageValue_ != null) {
        if (messageValue_ == null) {
          messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
703
        }
704
        MessageValue.MergeFrom(other.MessageValue);
705
      }
706 707 708
      messageArray_.Add(other.messageArray_);
      if (other.EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) {
        EnumValue = other.EnumValue;
709
      }
710 711
      enumArray_.Add(other.enumArray_);
    }
712

Jon Skeet's avatar
Jon Skeet committed
713
    public void MergeFrom(pb::CodedInputStream input) {
714
      uint tag;
715
      while ((tag = input.ReadTag()) != 0) {
716 717
        switch(tag) {
          default:
718
            input.SkipLastField();
719 720
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
721
            PrimitiveValue = input.ReadInt32();
722 723 724 725
            break;
          }
          case 18:
          case 16: {
726
            primitiveArray_.AddEntriesFrom(input, _repeated_primitiveArray_codec);
727 728 729 730 731
            break;
          }
          case 26: {
            if (messageValue_ == null) {
              messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
732
            }
733 734 735 736
            input.ReadMessage(messageValue_);
            break;
          }
          case 34: {
737
            messageArray_.AddEntriesFrom(input, _repeated_messageArray_codec);
738 739 740
            break;
          }
          case 40: {
Jon Skeet's avatar
Jon Skeet committed
741 742
            enumValue_ = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) input.ReadEnum();
            break;
743 744 745
          }
          case 50:
          case 48: {
746
            enumArray_.AddEntriesFrom(input, _repeated_enumArray_codec);
747
            break;
748 749 750 751
          }
        }
      }
    }
752

753 754 755
  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
756
  public sealed partial class ItemField : pb::IMessage<ItemField> {
757 758
    private static readonly pb::MessageParser<ItemField> _parser = new pb::MessageParser<ItemField>(() => new ItemField());
    public static pb::MessageParser<ItemField> Parser { get { return _parser; } }
759

760
    public static pbr::MessageDescriptor Descriptor {
761
      get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[4]; }
762 763
    }

764 765
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
766 767
    }

768 769 770 771 772
    public ItemField() {
      OnConstruction();
    }

    partial void OnConstruction();
Jon Skeet's avatar
Jon Skeet committed
773

774
    public ItemField(ItemField other) : this() {
Jon Skeet's avatar
Jon Skeet committed
775 776 777 778 779
      item_ = other.item_;
    }

    public ItemField Clone() {
      return new ItemField(this);
780
    }
Jon Skeet's avatar
Jon Skeet committed
781

782 783 784 785
    public const int ItemFieldNumber = 1;
    private int item_;
    public int Item {
      get { return item_; }
786 787 788
      set {
        item_ = value;
      }
789 790
    }

791 792
    public override bool Equals(object other) {
      return Equals(other as ItemField);
793 794
    }

795 796 797 798 799
    public bool Equals(ItemField other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
800 801
        return true;
      }
802 803
      if (Item != other.Item) return false;
      return true;
804 805
    }

806
    public override int GetHashCode() {
807
      int hash = 1;
808 809
      if (Item != 0) hash ^= Item.GetHashCode();
      return hash;
810
    }
811 812 813 814

    public override string ToString() {
      return pb::JsonFormatter.Default.Format(this);
    }
815

Jon Skeet's avatar
Jon Skeet committed
816
    public void WriteTo(pb::CodedOutputStream output) {
817
      if (Item != 0) {
818 819
        output.WriteRawTag(8);
        output.WriteInt32(Item);
820 821 822
      }
    }

823 824 825
    public int CalculateSize() {
      int size = 0;
      if (Item != 0) {
826
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Item);
827
      }
828 829
      return size;
    }
830

831 832 833 834 835 836 837 838 839
    public void MergeFrom(ItemField other) {
      if (other == null) {
        return;
      }
      if (other.Item != 0) {
        Item = other.Item;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
840
    public void MergeFrom(pb::CodedInputStream input) {
841
      uint tag;
842
      while ((tag = input.ReadTag()) != 0) {
843 844
        switch(tag) {
          default:
845
            input.SkipLastField();
846 847
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
848
            Item = input.ReadInt32();
849
            break;
850 851 852 853 854 855 856
          }
        }
      }
    }

  }

857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class ReservedNames : pb::IMessage<ReservedNames> {
    private static readonly pb::MessageParser<ReservedNames> _parser = new pb::MessageParser<ReservedNames>(() => new ReservedNames());
    public static pb::MessageParser<ReservedNames> Parser { get { return _parser; } }

    public static pbr::MessageDescriptor Descriptor {
      get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[5]; }
    }

    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    public ReservedNames() {
      OnConstruction();
    }

    partial void OnConstruction();

    public ReservedNames(ReservedNames other) : this() {
      types_ = other.types_;
      descriptor_ = other.descriptor_;
    }

    public ReservedNames Clone() {
      return new ReservedNames(this);
    }

    public const int Types_FieldNumber = 1;
    private int types_;
    public int Types_ {
      get { return types_; }
      set {
        types_ = value;
      }
    }

    public const int Descriptor_FieldNumber = 2;
    private int descriptor_;
    public int Descriptor_ {
      get { return descriptor_; }
      set {
        descriptor_ = value;
      }
    }

    public override bool Equals(object other) {
      return Equals(other as ReservedNames);
    }

    public bool Equals(ReservedNames other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Types_ != other.Types_) return false;
      if (Descriptor_ != other.Descriptor_) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (Types_ != 0) hash ^= Types_.GetHashCode();
      if (Descriptor_ != 0) hash ^= Descriptor_.GetHashCode();
      return hash;
    }

    public override string ToString() {
      return pb::JsonFormatter.Default.Format(this);
    }

    public void WriteTo(pb::CodedOutputStream output) {
      if (Types_ != 0) {
        output.WriteRawTag(8);
        output.WriteInt32(Types_);
      }
      if (Descriptor_ != 0) {
        output.WriteRawTag(16);
        output.WriteInt32(Descriptor_);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (Types_ != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Types_);
      }
      if (Descriptor_ != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Descriptor_);
      }
      return size;
    }

    public void MergeFrom(ReservedNames other) {
      if (other == null) {
        return;
      }
      if (other.Types_ != 0) {
        Types_ = other.Types_;
      }
      if (other.Descriptor_ != 0) {
        Descriptor_ = other.Descriptor_;
      }
    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
966
      while ((tag = input.ReadTag()) != 0) {
967 968
        switch(tag) {
          default:
969
            input.SkipLastField();
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050
            break;
          case 8: {
            Types_ = input.ReadInt32();
            break;
          }
          case 16: {
            Descriptor_ = input.ReadInt32();
            break;
          }
        }
      }
    }

    #region Nested types
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    public static partial class Types {
      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
      public sealed partial class SomeNestedType : pb::IMessage<SomeNestedType> {
        private static readonly pb::MessageParser<SomeNestedType> _parser = new pb::MessageParser<SomeNestedType>(() => new SomeNestedType());
        public static pb::MessageParser<SomeNestedType> Parser { get { return _parser; } }

        public static pbr::MessageDescriptor Descriptor {
          get { return global::UnitTest.Issues.TestProtos.ReservedNames.Descriptor.NestedTypes[0]; }
        }

        pbr::MessageDescriptor pb::IMessage.Descriptor {
          get { return Descriptor; }
        }

        public SomeNestedType() {
          OnConstruction();
        }

        partial void OnConstruction();

        public SomeNestedType(SomeNestedType other) : this() {
        }

        public SomeNestedType Clone() {
          return new SomeNestedType(this);
        }

        public override bool Equals(object other) {
          return Equals(other as SomeNestedType);
        }

        public bool Equals(SomeNestedType other) {
          if (ReferenceEquals(other, null)) {
            return false;
          }
          if (ReferenceEquals(other, this)) {
            return true;
          }
          return true;
        }

        public override int GetHashCode() {
          int hash = 1;
          return hash;
        }

        public override string ToString() {
          return pb::JsonFormatter.Default.Format(this);
        }

        public void WriteTo(pb::CodedOutputStream output) {
        }

        public int CalculateSize() {
          int size = 0;
          return size;
        }

        public void MergeFrom(SomeNestedType other) {
          if (other == null) {
            return;
          }
        }

        public void MergeFrom(pb::CodedInputStream input) {
          uint tag;
1051
          while ((tag = input.ReadTag()) != 0) {
1052 1053
            switch(tag) {
              default:
1054
                input.SkipLastField();
1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066
                break;
            }
          }
        }

      }

    }
    #endregion

  }

1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public sealed partial class TestJsonFieldOrdering : pb::IMessage<TestJsonFieldOrdering> {
    private static readonly pb::MessageParser<TestJsonFieldOrdering> _parser = new pb::MessageParser<TestJsonFieldOrdering>(() => new TestJsonFieldOrdering());
    public static pb::MessageParser<TestJsonFieldOrdering> Parser { get { return _parser; } }

    public static pbr::MessageDescriptor Descriptor {
      get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[6]; }
    }

    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    public TestJsonFieldOrdering() {
      OnConstruction();
    }

    partial void OnConstruction();

    public TestJsonFieldOrdering(TestJsonFieldOrdering other) : this() {
      plainInt32_ = other.plainInt32_;
      plainString_ = other.plainString_;
      switch (other.O1Case) {
        case O1OneofCase.O1String:
          O1String = other.O1String;
          break;
        case O1OneofCase.O1Int32:
          O1Int32 = other.O1Int32;
          break;
      }

      switch (other.O2Case) {
        case O2OneofCase.O2Int32:
          O2Int32 = other.O2Int32;
          break;
        case O2OneofCase.O2String:
          O2String = other.O2String;
          break;
      }

    }

    public TestJsonFieldOrdering Clone() {
      return new TestJsonFieldOrdering(this);
    }

    public const int PlainInt32FieldNumber = 4;
    private int plainInt32_;
    public int PlainInt32 {
      get { return plainInt32_; }
      set {
        plainInt32_ = value;
      }
    }

    public const int O1StringFieldNumber = 2;
    public string O1String {
      get { return o1Case_ == O1OneofCase.O1String ? (string) o1_ : ""; }
      set {
        o1_ = pb::Preconditions.CheckNotNull(value, "value");
        o1Case_ = O1OneofCase.O1String;
      }
    }

    public const int O1Int32FieldNumber = 5;
    public int O1Int32 {
      get { return o1Case_ == O1OneofCase.O1Int32 ? (int) o1_ : 0; }
      set {
        o1_ = value;
        o1Case_ = O1OneofCase.O1Int32;
      }
    }

    public const int PlainStringFieldNumber = 1;
    private string plainString_ = "";
    public string PlainString {
      get { return plainString_; }
      set {
        plainString_ = pb::Preconditions.CheckNotNull(value, "value");
      }
    }

    public const int O2Int32FieldNumber = 6;
    public int O2Int32 {
      get { return o2Case_ == O2OneofCase.O2Int32 ? (int) o2_ : 0; }
      set {
        o2_ = value;
        o2Case_ = O2OneofCase.O2Int32;
      }
    }

    public const int O2StringFieldNumber = 3;
    public string O2String {
      get { return o2Case_ == O2OneofCase.O2String ? (string) o2_ : ""; }
      set {
        o2_ = pb::Preconditions.CheckNotNull(value, "value");
        o2Case_ = O2OneofCase.O2String;
      }
    }

    private object o1_;
    public enum O1OneofCase {
      None = 0,
      O1String = 2,
      O1Int32 = 5,
    }
    private O1OneofCase o1Case_ = O1OneofCase.None;
    public O1OneofCase O1Case {
      get { return o1Case_; }
    }

    public void ClearO1() {
      o1Case_ = O1OneofCase.None;
      o1_ = null;
    }

    private object o2_;
    public enum O2OneofCase {
      None = 0,
      O2Int32 = 6,
      O2String = 3,
    }
    private O2OneofCase o2Case_ = O2OneofCase.None;
    public O2OneofCase O2Case {
      get { return o2Case_; }
    }

    public void ClearO2() {
      o2Case_ = O2OneofCase.None;
      o2_ = null;
    }

    public override bool Equals(object other) {
      return Equals(other as TestJsonFieldOrdering);
    }

    public bool Equals(TestJsonFieldOrdering other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (PlainInt32 != other.PlainInt32) return false;
      if (O1String != other.O1String) return false;
      if (O1Int32 != other.O1Int32) return false;
      if (PlainString != other.PlainString) return false;
      if (O2Int32 != other.O2Int32) return false;
      if (O2String != other.O2String) return false;
      return true;
    }

    public override int GetHashCode() {
      int hash = 1;
      if (PlainInt32 != 0) hash ^= PlainInt32.GetHashCode();
      if (o1Case_ == O1OneofCase.O1String) hash ^= O1String.GetHashCode();
      if (o1Case_ == O1OneofCase.O1Int32) hash ^= O1Int32.GetHashCode();
      if (PlainString.Length != 0) hash ^= PlainString.GetHashCode();
      if (o2Case_ == O2OneofCase.O2Int32) hash ^= O2Int32.GetHashCode();
      if (o2Case_ == O2OneofCase.O2String) hash ^= O2String.GetHashCode();
      return hash;
    }

    public override string ToString() {
      return pb::JsonFormatter.Default.Format(this);
    }

    public void WriteTo(pb::CodedOutputStream output) {
      if (PlainString.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(PlainString);
      }
      if (o1Case_ == O1OneofCase.O1String) {
        output.WriteRawTag(18);
        output.WriteString(O1String);
      }
      if (o2Case_ == O2OneofCase.O2String) {
        output.WriteRawTag(26);
        output.WriteString(O2String);
      }
      if (PlainInt32 != 0) {
        output.WriteRawTag(32);
        output.WriteInt32(PlainInt32);
      }
      if (o1Case_ == O1OneofCase.O1Int32) {
        output.WriteRawTag(40);
        output.WriteInt32(O1Int32);
      }
      if (o2Case_ == O2OneofCase.O2Int32) {
        output.WriteRawTag(48);
        output.WriteInt32(O2Int32);
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (PlainInt32 != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlainInt32);
      }
      if (o1Case_ == O1OneofCase.O1String) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(O1String);
      }
      if (o1Case_ == O1OneofCase.O1Int32) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(O1Int32);
      }
      if (PlainString.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(PlainString);
      }
      if (o2Case_ == O2OneofCase.O2Int32) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(O2Int32);
      }
      if (o2Case_ == O2OneofCase.O2String) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(O2String);
      }
      return size;
    }

    public void MergeFrom(TestJsonFieldOrdering other) {
      if (other == null) {
        return;
      }
      if (other.PlainInt32 != 0) {
        PlainInt32 = other.PlainInt32;
      }
      if (other.PlainString.Length != 0) {
        PlainString = other.PlainString;
      }
      switch (other.O1Case) {
        case O1OneofCase.O1String:
          O1String = other.O1String;
          break;
        case O1OneofCase.O1Int32:
          O1Int32 = other.O1Int32;
          break;
      }

      switch (other.O2Case) {
        case O2OneofCase.O2Int32:
          O2Int32 = other.O2Int32;
          break;
        case O2OneofCase.O2String:
          O2String = other.O2String;
          break;
      }

    }

    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
1316
      while ((tag = input.ReadTag()) != 0) {
1317 1318
        switch(tag) {
          default:
1319
            input.SkipLastField();
1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350
            break;
          case 10: {
            PlainString = input.ReadString();
            break;
          }
          case 18: {
            O1String = input.ReadString();
            break;
          }
          case 26: {
            O2String = input.ReadString();
            break;
          }
          case 32: {
            PlainInt32 = input.ReadInt32();
            break;
          }
          case 40: {
            O1Int32 = input.ReadInt32();
            break;
          }
          case 48: {
            O2Int32 = input.ReadInt32();
            break;
          }
        }
      }
    }

  }

1351 1352 1353 1354 1355
  #endregion

}

#endregion Designer generated code