UnittestProto3.cs 213 KB
Newer Older
1 2 3 4 5 6 7
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/protobuf/unittest_proto3.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
8
using pbr = global::Google.Protobuf.Reflection;
9 10 11
using scg = global::System.Collections.Generic;
namespace Google.Protobuf.TestProtos {

12
  /// <summary>Holder for reflection information generated from google/protobuf/unittest_proto3.proto</summary>
13
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14
  public static partial class UnittestProto3Reflection {
15 16

    #region Descriptor
17
    /// <summary>File descriptor for google/protobuf/unittest_proto3.proto</summary>
18
    public static pbr::FileDescriptor Descriptor {
19 20
      get { return descriptor; }
    }
21
    private static pbr::FileDescriptor descriptor;
22

23
    static UnittestProto3Reflection() {
24 25
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 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 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
            "CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfcHJvdG8zLnByb3RvEhFwcm90",
            "b2J1Zl91bml0dGVzdBosZ29vZ2xlL3Byb3RvYnVmL3VuaXR0ZXN0X2ltcG9y",
            "dF9wcm90bzMucHJvdG8i8A8KDFRlc3RBbGxUeXBlcxIUCgxzaW5nbGVfaW50",
            "MzIYASABKAUSFAoMc2luZ2xlX2ludDY0GAIgASgDEhUKDXNpbmdsZV91aW50",
            "MzIYAyABKA0SFQoNc2luZ2xlX3VpbnQ2NBgEIAEoBBIVCg1zaW5nbGVfc2lu",
            "dDMyGAUgASgREhUKDXNpbmdsZV9zaW50NjQYBiABKBISFgoOc2luZ2xlX2Zp",
            "eGVkMzIYByABKAcSFgoOc2luZ2xlX2ZpeGVkNjQYCCABKAYSFwoPc2luZ2xl",
            "X3NmaXhlZDMyGAkgASgPEhcKD3NpbmdsZV9zZml4ZWQ2NBgKIAEoEBIUCgxz",
            "aW5nbGVfZmxvYXQYCyABKAISFQoNc2luZ2xlX2RvdWJsZRgMIAEoARITCgtz",
            "aW5nbGVfYm9vbBgNIAEoCBIVCg1zaW5nbGVfc3RyaW5nGA4gASgJEhQKDHNp",
            "bmdsZV9ieXRlcxgPIAEoDBJMChVzaW5nbGVfbmVzdGVkX21lc3NhZ2UYEiAB",
            "KAsyLS5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkTWVz",
            "c2FnZRJBChZzaW5nbGVfZm9yZWlnbl9tZXNzYWdlGBMgASgLMiEucHJvdG9i",
            "dWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2USRgoVc2luZ2xlX2ltcG9ydF9t",
            "ZXNzYWdlGBQgASgLMicucHJvdG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9y",
            "dE1lc3NhZ2USRgoSc2luZ2xlX25lc3RlZF9lbnVtGBUgASgOMioucHJvdG9i",
            "dWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVzLk5lc3RlZEVudW0SOwoTc2luZ2xl",
            "X2ZvcmVpZ25fZW51bRgWIAEoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVp",
            "Z25FbnVtEkAKEnNpbmdsZV9pbXBvcnRfZW51bRgXIAEoDjIkLnByb3RvYnVm",
            "X3VuaXR0ZXN0X2ltcG9ydC5JbXBvcnRFbnVtElMKHHNpbmdsZV9wdWJsaWNf",
            "aW1wb3J0X21lc3NhZ2UYGiABKAsyLS5wcm90b2J1Zl91bml0dGVzdF9pbXBv",
            "cnQuUHVibGljSW1wb3J0TWVzc2FnZRIWCg5yZXBlYXRlZF9pbnQzMhgfIAMo",
            "BRIWCg5yZXBlYXRlZF9pbnQ2NBggIAMoAxIXCg9yZXBlYXRlZF91aW50MzIY",
            "ISADKA0SFwoPcmVwZWF0ZWRfdWludDY0GCIgAygEEhcKD3JlcGVhdGVkX3Np",
            "bnQzMhgjIAMoERIXCg9yZXBlYXRlZF9zaW50NjQYJCADKBISGAoQcmVwZWF0",
            "ZWRfZml4ZWQzMhglIAMoBxIYChByZXBlYXRlZF9maXhlZDY0GCYgAygGEhkK",
            "EXJlcGVhdGVkX3NmaXhlZDMyGCcgAygPEhkKEXJlcGVhdGVkX3NmaXhlZDY0",
            "GCggAygQEhYKDnJlcGVhdGVkX2Zsb2F0GCkgAygCEhcKD3JlcGVhdGVkX2Rv",
            "dWJsZRgqIAMoARIVCg1yZXBlYXRlZF9ib29sGCsgAygIEhcKD3JlcGVhdGVk",
            "X3N0cmluZxgsIAMoCRIWCg5yZXBlYXRlZF9ieXRlcxgtIAMoDBJOChdyZXBl",
            "YXRlZF9uZXN0ZWRfbWVzc2FnZRgwIAMoCzItLnByb3RvYnVmX3VuaXR0ZXN0",
            "LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlEkMKGHJlcGVhdGVkX2ZvcmVp",
            "Z25fbWVzc2FnZRgxIAMoCzIhLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25N",
            "ZXNzYWdlEkgKF3JlcGVhdGVkX2ltcG9ydF9tZXNzYWdlGDIgAygLMicucHJv",
            "dG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9ydE1lc3NhZ2USSAoUcmVwZWF0",
            "ZWRfbmVzdGVkX2VudW0YMyADKA4yKi5wcm90b2J1Zl91bml0dGVzdC5UZXN0",
            "QWxsVHlwZXMuTmVzdGVkRW51bRI9ChVyZXBlYXRlZF9mb3JlaWduX2VudW0Y",
            "NCADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bRJCChRyZXBl",
            "YXRlZF9pbXBvcnRfZW51bRg1IAMoDjIkLnByb3RvYnVmX3VuaXR0ZXN0X2lt",
            "cG9ydC5JbXBvcnRFbnVtElUKHnJlcGVhdGVkX3B1YmxpY19pbXBvcnRfbWVz",
            "c2FnZRg2IAMoCzItLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydC5QdWJsaWNJ",
            "bXBvcnRNZXNzYWdlEhYKDG9uZW9mX3VpbnQzMhhvIAEoDUgAEk0KFG9uZW9m",
            "X25lc3RlZF9tZXNzYWdlGHAgASgLMi0ucHJvdG9idWZfdW5pdHRlc3QuVGVz",
            "dEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2VIABIWCgxvbmVvZl9zdHJpbmcYcSAB",
            "KAlIABIVCgtvbmVvZl9ieXRlcxhyIAEoDEgAGhsKDU5lc3RlZE1lc3NhZ2US",
            "CgoCYmIYASABKAUiVgoKTmVzdGVkRW51bRIbChdORVNURURfRU5VTV9VTlNQ",
            "RUNJRklFRBAAEgcKA0ZPTxABEgcKA0JBUhACEgcKA0JBWhADEhAKA05FRxD/",
            "//////////8BQg0KC29uZW9mX2ZpZWxkIrsBChJOZXN0ZWRUZXN0QWxsVHlw",
            "ZXMSNAoFY2hpbGQYASABKAsyJS5wcm90b2J1Zl91bml0dGVzdC5OZXN0ZWRU",
            "ZXN0QWxsVHlwZXMSMAoHcGF5bG9hZBgCIAEoCzIfLnByb3RvYnVmX3VuaXR0",
            "ZXN0LlRlc3RBbGxUeXBlcxI9Cg5yZXBlYXRlZF9jaGlsZBgDIAMoCzIlLnBy",
            "b3RvYnVmX3VuaXR0ZXN0Lk5lc3RlZFRlc3RBbGxUeXBlcyI0ChRUZXN0RGVw",
            "cmVjYXRlZEZpZWxkcxIcChBkZXByZWNhdGVkX2ludDMyGAEgASgFQgIYASIb",
            "Cg5Gb3JlaWduTWVzc2FnZRIJCgFjGAEgASgFIjAKElRlc3RSZXNlcnZlZEZp",
            "ZWxkc0oECAIQA0oECA8QEEoECAkQDFIDYmFyUgNiYXoiWgoRVGVzdEZvcmVp",
            "Z25OZXN0ZWQSRQoOZm9yZWlnbl9uZXN0ZWQYASABKAsyLS5wcm90b2J1Zl91",
            "bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2FnZSI0ChhUZXN0UmVh",
            "bGx5TGFyZ2VUYWdOdW1iZXISCQoBYRgBIAEoBRINCgJiYhj///9/IAEoBSJV",
            "ChRUZXN0UmVjdXJzaXZlTWVzc2FnZRIyCgFhGAEgASgLMicucHJvdG9idWZf",
            "dW5pdHRlc3QuVGVzdFJlY3Vyc2l2ZU1lc3NhZ2USCQoBaRgCIAEoBSJLChRU",
            "ZXN0TXV0dWFsUmVjdXJzaW9uQRIzCgJiYhgBIAEoCzInLnByb3RvYnVmX3Vu",
            "aXR0ZXN0LlRlc3RNdXR1YWxSZWN1cnNpb25CImIKFFRlc3RNdXR1YWxSZWN1",
            "cnNpb25CEjIKAWEYASABKAsyJy5wcm90b2J1Zl91bml0dGVzdC5UZXN0TXV0",
            "dWFsUmVjdXJzaW9uQRIWCg5vcHRpb25hbF9pbnQzMhgCIAEoBSLrAgoXVGVz",
            "dENhbWVsQ2FzZUZpZWxkTmFtZXMSFgoOUHJpbWl0aXZlRmllbGQYASABKAUS",
            "EwoLU3RyaW5nRmllbGQYAiABKAkSMQoJRW51bUZpZWxkGAMgASgOMh4ucHJv",
            "dG9idWZfdW5pdHRlc3QuRm9yZWlnbkVudW0SNwoMTWVzc2FnZUZpZWxkGAQg",
            "ASgLMiEucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2USHgoWUmVw",
            "ZWF0ZWRQcmltaXRpdmVGaWVsZBgHIAMoBRIbChNSZXBlYXRlZFN0cmluZ0Zp",
            "ZWxkGAggAygJEjkKEVJlcGVhdGVkRW51bUZpZWxkGAkgAygOMh4ucHJvdG9i",
            "dWZfdW5pdHRlc3QuRm9yZWlnbkVudW0SPwoUUmVwZWF0ZWRNZXNzYWdlRmll",
            "bGQYCiADKAsyIS5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduTWVzc2FnZSLH",
            "AQoSVGVzdEZpZWxkT3JkZXJpbmdzEhEKCW15X3N0cmluZxgLIAEoCRIOCgZt",
            "eV9pbnQYASABKAMSEAoIbXlfZmxvYXQYZSABKAISUwoVc2luZ2xlX25lc3Rl",
            "ZF9tZXNzYWdlGMgBIAEoCzIzLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RGaWVs",
            "ZE9yZGVyaW5ncy5OZXN0ZWRNZXNzYWdlGicKDU5lc3RlZE1lc3NhZ2USCgoC",
            "b28YAiABKAMSCgoCYmIYASABKAUiSwoRU3BhcnNlRW51bU1lc3NhZ2USNgoL",
            "c3BhcnNlX2VudW0YASABKA4yIS5wcm90b2J1Zl91bml0dGVzdC5UZXN0U3Bh",
            "cnNlRW51bSIZCglPbmVTdHJpbmcSDAoEZGF0YRgBIAEoCSIaCgpNb3JlU3Ry",
            "aW5nEgwKBGRhdGEYASADKAkiGAoIT25lQnl0ZXMSDAoEZGF0YRgBIAEoDCIZ",
            "CglNb3JlQnl0ZXMSDAoEZGF0YRgBIAEoDCIcCgxJbnQzMk1lc3NhZ2USDAoE",
            "ZGF0YRgBIAEoBSIdCg1VaW50MzJNZXNzYWdlEgwKBGRhdGEYASABKA0iHAoM",
            "SW50NjRNZXNzYWdlEgwKBGRhdGEYASABKAMiHQoNVWludDY0TWVzc2FnZRIM",
            "CgRkYXRhGAEgASgEIhsKC0Jvb2xNZXNzYWdlEgwKBGRhdGEYASABKAgicwoJ",
            "VGVzdE9uZW9mEhEKB2Zvb19pbnQYASABKAVIABIUCgpmb29fc3RyaW5nGAIg",
            "ASgJSAASNgoLZm9vX21lc3NhZ2UYAyABKAsyHy5wcm90b2J1Zl91bml0dGVz",
            "dC5UZXN0QWxsVHlwZXNIAEIFCgNmb28iqgMKD1Rlc3RQYWNrZWRUeXBlcxIY",
            "CgxwYWNrZWRfaW50MzIYWiADKAVCAhABEhgKDHBhY2tlZF9pbnQ2NBhbIAMo",
            "A0ICEAESGQoNcGFja2VkX3VpbnQzMhhcIAMoDUICEAESGQoNcGFja2VkX3Vp",
            "bnQ2NBhdIAMoBEICEAESGQoNcGFja2VkX3NpbnQzMhheIAMoEUICEAESGQoN",
            "cGFja2VkX3NpbnQ2NBhfIAMoEkICEAESGgoOcGFja2VkX2ZpeGVkMzIYYCAD",
            "KAdCAhABEhoKDnBhY2tlZF9maXhlZDY0GGEgAygGQgIQARIbCg9wYWNrZWRf",
            "c2ZpeGVkMzIYYiADKA9CAhABEhsKD3BhY2tlZF9zZml4ZWQ2NBhjIAMoEEIC",
            "EAESGAoMcGFja2VkX2Zsb2F0GGQgAygCQgIQARIZCg1wYWNrZWRfZG91Ymxl",
            "GGUgAygBQgIQARIXCgtwYWNrZWRfYm9vbBhmIAMoCEICEAESNwoLcGFja2Vk",
            "X2VudW0YZyADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bUIC",
            "EAEiyAMKEVRlc3RVbnBhY2tlZFR5cGVzEhoKDnVucGFja2VkX2ludDMyGFog",
            "AygFQgIQABIaCg51bnBhY2tlZF9pbnQ2NBhbIAMoA0ICEAASGwoPdW5wYWNr",
            "ZWRfdWludDMyGFwgAygNQgIQABIbCg91bnBhY2tlZF91aW50NjQYXSADKARC",
            "AhAAEhsKD3VucGFja2VkX3NpbnQzMhheIAMoEUICEAASGwoPdW5wYWNrZWRf",
            "c2ludDY0GF8gAygSQgIQABIcChB1bnBhY2tlZF9maXhlZDMyGGAgAygHQgIQ",
            "ABIcChB1bnBhY2tlZF9maXhlZDY0GGEgAygGQgIQABIdChF1bnBhY2tlZF9z",
            "Zml4ZWQzMhhiIAMoD0ICEAASHQoRdW5wYWNrZWRfc2ZpeGVkNjQYYyADKBBC",
            "AhAAEhoKDnVucGFja2VkX2Zsb2F0GGQgAygCQgIQABIbCg91bnBhY2tlZF9k",
            "b3VibGUYZSADKAFCAhAAEhkKDXVucGFja2VkX2Jvb2wYZiADKAhCAhAAEjkK",
            "DXVucGFja2VkX2VudW0YZyADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3Jl",
            "aWduRW51bUICEAAiwAEKI1Rlc3RSZXBlYXRlZFNjYWxhckRpZmZlcmVudFRh",
            "Z1NpemVzEhgKEHJlcGVhdGVkX2ZpeGVkMzIYDCADKAcSFgoOcmVwZWF0ZWRf",
            "aW50MzIYDSADKAUSGQoQcmVwZWF0ZWRfZml4ZWQ2NBj+DyADKAYSFwoOcmVw",
            "ZWF0ZWRfaW50NjQY/w8gAygDEhgKDnJlcGVhdGVkX2Zsb2F0GP7/DyADKAIS",
            "GQoPcmVwZWF0ZWRfdWludDY0GP//DyADKAQiKAobVGVzdENvbW1lbnRJbmpl",
            "Y3Rpb25NZXNzYWdlEgkKAWEYASABKAkiDAoKRm9vUmVxdWVzdCINCgtGb29S",
            "ZXNwb25zZSISChBGb29DbGllbnRNZXNzYWdlIhIKEEZvb1NlcnZlck1lc3Nh",
            "Z2UiDAoKQmFyUmVxdWVzdCINCgtCYXJSZXNwb25zZSpZCgtGb3JlaWduRW51",
            "bRIXChNGT1JFSUdOX1VOU1BFQ0lGSUVEEAASDwoLRk9SRUlHTl9GT08QBBIP",
            "CgtGT1JFSUdOX0JBUhAFEg8KC0ZPUkVJR05fQkFaEAYqdQoUVGVzdEVudW1X",
            "aXRoRHVwVmFsdWUSKAokVEVTVF9FTlVNX1dJVEhfRFVQX1ZBTFVFX1VOU1BF",
            "Q0lGSUVEEAASCAoERk9PMRABEggKBEJBUjEQAhIHCgNCQVoQAxIICgRGT08y",
            "EAESCAoEQkFSMhACGgIQASqdAQoOVGVzdFNwYXJzZUVudW0SIAocVEVTVF9T",
            "UEFSU0VfRU5VTV9VTlNQRUNJRklFRBAAEgwKCFNQQVJTRV9BEHsSDgoIU1BB",
            "UlNFX0IQpucDEg8KCFNQQVJTRV9DELKxgAYSFQoIU1BBUlNFX0QQ8f//////",
            "////ARIVCghTUEFSU0VfRRC03vz///////8BEgwKCFNQQVJTRV9HEAIymQEK",
            "C1Rlc3RTZXJ2aWNlEkQKA0ZvbxIdLnByb3RvYnVmX3VuaXR0ZXN0LkZvb1Jl",
            "cXVlc3QaHi5wcm90b2J1Zl91bml0dGVzdC5Gb29SZXNwb25zZRJECgNCYXIS",
            "HS5wcm90b2J1Zl91bml0dGVzdC5CYXJSZXF1ZXN0Gh4ucHJvdG9idWZfdW5p",
            "dHRlc3QuQmFyUmVzcG9uc2VCOkINVW5pdHRlc3RQcm90b0gBgAEBiAEBkAEB",
152
            "+AEBqgIaR29vZ2xlLlByb3RvYnVmLlRlc3RQcm90b3NiBnByb3RvMw=="));
153
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
154
          new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.UnittestImportProto3Reflection.Descriptor, },
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.ForeignEnum), typeof(global::Google.Protobuf.TestProtos.TestEnumWithDupValue), typeof(global::Google.Protobuf.TestProtos.TestSparseEnum), }, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestAllTypes), global::Google.Protobuf.TestProtos.TestAllTypes.Parser, new[]{ "SingleInt32", "SingleInt64", "SingleUint32", "SingleUint64", "SingleSint32", "SingleSint64", "SingleFixed32", "SingleFixed64", "SingleSfixed32", "SingleSfixed64", "SingleFloat", "SingleDouble", "SingleBool", "SingleString", "SingleBytes", "SingleNestedMessage", "SingleForeignMessage", "SingleImportMessage", "SingleNestedEnum", "SingleForeignEnum", "SingleImportEnum", "SinglePublicImportMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedImportMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedImportEnum", "RepeatedPublicImportMessage", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes" }, new[]{ "OneofField" }, new[]{ typeof(global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage), global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage.Parser, new[]{ "Bb" }, null, null, null)}),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.NestedTestAllTypes), global::Google.Protobuf.TestProtos.NestedTestAllTypes.Parser, new[]{ "Child", "Payload", "RepeatedChild" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestDeprecatedFields), global::Google.Protobuf.TestProtos.TestDeprecatedFields.Parser, new[]{ "DeprecatedInt32" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.ForeignMessage), global::Google.Protobuf.TestProtos.ForeignMessage.Parser, new[]{ "C" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestReservedFields), global::Google.Protobuf.TestProtos.TestReservedFields.Parser, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestForeignNested), global::Google.Protobuf.TestProtos.TestForeignNested.Parser, new[]{ "ForeignNested" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestReallyLargeTagNumber), global::Google.Protobuf.TestProtos.TestReallyLargeTagNumber.Parser, new[]{ "A", "Bb" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestRecursiveMessage), global::Google.Protobuf.TestProtos.TestRecursiveMessage.Parser, new[]{ "A", "I" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMutualRecursionA), global::Google.Protobuf.TestProtos.TestMutualRecursionA.Parser, new[]{ "Bb" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMutualRecursionB), global::Google.Protobuf.TestProtos.TestMutualRecursionB.Parser, new[]{ "A", "OptionalInt32" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestCamelCaseFieldNames), global::Google.Protobuf.TestProtos.TestCamelCaseFieldNames.Parser, new[]{ "PrimitiveField", "StringField", "EnumField", "MessageField", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedEnumField", "RepeatedMessageField" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestFieldOrderings), global::Google.Protobuf.TestProtos.TestFieldOrderings.Parser, new[]{ "MyString", "MyInt", "MyFloat", "SingleNestedMessage" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage), global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage.Parser, new[]{ "Oo", "Bb" }, null, null, null)}),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.SparseEnumMessage), global::Google.Protobuf.TestProtos.SparseEnumMessage.Parser, new[]{ "SparseEnum" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.OneString), global::Google.Protobuf.TestProtos.OneString.Parser, new[]{ "Data" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.MoreString), global::Google.Protobuf.TestProtos.MoreString.Parser, new[]{ "Data" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.OneBytes), global::Google.Protobuf.TestProtos.OneBytes.Parser, new[]{ "Data" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.MoreBytes), global::Google.Protobuf.TestProtos.MoreBytes.Parser, new[]{ "Data" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Int32Message), global::Google.Protobuf.TestProtos.Int32Message.Parser, new[]{ "Data" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Uint32Message), global::Google.Protobuf.TestProtos.Uint32Message.Parser, new[]{ "Data" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Int64Message), global::Google.Protobuf.TestProtos.Int64Message.Parser, new[]{ "Data" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Uint64Message), global::Google.Protobuf.TestProtos.Uint64Message.Parser, new[]{ "Data" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.BoolMessage), global::Google.Protobuf.TestProtos.BoolMessage.Parser, new[]{ "Data" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestOneof), global::Google.Protobuf.TestProtos.TestOneof.Parser, new[]{ "FooInt", "FooString", "FooMessage" }, new[]{ "Foo" }, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestPackedTypes), global::Google.Protobuf.TestProtos.TestPackedTypes.Parser, new[]{ "PackedInt32", "PackedInt64", "PackedUint32", "PackedUint64", "PackedSint32", "PackedSint64", "PackedFixed32", "PackedFixed64", "PackedSfixed32", "PackedSfixed64", "PackedFloat", "PackedDouble", "PackedBool", "PackedEnum" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestUnpackedTypes), global::Google.Protobuf.TestProtos.TestUnpackedTypes.Parser, new[]{ "UnpackedInt32", "UnpackedInt64", "UnpackedUint32", "UnpackedUint64", "UnpackedSint32", "UnpackedSint64", "UnpackedFixed32", "UnpackedFixed64", "UnpackedSfixed32", "UnpackedSfixed64", "UnpackedFloat", "UnpackedDouble", "UnpackedBool", "UnpackedEnum" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestRepeatedScalarDifferentTagSizes), global::Google.Protobuf.TestProtos.TestRepeatedScalarDifferentTagSizes.Parser, new[]{ "RepeatedFixed32", "RepeatedInt32", "RepeatedFixed64", "RepeatedInt64", "RepeatedFloat", "RepeatedUint64" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestCommentInjectionMessage), global::Google.Protobuf.TestProtos.TestCommentInjectionMessage.Parser, new[]{ "A" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooRequest), global::Google.Protobuf.TestProtos.FooRequest.Parser, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooResponse), global::Google.Protobuf.TestProtos.FooResponse.Parser, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooClientMessage), global::Google.Protobuf.TestProtos.FooClientMessage.Parser, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooServerMessage), global::Google.Protobuf.TestProtos.FooServerMessage.Parser, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.BarRequest), global::Google.Protobuf.TestProtos.BarRequest.Parser, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.BarResponse), global::Google.Protobuf.TestProtos.BarResponse.Parser, null, null, null, null)
189
          }));
190 191 192 193 194
    }
    #endregion

  }
  #region Enums
195
  public enum ForeignEnum {
196 197 198 199 200 201
    FOREIGN_UNSPECIFIED = 0,
    FOREIGN_FOO = 4,
    FOREIGN_BAR = 5,
    FOREIGN_BAZ = 6,
  }

202 203 204
  /// <summary>
  ///  Test an enum that has multiple values with the same number.
  /// </summary>
205
  public enum TestEnumWithDupValue {
206 207 208 209 210 211 212 213
    TEST_ENUM_WITH_DUP_VALUE_UNSPECIFIED = 0,
    FOO1 = 1,
    BAR1 = 2,
    BAZ = 3,
    FOO2 = 1,
    BAR2 = 2,
  }

214 215 216
  /// <summary>
  ///  Test an enum with large, unordered values.
  /// </summary>
217
  public enum TestSparseEnum {
218 219 220 221 222 223
    TEST_SPARSE_ENUM_UNSPECIFIED = 0,
    SPARSE_A = 123,
    SPARSE_B = 62374,
    SPARSE_C = 12589234,
    SPARSE_D = -15,
    SPARSE_E = -53452,
224 225 226 227
    /// <summary>
    ///  In proto3, value 0 must be the first one specified
    ///  SPARSE_F = 0;
    /// </summary>
228 229 230 231 232 233
    SPARSE_G = 2,
  }

  #endregion

  #region Messages
234 235 236 237
  /// <summary>
  ///  This proto includes every type of field in both singular and repeated
  ///  forms.
  /// </summary>
238
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
239
  public sealed partial class TestAllTypes : pb::IMessage<TestAllTypes> {
240 241 242
    private static readonly pb::MessageParser<TestAllTypes> _parser = new pb::MessageParser<TestAllTypes>(() => new TestAllTypes());
    public static pb::MessageParser<TestAllTypes> Parser { get { return _parser; } }

243
    public static pbr::MessageDescriptor Descriptor {
244
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[0]; }
245 246
    }

247 248
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
249 250
    }

251 252 253 254 255
    public TestAllTypes() {
      OnConstruction();
    }

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

257
    public TestAllTypes(TestAllTypes other) : this() {
Jon Skeet's avatar
Jon Skeet committed
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
      singleInt32_ = other.singleInt32_;
      singleInt64_ = other.singleInt64_;
      singleUint32_ = other.singleUint32_;
      singleUint64_ = other.singleUint64_;
      singleSint32_ = other.singleSint32_;
      singleSint64_ = other.singleSint64_;
      singleFixed32_ = other.singleFixed32_;
      singleFixed64_ = other.singleFixed64_;
      singleSfixed32_ = other.singleSfixed32_;
      singleSfixed64_ = other.singleSfixed64_;
      singleFloat_ = other.singleFloat_;
      singleDouble_ = other.singleDouble_;
      singleBool_ = other.singleBool_;
      singleString_ = other.singleString_;
      singleBytes_ = other.singleBytes_;
      SingleNestedMessage = other.singleNestedMessage_ != null ? other.SingleNestedMessage.Clone() : null;
      SingleForeignMessage = other.singleForeignMessage_ != null ? other.SingleForeignMessage.Clone() : null;
      SingleImportMessage = other.singleImportMessage_ != null ? other.SingleImportMessage.Clone() : null;
      singleNestedEnum_ = other.singleNestedEnum_;
      singleForeignEnum_ = other.singleForeignEnum_;
      singleImportEnum_ = other.singleImportEnum_;
      SinglePublicImportMessage = other.singlePublicImportMessage_ != null ? other.SinglePublicImportMessage.Clone() : null;
      repeatedInt32_ = other.repeatedInt32_.Clone();
      repeatedInt64_ = other.repeatedInt64_.Clone();
      repeatedUint32_ = other.repeatedUint32_.Clone();
      repeatedUint64_ = other.repeatedUint64_.Clone();
      repeatedSint32_ = other.repeatedSint32_.Clone();
      repeatedSint64_ = other.repeatedSint64_.Clone();
      repeatedFixed32_ = other.repeatedFixed32_.Clone();
      repeatedFixed64_ = other.repeatedFixed64_.Clone();
      repeatedSfixed32_ = other.repeatedSfixed32_.Clone();
      repeatedSfixed64_ = other.repeatedSfixed64_.Clone();
      repeatedFloat_ = other.repeatedFloat_.Clone();
      repeatedDouble_ = other.repeatedDouble_.Clone();
      repeatedBool_ = other.repeatedBool_.Clone();
      repeatedString_ = other.repeatedString_.Clone();
      repeatedBytes_ = other.repeatedBytes_.Clone();
      repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone();
      repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone();
      repeatedImportMessage_ = other.repeatedImportMessage_.Clone();
      repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone();
      repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone();
      repeatedImportEnum_ = other.repeatedImportEnum_.Clone();
      repeatedPublicImportMessage_ = other.repeatedPublicImportMessage_.Clone();
      switch (other.OneofFieldCase) {
        case OneofFieldOneofCase.OneofUint32:
          OneofUint32 = other.OneofUint32;
          break;
        case OneofFieldOneofCase.OneofNestedMessage:
          OneofNestedMessage = other.OneofNestedMessage.Clone();
          break;
        case OneofFieldOneofCase.OneofString:
          OneofString = other.OneofString;
          break;
        case OneofFieldOneofCase.OneofBytes:
          OneofBytes = other.OneofBytes;
          break;
      }

    }

    public TestAllTypes Clone() {
      return new TestAllTypes(this);
321
    }
Jon Skeet's avatar
Jon Skeet committed
322

323
    /// <summary>Field number for the "single_int32" field.</summary>
324 325
    public const int SingleInt32FieldNumber = 1;
    private int singleInt32_;
326 327 328
    /// <summary>
    ///  Singular
    /// </summary>
329 330
    public int SingleInt32 {
      get { return singleInt32_; }
331 332 333
      set {
        singleInt32_ = value;
      }
334 335
    }

336
    /// <summary>Field number for the "single_int64" field.</summary>
337 338 339 340
    public const int SingleInt64FieldNumber = 2;
    private long singleInt64_;
    public long SingleInt64 {
      get { return singleInt64_; }
341 342 343
      set {
        singleInt64_ = value;
      }
344 345
    }

346
    /// <summary>Field number for the "single_uint32" field.</summary>
347 348 349 350
    public const int SingleUint32FieldNumber = 3;
    private uint singleUint32_;
    public uint SingleUint32 {
      get { return singleUint32_; }
351 352 353
      set {
        singleUint32_ = value;
      }
354 355
    }

356
    /// <summary>Field number for the "single_uint64" field.</summary>
357 358 359 360
    public const int SingleUint64FieldNumber = 4;
    private ulong singleUint64_;
    public ulong SingleUint64 {
      get { return singleUint64_; }
361 362 363
      set {
        singleUint64_ = value;
      }
364 365
    }

366
    /// <summary>Field number for the "single_sint32" field.</summary>
367 368 369 370
    public const int SingleSint32FieldNumber = 5;
    private int singleSint32_;
    public int SingleSint32 {
      get { return singleSint32_; }
371 372 373
      set {
        singleSint32_ = value;
      }
374 375
    }

376
    /// <summary>Field number for the "single_sint64" field.</summary>
377 378 379 380
    public const int SingleSint64FieldNumber = 6;
    private long singleSint64_;
    public long SingleSint64 {
      get { return singleSint64_; }
381 382 383
      set {
        singleSint64_ = value;
      }
384 385
    }

386
    /// <summary>Field number for the "single_fixed32" field.</summary>
387 388 389 390
    public const int SingleFixed32FieldNumber = 7;
    private uint singleFixed32_;
    public uint SingleFixed32 {
      get { return singleFixed32_; }
391 392 393
      set {
        singleFixed32_ = value;
      }
394 395
    }

396
    /// <summary>Field number for the "single_fixed64" field.</summary>
397 398 399 400
    public const int SingleFixed64FieldNumber = 8;
    private ulong singleFixed64_;
    public ulong SingleFixed64 {
      get { return singleFixed64_; }
401 402 403
      set {
        singleFixed64_ = value;
      }
404 405
    }

406
    /// <summary>Field number for the "single_sfixed32" field.</summary>
407 408 409 410
    public const int SingleSfixed32FieldNumber = 9;
    private int singleSfixed32_;
    public int SingleSfixed32 {
      get { return singleSfixed32_; }
411 412 413
      set {
        singleSfixed32_ = value;
      }
414 415
    }

416
    /// <summary>Field number for the "single_sfixed64" field.</summary>
417 418 419 420
    public const int SingleSfixed64FieldNumber = 10;
    private long singleSfixed64_;
    public long SingleSfixed64 {
      get { return singleSfixed64_; }
421 422 423
      set {
        singleSfixed64_ = value;
      }
424 425
    }

426
    /// <summary>Field number for the "single_float" field.</summary>
427 428 429 430
    public const int SingleFloatFieldNumber = 11;
    private float singleFloat_;
    public float SingleFloat {
      get { return singleFloat_; }
431 432 433
      set {
        singleFloat_ = value;
      }
434 435
    }

436
    /// <summary>Field number for the "single_double" field.</summary>
437 438 439 440
    public const int SingleDoubleFieldNumber = 12;
    private double singleDouble_;
    public double SingleDouble {
      get { return singleDouble_; }
441 442 443
      set {
        singleDouble_ = value;
      }
444 445
    }

446
    /// <summary>Field number for the "single_bool" field.</summary>
447 448 449 450
    public const int SingleBoolFieldNumber = 13;
    private bool singleBool_;
    public bool SingleBool {
      get { return singleBool_; }
451 452 453
      set {
        singleBool_ = value;
      }
454 455
    }

456
    /// <summary>Field number for the "single_string" field.</summary>
457 458 459 460
    public const int SingleStringFieldNumber = 14;
    private string singleString_ = "";
    public string SingleString {
      get { return singleString_; }
461
      set {
462
        singleString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
463
      }
464 465
    }

466
    /// <summary>Field number for the "single_bytes" field.</summary>
467 468 469 470
    public const int SingleBytesFieldNumber = 15;
    private pb::ByteString singleBytes_ = pb::ByteString.Empty;
    public pb::ByteString SingleBytes {
      get { return singleBytes_; }
471
      set {
472
        singleBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
473
      }
474 475
    }

476
    /// <summary>Field number for the "single_nested_message" field.</summary>
477 478 479 480
    public const int SingleNestedMessageFieldNumber = 18;
    private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage singleNestedMessage_;
    public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage SingleNestedMessage {
      get { return singleNestedMessage_; }
481 482 483
      set {
        singleNestedMessage_ = value;
      }
484 485
    }

486
    /// <summary>Field number for the "single_foreign_message" field.</summary>
487 488 489 490
    public const int SingleForeignMessageFieldNumber = 19;
    private global::Google.Protobuf.TestProtos.ForeignMessage singleForeignMessage_;
    public global::Google.Protobuf.TestProtos.ForeignMessage SingleForeignMessage {
      get { return singleForeignMessage_; }
491 492 493
      set {
        singleForeignMessage_ = value;
      }
494 495
    }

496
    /// <summary>Field number for the "single_import_message" field.</summary>
497 498 499 500
    public const int SingleImportMessageFieldNumber = 20;
    private global::Google.Protobuf.TestProtos.ImportMessage singleImportMessage_;
    public global::Google.Protobuf.TestProtos.ImportMessage SingleImportMessage {
      get { return singleImportMessage_; }
501 502 503
      set {
        singleImportMessage_ = value;
      }
504 505
    }

506
    /// <summary>Field number for the "single_nested_enum" field.</summary>
507 508 509 510
    public const int SingleNestedEnumFieldNumber = 21;
    private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum singleNestedEnum_ = global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED;
    public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum SingleNestedEnum {
      get { return singleNestedEnum_; }
511 512 513
      set {
        singleNestedEnum_ = value;
      }
514 515
    }

516
    /// <summary>Field number for the "single_foreign_enum" field.</summary>
517 518 519 520
    public const int SingleForeignEnumFieldNumber = 22;
    private global::Google.Protobuf.TestProtos.ForeignEnum singleForeignEnum_ = global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED;
    public global::Google.Protobuf.TestProtos.ForeignEnum SingleForeignEnum {
      get { return singleForeignEnum_; }
521 522 523
      set {
        singleForeignEnum_ = value;
      }
524 525
    }

526
    /// <summary>Field number for the "single_import_enum" field.</summary>
527 528 529 530
    public const int SingleImportEnumFieldNumber = 23;
    private global::Google.Protobuf.TestProtos.ImportEnum singleImportEnum_ = global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED;
    public global::Google.Protobuf.TestProtos.ImportEnum SingleImportEnum {
      get { return singleImportEnum_; }
531 532 533
      set {
        singleImportEnum_ = value;
      }
534 535
    }

536
    /// <summary>Field number for the "single_public_import_message" field.</summary>
537 538
    public const int SinglePublicImportMessageFieldNumber = 26;
    private global::Google.Protobuf.TestProtos.PublicImportMessage singlePublicImportMessage_;
539 540 541
    /// <summary>
    ///  Defined in unittest_import_public.proto
    /// </summary>
542 543
    public global::Google.Protobuf.TestProtos.PublicImportMessage SinglePublicImportMessage {
      get { return singlePublicImportMessage_; }
544 545 546
      set {
        singlePublicImportMessage_ = value;
      }
547 548
    }

549
    /// <summary>Field number for the "repeated_int32" field.</summary>
550
    public const int RepeatedInt32FieldNumber = 31;
551 552
    private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
        = pb::FieldCodec.ForInt32(250);
553
    private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
554 555 556
    /// <summary>
    ///  Repeated
    /// </summary>
557 558 559 560
    public pbc::RepeatedField<int> RepeatedInt32 {
      get { return repeatedInt32_; }
    }

561
    /// <summary>Field number for the "repeated_int64" field.</summary>
562
    public const int RepeatedInt64FieldNumber = 32;
563 564
    private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
        = pb::FieldCodec.ForInt64(258);
565 566 567 568 569
    private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>();
    public pbc::RepeatedField<long> RepeatedInt64 {
      get { return repeatedInt64_; }
    }

570
    /// <summary>Field number for the "repeated_uint32" field.</summary>
571
    public const int RepeatedUint32FieldNumber = 33;
572 573
    private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
        = pb::FieldCodec.ForUInt32(266);
574 575 576 577 578
    private readonly pbc::RepeatedField<uint> repeatedUint32_ = new pbc::RepeatedField<uint>();
    public pbc::RepeatedField<uint> RepeatedUint32 {
      get { return repeatedUint32_; }
    }

579
    /// <summary>Field number for the "repeated_uint64" field.</summary>
580
    public const int RepeatedUint64FieldNumber = 34;
581 582
    private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
        = pb::FieldCodec.ForUInt64(274);
583 584 585 586 587
    private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>();
    public pbc::RepeatedField<ulong> RepeatedUint64 {
      get { return repeatedUint64_; }
    }

588
    /// <summary>Field number for the "repeated_sint32" field.</summary>
589
    public const int RepeatedSint32FieldNumber = 35;
590 591
    private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec
        = pb::FieldCodec.ForSInt32(282);
592 593 594 595 596
    private readonly pbc::RepeatedField<int> repeatedSint32_ = new pbc::RepeatedField<int>();
    public pbc::RepeatedField<int> RepeatedSint32 {
      get { return repeatedSint32_; }
    }

597
    /// <summary>Field number for the "repeated_sint64" field.</summary>
598
    public const int RepeatedSint64FieldNumber = 36;
599 600
    private static readonly pb::FieldCodec<long> _repeated_repeatedSint64_codec
        = pb::FieldCodec.ForSInt64(290);
601 602 603 604 605
    private readonly pbc::RepeatedField<long> repeatedSint64_ = new pbc::RepeatedField<long>();
    public pbc::RepeatedField<long> RepeatedSint64 {
      get { return repeatedSint64_; }
    }

606
    /// <summary>Field number for the "repeated_fixed32" field.</summary>
607
    public const int RepeatedFixed32FieldNumber = 37;
608 609
    private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec
        = pb::FieldCodec.ForFixed32(298);
610 611 612 613 614
    private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
    public pbc::RepeatedField<uint> RepeatedFixed32 {
      get { return repeatedFixed32_; }
    }

615
    /// <summary>Field number for the "repeated_fixed64" field.</summary>
616
    public const int RepeatedFixed64FieldNumber = 38;
617 618
    private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec
        = pb::FieldCodec.ForFixed64(306);
619 620 621 622 623
    private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
    public pbc::RepeatedField<ulong> RepeatedFixed64 {
      get { return repeatedFixed64_; }
    }

624
    /// <summary>Field number for the "repeated_sfixed32" field.</summary>
625
    public const int RepeatedSfixed32FieldNumber = 39;
626 627
    private static readonly pb::FieldCodec<int> _repeated_repeatedSfixed32_codec
        = pb::FieldCodec.ForSFixed32(314);
628 629 630 631 632
    private readonly pbc::RepeatedField<int> repeatedSfixed32_ = new pbc::RepeatedField<int>();
    public pbc::RepeatedField<int> RepeatedSfixed32 {
      get { return repeatedSfixed32_; }
    }

633
    /// <summary>Field number for the "repeated_sfixed64" field.</summary>
634
    public const int RepeatedSfixed64FieldNumber = 40;
635 636
    private static readonly pb::FieldCodec<long> _repeated_repeatedSfixed64_codec
        = pb::FieldCodec.ForSFixed64(322);
637 638 639 640 641
    private readonly pbc::RepeatedField<long> repeatedSfixed64_ = new pbc::RepeatedField<long>();
    public pbc::RepeatedField<long> RepeatedSfixed64 {
      get { return repeatedSfixed64_; }
    }

642
    /// <summary>Field number for the "repeated_float" field.</summary>
643
    public const int RepeatedFloatFieldNumber = 41;
644 645
    private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec
        = pb::FieldCodec.ForFloat(330);
646 647 648 649 650
    private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
    public pbc::RepeatedField<float> RepeatedFloat {
      get { return repeatedFloat_; }
    }

651
    /// <summary>Field number for the "repeated_double" field.</summary>
652
    public const int RepeatedDoubleFieldNumber = 42;
653 654
    private static readonly pb::FieldCodec<double> _repeated_repeatedDouble_codec
        = pb::FieldCodec.ForDouble(338);
655 656 657 658 659
    private readonly pbc::RepeatedField<double> repeatedDouble_ = new pbc::RepeatedField<double>();
    public pbc::RepeatedField<double> RepeatedDouble {
      get { return repeatedDouble_; }
    }

660
    /// <summary>Field number for the "repeated_bool" field.</summary>
661
    public const int RepeatedBoolFieldNumber = 43;
662 663
    private static readonly pb::FieldCodec<bool> _repeated_repeatedBool_codec
        = pb::FieldCodec.ForBool(346);
664 665 666 667 668
    private readonly pbc::RepeatedField<bool> repeatedBool_ = new pbc::RepeatedField<bool>();
    public pbc::RepeatedField<bool> RepeatedBool {
      get { return repeatedBool_; }
    }

669
    /// <summary>Field number for the "repeated_string" field.</summary>
670
    public const int RepeatedStringFieldNumber = 44;
671 672
    private static readonly pb::FieldCodec<string> _repeated_repeatedString_codec
        = pb::FieldCodec.ForString(354);
673 674 675 676 677
    private readonly pbc::RepeatedField<string> repeatedString_ = new pbc::RepeatedField<string>();
    public pbc::RepeatedField<string> RepeatedString {
      get { return repeatedString_; }
    }

678
    /// <summary>Field number for the "repeated_bytes" field.</summary>
679
    public const int RepeatedBytesFieldNumber = 45;
680 681
    private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytes_codec
        = pb::FieldCodec.ForBytes(362);
682 683 684 685 686
    private readonly pbc::RepeatedField<pb::ByteString> repeatedBytes_ = new pbc::RepeatedField<pb::ByteString>();
    public pbc::RepeatedField<pb::ByteString> RepeatedBytes {
      get { return repeatedBytes_; }
    }

687
    /// <summary>Field number for the "repeated_nested_message" field.</summary>
688
    public const int RepeatedNestedMessageFieldNumber = 48;
689 690
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> _repeated_repeatedNestedMessage_codec
        = pb::FieldCodec.ForMessage(386, global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage.Parser);
691 692 693 694 695
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage>();
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> RepeatedNestedMessage {
      get { return repeatedNestedMessage_; }
    }

696
    /// <summary>Field number for the "repeated_foreign_message" field.</summary>
697
    public const int RepeatedForeignMessageFieldNumber = 49;
698 699
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignMessage> _repeated_repeatedForeignMessage_codec
        = pb::FieldCodec.ForMessage(394, global::Google.Protobuf.TestProtos.ForeignMessage.Parser);
700 701 702 703 704
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> repeatedForeignMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage>();
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> RepeatedForeignMessage {
      get { return repeatedForeignMessage_; }
    }

705
    /// <summary>Field number for the "repeated_import_message" field.</summary>
706
    public const int RepeatedImportMessageFieldNumber = 50;
707 708
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ImportMessage> _repeated_repeatedImportMessage_codec
        = pb::FieldCodec.ForMessage(402, global::Google.Protobuf.TestProtos.ImportMessage.Parser);
709 710 711 712 713
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage> repeatedImportMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage>();
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage> RepeatedImportMessage {
      get { return repeatedImportMessage_; }
    }

714
    /// <summary>Field number for the "repeated_nested_enum" field.</summary>
715
    public const int RepeatedNestedEnumFieldNumber = 51;
716
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> _repeated_repeatedNestedEnum_codec
717 718
        = pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) x);
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum>();
719 720 721 722
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> RepeatedNestedEnum {
      get { return repeatedNestedEnum_; }
    }

723
    /// <summary>Field number for the "repeated_foreign_enum" field.</summary>
724
    public const int RepeatedForeignEnumFieldNumber = 52;
725
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_repeatedForeignEnum_codec
726 727
        = pb::FieldCodec.ForEnum(418, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> repeatedForeignEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
728 729 730 731
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> RepeatedForeignEnum {
      get { return repeatedForeignEnum_; }
    }

732
    /// <summary>Field number for the "repeated_import_enum" field.</summary>
733
    public const int RepeatedImportEnumFieldNumber = 53;
734
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ImportEnum> _repeated_repeatedImportEnum_codec
735 736
        = pb::FieldCodec.ForEnum(426, x => (int) x, x => (global::Google.Protobuf.TestProtos.ImportEnum) x);
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum> repeatedImportEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum>();
737 738 739 740
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum> RepeatedImportEnum {
      get { return repeatedImportEnum_; }
    }

741
    /// <summary>Field number for the "repeated_public_import_message" field.</summary>
742
    public const int RepeatedPublicImportMessageFieldNumber = 54;
743 744
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.PublicImportMessage> _repeated_repeatedPublicImportMessage_codec
        = pb::FieldCodec.ForMessage(434, global::Google.Protobuf.TestProtos.PublicImportMessage.Parser);
745
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage> repeatedPublicImportMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage>();
746 747 748
    /// <summary>
    ///  Defined in unittest_import_public.proto
    /// </summary>
749 750 751 752
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage> RepeatedPublicImportMessage {
      get { return repeatedPublicImportMessage_; }
    }

753
    /// <summary>Field number for the "oneof_uint32" field.</summary>
754 755 756 757 758 759 760 761 762
    public const int OneofUint32FieldNumber = 111;
    public uint OneofUint32 {
      get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32 ? (uint) oneofField_ : 0; }
      set {
        oneofField_ = value;
        oneofFieldCase_ = OneofFieldOneofCase.OneofUint32;
      }
    }

763
    /// <summary>Field number for the "oneof_nested_message" field.</summary>
764 765 766 767 768 769 770 771 772
    public const int OneofNestedMessageFieldNumber = 112;
    public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage OneofNestedMessage {
      get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage) oneofField_ : null; }
      set {
        oneofField_ = value;
        oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage;
      }
    }

773
    /// <summary>Field number for the "oneof_string" field.</summary>
774 775 776 777
    public const int OneofStringFieldNumber = 113;
    public string OneofString {
      get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString ? (string) oneofField_ : ""; }
      set {
778
        oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet's avatar
Jon Skeet committed
779
        oneofFieldCase_ = OneofFieldOneofCase.OneofString;
780 781 782
      }
    }

783
    /// <summary>Field number for the "oneof_bytes" field.</summary>
784 785 786 787
    public const int OneofBytesFieldNumber = 114;
    public pb::ByteString OneofBytes {
      get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; }
      set {
788
        oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet's avatar
Jon Skeet committed
789
        oneofFieldCase_ = OneofFieldOneofCase.OneofBytes;
790 791 792 793
      }
    }

    private object oneofField_;
794
    /// <summary>Enum of possible cases for the "oneof_field" oneof.</summary>
795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837
    public enum OneofFieldOneofCase {
      None = 0,
      OneofUint32 = 111,
      OneofNestedMessage = 112,
      OneofString = 113,
      OneofBytes = 114,
    }
    private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
    public OneofFieldOneofCase OneofFieldCase {
      get { return oneofFieldCase_; }
    }

    public void ClearOneofField() {
      oneofFieldCase_ = OneofFieldOneofCase.None;
      oneofField_ = null;
    }

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

    public bool Equals(TestAllTypes other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (SingleInt32 != other.SingleInt32) return false;
      if (SingleInt64 != other.SingleInt64) return false;
      if (SingleUint32 != other.SingleUint32) return false;
      if (SingleUint64 != other.SingleUint64) return false;
      if (SingleSint32 != other.SingleSint32) return false;
      if (SingleSint64 != other.SingleSint64) return false;
      if (SingleFixed32 != other.SingleFixed32) return false;
      if (SingleFixed64 != other.SingleFixed64) return false;
      if (SingleSfixed32 != other.SingleSfixed32) return false;
      if (SingleSfixed64 != other.SingleSfixed64) return false;
      if (SingleFloat != other.SingleFloat) return false;
      if (SingleDouble != other.SingleDouble) return false;
      if (SingleBool != other.SingleBool) return false;
      if (SingleString != other.SingleString) return false;
      if (SingleBytes != other.SingleBytes) return false;
838 839 840 841
      if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return false;
      if (!object.Equals(SingleForeignMessage, other.SingleForeignMessage)) return false;
      if (!object.Equals(SingleImportMessage, other.SingleImportMessage)) return false;
      if (SingleNestedEnum != other.SingleNestedEnum) return false;
842 843
      if (SingleForeignEnum != other.SingleForeignEnum) return false;
      if (SingleImportEnum != other.SingleImportEnum) return false;
844 845
      if (!object.Equals(SinglePublicImportMessage, other.SinglePublicImportMessage)) return false;
      if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867
      if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
      if(!repeatedUint32_.Equals(other.repeatedUint32_)) return false;
      if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
      if(!repeatedSint32_.Equals(other.repeatedSint32_)) return false;
      if(!repeatedSint64_.Equals(other.repeatedSint64_)) return false;
      if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
      if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
      if(!repeatedSfixed32_.Equals(other.repeatedSfixed32_)) return false;
      if(!repeatedSfixed64_.Equals(other.repeatedSfixed64_)) return false;
      if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
      if(!repeatedDouble_.Equals(other.repeatedDouble_)) return false;
      if(!repeatedBool_.Equals(other.repeatedBool_)) return false;
      if(!repeatedString_.Equals(other.repeatedString_)) return false;
      if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false;
      if(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return false;
      if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false;
      if(!repeatedImportMessage_.Equals(other.repeatedImportMessage_)) return false;
      if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false;
      if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false;
      if(!repeatedImportEnum_.Equals(other.repeatedImportEnum_)) return false;
      if(!repeatedPublicImportMessage_.Equals(other.repeatedPublicImportMessage_)) return false;
      if (OneofUint32 != other.OneofUint32) return false;
868 869
      if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return false;
      if (OneofString != other.OneofString) return false;
870
      if (OneofBytes != other.OneofBytes) return false;
871
      if (OneofFieldCase != other.OneofFieldCase) return false;
872 873 874 875
      return true;
    }

    public override int GetHashCode() {
876
      int hash = 1;
877 878 879 880 881 882 883 884 885 886 887 888 889
      if (SingleInt32 != 0) hash ^= SingleInt32.GetHashCode();
      if (SingleInt64 != 0L) hash ^= SingleInt64.GetHashCode();
      if (SingleUint32 != 0) hash ^= SingleUint32.GetHashCode();
      if (SingleUint64 != 0UL) hash ^= SingleUint64.GetHashCode();
      if (SingleSint32 != 0) hash ^= SingleSint32.GetHashCode();
      if (SingleSint64 != 0L) hash ^= SingleSint64.GetHashCode();
      if (SingleFixed32 != 0) hash ^= SingleFixed32.GetHashCode();
      if (SingleFixed64 != 0UL) hash ^= SingleFixed64.GetHashCode();
      if (SingleSfixed32 != 0) hash ^= SingleSfixed32.GetHashCode();
      if (SingleSfixed64 != 0L) hash ^= SingleSfixed64.GetHashCode();
      if (SingleFloat != 0F) hash ^= SingleFloat.GetHashCode();
      if (SingleDouble != 0D) hash ^= SingleDouble.GetHashCode();
      if (SingleBool != false) hash ^= SingleBool.GetHashCode();
Jon Skeet's avatar
Jon Skeet committed
890 891
      if (SingleString.Length != 0) hash ^= SingleString.GetHashCode();
      if (SingleBytes.Length != 0) hash ^= SingleBytes.GetHashCode();
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
      if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode();
      if (singleForeignMessage_ != null) hash ^= SingleForeignMessage.GetHashCode();
      if (singleImportMessage_ != null) hash ^= SingleImportMessage.GetHashCode();
      if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) hash ^= SingleNestedEnum.GetHashCode();
      if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) hash ^= SingleForeignEnum.GetHashCode();
      if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) hash ^= SingleImportEnum.GetHashCode();
      if (singlePublicImportMessage_ != null) hash ^= SinglePublicImportMessage.GetHashCode();
      hash ^= repeatedInt32_.GetHashCode();
      hash ^= repeatedInt64_.GetHashCode();
      hash ^= repeatedUint32_.GetHashCode();
      hash ^= repeatedUint64_.GetHashCode();
      hash ^= repeatedSint32_.GetHashCode();
      hash ^= repeatedSint64_.GetHashCode();
      hash ^= repeatedFixed32_.GetHashCode();
      hash ^= repeatedFixed64_.GetHashCode();
      hash ^= repeatedSfixed32_.GetHashCode();
      hash ^= repeatedSfixed64_.GetHashCode();
      hash ^= repeatedFloat_.GetHashCode();
      hash ^= repeatedDouble_.GetHashCode();
      hash ^= repeatedBool_.GetHashCode();
      hash ^= repeatedString_.GetHashCode();
      hash ^= repeatedBytes_.GetHashCode();
      hash ^= repeatedNestedMessage_.GetHashCode();
      hash ^= repeatedForeignMessage_.GetHashCode();
      hash ^= repeatedImportMessage_.GetHashCode();
      hash ^= repeatedNestedEnum_.GetHashCode();
      hash ^= repeatedForeignEnum_.GetHashCode();
      hash ^= repeatedImportEnum_.GetHashCode();
      hash ^= repeatedPublicImportMessage_.GetHashCode();
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) hash ^= OneofUint32.GetHashCode();
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode();
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) hash ^= OneofString.GetHashCode();
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.GetHashCode();
925
      hash ^= (int) oneofFieldCase_;
926 927 928
      return hash;
    }

929
    public override string ToString() {
930
      return pb::JsonFormatter.ToDiagnosticString(this);
931 932
    }

Jon Skeet's avatar
Jon Skeet committed
933
    public void WriteTo(pb::CodedOutputStream output) {
934
      if (SingleInt32 != 0) {
935 936
        output.WriteRawTag(8);
        output.WriteInt32(SingleInt32);
937 938
      }
      if (SingleInt64 != 0L) {
939 940
        output.WriteRawTag(16);
        output.WriteInt64(SingleInt64);
941 942
      }
      if (SingleUint32 != 0) {
943 944
        output.WriteRawTag(24);
        output.WriteUInt32(SingleUint32);
945 946
      }
      if (SingleUint64 != 0UL) {
947 948
        output.WriteRawTag(32);
        output.WriteUInt64(SingleUint64);
949 950
      }
      if (SingleSint32 != 0) {
951 952
        output.WriteRawTag(40);
        output.WriteSInt32(SingleSint32);
953 954
      }
      if (SingleSint64 != 0L) {
955 956
        output.WriteRawTag(48);
        output.WriteSInt64(SingleSint64);
957 958
      }
      if (SingleFixed32 != 0) {
959 960
        output.WriteRawTag(61);
        output.WriteFixed32(SingleFixed32);
961 962
      }
      if (SingleFixed64 != 0UL) {
963 964
        output.WriteRawTag(65);
        output.WriteFixed64(SingleFixed64);
965 966
      }
      if (SingleSfixed32 != 0) {
967 968
        output.WriteRawTag(77);
        output.WriteSFixed32(SingleSfixed32);
969 970
      }
      if (SingleSfixed64 != 0L) {
971 972
        output.WriteRawTag(81);
        output.WriteSFixed64(SingleSfixed64);
973 974
      }
      if (SingleFloat != 0F) {
975 976
        output.WriteRawTag(93);
        output.WriteFloat(SingleFloat);
977 978
      }
      if (SingleDouble != 0D) {
979 980
        output.WriteRawTag(97);
        output.WriteDouble(SingleDouble);
981 982
      }
      if (SingleBool != false) {
983 984
        output.WriteRawTag(104);
        output.WriteBool(SingleBool);
985
      }
Jon Skeet's avatar
Jon Skeet committed
986
      if (SingleString.Length != 0) {
987 988
        output.WriteRawTag(114);
        output.WriteString(SingleString);
989
      }
Jon Skeet's avatar
Jon Skeet committed
990
      if (SingleBytes.Length != 0) {
991 992
        output.WriteRawTag(122);
        output.WriteBytes(SingleBytes);
993 994
      }
      if (singleNestedMessage_ != null) {
995 996
        output.WriteRawTag(146, 1);
        output.WriteMessage(SingleNestedMessage);
997 998
      }
      if (singleForeignMessage_ != null) {
999 1000
        output.WriteRawTag(154, 1);
        output.WriteMessage(SingleForeignMessage);
1001 1002
      }
      if (singleImportMessage_ != null) {
1003 1004
        output.WriteRawTag(162, 1);
        output.WriteMessage(SingleImportMessage);
1005 1006
      }
      if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) {
1007 1008
        output.WriteRawTag(168, 1);
        output.WriteEnum((int) SingleNestedEnum);
1009 1010
      }
      if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
1011 1012
        output.WriteRawTag(176, 1);
        output.WriteEnum((int) SingleForeignEnum);
1013 1014
      }
      if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) {
1015 1016
        output.WriteRawTag(184, 1);
        output.WriteEnum((int) SingleImportEnum);
1017 1018
      }
      if (singlePublicImportMessage_ != null) {
1019 1020
        output.WriteRawTag(210, 1);
        output.WriteMessage(SinglePublicImportMessage);
Jon Skeet's avatar
Jon Skeet committed
1021
      }
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043
      repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
      repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
      repeatedUint32_.WriteTo(output, _repeated_repeatedUint32_codec);
      repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
      repeatedSint32_.WriteTo(output, _repeated_repeatedSint32_codec);
      repeatedSint64_.WriteTo(output, _repeated_repeatedSint64_codec);
      repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
      repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
      repeatedSfixed32_.WriteTo(output, _repeated_repeatedSfixed32_codec);
      repeatedSfixed64_.WriteTo(output, _repeated_repeatedSfixed64_codec);
      repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
      repeatedDouble_.WriteTo(output, _repeated_repeatedDouble_codec);
      repeatedBool_.WriteTo(output, _repeated_repeatedBool_codec);
      repeatedString_.WriteTo(output, _repeated_repeatedString_codec);
      repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec);
      repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_codec);
      repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec);
      repeatedImportMessage_.WriteTo(output, _repeated_repeatedImportMessage_codec);
      repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec);
      repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec);
      repeatedImportEnum_.WriteTo(output, _repeated_repeatedImportEnum_codec);
      repeatedPublicImportMessage_.WriteTo(output, _repeated_repeatedPublicImportMessage_codec);
1044
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
1045 1046
        output.WriteRawTag(248, 6);
        output.WriteUInt32(OneofUint32);
1047 1048
      }
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
1049 1050
        output.WriteRawTag(130, 7);
        output.WriteMessage(OneofNestedMessage);
1051 1052
      }
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
1053 1054
        output.WriteRawTag(138, 7);
        output.WriteString(OneofString);
1055 1056
      }
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
1057 1058
        output.WriteRawTag(146, 7);
        output.WriteBytes(OneofBytes);
1059 1060 1061 1062 1063 1064
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (SingleInt32 != 0) {
1065
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(SingleInt32);
1066 1067
      }
      if (SingleInt64 != 0L) {
1068
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(SingleInt64);
1069 1070
      }
      if (SingleUint32 != 0) {
1071
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SingleUint32);
1072 1073
      }
      if (SingleUint64 != 0UL) {
1074
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SingleUint64);
1075 1076
      }
      if (SingleSint32 != 0) {
1077
        size += 1 + pb::CodedOutputStream.ComputeSInt32Size(SingleSint32);
1078 1079
      }
      if (SingleSint64 != 0L) {
1080
        size += 1 + pb::CodedOutputStream.ComputeSInt64Size(SingleSint64);
1081 1082
      }
      if (SingleFixed32 != 0) {
1083
        size += 1 + 4;
1084 1085
      }
      if (SingleFixed64 != 0UL) {
1086
        size += 1 + 8;
1087 1088
      }
      if (SingleSfixed32 != 0) {
1089
        size += 1 + 4;
1090 1091
      }
      if (SingleSfixed64 != 0L) {
1092
        size += 1 + 8;
1093 1094
      }
      if (SingleFloat != 0F) {
1095
        size += 1 + 4;
1096 1097
      }
      if (SingleDouble != 0D) {
1098
        size += 1 + 8;
1099 1100
      }
      if (SingleBool != false) {
1101
        size += 1 + 1;
1102
      }
Jon Skeet's avatar
Jon Skeet committed
1103
      if (SingleString.Length != 0) {
1104
        size += 1 + pb::CodedOutputStream.ComputeStringSize(SingleString);
1105
      }
Jon Skeet's avatar
Jon Skeet committed
1106
      if (SingleBytes.Length != 0) {
1107
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(SingleBytes);
1108 1109
      }
      if (singleNestedMessage_ != null) {
1110
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage);
1111 1112
      }
      if (singleForeignMessage_ != null) {
1113
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleForeignMessage);
1114 1115
      }
      if (singleImportMessage_ != null) {
1116
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleImportMessage);
1117 1118
      }
      if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) {
1119
        size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleNestedEnum);
1120 1121
      }
      if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
1122
        size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleForeignEnum);
1123 1124
      }
      if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) {
1125
        size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleImportEnum);
1126 1127
      }
      if (singlePublicImportMessage_ != null) {
1128
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SinglePublicImportMessage);
1129
      }
1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151
      size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
      size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
      size += repeatedUint32_.CalculateSize(_repeated_repeatedUint32_codec);
      size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
      size += repeatedSint32_.CalculateSize(_repeated_repeatedSint32_codec);
      size += repeatedSint64_.CalculateSize(_repeated_repeatedSint64_codec);
      size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
      size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
      size += repeatedSfixed32_.CalculateSize(_repeated_repeatedSfixed32_codec);
      size += repeatedSfixed64_.CalculateSize(_repeated_repeatedSfixed64_codec);
      size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
      size += repeatedDouble_.CalculateSize(_repeated_repeatedDouble_codec);
      size += repeatedBool_.CalculateSize(_repeated_repeatedBool_codec);
      size += repeatedString_.CalculateSize(_repeated_repeatedString_codec);
      size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec);
      size += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessage_codec);
      size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec);
      size += repeatedImportMessage_.CalculateSize(_repeated_repeatedImportMessage_codec);
      size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_codec);
      size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec);
      size += repeatedImportEnum_.CalculateSize(_repeated_repeatedImportEnum_codec);
      size += repeatedPublicImportMessage_.CalculateSize(_repeated_repeatedPublicImportMessage_codec);
1152
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
1153
        size += 2 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32);
1154 1155
      }
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
1156
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(OneofNestedMessage);
1157 1158
      }
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
1159
        size += 2 + pb::CodedOutputStream.ComputeStringSize(OneofString);
1160 1161
      }
      if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
1162
        size += 2 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes);
1163 1164 1165
      }
      return size;
    }
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
    public void MergeFrom(TestAllTypes other) {
      if (other == null) {
        return;
      }
      if (other.SingleInt32 != 0) {
        SingleInt32 = other.SingleInt32;
      }
      if (other.SingleInt64 != 0L) {
        SingleInt64 = other.SingleInt64;
      }
      if (other.SingleUint32 != 0) {
        SingleUint32 = other.SingleUint32;
      }
      if (other.SingleUint64 != 0UL) {
        SingleUint64 = other.SingleUint64;
      }
      if (other.SingleSint32 != 0) {
        SingleSint32 = other.SingleSint32;
      }
      if (other.SingleSint64 != 0L) {
        SingleSint64 = other.SingleSint64;
      }
      if (other.SingleFixed32 != 0) {
        SingleFixed32 = other.SingleFixed32;
      }
      if (other.SingleFixed64 != 0UL) {
        SingleFixed64 = other.SingleFixed64;
      }
      if (other.SingleSfixed32 != 0) {
        SingleSfixed32 = other.SingleSfixed32;
      }
      if (other.SingleSfixed64 != 0L) {
        SingleSfixed64 = other.SingleSfixed64;
      }
      if (other.SingleFloat != 0F) {
        SingleFloat = other.SingleFloat;
      }
      if (other.SingleDouble != 0D) {
        SingleDouble = other.SingleDouble;
      }
      if (other.SingleBool != false) {
        SingleBool = other.SingleBool;
      }
Jon Skeet's avatar
Jon Skeet committed
1210
      if (other.SingleString.Length != 0) {
1211 1212
        SingleString = other.SingleString;
      }
Jon Skeet's avatar
Jon Skeet committed
1213
      if (other.SingleBytes.Length != 0) {
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
        SingleBytes = other.SingleBytes;
      }
      if (other.singleNestedMessage_ != null) {
        if (singleNestedMessage_ == null) {
          singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
        }
        SingleNestedMessage.MergeFrom(other.SingleNestedMessage);
      }
      if (other.singleForeignMessage_ != null) {
        if (singleForeignMessage_ == null) {
          singleForeignMessage_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
        }
        SingleForeignMessage.MergeFrom(other.SingleForeignMessage);
      }
      if (other.singleImportMessage_ != null) {
        if (singleImportMessage_ == null) {
          singleImportMessage_ = new global::Google.Protobuf.TestProtos.ImportMessage();
        }
        SingleImportMessage.MergeFrom(other.SingleImportMessage);
      }
      if (other.SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) {
        SingleNestedEnum = other.SingleNestedEnum;
      }
      if (other.SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
        SingleForeignEnum = other.SingleForeignEnum;
      }
      if (other.SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) {
        SingleImportEnum = other.SingleImportEnum;
      }
      if (other.singlePublicImportMessage_ != null) {
        if (singlePublicImportMessage_ == null) {
          singlePublicImportMessage_ = new global::Google.Protobuf.TestProtos.PublicImportMessage();
        }
        SinglePublicImportMessage.MergeFrom(other.SinglePublicImportMessage);
      }
      repeatedInt32_.Add(other.repeatedInt32_);
      repeatedInt64_.Add(other.repeatedInt64_);
      repeatedUint32_.Add(other.repeatedUint32_);
      repeatedUint64_.Add(other.repeatedUint64_);
      repeatedSint32_.Add(other.repeatedSint32_);
      repeatedSint64_.Add(other.repeatedSint64_);
      repeatedFixed32_.Add(other.repeatedFixed32_);
      repeatedFixed64_.Add(other.repeatedFixed64_);
      repeatedSfixed32_.Add(other.repeatedSfixed32_);
      repeatedSfixed64_.Add(other.repeatedSfixed64_);
      repeatedFloat_.Add(other.repeatedFloat_);
      repeatedDouble_.Add(other.repeatedDouble_);
      repeatedBool_.Add(other.repeatedBool_);
      repeatedString_.Add(other.repeatedString_);
      repeatedBytes_.Add(other.repeatedBytes_);
      repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
      repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
      repeatedImportMessage_.Add(other.repeatedImportMessage_);
      repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
      repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
      repeatedImportEnum_.Add(other.repeatedImportEnum_);
      repeatedPublicImportMessage_.Add(other.repeatedPublicImportMessage_);
      switch (other.OneofFieldCase) {
        case OneofFieldOneofCase.OneofUint32:
          OneofUint32 = other.OneofUint32;
          break;
        case OneofFieldOneofCase.OneofNestedMessage:
          OneofNestedMessage = other.OneofNestedMessage;
          break;
        case OneofFieldOneofCase.OneofString:
          OneofString = other.OneofString;
          break;
        case OneofFieldOneofCase.OneofBytes:
          OneofBytes = other.OneofBytes;
          break;
      }

    }

Jon Skeet's avatar
Jon Skeet committed
1288
    public void MergeFrom(pb::CodedInputStream input) {
1289
      uint tag;
1290
      while ((tag = input.ReadTag()) != 0) {
1291 1292
        switch(tag) {
          default:
1293
            input.SkipLastField();
1294 1295
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
1296
            SingleInt32 = input.ReadInt32();
1297 1298 1299
            break;
          }
          case 16: {
Jon Skeet's avatar
Jon Skeet committed
1300
            SingleInt64 = input.ReadInt64();
1301 1302 1303
            break;
          }
          case 24: {
Jon Skeet's avatar
Jon Skeet committed
1304
            SingleUint32 = input.ReadUInt32();
1305 1306 1307
            break;
          }
          case 32: {
Jon Skeet's avatar
Jon Skeet committed
1308
            SingleUint64 = input.ReadUInt64();
1309 1310 1311
            break;
          }
          case 40: {
Jon Skeet's avatar
Jon Skeet committed
1312
            SingleSint32 = input.ReadSInt32();
1313 1314 1315
            break;
          }
          case 48: {
Jon Skeet's avatar
Jon Skeet committed
1316
            SingleSint64 = input.ReadSInt64();
1317 1318 1319
            break;
          }
          case 61: {
Jon Skeet's avatar
Jon Skeet committed
1320
            SingleFixed32 = input.ReadFixed32();
1321 1322 1323
            break;
          }
          case 65: {
Jon Skeet's avatar
Jon Skeet committed
1324
            SingleFixed64 = input.ReadFixed64();
1325 1326 1327
            break;
          }
          case 77: {
Jon Skeet's avatar
Jon Skeet committed
1328
            SingleSfixed32 = input.ReadSFixed32();
1329 1330 1331
            break;
          }
          case 81: {
Jon Skeet's avatar
Jon Skeet committed
1332
            SingleSfixed64 = input.ReadSFixed64();
1333 1334 1335
            break;
          }
          case 93: {
Jon Skeet's avatar
Jon Skeet committed
1336
            SingleFloat = input.ReadFloat();
1337 1338 1339
            break;
          }
          case 97: {
Jon Skeet's avatar
Jon Skeet committed
1340
            SingleDouble = input.ReadDouble();
1341 1342 1343
            break;
          }
          case 104: {
Jon Skeet's avatar
Jon Skeet committed
1344
            SingleBool = input.ReadBool();
1345 1346 1347
            break;
          }
          case 114: {
Jon Skeet's avatar
Jon Skeet committed
1348
            SingleString = input.ReadString();
1349 1350 1351
            break;
          }
          case 122: {
Jon Skeet's avatar
Jon Skeet committed
1352
            SingleBytes = input.ReadBytes();
1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376
            break;
          }
          case 146: {
            if (singleNestedMessage_ == null) {
              singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
            }
            input.ReadMessage(singleNestedMessage_);
            break;
          }
          case 154: {
            if (singleForeignMessage_ == null) {
              singleForeignMessage_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
            }
            input.ReadMessage(singleForeignMessage_);
            break;
          }
          case 162: {
            if (singleImportMessage_ == null) {
              singleImportMessage_ = new global::Google.Protobuf.TestProtos.ImportMessage();
            }
            input.ReadMessage(singleImportMessage_);
            break;
          }
          case 168: {
Jon Skeet's avatar
Jon Skeet committed
1377 1378
            singleNestedEnum_ = (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) input.ReadEnum();
            break;
1379 1380
          }
          case 176: {
Jon Skeet's avatar
Jon Skeet committed
1381 1382
            singleForeignEnum_ = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum();
            break;
1383 1384
          }
          case 184: {
Jon Skeet's avatar
Jon Skeet committed
1385 1386
            singleImportEnum_ = (global::Google.Protobuf.TestProtos.ImportEnum) input.ReadEnum();
            break;
1387 1388 1389 1390 1391 1392 1393 1394 1395 1396
          }
          case 210: {
            if (singlePublicImportMessage_ == null) {
              singlePublicImportMessage_ = new global::Google.Protobuf.TestProtos.PublicImportMessage();
            }
            input.ReadMessage(singlePublicImportMessage_);
            break;
          }
          case 250:
          case 248: {
1397
            repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
1398 1399 1400 1401
            break;
          }
          case 258:
          case 256: {
1402
            repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
1403 1404 1405 1406
            break;
          }
          case 266:
          case 264: {
1407
            repeatedUint32_.AddEntriesFrom(input, _repeated_repeatedUint32_codec);
1408 1409 1410 1411
            break;
          }
          case 274:
          case 272: {
1412
            repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
1413 1414 1415 1416
            break;
          }
          case 282:
          case 280: {
1417
            repeatedSint32_.AddEntriesFrom(input, _repeated_repeatedSint32_codec);
1418 1419 1420 1421
            break;
          }
          case 290:
          case 288: {
1422
            repeatedSint64_.AddEntriesFrom(input, _repeated_repeatedSint64_codec);
1423 1424 1425 1426
            break;
          }
          case 298:
          case 301: {
1427
            repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
1428 1429 1430 1431
            break;
          }
          case 306:
          case 305: {
1432
            repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
1433 1434 1435 1436
            break;
          }
          case 314:
          case 317: {
1437
            repeatedSfixed32_.AddEntriesFrom(input, _repeated_repeatedSfixed32_codec);
1438 1439 1440 1441
            break;
          }
          case 322:
          case 321: {
1442
            repeatedSfixed64_.AddEntriesFrom(input, _repeated_repeatedSfixed64_codec);
1443 1444 1445 1446
            break;
          }
          case 330:
          case 333: {
1447
            repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
1448 1449 1450 1451
            break;
          }
          case 338:
          case 337: {
1452
            repeatedDouble_.AddEntriesFrom(input, _repeated_repeatedDouble_codec);
1453 1454 1455 1456
            break;
          }
          case 346:
          case 344: {
1457
            repeatedBool_.AddEntriesFrom(input, _repeated_repeatedBool_codec);
1458 1459 1460
            break;
          }
          case 354: {
1461
            repeatedString_.AddEntriesFrom(input, _repeated_repeatedString_codec);
1462 1463 1464
            break;
          }
          case 362: {
1465
            repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec);
1466 1467 1468
            break;
          }
          case 386: {
1469
            repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNestedMessage_codec);
1470 1471 1472
            break;
          }
          case 394: {
1473
            repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_codec);
1474 1475 1476
            break;
          }
          case 402: {
1477
            repeatedImportMessage_.AddEntriesFrom(input, _repeated_repeatedImportMessage_codec);
1478 1479 1480 1481
            break;
          }
          case 410:
          case 408: {
1482
            repeatedNestedEnum_.AddEntriesFrom(input, _repeated_repeatedNestedEnum_codec);
1483 1484 1485 1486
            break;
          }
          case 418:
          case 416: {
1487
            repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeignEnum_codec);
1488 1489 1490 1491
            break;
          }
          case 426:
          case 424: {
1492
            repeatedImportEnum_.AddEntriesFrom(input, _repeated_repeatedImportEnum_codec);
1493 1494 1495
            break;
          }
          case 434: {
1496
            repeatedPublicImportMessage_.AddEntriesFrom(input, _repeated_repeatedPublicImportMessage_codec);
1497 1498 1499
            break;
          }
          case 888: {
1500 1501
            OneofUint32 = input.ReadUInt32();
            break;
1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512
          }
          case 898: {
            global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
            if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
              subBuilder.MergeFrom(OneofNestedMessage);
            }
            input.ReadMessage(subBuilder);
            OneofNestedMessage = subBuilder;
            break;
          }
          case 906: {
1513 1514
            OneofString = input.ReadString();
            break;
1515 1516
          }
          case 914: {
1517 1518
            OneofBytes = input.ReadBytes();
            break;
1519 1520 1521 1522 1523 1524
          }
        }
      }
    }

    #region Nested types
1525
    /// <summary>Container for nested types declared in the TestAllTypes message type.</summary>
1526
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1527
    public static partial class Types {
1528
      public enum NestedEnum {
1529 1530 1531 1532
        NESTED_ENUM_UNSPECIFIED = 0,
        FOO = 1,
        BAR = 2,
        BAZ = 3,
1533 1534 1535
        /// <summary>
        ///  Intentionally negative.
        /// </summary>
1536 1537 1538 1539
        NEG = -1,
      }

      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1540
      public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
1541 1542 1543
        private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
        public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }

1544
        public static pbr::MessageDescriptor Descriptor {
1545
          get { return global::Google.Protobuf.TestProtos.TestAllTypes.Descriptor.NestedTypes[0]; }
1546 1547
        }

1548 1549
        pbr::MessageDescriptor pb::IMessage.Descriptor {
          get { return Descriptor; }
1550 1551
        }

1552 1553 1554
        public NestedMessage() {
          OnConstruction();
        }
Jon Skeet's avatar
Jon Skeet committed
1555

1556 1557 1558
        partial void OnConstruction();

        public NestedMessage(NestedMessage other) : this() {
Jon Skeet's avatar
Jon Skeet committed
1559 1560 1561 1562 1563
          bb_ = other.bb_;
        }

        public NestedMessage Clone() {
          return new NestedMessage(this);
1564
        }
Jon Skeet's avatar
Jon Skeet committed
1565

1566
        /// <summary>Field number for the "bb" field.</summary>
1567 1568
        public const int BbFieldNumber = 1;
        private int bb_;
1569 1570 1571 1572 1573
        /// <summary>
        ///  The field name "b" fails to compile in proto1 because it conflicts with
        ///  a local variable named "b" in one of the generated methods.  Doh.
        ///  This file needs to compile in proto1 to test backwards-compatibility.
        /// </summary>
1574 1575
        public int Bb {
          get { return bb_; }
1576 1577 1578
          set {
            bb_ = value;
          }
1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596
        }

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

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

        public override int GetHashCode() {
1597
          int hash = 1;
1598 1599 1600 1601
          if (Bb != 0) hash ^= Bb.GetHashCode();
          return hash;
        }

1602
        public override string ToString() {
1603
          return pb::JsonFormatter.ToDiagnosticString(this);
1604 1605
        }

Jon Skeet's avatar
Jon Skeet committed
1606
        public void WriteTo(pb::CodedOutputStream output) {
1607
          if (Bb != 0) {
1608 1609
            output.WriteRawTag(8);
            output.WriteInt32(Bb);
1610 1611 1612 1613 1614 1615
          }
        }

        public int CalculateSize() {
          int size = 0;
          if (Bb != 0) {
1616
            size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb);
1617 1618 1619
          }
          return size;
        }
1620

1621 1622 1623 1624 1625 1626 1627 1628 1629
        public void MergeFrom(NestedMessage other) {
          if (other == null) {
            return;
          }
          if (other.Bb != 0) {
            Bb = other.Bb;
          }
        }

Jon Skeet's avatar
Jon Skeet committed
1630
        public void MergeFrom(pb::CodedInputStream input) {
1631
          uint tag;
1632
          while ((tag = input.ReadTag()) != 0) {
1633 1634
            switch(tag) {
              default:
1635
                input.SkipLastField();
1636 1637
                break;
              case 8: {
Jon Skeet's avatar
Jon Skeet committed
1638
                Bb = input.ReadInt32();
1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651
                break;
              }
            }
          }
        }

      }

    }
    #endregion

  }

1652 1653 1654
  /// <summary>
  ///  This proto includes a recusively nested message.
  /// </summary>
1655
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1656
  public sealed partial class NestedTestAllTypes : pb::IMessage<NestedTestAllTypes> {
1657 1658 1659
    private static readonly pb::MessageParser<NestedTestAllTypes> _parser = new pb::MessageParser<NestedTestAllTypes>(() => new NestedTestAllTypes());
    public static pb::MessageParser<NestedTestAllTypes> Parser { get { return _parser; } }

1660
    public static pbr::MessageDescriptor Descriptor {
1661
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[1]; }
1662 1663
    }

1664 1665
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
1666 1667
    }

1668 1669 1670
    public NestedTestAllTypes() {
      OnConstruction();
    }
Jon Skeet's avatar
Jon Skeet committed
1671

1672 1673 1674
    partial void OnConstruction();

    public NestedTestAllTypes(NestedTestAllTypes other) : this() {
Jon Skeet's avatar
Jon Skeet committed
1675 1676 1677
      Child = other.child_ != null ? other.Child.Clone() : null;
      Payload = other.payload_ != null ? other.Payload.Clone() : null;
      repeatedChild_ = other.repeatedChild_.Clone();
1678
    }
Jon Skeet's avatar
Jon Skeet committed
1679 1680 1681 1682 1683

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

1684
    /// <summary>Field number for the "child" field.</summary>
1685 1686 1687 1688
    public const int ChildFieldNumber = 1;
    private global::Google.Protobuf.TestProtos.NestedTestAllTypes child_;
    public global::Google.Protobuf.TestProtos.NestedTestAllTypes Child {
      get { return child_; }
1689 1690 1691
      set {
        child_ = value;
      }
1692 1693
    }

1694
    /// <summary>Field number for the "payload" field.</summary>
1695 1696 1697 1698
    public const int PayloadFieldNumber = 2;
    private global::Google.Protobuf.TestProtos.TestAllTypes payload_;
    public global::Google.Protobuf.TestProtos.TestAllTypes Payload {
      get { return payload_; }
1699 1700 1701
      set {
        payload_ = value;
      }
1702 1703
    }

1704
    /// <summary>Field number for the "repeated_child" field.</summary>
1705
    public const int RepeatedChildFieldNumber = 3;
1706 1707
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.NestedTestAllTypes> _repeated_repeatedChild_codec
        = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.NestedTestAllTypes.Parser);
1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes> repeatedChild_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes>();
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes> RepeatedChild {
      get { return repeatedChild_; }
    }

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

    public bool Equals(NestedTestAllTypes other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
1724 1725 1726
      if (!object.Equals(Child, other.Child)) return false;
      if (!object.Equals(Payload, other.Payload)) return false;
      if(!repeatedChild_.Equals(other.repeatedChild_)) return false;
1727 1728 1729 1730
      return true;
    }

    public override int GetHashCode() {
1731
      int hash = 1;
1732 1733 1734 1735 1736 1737
      if (child_ != null) hash ^= Child.GetHashCode();
      if (payload_ != null) hash ^= Payload.GetHashCode();
      hash ^= repeatedChild_.GetHashCode();
      return hash;
    }

1738
    public override string ToString() {
1739
      return pb::JsonFormatter.ToDiagnosticString(this);
1740 1741
    }

Jon Skeet's avatar
Jon Skeet committed
1742
    public void WriteTo(pb::CodedOutputStream output) {
1743
      if (child_ != null) {
1744 1745
        output.WriteRawTag(10);
        output.WriteMessage(Child);
1746 1747
      }
      if (payload_ != null) {
1748 1749
        output.WriteRawTag(18);
        output.WriteMessage(Payload);
1750
      }
1751
      repeatedChild_.WriteTo(output, _repeated_repeatedChild_codec);
1752 1753 1754 1755 1756
    }

    public int CalculateSize() {
      int size = 0;
      if (child_ != null) {
1757
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Child);
1758 1759
      }
      if (payload_ != null) {
1760
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload);
1761
      }
1762
      size += repeatedChild_.CalculateSize(_repeated_repeatedChild_codec);
1763 1764
      return size;
    }
1765

1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784
    public void MergeFrom(NestedTestAllTypes other) {
      if (other == null) {
        return;
      }
      if (other.child_ != null) {
        if (child_ == null) {
          child_ = new global::Google.Protobuf.TestProtos.NestedTestAllTypes();
        }
        Child.MergeFrom(other.Child);
      }
      if (other.payload_ != null) {
        if (payload_ == null) {
          payload_ = new global::Google.Protobuf.TestProtos.TestAllTypes();
        }
        Payload.MergeFrom(other.Payload);
      }
      repeatedChild_.Add(other.repeatedChild_);
    }

Jon Skeet's avatar
Jon Skeet committed
1785
    public void MergeFrom(pb::CodedInputStream input) {
1786
      uint tag;
1787
      while ((tag = input.ReadTag()) != 0) {
1788 1789
        switch(tag) {
          default:
1790
            input.SkipLastField();
1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806
            break;
          case 10: {
            if (child_ == null) {
              child_ = new global::Google.Protobuf.TestProtos.NestedTestAllTypes();
            }
            input.ReadMessage(child_);
            break;
          }
          case 18: {
            if (payload_ == null) {
              payload_ = new global::Google.Protobuf.TestProtos.TestAllTypes();
            }
            input.ReadMessage(payload_);
            break;
          }
          case 26: {
1807
            repeatedChild_.AddEntriesFrom(input, _repeated_repeatedChild_codec);
1808 1809 1810 1811 1812 1813 1814 1815 1816
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1817
  public sealed partial class TestDeprecatedFields : pb::IMessage<TestDeprecatedFields> {
1818 1819 1820
    private static readonly pb::MessageParser<TestDeprecatedFields> _parser = new pb::MessageParser<TestDeprecatedFields>(() => new TestDeprecatedFields());
    public static pb::MessageParser<TestDeprecatedFields> Parser { get { return _parser; } }

1821
    public static pbr::MessageDescriptor Descriptor {
1822
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[2]; }
1823 1824
    }

1825 1826
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
1827 1828
    }

1829 1830 1831 1832 1833
    public TestDeprecatedFields() {
      OnConstruction();
    }

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

1835
    public TestDeprecatedFields(TestDeprecatedFields other) : this() {
Jon Skeet's avatar
Jon Skeet committed
1836 1837 1838 1839 1840
      deprecatedInt32_ = other.deprecatedInt32_;
    }

    public TestDeprecatedFields Clone() {
      return new TestDeprecatedFields(this);
1841
    }
Jon Skeet's avatar
Jon Skeet committed
1842

1843
    /// <summary>Field number for the "deprecated_int32" field.</summary>
1844 1845 1846 1847 1848
    public const int DeprecatedInt32FieldNumber = 1;
    private int deprecatedInt32_;
    [global::System.ObsoleteAttribute()]
    public int DeprecatedInt32 {
      get { return deprecatedInt32_; }
1849 1850 1851
      set {
        deprecatedInt32_ = value;
      }
1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869
    }

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

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

    public override int GetHashCode() {
1870
      int hash = 1;
1871 1872 1873 1874
      if (DeprecatedInt32 != 0) hash ^= DeprecatedInt32.GetHashCode();
      return hash;
    }

1875
    public override string ToString() {
1876
      return pb::JsonFormatter.ToDiagnosticString(this);
1877 1878
    }

Jon Skeet's avatar
Jon Skeet committed
1879
    public void WriteTo(pb::CodedOutputStream output) {
1880
      if (DeprecatedInt32 != 0) {
1881 1882
        output.WriteRawTag(8);
        output.WriteInt32(DeprecatedInt32);
1883 1884 1885 1886 1887 1888
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (DeprecatedInt32 != 0) {
1889
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeprecatedInt32);
1890 1891 1892
      }
      return size;
    }
1893

1894 1895 1896 1897 1898 1899 1900 1901 1902
    public void MergeFrom(TestDeprecatedFields other) {
      if (other == null) {
        return;
      }
      if (other.DeprecatedInt32 != 0) {
        DeprecatedInt32 = other.DeprecatedInt32;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
1903
    public void MergeFrom(pb::CodedInputStream input) {
1904
      uint tag;
1905
      while ((tag = input.ReadTag()) != 0) {
1906 1907
        switch(tag) {
          default:
1908
            input.SkipLastField();
1909 1910
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
1911
            DeprecatedInt32 = input.ReadInt32();
1912 1913 1914 1915 1916 1917 1918 1919
            break;
          }
        }
      }
    }

  }

1920 1921 1922 1923
  /// <summary>
  ///  Define these after TestAllTypes to make sure the compiler can handle
  ///  that.
  /// </summary>
1924
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1925
  public sealed partial class ForeignMessage : pb::IMessage<ForeignMessage> {
1926 1927 1928
    private static readonly pb::MessageParser<ForeignMessage> _parser = new pb::MessageParser<ForeignMessage>(() => new ForeignMessage());
    public static pb::MessageParser<ForeignMessage> Parser { get { return _parser; } }

1929
    public static pbr::MessageDescriptor Descriptor {
1930
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[3]; }
1931 1932
    }

1933 1934
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
1935 1936
    }

1937 1938 1939 1940 1941
    public ForeignMessage() {
      OnConstruction();
    }

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

1943
    public ForeignMessage(ForeignMessage other) : this() {
Jon Skeet's avatar
Jon Skeet committed
1944
      c_ = other.c_;
1945
    }
Jon Skeet's avatar
Jon Skeet committed
1946 1947 1948 1949 1950

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

1951
    /// <summary>Field number for the "c" field.</summary>
1952 1953 1954 1955
    public const int CFieldNumber = 1;
    private int c_;
    public int C {
      get { return c_; }
1956 1957 1958
      set {
        c_ = value;
      }
1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976
    }

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

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

    public override int GetHashCode() {
1977
      int hash = 1;
1978 1979 1980 1981
      if (C != 0) hash ^= C.GetHashCode();
      return hash;
    }

1982
    public override string ToString() {
1983
      return pb::JsonFormatter.ToDiagnosticString(this);
1984 1985
    }

Jon Skeet's avatar
Jon Skeet committed
1986
    public void WriteTo(pb::CodedOutputStream output) {
1987
      if (C != 0) {
1988 1989
        output.WriteRawTag(8);
        output.WriteInt32(C);
1990 1991 1992 1993 1994 1995
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (C != 0) {
1996
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(C);
1997 1998 1999
      }
      return size;
    }
2000

2001 2002 2003 2004 2005 2006 2007 2008 2009
    public void MergeFrom(ForeignMessage other) {
      if (other == null) {
        return;
      }
      if (other.C != 0) {
        C = other.C;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
2010
    public void MergeFrom(pb::CodedInputStream input) {
2011
      uint tag;
2012
      while ((tag = input.ReadTag()) != 0) {
2013 2014
        switch(tag) {
          default:
2015
            input.SkipLastField();
2016 2017
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
2018
            C = input.ReadInt32();
2019 2020 2021 2022 2023 2024 2025 2026 2027
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2028
  public sealed partial class TestReservedFields : pb::IMessage<TestReservedFields> {
2029 2030 2031
    private static readonly pb::MessageParser<TestReservedFields> _parser = new pb::MessageParser<TestReservedFields>(() => new TestReservedFields());
    public static pb::MessageParser<TestReservedFields> Parser { get { return _parser; } }

2032
    public static pbr::MessageDescriptor Descriptor {
2033
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[4]; }
2034 2035
    }

2036 2037
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
2038 2039
    }

2040 2041 2042 2043 2044
    public TestReservedFields() {
      OnConstruction();
    }

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

2046
    public TestReservedFields(TestReservedFields other) : this() {
2047
    }
Jon Skeet's avatar
Jon Skeet committed
2048 2049 2050 2051 2052

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

2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067
    public override bool Equals(object other) {
      return Equals(other as TestReservedFields);
    }

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

    public override int GetHashCode() {
2068
      int hash = 1;
2069 2070 2071
      return hash;
    }

2072
    public override string ToString() {
2073
      return pb::JsonFormatter.ToDiagnosticString(this);
2074 2075
    }

Jon Skeet's avatar
Jon Skeet committed
2076
    public void WriteTo(pb::CodedOutputStream output) {
2077 2078 2079 2080 2081 2082
    }

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

2084 2085 2086 2087 2088 2089
    public void MergeFrom(TestReservedFields other) {
      if (other == null) {
        return;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
2090
    public void MergeFrom(pb::CodedInputStream input) {
2091
      uint tag;
2092
      while ((tag = input.ReadTag()) != 0) {
2093 2094
        switch(tag) {
          default:
2095
            input.SkipLastField();
2096 2097 2098 2099 2100 2101 2102
            break;
        }
      }
    }

  }

2103 2104 2105
  /// <summary>
  ///  Test that we can use NestedMessage from outside TestAllTypes.
  /// </summary>
2106
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2107
  public sealed partial class TestForeignNested : pb::IMessage<TestForeignNested> {
2108 2109 2110
    private static readonly pb::MessageParser<TestForeignNested> _parser = new pb::MessageParser<TestForeignNested>(() => new TestForeignNested());
    public static pb::MessageParser<TestForeignNested> Parser { get { return _parser; } }

2111
    public static pbr::MessageDescriptor Descriptor {
2112
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[5]; }
2113 2114
    }

2115 2116
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
2117 2118
    }

2119 2120 2121 2122 2123
    public TestForeignNested() {
      OnConstruction();
    }

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

2125
    public TestForeignNested(TestForeignNested other) : this() {
Jon Skeet's avatar
Jon Skeet committed
2126 2127 2128 2129 2130
      ForeignNested = other.foreignNested_ != null ? other.ForeignNested.Clone() : null;
    }

    public TestForeignNested Clone() {
      return new TestForeignNested(this);
2131
    }
Jon Skeet's avatar
Jon Skeet committed
2132

2133
    /// <summary>Field number for the "foreign_nested" field.</summary>
2134 2135 2136 2137
    public const int ForeignNestedFieldNumber = 1;
    private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage foreignNested_;
    public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage ForeignNested {
      get { return foreignNested_; }
2138 2139 2140
      set {
        foreignNested_ = value;
      }
2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153
    }

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

    public bool Equals(TestForeignNested other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
2154 2155
      if (!object.Equals(ForeignNested, other.ForeignNested)) return false;
      return true;
2156 2157 2158
    }

    public override int GetHashCode() {
2159
      int hash = 1;
2160 2161 2162 2163
      if (foreignNested_ != null) hash ^= ForeignNested.GetHashCode();
      return hash;
    }

2164
    public override string ToString() {
2165
      return pb::JsonFormatter.ToDiagnosticString(this);
2166 2167
    }

Jon Skeet's avatar
Jon Skeet committed
2168
    public void WriteTo(pb::CodedOutputStream output) {
2169
      if (foreignNested_ != null) {
2170 2171
        output.WriteRawTag(10);
        output.WriteMessage(ForeignNested);
2172 2173 2174 2175 2176 2177
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (foreignNested_ != null) {
2178
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(ForeignNested);
2179 2180 2181
      }
      return size;
    }
2182

2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194
    public void MergeFrom(TestForeignNested other) {
      if (other == null) {
        return;
      }
      if (other.foreignNested_ != null) {
        if (foreignNested_ == null) {
          foreignNested_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
        }
        ForeignNested.MergeFrom(other.ForeignNested);
      }
    }

Jon Skeet's avatar
Jon Skeet committed
2195
    public void MergeFrom(pb::CodedInputStream input) {
2196
      uint tag;
2197
      while ((tag = input.ReadTag()) != 0) {
2198 2199
        switch(tag) {
          default:
2200
            input.SkipLastField();
2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214
            break;
          case 10: {
            if (foreignNested_ == null) {
              foreignNested_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
            }
            input.ReadMessage(foreignNested_);
            break;
          }
        }
      }
    }

  }

2215 2216 2217
  /// <summary>
  ///  Test that really large tag numbers don't break anything.
  /// </summary>
2218
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2219
  public sealed partial class TestReallyLargeTagNumber : pb::IMessage<TestReallyLargeTagNumber> {
2220 2221 2222
    private static readonly pb::MessageParser<TestReallyLargeTagNumber> _parser = new pb::MessageParser<TestReallyLargeTagNumber>(() => new TestReallyLargeTagNumber());
    public static pb::MessageParser<TestReallyLargeTagNumber> Parser { get { return _parser; } }

2223
    public static pbr::MessageDescriptor Descriptor {
2224
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[6]; }
2225 2226
    }

2227 2228
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
2229 2230
    }

2231 2232 2233 2234 2235
    public TestReallyLargeTagNumber() {
      OnConstruction();
    }

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

2237
    public TestReallyLargeTagNumber(TestReallyLargeTagNumber other) : this() {
Jon Skeet's avatar
Jon Skeet committed
2238 2239
      a_ = other.a_;
      bb_ = other.bb_;
2240
    }
Jon Skeet's avatar
Jon Skeet committed
2241 2242 2243 2244 2245

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

2246
    /// <summary>Field number for the "a" field.</summary>
2247 2248
    public const int AFieldNumber = 1;
    private int a_;
2249 2250 2251 2252
    /// <summary>
    ///  The largest possible tag number is 2^28 - 1, since the wire format uses
    ///  three bits to communicate wire type.
    /// </summary>
2253 2254
    public int A {
      get { return a_; }
2255 2256 2257
      set {
        a_ = value;
      }
2258 2259
    }

2260
    /// <summary>Field number for the "bb" field.</summary>
2261 2262 2263 2264
    public const int BbFieldNumber = 268435455;
    private int bb_;
    public int Bb {
      get { return bb_; }
2265 2266 2267
      set {
        bb_ = value;
      }
2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286
    }

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

    public bool Equals(TestReallyLargeTagNumber other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (A != other.A) return false;
      if (Bb != other.Bb) return false;
      return true;
    }

    public override int GetHashCode() {
2287
      int hash = 1;
2288 2289 2290 2291 2292
      if (A != 0) hash ^= A.GetHashCode();
      if (Bb != 0) hash ^= Bb.GetHashCode();
      return hash;
    }

2293
    public override string ToString() {
2294
      return pb::JsonFormatter.ToDiagnosticString(this);
2295 2296
    }

Jon Skeet's avatar
Jon Skeet committed
2297
    public void WriteTo(pb::CodedOutputStream output) {
2298
      if (A != 0) {
2299 2300
        output.WriteRawTag(8);
        output.WriteInt32(A);
2301 2302
      }
      if (Bb != 0) {
2303 2304
        output.WriteRawTag(248, 255, 255, 255, 7);
        output.WriteInt32(Bb);
2305 2306 2307 2308 2309 2310
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (A != 0) {
2311
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
2312 2313
      }
      if (Bb != 0) {
2314
        size += 5 + pb::CodedOutputStream.ComputeInt32Size(Bb);
2315 2316 2317
      }
      return size;
    }
2318

2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330
    public void MergeFrom(TestReallyLargeTagNumber other) {
      if (other == null) {
        return;
      }
      if (other.A != 0) {
        A = other.A;
      }
      if (other.Bb != 0) {
        Bb = other.Bb;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
2331
    public void MergeFrom(pb::CodedInputStream input) {
2332
      uint tag;
2333
      while ((tag = input.ReadTag()) != 0) {
2334 2335
        switch(tag) {
          default:
2336
            input.SkipLastField();
2337 2338
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
2339
            A = input.ReadInt32();
2340 2341 2342
            break;
          }
          case 2147483640: {
Jon Skeet's avatar
Jon Skeet committed
2343
            Bb = input.ReadInt32();
2344 2345 2346 2347 2348 2349 2350 2351 2352
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2353
  public sealed partial class TestRecursiveMessage : pb::IMessage<TestRecursiveMessage> {
2354 2355 2356
    private static readonly pb::MessageParser<TestRecursiveMessage> _parser = new pb::MessageParser<TestRecursiveMessage>(() => new TestRecursiveMessage());
    public static pb::MessageParser<TestRecursiveMessage> Parser { get { return _parser; } }

2357
    public static pbr::MessageDescriptor Descriptor {
2358
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[7]; }
2359 2360
    }

2361 2362
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
2363 2364
    }

2365 2366 2367 2368 2369
    public TestRecursiveMessage() {
      OnConstruction();
    }

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

2371
    public TestRecursiveMessage(TestRecursiveMessage other) : this() {
Jon Skeet's avatar
Jon Skeet committed
2372 2373 2374 2375 2376 2377
      A = other.a_ != null ? other.A.Clone() : null;
      i_ = other.i_;
    }

    public TestRecursiveMessage Clone() {
      return new TestRecursiveMessage(this);
2378
    }
Jon Skeet's avatar
Jon Skeet committed
2379

2380
    /// <summary>Field number for the "a" field.</summary>
2381 2382 2383 2384
    public const int AFieldNumber = 1;
    private global::Google.Protobuf.TestProtos.TestRecursiveMessage a_;
    public global::Google.Protobuf.TestProtos.TestRecursiveMessage A {
      get { return a_; }
2385 2386 2387
      set {
        a_ = value;
      }
2388 2389
    }

2390
    /// <summary>Field number for the "i" field.</summary>
2391 2392 2393 2394
    public const int IFieldNumber = 2;
    private int i_;
    public int I {
      get { return i_; }
2395 2396 2397
      set {
        i_ = value;
      }
2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
    }

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

    public bool Equals(TestRecursiveMessage other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
2411 2412
      if (!object.Equals(A, other.A)) return false;
      if (I != other.I) return false;
2413 2414 2415 2416
      return true;
    }

    public override int GetHashCode() {
2417
      int hash = 1;
2418 2419 2420 2421 2422
      if (a_ != null) hash ^= A.GetHashCode();
      if (I != 0) hash ^= I.GetHashCode();
      return hash;
    }

2423
    public override string ToString() {
2424
      return pb::JsonFormatter.ToDiagnosticString(this);
2425 2426
    }

Jon Skeet's avatar
Jon Skeet committed
2427
    public void WriteTo(pb::CodedOutputStream output) {
2428
      if (a_ != null) {
2429 2430
        output.WriteRawTag(10);
        output.WriteMessage(A);
2431 2432
      }
      if (I != 0) {
2433 2434
        output.WriteRawTag(16);
        output.WriteInt32(I);
2435 2436 2437 2438 2439 2440
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (a_ != null) {
2441
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(A);
2442 2443
      }
      if (I != 0) {
2444
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(I);
2445 2446 2447
      }
      return size;
    }
2448

2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463
    public void MergeFrom(TestRecursiveMessage other) {
      if (other == null) {
        return;
      }
      if (other.a_ != null) {
        if (a_ == null) {
          a_ = new global::Google.Protobuf.TestProtos.TestRecursiveMessage();
        }
        A.MergeFrom(other.A);
      }
      if (other.I != 0) {
        I = other.I;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
2464
    public void MergeFrom(pb::CodedInputStream input) {
2465
      uint tag;
2466
      while ((tag = input.ReadTag()) != 0) {
2467 2468
        switch(tag) {
          default:
2469
            input.SkipLastField();
2470 2471 2472 2473 2474 2475 2476 2477 2478
            break;
          case 10: {
            if (a_ == null) {
              a_ = new global::Google.Protobuf.TestProtos.TestRecursiveMessage();
            }
            input.ReadMessage(a_);
            break;
          }
          case 16: {
Jon Skeet's avatar
Jon Skeet committed
2479
            I = input.ReadInt32();
2480 2481 2482 2483 2484 2485 2486 2487
            break;
          }
        }
      }
    }

  }

2488 2489 2490
  /// <summary>
  ///  Test that mutual recursion works.
  /// </summary>
2491
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2492
  public sealed partial class TestMutualRecursionA : pb::IMessage<TestMutualRecursionA> {
2493 2494 2495
    private static readonly pb::MessageParser<TestMutualRecursionA> _parser = new pb::MessageParser<TestMutualRecursionA>(() => new TestMutualRecursionA());
    public static pb::MessageParser<TestMutualRecursionA> Parser { get { return _parser; } }

2496
    public static pbr::MessageDescriptor Descriptor {
2497
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[8]; }
2498 2499
    }

2500 2501
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
2502 2503
    }

2504 2505 2506 2507 2508
    public TestMutualRecursionA() {
      OnConstruction();
    }

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

2510
    public TestMutualRecursionA(TestMutualRecursionA other) : this() {
Jon Skeet's avatar
Jon Skeet committed
2511
      Bb = other.bb_ != null ? other.Bb.Clone() : null;
2512
    }
Jon Skeet's avatar
Jon Skeet committed
2513 2514 2515 2516 2517

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

2518
    /// <summary>Field number for the "bb" field.</summary>
2519 2520 2521 2522
    public const int BbFieldNumber = 1;
    private global::Google.Protobuf.TestProtos.TestMutualRecursionB bb_;
    public global::Google.Protobuf.TestProtos.TestMutualRecursionB Bb {
      get { return bb_; }
2523 2524 2525
      set {
        bb_ = value;
      }
2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538
    }

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

    public bool Equals(TestMutualRecursionA other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
2539 2540
      if (!object.Equals(Bb, other.Bb)) return false;
      return true;
2541 2542 2543
    }

    public override int GetHashCode() {
2544
      int hash = 1;
2545 2546 2547 2548
      if (bb_ != null) hash ^= Bb.GetHashCode();
      return hash;
    }

2549
    public override string ToString() {
2550
      return pb::JsonFormatter.ToDiagnosticString(this);
2551 2552
    }

Jon Skeet's avatar
Jon Skeet committed
2553
    public void WriteTo(pb::CodedOutputStream output) {
2554
      if (bb_ != null) {
2555 2556
        output.WriteRawTag(10);
        output.WriteMessage(Bb);
2557 2558 2559 2560 2561 2562
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (bb_ != null) {
2563
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bb);
2564 2565 2566
      }
      return size;
    }
2567

2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579
    public void MergeFrom(TestMutualRecursionA other) {
      if (other == null) {
        return;
      }
      if (other.bb_ != null) {
        if (bb_ == null) {
          bb_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionB();
        }
        Bb.MergeFrom(other.Bb);
      }
    }

Jon Skeet's avatar
Jon Skeet committed
2580
    public void MergeFrom(pb::CodedInputStream input) {
2581
      uint tag;
2582
      while ((tag = input.ReadTag()) != 0) {
2583 2584
        switch(tag) {
          default:
2585
            input.SkipLastField();
2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600
            break;
          case 10: {
            if (bb_ == null) {
              bb_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionB();
            }
            input.ReadMessage(bb_);
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2601
  public sealed partial class TestMutualRecursionB : pb::IMessage<TestMutualRecursionB> {
2602 2603 2604
    private static readonly pb::MessageParser<TestMutualRecursionB> _parser = new pb::MessageParser<TestMutualRecursionB>(() => new TestMutualRecursionB());
    public static pb::MessageParser<TestMutualRecursionB> Parser { get { return _parser; } }

2605
    public static pbr::MessageDescriptor Descriptor {
2606
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[9]; }
2607 2608
    }

2609 2610
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
2611 2612
    }

2613 2614 2615
    public TestMutualRecursionB() {
      OnConstruction();
    }
Jon Skeet's avatar
Jon Skeet committed
2616

2617 2618 2619
    partial void OnConstruction();

    public TestMutualRecursionB(TestMutualRecursionB other) : this() {
Jon Skeet's avatar
Jon Skeet committed
2620 2621 2622 2623 2624 2625
      A = other.a_ != null ? other.A.Clone() : null;
      optionalInt32_ = other.optionalInt32_;
    }

    public TestMutualRecursionB Clone() {
      return new TestMutualRecursionB(this);
2626
    }
Jon Skeet's avatar
Jon Skeet committed
2627

2628
    /// <summary>Field number for the "a" field.</summary>
2629 2630 2631 2632
    public const int AFieldNumber = 1;
    private global::Google.Protobuf.TestProtos.TestMutualRecursionA a_;
    public global::Google.Protobuf.TestProtos.TestMutualRecursionA A {
      get { return a_; }
2633 2634 2635
      set {
        a_ = value;
      }
2636 2637
    }

2638
    /// <summary>Field number for the "optional_int32" field.</summary>
2639 2640 2641 2642
    public const int OptionalInt32FieldNumber = 2;
    private int optionalInt32_;
    public int OptionalInt32 {
      get { return optionalInt32_; }
2643 2644 2645
      set {
        optionalInt32_ = value;
      }
2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658
    }

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

    public bool Equals(TestMutualRecursionB other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
2659 2660
      if (!object.Equals(A, other.A)) return false;
      if (OptionalInt32 != other.OptionalInt32) return false;
2661 2662 2663 2664
      return true;
    }

    public override int GetHashCode() {
2665
      int hash = 1;
2666 2667 2668 2669 2670
      if (a_ != null) hash ^= A.GetHashCode();
      if (OptionalInt32 != 0) hash ^= OptionalInt32.GetHashCode();
      return hash;
    }

2671
    public override string ToString() {
2672
      return pb::JsonFormatter.ToDiagnosticString(this);
2673 2674
    }

Jon Skeet's avatar
Jon Skeet committed
2675
    public void WriteTo(pb::CodedOutputStream output) {
2676
      if (a_ != null) {
2677 2678
        output.WriteRawTag(10);
        output.WriteMessage(A);
2679 2680
      }
      if (OptionalInt32 != 0) {
2681 2682
        output.WriteRawTag(16);
        output.WriteInt32(OptionalInt32);
2683 2684 2685 2686 2687 2688
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (a_ != null) {
2689
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(A);
2690 2691
      }
      if (OptionalInt32 != 0) {
2692
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32);
2693 2694 2695
      }
      return size;
    }
2696

2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711
    public void MergeFrom(TestMutualRecursionB other) {
      if (other == null) {
        return;
      }
      if (other.a_ != null) {
        if (a_ == null) {
          a_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionA();
        }
        A.MergeFrom(other.A);
      }
      if (other.OptionalInt32 != 0) {
        OptionalInt32 = other.OptionalInt32;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
2712
    public void MergeFrom(pb::CodedInputStream input) {
2713
      uint tag;
2714
      while ((tag = input.ReadTag()) != 0) {
2715 2716
        switch(tag) {
          default:
2717
            input.SkipLastField();
2718 2719 2720 2721 2722 2723 2724 2725 2726
            break;
          case 10: {
            if (a_ == null) {
              a_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionA();
            }
            input.ReadMessage(a_);
            break;
          }
          case 16: {
Jon Skeet's avatar
Jon Skeet committed
2727
            OptionalInt32 = input.ReadInt32();
2728 2729 2730 2731 2732 2733 2734 2735
            break;
          }
        }
      }
    }

  }

2736 2737 2738 2739
  /// <summary>
  ///  Test message with CamelCase field names.  This violates Protocol Buffer
  ///  standard style.
  /// </summary>
2740
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
2741
  public sealed partial class TestCamelCaseFieldNames : pb::IMessage<TestCamelCaseFieldNames> {
2742 2743 2744
    private static readonly pb::MessageParser<TestCamelCaseFieldNames> _parser = new pb::MessageParser<TestCamelCaseFieldNames>(() => new TestCamelCaseFieldNames());
    public static pb::MessageParser<TestCamelCaseFieldNames> Parser { get { return _parser; } }

2745
    public static pbr::MessageDescriptor Descriptor {
2746
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[10]; }
2747 2748
    }

2749 2750
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
2751 2752
    }

2753 2754 2755
    public TestCamelCaseFieldNames() {
      OnConstruction();
    }
Jon Skeet's avatar
Jon Skeet committed
2756

2757 2758 2759
    partial void OnConstruction();

    public TestCamelCaseFieldNames(TestCamelCaseFieldNames other) : this() {
Jon Skeet's avatar
Jon Skeet committed
2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771
      primitiveField_ = other.primitiveField_;
      stringField_ = other.stringField_;
      enumField_ = other.enumField_;
      MessageField = other.messageField_ != null ? other.MessageField.Clone() : null;
      repeatedPrimitiveField_ = other.repeatedPrimitiveField_.Clone();
      repeatedStringField_ = other.repeatedStringField_.Clone();
      repeatedEnumField_ = other.repeatedEnumField_.Clone();
      repeatedMessageField_ = other.repeatedMessageField_.Clone();
    }

    public TestCamelCaseFieldNames Clone() {
      return new TestCamelCaseFieldNames(this);
2772
    }
Jon Skeet's avatar
Jon Skeet committed
2773

2774
    /// <summary>Field number for the "PrimitiveField" field.</summary>
2775 2776 2777 2778
    public const int PrimitiveFieldFieldNumber = 1;
    private int primitiveField_;
    public int PrimitiveField {
      get { return primitiveField_; }
2779 2780 2781
      set {
        primitiveField_ = value;
      }
2782 2783
    }

2784
    /// <summary>Field number for the "StringField" field.</summary>
2785 2786 2787 2788
    public const int StringFieldFieldNumber = 2;
    private string stringField_ = "";
    public string StringField {
      get { return stringField_; }
2789
      set {
2790
        stringField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2791
      }
2792 2793
    }

2794
    /// <summary>Field number for the "EnumField" field.</summary>
2795 2796 2797 2798
    public const int EnumFieldFieldNumber = 3;
    private global::Google.Protobuf.TestProtos.ForeignEnum enumField_ = global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED;
    public global::Google.Protobuf.TestProtos.ForeignEnum EnumField {
      get { return enumField_; }
2799 2800 2801
      set {
        enumField_ = value;
      }
2802 2803
    }

2804
    /// <summary>Field number for the "MessageField" field.</summary>
2805 2806 2807 2808
    public const int MessageFieldFieldNumber = 4;
    private global::Google.Protobuf.TestProtos.ForeignMessage messageField_;
    public global::Google.Protobuf.TestProtos.ForeignMessage MessageField {
      get { return messageField_; }
2809 2810 2811
      set {
        messageField_ = value;
      }
2812 2813
    }

2814
    /// <summary>Field number for the "RepeatedPrimitiveField" field.</summary>
2815
    public const int RepeatedPrimitiveFieldFieldNumber = 7;
2816 2817
    private static readonly pb::FieldCodec<int> _repeated_repeatedPrimitiveField_codec
        = pb::FieldCodec.ForInt32(58);
2818 2819 2820 2821 2822
    private readonly pbc::RepeatedField<int> repeatedPrimitiveField_ = new pbc::RepeatedField<int>();
    public pbc::RepeatedField<int> RepeatedPrimitiveField {
      get { return repeatedPrimitiveField_; }
    }

2823
    /// <summary>Field number for the "RepeatedStringField" field.</summary>
2824
    public const int RepeatedStringFieldFieldNumber = 8;
2825 2826
    private static readonly pb::FieldCodec<string> _repeated_repeatedStringField_codec
        = pb::FieldCodec.ForString(66);
2827 2828 2829 2830 2831
    private readonly pbc::RepeatedField<string> repeatedStringField_ = new pbc::RepeatedField<string>();
    public pbc::RepeatedField<string> RepeatedStringField {
      get { return repeatedStringField_; }
    }

2832
    /// <summary>Field number for the "RepeatedEnumField" field.</summary>
2833
    public const int RepeatedEnumFieldFieldNumber = 9;
2834
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_repeatedEnumField_codec
2835 2836
        = pb::FieldCodec.ForEnum(74, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> repeatedEnumField_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
2837 2838 2839 2840
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> RepeatedEnumField {
      get { return repeatedEnumField_; }
    }

2841
    /// <summary>Field number for the "RepeatedMessageField" field.</summary>
2842
    public const int RepeatedMessageFieldFieldNumber = 10;
2843 2844
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignMessage> _repeated_repeatedMessageField_codec
        = pb::FieldCodec.ForMessage(82, global::Google.Protobuf.TestProtos.ForeignMessage.Parser);
2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> repeatedMessageField_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage>();
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> RepeatedMessageField {
      get { return repeatedMessageField_; }
    }

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

    public bool Equals(TestCamelCaseFieldNames other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (PrimitiveField != other.PrimitiveField) return false;
      if (StringField != other.StringField) return false;
      if (EnumField != other.EnumField) return false;
2864 2865
      if (!object.Equals(MessageField, other.MessageField)) return false;
      if(!repeatedPrimitiveField_.Equals(other.repeatedPrimitiveField_)) return false;
2866 2867 2868 2869 2870 2871 2872
      if(!repeatedStringField_.Equals(other.repeatedStringField_)) return false;
      if(!repeatedEnumField_.Equals(other.repeatedEnumField_)) return false;
      if(!repeatedMessageField_.Equals(other.repeatedMessageField_)) return false;
      return true;
    }

    public override int GetHashCode() {
2873
      int hash = 1;
2874
      if (PrimitiveField != 0) hash ^= PrimitiveField.GetHashCode();
Jon Skeet's avatar
Jon Skeet committed
2875
      if (StringField.Length != 0) hash ^= StringField.GetHashCode();
2876 2877 2878 2879 2880 2881 2882 2883 2884
      if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) hash ^= EnumField.GetHashCode();
      if (messageField_ != null) hash ^= MessageField.GetHashCode();
      hash ^= repeatedPrimitiveField_.GetHashCode();
      hash ^= repeatedStringField_.GetHashCode();
      hash ^= repeatedEnumField_.GetHashCode();
      hash ^= repeatedMessageField_.GetHashCode();
      return hash;
    }

2885
    public override string ToString() {
2886
      return pb::JsonFormatter.ToDiagnosticString(this);
2887 2888
    }

Jon Skeet's avatar
Jon Skeet committed
2889
    public void WriteTo(pb::CodedOutputStream output) {
2890
      if (PrimitiveField != 0) {
2891 2892
        output.WriteRawTag(8);
        output.WriteInt32(PrimitiveField);
2893
      }
Jon Skeet's avatar
Jon Skeet committed
2894
      if (StringField.Length != 0) {
2895 2896
        output.WriteRawTag(18);
        output.WriteString(StringField);
2897 2898
      }
      if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
2899 2900
        output.WriteRawTag(24);
        output.WriteEnum((int) EnumField);
2901 2902
      }
      if (messageField_ != null) {
2903 2904
        output.WriteRawTag(34);
        output.WriteMessage(MessageField);
2905
      }
2906 2907 2908 2909
      repeatedPrimitiveField_.WriteTo(output, _repeated_repeatedPrimitiveField_codec);
      repeatedStringField_.WriteTo(output, _repeated_repeatedStringField_codec);
      repeatedEnumField_.WriteTo(output, _repeated_repeatedEnumField_codec);
      repeatedMessageField_.WriteTo(output, _repeated_repeatedMessageField_codec);
2910 2911 2912 2913 2914
    }

    public int CalculateSize() {
      int size = 0;
      if (PrimitiveField != 0) {
2915
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveField);
2916
      }
Jon Skeet's avatar
Jon Skeet committed
2917
      if (StringField.Length != 0) {
2918
        size += 1 + pb::CodedOutputStream.ComputeStringSize(StringField);
2919 2920
      }
      if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
2921
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumField);
2922 2923
      }
      if (messageField_ != null) {
2924
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageField);
2925
      }
2926 2927 2928 2929
      size += repeatedPrimitiveField_.CalculateSize(_repeated_repeatedPrimitiveField_codec);
      size += repeatedStringField_.CalculateSize(_repeated_repeatedStringField_codec);
      size += repeatedEnumField_.CalculateSize(_repeated_repeatedEnumField_codec);
      size += repeatedMessageField_.CalculateSize(_repeated_repeatedMessageField_codec);
2930 2931
      return size;
    }
2932

2933 2934 2935 2936 2937 2938 2939
    public void MergeFrom(TestCamelCaseFieldNames other) {
      if (other == null) {
        return;
      }
      if (other.PrimitiveField != 0) {
        PrimitiveField = other.PrimitiveField;
      }
Jon Skeet's avatar
Jon Skeet committed
2940
      if (other.StringField.Length != 0) {
2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957
        StringField = other.StringField;
      }
      if (other.EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
        EnumField = other.EnumField;
      }
      if (other.messageField_ != null) {
        if (messageField_ == null) {
          messageField_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
        }
        MessageField.MergeFrom(other.MessageField);
      }
      repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_);
      repeatedStringField_.Add(other.repeatedStringField_);
      repeatedEnumField_.Add(other.repeatedEnumField_);
      repeatedMessageField_.Add(other.repeatedMessageField_);
    }

Jon Skeet's avatar
Jon Skeet committed
2958
    public void MergeFrom(pb::CodedInputStream input) {
2959
      uint tag;
2960
      while ((tag = input.ReadTag()) != 0) {
2961 2962
        switch(tag) {
          default:
2963
            input.SkipLastField();
2964 2965
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
2966
            PrimitiveField = input.ReadInt32();
2967 2968 2969
            break;
          }
          case 18: {
Jon Skeet's avatar
Jon Skeet committed
2970
            StringField = input.ReadString();
2971 2972 2973
            break;
          }
          case 24: {
Jon Skeet's avatar
Jon Skeet committed
2974 2975
            enumField_ = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum();
            break;
2976 2977 2978 2979 2980 2981 2982 2983 2984 2985
          }
          case 34: {
            if (messageField_ == null) {
              messageField_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
            }
            input.ReadMessage(messageField_);
            break;
          }
          case 58:
          case 56: {
2986
            repeatedPrimitiveField_.AddEntriesFrom(input, _repeated_repeatedPrimitiveField_codec);
2987 2988 2989
            break;
          }
          case 66: {
2990
            repeatedStringField_.AddEntriesFrom(input, _repeated_repeatedStringField_codec);
2991 2992 2993 2994
            break;
          }
          case 74:
          case 72: {
2995
            repeatedEnumField_.AddEntriesFrom(input, _repeated_repeatedEnumField_codec);
2996 2997 2998
            break;
          }
          case 82: {
2999
            repeatedMessageField_.AddEntriesFrom(input, _repeated_repeatedMessageField_codec);
3000 3001 3002 3003 3004 3005 3006 3007
            break;
          }
        }
      }
    }

  }

3008 3009 3010 3011
  /// <summary>
  ///  We list fields out of order, to ensure that we're using field number and not
  ///  field index to determine serialization order.
  /// </summary>
3012
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
3013
  public sealed partial class TestFieldOrderings : pb::IMessage<TestFieldOrderings> {
3014 3015 3016
    private static readonly pb::MessageParser<TestFieldOrderings> _parser = new pb::MessageParser<TestFieldOrderings>(() => new TestFieldOrderings());
    public static pb::MessageParser<TestFieldOrderings> Parser { get { return _parser; } }

3017
    public static pbr::MessageDescriptor Descriptor {
3018
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[11]; }
3019 3020
    }

3021 3022
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
3023 3024
    }

3025 3026 3027 3028 3029
    public TestFieldOrderings() {
      OnConstruction();
    }

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

3031
    public TestFieldOrderings(TestFieldOrderings other) : this() {
Jon Skeet's avatar
Jon Skeet committed
3032 3033 3034 3035
      myString_ = other.myString_;
      myInt_ = other.myInt_;
      myFloat_ = other.myFloat_;
      SingleNestedMessage = other.singleNestedMessage_ != null ? other.SingleNestedMessage.Clone() : null;
3036
    }
Jon Skeet's avatar
Jon Skeet committed
3037 3038 3039 3040 3041

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

3042
    /// <summary>Field number for the "my_string" field.</summary>
3043 3044 3045 3046
    public const int MyStringFieldNumber = 11;
    private string myString_ = "";
    public string MyString {
      get { return myString_; }
3047
      set {
3048
        myString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
3049
      }
3050 3051
    }

3052
    /// <summary>Field number for the "my_int" field.</summary>
3053 3054 3055 3056
    public const int MyIntFieldNumber = 1;
    private long myInt_;
    public long MyInt {
      get { return myInt_; }
3057 3058 3059
      set {
        myInt_ = value;
      }
3060 3061
    }

3062
    /// <summary>Field number for the "my_float" field.</summary>
3063 3064 3065 3066
    public const int MyFloatFieldNumber = 101;
    private float myFloat_;
    public float MyFloat {
      get { return myFloat_; }
3067 3068 3069
      set {
        myFloat_ = value;
      }
3070 3071
    }

3072
    /// <summary>Field number for the "single_nested_message" field.</summary>
3073 3074 3075 3076
    public const int SingleNestedMessageFieldNumber = 200;
    private global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage singleNestedMessage_;
    public global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage SingleNestedMessage {
      get { return singleNestedMessage_; }
3077 3078 3079
      set {
        singleNestedMessage_ = value;
      }
3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095
    }

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

    public bool Equals(TestFieldOrderings other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (MyString != other.MyString) return false;
      if (MyInt != other.MyInt) return false;
      if (MyFloat != other.MyFloat) return false;
3096 3097
      if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return false;
      return true;
3098 3099 3100
    }

    public override int GetHashCode() {
3101
      int hash = 1;
Jon Skeet's avatar
Jon Skeet committed
3102
      if (MyString.Length != 0) hash ^= MyString.GetHashCode();
3103 3104 3105 3106 3107 3108
      if (MyInt != 0L) hash ^= MyInt.GetHashCode();
      if (MyFloat != 0F) hash ^= MyFloat.GetHashCode();
      if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode();
      return hash;
    }

3109
    public override string ToString() {
3110
      return pb::JsonFormatter.ToDiagnosticString(this);
3111 3112
    }

Jon Skeet's avatar
Jon Skeet committed
3113
    public void WriteTo(pb::CodedOutputStream output) {
3114
      if (MyInt != 0L) {
3115 3116
        output.WriteRawTag(8);
        output.WriteInt64(MyInt);
3117
      }
Jon Skeet's avatar
Jon Skeet committed
3118
      if (MyString.Length != 0) {
3119 3120
        output.WriteRawTag(90);
        output.WriteString(MyString);
3121 3122
      }
      if (MyFloat != 0F) {
3123 3124
        output.WriteRawTag(173, 6);
        output.WriteFloat(MyFloat);
3125 3126
      }
      if (singleNestedMessage_ != null) {
3127 3128
        output.WriteRawTag(194, 12);
        output.WriteMessage(SingleNestedMessage);
3129 3130 3131 3132 3133
      }
    }

    public int CalculateSize() {
      int size = 0;
Jon Skeet's avatar
Jon Skeet committed
3134
      if (MyString.Length != 0) {
3135
        size += 1 + pb::CodedOutputStream.ComputeStringSize(MyString);
3136 3137
      }
      if (MyInt != 0L) {
3138
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(MyInt);
3139 3140
      }
      if (MyFloat != 0F) {
3141
        size += 2 + 4;
3142 3143
      }
      if (singleNestedMessage_ != null) {
3144
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage);
3145 3146 3147
      }
      return size;
    }
3148

3149 3150 3151 3152
    public void MergeFrom(TestFieldOrderings other) {
      if (other == null) {
        return;
      }
Jon Skeet's avatar
Jon Skeet committed
3153
      if (other.MyString.Length != 0) {
3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169
        MyString = other.MyString;
      }
      if (other.MyInt != 0L) {
        MyInt = other.MyInt;
      }
      if (other.MyFloat != 0F) {
        MyFloat = other.MyFloat;
      }
      if (other.singleNestedMessage_ != null) {
        if (singleNestedMessage_ == null) {
          singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage();
        }
        SingleNestedMessage.MergeFrom(other.SingleNestedMessage);
      }
    }

Jon Skeet's avatar
Jon Skeet committed
3170
    public void MergeFrom(pb::CodedInputStream input) {
3171
      uint tag;
3172
      while ((tag = input.ReadTag()) != 0) {
3173 3174
        switch(tag) {
          default:
3175
            input.SkipLastField();
3176 3177
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
3178
            MyInt = input.ReadInt64();
3179 3180 3181
            break;
          }
          case 90: {
Jon Skeet's avatar
Jon Skeet committed
3182
            MyString = input.ReadString();
3183 3184 3185
            break;
          }
          case 813: {
Jon Skeet's avatar
Jon Skeet committed
3186
            MyFloat = input.ReadFloat();
3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200
            break;
          }
          case 1602: {
            if (singleNestedMessage_ == null) {
              singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage();
            }
            input.ReadMessage(singleNestedMessage_);
            break;
          }
        }
      }
    }

    #region Nested types
3201
    /// <summary>Container for nested types declared in the TestFieldOrderings message type.</summary>
3202
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
3203 3204
    public static partial class Types {
      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
3205
      public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
3206 3207 3208
        private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
        public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }

3209
        public static pbr::MessageDescriptor Descriptor {
3210
          get { return global::Google.Protobuf.TestProtos.TestFieldOrderings.Descriptor.NestedTypes[0]; }
3211 3212
        }

3213 3214
        pbr::MessageDescriptor pb::IMessage.Descriptor {
          get { return Descriptor; }
3215 3216
        }

3217 3218 3219
        public NestedMessage() {
          OnConstruction();
        }
Jon Skeet's avatar
Jon Skeet committed
3220

3221 3222 3223
        partial void OnConstruction();

        public NestedMessage(NestedMessage other) : this() {
Jon Skeet's avatar
Jon Skeet committed
3224 3225 3226 3227 3228 3229
          oo_ = other.oo_;
          bb_ = other.bb_;
        }

        public NestedMessage Clone() {
          return new NestedMessage(this);
3230
        }
Jon Skeet's avatar
Jon Skeet committed
3231

3232
        /// <summary>Field number for the "oo" field.</summary>
3233 3234 3235 3236
        public const int OoFieldNumber = 2;
        private long oo_;
        public long Oo {
          get { return oo_; }
3237 3238 3239
          set {
            oo_ = value;
          }
3240 3241
        }

3242
        /// <summary>Field number for the "bb" field.</summary>
3243 3244
        public const int BbFieldNumber = 1;
        private int bb_;
3245 3246 3247 3248 3249
        /// <summary>
        ///  The field name "b" fails to compile in proto1 because it conflicts with
        ///  a local variable named "b" in one of the generated methods.  Doh.
        ///  This file needs to compile in proto1 to test backwards-compatibility.
        /// </summary>
3250 3251
        public int Bb {
          get { return bb_; }
3252 3253 3254
          set {
            bb_ = value;
          }
3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273
        }

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

        public bool Equals(NestedMessage other) {
          if (ReferenceEquals(other, null)) {
            return false;
          }
          if (ReferenceEquals(other, this)) {
            return true;
          }
          if (Oo != other.Oo) return false;
          if (Bb != other.Bb) return false;
          return true;
        }

        public override int GetHashCode() {
3274
          int hash = 1;
3275 3276 3277 3278 3279
          if (Oo != 0L) hash ^= Oo.GetHashCode();
          if (Bb != 0) hash ^= Bb.GetHashCode();
          return hash;
        }

3280
        public override string ToString() {
3281
          return pb::JsonFormatter.ToDiagnosticString(this);
3282 3283
        }

Jon Skeet's avatar
Jon Skeet committed
3284
        public void WriteTo(pb::CodedOutputStream output) {
3285
          if (Bb != 0) {
3286 3287
            output.WriteRawTag(8);
            output.WriteInt32(Bb);
3288 3289
          }
          if (Oo != 0L) {
3290 3291
            output.WriteRawTag(16);
            output.WriteInt64(Oo);
3292 3293 3294 3295 3296 3297
          }
        }

        public int CalculateSize() {
          int size = 0;
          if (Oo != 0L) {
3298
            size += 1 + pb::CodedOutputStream.ComputeInt64Size(Oo);
3299 3300
          }
          if (Bb != 0) {
3301
            size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb);
3302 3303 3304
          }
          return size;
        }
3305

3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317
        public void MergeFrom(NestedMessage other) {
          if (other == null) {
            return;
          }
          if (other.Oo != 0L) {
            Oo = other.Oo;
          }
          if (other.Bb != 0) {
            Bb = other.Bb;
          }
        }

Jon Skeet's avatar
Jon Skeet committed
3318
        public void MergeFrom(pb::CodedInputStream input) {
3319
          uint tag;
3320
          while ((tag = input.ReadTag()) != 0) {
3321 3322
            switch(tag) {
              default:
3323
                input.SkipLastField();
3324 3325
                break;
              case 8: {
Jon Skeet's avatar
Jon Skeet committed
3326
                Bb = input.ReadInt32();
3327 3328 3329
                break;
              }
              case 16: {
Jon Skeet's avatar
Jon Skeet committed
3330
                Oo = input.ReadInt64();
3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344
                break;
              }
            }
          }
        }

      }

    }
    #endregion

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
3345
  public sealed partial class SparseEnumMessage : pb::IMessage<SparseEnumMessage> {
3346 3347 3348
    private static readonly pb::MessageParser<SparseEnumMessage> _parser = new pb::MessageParser<SparseEnumMessage>(() => new SparseEnumMessage());
    public static pb::MessageParser<SparseEnumMessage> Parser { get { return _parser; } }

3349
    public static pbr::MessageDescriptor Descriptor {
3350
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[12]; }
3351 3352
    }

3353 3354
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
3355 3356
    }

3357 3358 3359 3360 3361
    public SparseEnumMessage() {
      OnConstruction();
    }

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

3363
    public SparseEnumMessage(SparseEnumMessage other) : this() {
Jon Skeet's avatar
Jon Skeet committed
3364
      sparseEnum_ = other.sparseEnum_;
3365
    }
Jon Skeet's avatar
Jon Skeet committed
3366 3367 3368 3369 3370

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

3371
    /// <summary>Field number for the "sparse_enum" field.</summary>
3372 3373 3374 3375
    public const int SparseEnumFieldNumber = 1;
    private global::Google.Protobuf.TestProtos.TestSparseEnum sparseEnum_ = global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED;
    public global::Google.Protobuf.TestProtos.TestSparseEnum SparseEnum {
      get { return sparseEnum_; }
3376 3377 3378
      set {
        sparseEnum_ = value;
      }
3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396
    }

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

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

    public override int GetHashCode() {
3397
      int hash = 1;
3398 3399 3400 3401
      if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) hash ^= SparseEnum.GetHashCode();
      return hash;
    }

3402
    public override string ToString() {
3403
      return pb::JsonFormatter.ToDiagnosticString(this);
3404 3405
    }

Jon Skeet's avatar
Jon Skeet committed
3406
    public void WriteTo(pb::CodedOutputStream output) {
3407
      if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) {
3408 3409
        output.WriteRawTag(8);
        output.WriteEnum((int) SparseEnum);
3410 3411 3412 3413 3414 3415
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) {
3416
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SparseEnum);
3417 3418 3419
      }
      return size;
    }
3420

3421 3422 3423 3424 3425 3426 3427 3428 3429
    public void MergeFrom(SparseEnumMessage other) {
      if (other == null) {
        return;
      }
      if (other.SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) {
        SparseEnum = other.SparseEnum;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
3430
    public void MergeFrom(pb::CodedInputStream input) {
3431
      uint tag;
3432
      while ((tag = input.ReadTag()) != 0) {
3433 3434
        switch(tag) {
          default:
3435
            input.SkipLastField();
3436 3437
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
3438 3439
            sparseEnum_ = (global::Google.Protobuf.TestProtos.TestSparseEnum) input.ReadEnum();
            break;
3440 3441 3442 3443 3444 3445 3446
          }
        }
      }
    }

  }

3447 3448 3449
  /// <summary>
  ///  Test String and Bytes: string is for valid UTF-8 strings
  /// </summary>
3450
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
3451
  public sealed partial class OneString : pb::IMessage<OneString> {
3452 3453 3454
    private static readonly pb::MessageParser<OneString> _parser = new pb::MessageParser<OneString>(() => new OneString());
    public static pb::MessageParser<OneString> Parser { get { return _parser; } }

3455
    public static pbr::MessageDescriptor Descriptor {
3456
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[13]; }
3457 3458
    }

3459 3460
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
3461 3462
    }

3463 3464 3465 3466 3467
    public OneString() {
      OnConstruction();
    }

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

3469
    public OneString(OneString other) : this() {
Jon Skeet's avatar
Jon Skeet committed
3470 3471 3472 3473 3474
      data_ = other.data_;
    }

    public OneString Clone() {
      return new OneString(this);
3475
    }
Jon Skeet's avatar
Jon Skeet committed
3476

3477
    /// <summary>Field number for the "data" field.</summary>
3478 3479 3480 3481
    public const int DataFieldNumber = 1;
    private string data_ = "";
    public string Data {
      get { return data_; }
3482
      set {
3483
        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
3484
      }
3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502
    }

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

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

    public override int GetHashCode() {
3503
      int hash = 1;
Jon Skeet's avatar
Jon Skeet committed
3504
      if (Data.Length != 0) hash ^= Data.GetHashCode();
3505 3506 3507
      return hash;
    }

3508
    public override string ToString() {
3509
      return pb::JsonFormatter.ToDiagnosticString(this);
3510 3511
    }

Jon Skeet's avatar
Jon Skeet committed
3512
    public void WriteTo(pb::CodedOutputStream output) {
Jon Skeet's avatar
Jon Skeet committed
3513
      if (Data.Length != 0) {
3514 3515
        output.WriteRawTag(10);
        output.WriteString(Data);
3516 3517 3518 3519 3520
      }
    }

    public int CalculateSize() {
      int size = 0;
Jon Skeet's avatar
Jon Skeet committed
3521
      if (Data.Length != 0) {
3522
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Data);
3523 3524 3525
      }
      return size;
    }
3526

3527 3528 3529 3530
    public void MergeFrom(OneString other) {
      if (other == null) {
        return;
      }
Jon Skeet's avatar
Jon Skeet committed
3531
      if (other.Data.Length != 0) {
3532 3533 3534 3535
        Data = other.Data;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
3536
    public void MergeFrom(pb::CodedInputStream input) {
3537
      uint tag;
3538
      while ((tag = input.ReadTag()) != 0) {
3539 3540
        switch(tag) {
          default:
3541
            input.SkipLastField();
3542 3543
            break;
          case 10: {
Jon Skeet's avatar
Jon Skeet committed
3544
            Data = input.ReadString();
3545 3546 3547 3548 3549 3550 3551 3552 3553
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
3554
  public sealed partial class MoreString : pb::IMessage<MoreString> {
3555 3556 3557
    private static readonly pb::MessageParser<MoreString> _parser = new pb::MessageParser<MoreString>(() => new MoreString());
    public static pb::MessageParser<MoreString> Parser { get { return _parser; } }

3558
    public static pbr::MessageDescriptor Descriptor {
3559
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[14]; }
3560 3561
    }

3562 3563
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
3564 3565
    }

3566 3567 3568 3569 3570
    public MoreString() {
      OnConstruction();
    }

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

3572
    public MoreString(MoreString other) : this() {
Jon Skeet's avatar
Jon Skeet committed
3573 3574 3575 3576 3577
      data_ = other.data_.Clone();
    }

    public MoreString Clone() {
      return new MoreString(this);
3578
    }
Jon Skeet's avatar
Jon Skeet committed
3579

3580
    /// <summary>Field number for the "data" field.</summary>
3581
    public const int DataFieldNumber = 1;
3582 3583
    private static readonly pb::FieldCodec<string> _repeated_data_codec
        = pb::FieldCodec.ForString(10);
3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604
    private readonly pbc::RepeatedField<string> data_ = new pbc::RepeatedField<string>();
    public pbc::RepeatedField<string> Data {
      get { return data_; }
    }

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

    public bool Equals(MoreString other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!data_.Equals(other.data_)) return false;
      return true;
    }

    public override int GetHashCode() {
3605
      int hash = 1;
3606 3607 3608 3609
      hash ^= data_.GetHashCode();
      return hash;
    }

3610
    public override string ToString() {
3611
      return pb::JsonFormatter.ToDiagnosticString(this);
3612 3613
    }

Jon Skeet's avatar
Jon Skeet committed
3614
    public void WriteTo(pb::CodedOutputStream output) {
3615
      data_.WriteTo(output, _repeated_data_codec);
3616 3617 3618 3619
    }

    public int CalculateSize() {
      int size = 0;
3620
      size += data_.CalculateSize(_repeated_data_codec);
3621 3622
      return size;
    }
3623

3624 3625 3626 3627 3628 3629 3630
    public void MergeFrom(MoreString other) {
      if (other == null) {
        return;
      }
      data_.Add(other.data_);
    }

Jon Skeet's avatar
Jon Skeet committed
3631
    public void MergeFrom(pb::CodedInputStream input) {
3632
      uint tag;
3633
      while ((tag = input.ReadTag()) != 0) {
3634 3635
        switch(tag) {
          default:
3636
            input.SkipLastField();
3637 3638
            break;
          case 10: {
3639
            data_.AddEntriesFrom(input, _repeated_data_codec);
3640 3641 3642 3643 3644 3645 3646 3647 3648
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
3649
  public sealed partial class OneBytes : pb::IMessage<OneBytes> {
3650 3651 3652
    private static readonly pb::MessageParser<OneBytes> _parser = new pb::MessageParser<OneBytes>(() => new OneBytes());
    public static pb::MessageParser<OneBytes> Parser { get { return _parser; } }

3653
    public static pbr::MessageDescriptor Descriptor {
3654
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[15]; }
3655 3656
    }

3657 3658
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
3659 3660
    }

3661 3662 3663 3664 3665
    public OneBytes() {
      OnConstruction();
    }

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

3667
    public OneBytes(OneBytes other) : this() {
Jon Skeet's avatar
Jon Skeet committed
3668
      data_ = other.data_;
3669
    }
Jon Skeet's avatar
Jon Skeet committed
3670 3671 3672 3673 3674

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

3675
    /// <summary>Field number for the "data" field.</summary>
3676 3677 3678 3679
    public const int DataFieldNumber = 1;
    private pb::ByteString data_ = pb::ByteString.Empty;
    public pb::ByteString Data {
      get { return data_; }
3680
      set {
3681
        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
3682
      }
3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700
    }

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

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

    public override int GetHashCode() {
3701
      int hash = 1;
Jon Skeet's avatar
Jon Skeet committed
3702
      if (Data.Length != 0) hash ^= Data.GetHashCode();
3703 3704 3705
      return hash;
    }

3706
    public override string ToString() {
3707
      return pb::JsonFormatter.ToDiagnosticString(this);
3708 3709
    }

Jon Skeet's avatar
Jon Skeet committed
3710
    public void WriteTo(pb::CodedOutputStream output) {
Jon Skeet's avatar
Jon Skeet committed
3711
      if (Data.Length != 0) {
3712 3713
        output.WriteRawTag(10);
        output.WriteBytes(Data);
3714 3715 3716 3717 3718
      }
    }

    public int CalculateSize() {
      int size = 0;
Jon Skeet's avatar
Jon Skeet committed
3719
      if (Data.Length != 0) {
3720
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
3721 3722 3723
      }
      return size;
    }
3724

3725 3726 3727 3728
    public void MergeFrom(OneBytes other) {
      if (other == null) {
        return;
      }
Jon Skeet's avatar
Jon Skeet committed
3729
      if (other.Data.Length != 0) {
3730 3731 3732 3733
        Data = other.Data;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
3734
    public void MergeFrom(pb::CodedInputStream input) {
3735
      uint tag;
3736
      while ((tag = input.ReadTag()) != 0) {
3737 3738
        switch(tag) {
          default:
3739
            input.SkipLastField();
3740 3741
            break;
          case 10: {
Jon Skeet's avatar
Jon Skeet committed
3742
            Data = input.ReadBytes();
3743 3744 3745 3746 3747 3748 3749 3750 3751
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
3752
  public sealed partial class MoreBytes : pb::IMessage<MoreBytes> {
3753 3754 3755
    private static readonly pb::MessageParser<MoreBytes> _parser = new pb::MessageParser<MoreBytes>(() => new MoreBytes());
    public static pb::MessageParser<MoreBytes> Parser { get { return _parser; } }

3756
    public static pbr::MessageDescriptor Descriptor {
3757
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[16]; }
3758 3759
    }

3760 3761
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
3762 3763
    }

3764 3765 3766 3767 3768
    public MoreBytes() {
      OnConstruction();
    }

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

3770
    public MoreBytes(MoreBytes other) : this() {
Jon Skeet's avatar
Jon Skeet committed
3771 3772 3773 3774 3775
      data_ = other.data_;
    }

    public MoreBytes Clone() {
      return new MoreBytes(this);
3776
    }
Jon Skeet's avatar
Jon Skeet committed
3777

3778
    /// <summary>Field number for the "data" field.</summary>
3779 3780 3781 3782
    public const int DataFieldNumber = 1;
    private pb::ByteString data_ = pb::ByteString.Empty;
    public pb::ByteString Data {
      get { return data_; }
3783
      set {
3784
        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
3785
      }
3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803
    }

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

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

    public override int GetHashCode() {
3804
      int hash = 1;
Jon Skeet's avatar
Jon Skeet committed
3805
      if (Data.Length != 0) hash ^= Data.GetHashCode();
3806 3807 3808
      return hash;
    }

3809
    public override string ToString() {
3810
      return pb::JsonFormatter.ToDiagnosticString(this);
3811 3812
    }

Jon Skeet's avatar
Jon Skeet committed
3813
    public void WriteTo(pb::CodedOutputStream output) {
Jon Skeet's avatar
Jon Skeet committed
3814
      if (Data.Length != 0) {
3815 3816
        output.WriteRawTag(10);
        output.WriteBytes(Data);
3817 3818 3819 3820 3821
      }
    }

    public int CalculateSize() {
      int size = 0;
Jon Skeet's avatar
Jon Skeet committed
3822
      if (Data.Length != 0) {
3823
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
3824 3825 3826
      }
      return size;
    }
3827

3828 3829 3830 3831
    public void MergeFrom(MoreBytes other) {
      if (other == null) {
        return;
      }
Jon Skeet's avatar
Jon Skeet committed
3832
      if (other.Data.Length != 0) {
3833 3834 3835 3836
        Data = other.Data;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
3837
    public void MergeFrom(pb::CodedInputStream input) {
3838
      uint tag;
3839
      while ((tag = input.ReadTag()) != 0) {
3840 3841
        switch(tag) {
          default:
3842
            input.SkipLastField();
3843 3844
            break;
          case 10: {
Jon Skeet's avatar
Jon Skeet committed
3845
            Data = input.ReadBytes();
3846 3847 3848 3849 3850 3851 3852 3853
            break;
          }
        }
      }
    }

  }

3854 3855 3856
  /// <summary>
  ///  Test int32, uint32, int64, uint64, and bool are all compatible
  /// </summary>
3857
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
3858
  public sealed partial class Int32Message : pb::IMessage<Int32Message> {
3859 3860 3861
    private static readonly pb::MessageParser<Int32Message> _parser = new pb::MessageParser<Int32Message>(() => new Int32Message());
    public static pb::MessageParser<Int32Message> Parser { get { return _parser; } }

3862
    public static pbr::MessageDescriptor Descriptor {
3863
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[17]; }
3864 3865
    }

3866 3867
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
3868 3869
    }

3870 3871 3872 3873 3874
    public Int32Message() {
      OnConstruction();
    }

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

3876
    public Int32Message(Int32Message other) : this() {
Jon Skeet's avatar
Jon Skeet committed
3877
      data_ = other.data_;
3878
    }
Jon Skeet's avatar
Jon Skeet committed
3879 3880 3881 3882 3883

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

3884
    /// <summary>Field number for the "data" field.</summary>
3885 3886 3887 3888
    public const int DataFieldNumber = 1;
    private int data_;
    public int Data {
      get { return data_; }
3889 3890 3891
      set {
        data_ = value;
      }
3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909
    }

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

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

    public override int GetHashCode() {
3910
      int hash = 1;
3911 3912 3913 3914
      if (Data != 0) hash ^= Data.GetHashCode();
      return hash;
    }

3915
    public override string ToString() {
3916
      return pb::JsonFormatter.ToDiagnosticString(this);
3917 3918
    }

Jon Skeet's avatar
Jon Skeet committed
3919
    public void WriteTo(pb::CodedOutputStream output) {
3920
      if (Data != 0) {
3921 3922
        output.WriteRawTag(8);
        output.WriteInt32(Data);
3923 3924 3925 3926 3927 3928
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (Data != 0) {
3929
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Data);
3930 3931 3932
      }
      return size;
    }
3933

3934 3935 3936 3937 3938 3939 3940 3941 3942
    public void MergeFrom(Int32Message other) {
      if (other == null) {
        return;
      }
      if (other.Data != 0) {
        Data = other.Data;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
3943
    public void MergeFrom(pb::CodedInputStream input) {
3944
      uint tag;
3945
      while ((tag = input.ReadTag()) != 0) {
3946 3947
        switch(tag) {
          default:
3948
            input.SkipLastField();
3949 3950
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
3951
            Data = input.ReadInt32();
3952 3953 3954 3955 3956 3957 3958 3959 3960
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
3961
  public sealed partial class Uint32Message : pb::IMessage<Uint32Message> {
3962 3963 3964
    private static readonly pb::MessageParser<Uint32Message> _parser = new pb::MessageParser<Uint32Message>(() => new Uint32Message());
    public static pb::MessageParser<Uint32Message> Parser { get { return _parser; } }

3965
    public static pbr::MessageDescriptor Descriptor {
3966
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[18]; }
3967 3968
    }

3969 3970
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
3971 3972
    }

3973 3974 3975 3976 3977
    public Uint32Message() {
      OnConstruction();
    }

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

3979
    public Uint32Message(Uint32Message other) : this() {
Jon Skeet's avatar
Jon Skeet committed
3980 3981 3982 3983 3984
      data_ = other.data_;
    }

    public Uint32Message Clone() {
      return new Uint32Message(this);
3985
    }
Jon Skeet's avatar
Jon Skeet committed
3986

3987
    /// <summary>Field number for the "data" field.</summary>
3988 3989 3990 3991
    public const int DataFieldNumber = 1;
    private uint data_;
    public uint Data {
      get { return data_; }
3992 3993 3994
      set {
        data_ = value;
      }
3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012
    }

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

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

    public override int GetHashCode() {
4013
      int hash = 1;
4014 4015 4016 4017
      if (Data != 0) hash ^= Data.GetHashCode();
      return hash;
    }

4018
    public override string ToString() {
4019
      return pb::JsonFormatter.ToDiagnosticString(this);
4020 4021
    }

Jon Skeet's avatar
Jon Skeet committed
4022
    public void WriteTo(pb::CodedOutputStream output) {
4023
      if (Data != 0) {
4024 4025
        output.WriteRawTag(8);
        output.WriteUInt32(Data);
4026 4027 4028 4029 4030 4031
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (Data != 0) {
4032
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Data);
4033 4034 4035
      }
      return size;
    }
4036

4037 4038 4039 4040 4041 4042 4043 4044 4045
    public void MergeFrom(Uint32Message other) {
      if (other == null) {
        return;
      }
      if (other.Data != 0) {
        Data = other.Data;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
4046
    public void MergeFrom(pb::CodedInputStream input) {
4047
      uint tag;
4048
      while ((tag = input.ReadTag()) != 0) {
4049 4050
        switch(tag) {
          default:
4051
            input.SkipLastField();
4052 4053
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
4054
            Data = input.ReadUInt32();
4055 4056 4057 4058 4059 4060 4061 4062 4063
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
4064
  public sealed partial class Int64Message : pb::IMessage<Int64Message> {
4065 4066 4067
    private static readonly pb::MessageParser<Int64Message> _parser = new pb::MessageParser<Int64Message>(() => new Int64Message());
    public static pb::MessageParser<Int64Message> Parser { get { return _parser; } }

4068
    public static pbr::MessageDescriptor Descriptor {
4069
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[19]; }
4070 4071
    }

4072 4073
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
4074 4075
    }

4076 4077 4078 4079 4080
    public Int64Message() {
      OnConstruction();
    }

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

4082
    public Int64Message(Int64Message other) : this() {
Jon Skeet's avatar
Jon Skeet committed
4083 4084 4085 4086 4087
      data_ = other.data_;
    }

    public Int64Message Clone() {
      return new Int64Message(this);
4088
    }
Jon Skeet's avatar
Jon Skeet committed
4089

4090
    /// <summary>Field number for the "data" field.</summary>
4091 4092 4093 4094
    public const int DataFieldNumber = 1;
    private long data_;
    public long Data {
      get { return data_; }
4095 4096 4097
      set {
        data_ = value;
      }
4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115
    }

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

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

    public override int GetHashCode() {
4116
      int hash = 1;
4117 4118 4119 4120
      if (Data != 0L) hash ^= Data.GetHashCode();
      return hash;
    }

4121
    public override string ToString() {
4122
      return pb::JsonFormatter.ToDiagnosticString(this);
4123 4124
    }

Jon Skeet's avatar
Jon Skeet committed
4125
    public void WriteTo(pb::CodedOutputStream output) {
4126
      if (Data != 0L) {
4127 4128
        output.WriteRawTag(8);
        output.WriteInt64(Data);
4129 4130 4131 4132 4133 4134
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (Data != 0L) {
4135
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Data);
4136 4137 4138
      }
      return size;
    }
4139

4140 4141 4142 4143 4144 4145 4146 4147 4148
    public void MergeFrom(Int64Message other) {
      if (other == null) {
        return;
      }
      if (other.Data != 0L) {
        Data = other.Data;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
4149
    public void MergeFrom(pb::CodedInputStream input) {
4150
      uint tag;
4151
      while ((tag = input.ReadTag()) != 0) {
4152 4153
        switch(tag) {
          default:
4154
            input.SkipLastField();
4155 4156
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
4157
            Data = input.ReadInt64();
4158 4159 4160 4161 4162 4163 4164 4165 4166
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
4167
  public sealed partial class Uint64Message : pb::IMessage<Uint64Message> {
4168 4169 4170
    private static readonly pb::MessageParser<Uint64Message> _parser = new pb::MessageParser<Uint64Message>(() => new Uint64Message());
    public static pb::MessageParser<Uint64Message> Parser { get { return _parser; } }

4171
    public static pbr::MessageDescriptor Descriptor {
4172
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[20]; }
4173 4174
    }

4175 4176
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
4177 4178
    }

4179 4180 4181 4182 4183
    public Uint64Message() {
      OnConstruction();
    }

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

4185
    public Uint64Message(Uint64Message other) : this() {
Jon Skeet's avatar
Jon Skeet committed
4186
      data_ = other.data_;
4187
    }
Jon Skeet's avatar
Jon Skeet committed
4188 4189 4190 4191 4192

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

4193
    /// <summary>Field number for the "data" field.</summary>
4194 4195 4196 4197
    public const int DataFieldNumber = 1;
    private ulong data_;
    public ulong Data {
      get { return data_; }
4198 4199 4200
      set {
        data_ = value;
      }
4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218
    }

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

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

    public override int GetHashCode() {
4219
      int hash = 1;
4220 4221 4222 4223
      if (Data != 0UL) hash ^= Data.GetHashCode();
      return hash;
    }

4224
    public override string ToString() {
4225
      return pb::JsonFormatter.ToDiagnosticString(this);
4226 4227
    }

Jon Skeet's avatar
Jon Skeet committed
4228
    public void WriteTo(pb::CodedOutputStream output) {
4229
      if (Data != 0UL) {
4230 4231
        output.WriteRawTag(8);
        output.WriteUInt64(Data);
4232 4233 4234 4235 4236 4237
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (Data != 0UL) {
4238
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Data);
4239 4240 4241
      }
      return size;
    }
4242

4243 4244 4245 4246 4247 4248 4249 4250 4251
    public void MergeFrom(Uint64Message other) {
      if (other == null) {
        return;
      }
      if (other.Data != 0UL) {
        Data = other.Data;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
4252
    public void MergeFrom(pb::CodedInputStream input) {
4253
      uint tag;
4254
      while ((tag = input.ReadTag()) != 0) {
4255 4256
        switch(tag) {
          default:
4257
            input.SkipLastField();
4258 4259
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
4260
            Data = input.ReadUInt64();
4261 4262 4263 4264 4265 4266 4267 4268 4269
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
4270
  public sealed partial class BoolMessage : pb::IMessage<BoolMessage> {
4271 4272 4273
    private static readonly pb::MessageParser<BoolMessage> _parser = new pb::MessageParser<BoolMessage>(() => new BoolMessage());
    public static pb::MessageParser<BoolMessage> Parser { get { return _parser; } }

4274
    public static pbr::MessageDescriptor Descriptor {
4275
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[21]; }
4276 4277
    }

4278 4279
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
4280 4281
    }

4282 4283 4284
    public BoolMessage() {
      OnConstruction();
    }
Jon Skeet's avatar
Jon Skeet committed
4285

4286 4287 4288
    partial void OnConstruction();

    public BoolMessage(BoolMessage other) : this() {
Jon Skeet's avatar
Jon Skeet committed
4289 4290 4291 4292 4293
      data_ = other.data_;
    }

    public BoolMessage Clone() {
      return new BoolMessage(this);
4294
    }
Jon Skeet's avatar
Jon Skeet committed
4295

4296
    /// <summary>Field number for the "data" field.</summary>
4297 4298 4299 4300
    public const int DataFieldNumber = 1;
    private bool data_;
    public bool Data {
      get { return data_; }
4301 4302 4303
      set {
        data_ = value;
      }
4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321
    }

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

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

    public override int GetHashCode() {
4322
      int hash = 1;
4323 4324 4325 4326
      if (Data != false) hash ^= Data.GetHashCode();
      return hash;
    }

4327
    public override string ToString() {
4328
      return pb::JsonFormatter.ToDiagnosticString(this);
4329 4330
    }

Jon Skeet's avatar
Jon Skeet committed
4331
    public void WriteTo(pb::CodedOutputStream output) {
4332
      if (Data != false) {
4333 4334
        output.WriteRawTag(8);
        output.WriteBool(Data);
4335 4336 4337 4338 4339 4340
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (Data != false) {
4341
        size += 1 + 1;
4342 4343 4344
      }
      return size;
    }
4345

4346 4347 4348 4349 4350 4351 4352 4353 4354
    public void MergeFrom(BoolMessage other) {
      if (other == null) {
        return;
      }
      if (other.Data != false) {
        Data = other.Data;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
4355
    public void MergeFrom(pb::CodedInputStream input) {
4356
      uint tag;
4357
      while ((tag = input.ReadTag()) != 0) {
4358 4359
        switch(tag) {
          default:
4360
            input.SkipLastField();
4361 4362
            break;
          case 8: {
Jon Skeet's avatar
Jon Skeet committed
4363
            Data = input.ReadBool();
4364 4365 4366 4367 4368 4369 4370 4371
            break;
          }
        }
      }
    }

  }

4372 4373 4374
  /// <summary>
  ///  Test oneofs.
  /// </summary>
4375
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
4376
  public sealed partial class TestOneof : pb::IMessage<TestOneof> {
4377 4378 4379
    private static readonly pb::MessageParser<TestOneof> _parser = new pb::MessageParser<TestOneof>(() => new TestOneof());
    public static pb::MessageParser<TestOneof> Parser { get { return _parser; } }

4380
    public static pbr::MessageDescriptor Descriptor {
4381
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[22]; }
4382 4383
    }

4384 4385
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
4386 4387
    }

4388 4389 4390
    public TestOneof() {
      OnConstruction();
    }
Jon Skeet's avatar
Jon Skeet committed
4391

4392 4393 4394
    partial void OnConstruction();

    public TestOneof(TestOneof other) : this() {
Jon Skeet's avatar
Jon Skeet committed
4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410
      switch (other.FooCase) {
        case FooOneofCase.FooInt:
          FooInt = other.FooInt;
          break;
        case FooOneofCase.FooString:
          FooString = other.FooString;
          break;
        case FooOneofCase.FooMessage:
          FooMessage = other.FooMessage.Clone();
          break;
      }

    }

    public TestOneof Clone() {
      return new TestOneof(this);
4411
    }
Jon Skeet's avatar
Jon Skeet committed
4412

4413
    /// <summary>Field number for the "foo_int" field.</summary>
4414 4415 4416 4417 4418 4419 4420 4421 4422
    public const int FooIntFieldNumber = 1;
    public int FooInt {
      get { return fooCase_ == FooOneofCase.FooInt ? (int) foo_ : 0; }
      set {
        foo_ = value;
        fooCase_ = FooOneofCase.FooInt;
      }
    }

4423
    /// <summary>Field number for the "foo_string" field.</summary>
4424 4425 4426 4427
    public const int FooStringFieldNumber = 2;
    public string FooString {
      get { return fooCase_ == FooOneofCase.FooString ? (string) foo_ : ""; }
      set {
4428
        foo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
Jon Skeet's avatar
Jon Skeet committed
4429
        fooCase_ = FooOneofCase.FooString;
4430 4431 4432
      }
    }

4433
    /// <summary>Field number for the "foo_message" field.</summary>
4434 4435 4436 4437 4438 4439 4440 4441 4442 4443
    public const int FooMessageFieldNumber = 3;
    public global::Google.Protobuf.TestProtos.TestAllTypes FooMessage {
      get { return fooCase_ == FooOneofCase.FooMessage ? (global::Google.Protobuf.TestProtos.TestAllTypes) foo_ : null; }
      set {
        foo_ = value;
        fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooMessage;
      }
    }

    private object foo_;
4444
    /// <summary>Enum of possible cases for the "foo" oneof.</summary>
4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473
    public enum FooOneofCase {
      None = 0,
      FooInt = 1,
      FooString = 2,
      FooMessage = 3,
    }
    private FooOneofCase fooCase_ = FooOneofCase.None;
    public FooOneofCase FooCase {
      get { return fooCase_; }
    }

    public void ClearFoo() {
      fooCase_ = FooOneofCase.None;
      foo_ = null;
    }

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

    public bool Equals(TestOneof other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (FooInt != other.FooInt) return false;
      if (FooString != other.FooString) return false;
4474
      if (!object.Equals(FooMessage, other.FooMessage)) return false;
4475
      if (FooCase != other.FooCase) return false;
4476
      return true;
4477 4478 4479
    }

    public override int GetHashCode() {
4480
      int hash = 1;
4481 4482 4483
      if (fooCase_ == FooOneofCase.FooInt) hash ^= FooInt.GetHashCode();
      if (fooCase_ == FooOneofCase.FooString) hash ^= FooString.GetHashCode();
      if (fooCase_ == FooOneofCase.FooMessage) hash ^= FooMessage.GetHashCode();
4484
      hash ^= (int) fooCase_;
4485 4486 4487
      return hash;
    }

4488
    public override string ToString() {
4489
      return pb::JsonFormatter.ToDiagnosticString(this);
4490 4491
    }

Jon Skeet's avatar
Jon Skeet committed
4492
    public void WriteTo(pb::CodedOutputStream output) {
4493
      if (fooCase_ == FooOneofCase.FooInt) {
4494 4495
        output.WriteRawTag(8);
        output.WriteInt32(FooInt);
4496 4497
      }
      if (fooCase_ == FooOneofCase.FooString) {
4498 4499
        output.WriteRawTag(18);
        output.WriteString(FooString);
4500 4501
      }
      if (fooCase_ == FooOneofCase.FooMessage) {
4502 4503
        output.WriteRawTag(26);
        output.WriteMessage(FooMessage);
4504 4505 4506 4507 4508 4509
      }
    }

    public int CalculateSize() {
      int size = 0;
      if (fooCase_ == FooOneofCase.FooInt) {
4510
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(FooInt);
4511 4512
      }
      if (fooCase_ == FooOneofCase.FooString) {
4513
        size += 1 + pb::CodedOutputStream.ComputeStringSize(FooString);
4514 4515
      }
      if (fooCase_ == FooOneofCase.FooMessage) {
4516
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(FooMessage);
4517 4518 4519
      }
      return size;
    }
4520

4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538
    public void MergeFrom(TestOneof other) {
      if (other == null) {
        return;
      }
      switch (other.FooCase) {
        case FooOneofCase.FooInt:
          FooInt = other.FooInt;
          break;
        case FooOneofCase.FooString:
          FooString = other.FooString;
          break;
        case FooOneofCase.FooMessage:
          FooMessage = other.FooMessage;
          break;
      }

    }

Jon Skeet's avatar
Jon Skeet committed
4539
    public void MergeFrom(pb::CodedInputStream input) {
4540
      uint tag;
4541
      while ((tag = input.ReadTag()) != 0) {
4542 4543
        switch(tag) {
          default:
4544
            input.SkipLastField();
4545 4546
            break;
          case 8: {
4547 4548
            FooInt = input.ReadInt32();
            break;
4549 4550
          }
          case 18: {
4551 4552
            FooString = input.ReadString();
            break;
4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569
          }
          case 26: {
            global::Google.Protobuf.TestProtos.TestAllTypes subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes();
            if (fooCase_ == FooOneofCase.FooMessage) {
              subBuilder.MergeFrom(FooMessage);
            }
            input.ReadMessage(subBuilder);
            FooMessage = subBuilder;
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
4570
  public sealed partial class TestPackedTypes : pb::IMessage<TestPackedTypes> {
4571 4572 4573
    private static readonly pb::MessageParser<TestPackedTypes> _parser = new pb::MessageParser<TestPackedTypes>(() => new TestPackedTypes());
    public static pb::MessageParser<TestPackedTypes> Parser { get { return _parser; } }

4574
    public static pbr::MessageDescriptor Descriptor {
4575
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[23]; }
4576 4577
    }

4578 4579
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
4580 4581
    }

4582 4583 4584 4585 4586
    public TestPackedTypes() {
      OnConstruction();
    }

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

4588
    public TestPackedTypes(TestPackedTypes other) : this() {
Jon Skeet's avatar
Jon Skeet committed
4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606
      packedInt32_ = other.packedInt32_.Clone();
      packedInt64_ = other.packedInt64_.Clone();
      packedUint32_ = other.packedUint32_.Clone();
      packedUint64_ = other.packedUint64_.Clone();
      packedSint32_ = other.packedSint32_.Clone();
      packedSint64_ = other.packedSint64_.Clone();
      packedFixed32_ = other.packedFixed32_.Clone();
      packedFixed64_ = other.packedFixed64_.Clone();
      packedSfixed32_ = other.packedSfixed32_.Clone();
      packedSfixed64_ = other.packedSfixed64_.Clone();
      packedFloat_ = other.packedFloat_.Clone();
      packedDouble_ = other.packedDouble_.Clone();
      packedBool_ = other.packedBool_.Clone();
      packedEnum_ = other.packedEnum_.Clone();
    }

    public TestPackedTypes Clone() {
      return new TestPackedTypes(this);
4607
    }
Jon Skeet's avatar
Jon Skeet committed
4608

4609
    /// <summary>Field number for the "packed_int32" field.</summary>
4610
    public const int PackedInt32FieldNumber = 90;
4611 4612
    private static readonly pb::FieldCodec<int> _repeated_packedInt32_codec
        = pb::FieldCodec.ForInt32(722);
4613 4614 4615 4616 4617
    private readonly pbc::RepeatedField<int> packedInt32_ = new pbc::RepeatedField<int>();
    public pbc::RepeatedField<int> PackedInt32 {
      get { return packedInt32_; }
    }

4618
    /// <summary>Field number for the "packed_int64" field.</summary>
4619
    public const int PackedInt64FieldNumber = 91;
4620 4621
    private static readonly pb::FieldCodec<long> _repeated_packedInt64_codec
        = pb::FieldCodec.ForInt64(730);
4622 4623 4624 4625 4626
    private readonly pbc::RepeatedField<long> packedInt64_ = new pbc::RepeatedField<long>();
    public pbc::RepeatedField<long> PackedInt64 {
      get { return packedInt64_; }
    }

4627
    /// <summary>Field number for the "packed_uint32" field.</summary>
4628
    public const int PackedUint32FieldNumber = 92;
4629 4630
    private static readonly pb::FieldCodec<uint> _repeated_packedUint32_codec
        = pb::FieldCodec.ForUInt32(738);
4631 4632 4633 4634 4635
    private readonly pbc::RepeatedField<uint> packedUint32_ = new pbc::RepeatedField<uint>();
    public pbc::RepeatedField<uint> PackedUint32 {
      get { return packedUint32_; }
    }

4636
    /// <summary>Field number for the "packed_uint64" field.</summary>
4637
    public const int PackedUint64FieldNumber = 93;
4638 4639
    private static readonly pb::FieldCodec<ulong> _repeated_packedUint64_codec
        = pb::FieldCodec.ForUInt64(746);
4640 4641 4642 4643 4644
    private readonly pbc::RepeatedField<ulong> packedUint64_ = new pbc::RepeatedField<ulong>();
    public pbc::RepeatedField<ulong> PackedUint64 {
      get { return packedUint64_; }
    }

4645
    /// <summary>Field number for the "packed_sint32" field.</summary>
4646
    public const int PackedSint32FieldNumber = 94;
4647 4648
    private static readonly pb::FieldCodec<int> _repeated_packedSint32_codec
        = pb::FieldCodec.ForSInt32(754);
4649 4650 4651 4652 4653
    private readonly pbc::RepeatedField<int> packedSint32_ = new pbc::RepeatedField<int>();
    public pbc::RepeatedField<int> PackedSint32 {
      get { return packedSint32_; }
    }

4654
    /// <summary>Field number for the "packed_sint64" field.</summary>
4655
    public const int PackedSint64FieldNumber = 95;
4656 4657
    private static readonly pb::FieldCodec<long> _repeated_packedSint64_codec
        = pb::FieldCodec.ForSInt64(762);
4658 4659 4660 4661 4662
    private readonly pbc::RepeatedField<long> packedSint64_ = new pbc::RepeatedField<long>();
    public pbc::RepeatedField<long> PackedSint64 {
      get { return packedSint64_; }
    }

4663
    /// <summary>Field number for the "packed_fixed32" field.</summary>
4664
    public const int PackedFixed32FieldNumber = 96;
4665 4666
    private static readonly pb::FieldCodec<uint> _repeated_packedFixed32_codec
        = pb::FieldCodec.ForFixed32(770);
4667 4668 4669 4670 4671
    private readonly pbc::RepeatedField<uint> packedFixed32_ = new pbc::RepeatedField<uint>();
    public pbc::RepeatedField<uint> PackedFixed32 {
      get { return packedFixed32_; }
    }

4672
    /// <summary>Field number for the "packed_fixed64" field.</summary>
4673
    public const int PackedFixed64FieldNumber = 97;
4674 4675
    private static readonly pb::FieldCodec<ulong> _repeated_packedFixed64_codec
        = pb::FieldCodec.ForFixed64(778);
4676 4677 4678 4679 4680
    private readonly pbc::RepeatedField<ulong> packedFixed64_ = new pbc::RepeatedField<ulong>();
    public pbc::RepeatedField<ulong> PackedFixed64 {
      get { return packedFixed64_; }
    }

4681
    /// <summary>Field number for the "packed_sfixed32" field.</summary>
4682
    public const int PackedSfixed32FieldNumber = 98;
4683 4684
    private static readonly pb::FieldCodec<int> _repeated_packedSfixed32_codec
        = pb::FieldCodec.ForSFixed32(786);
4685 4686 4687 4688 4689
    private readonly pbc::RepeatedField<int> packedSfixed32_ = new pbc::RepeatedField<int>();
    public pbc::RepeatedField<int> PackedSfixed32 {
      get { return packedSfixed32_; }
    }

4690
    /// <summary>Field number for the "packed_sfixed64" field.</summary>
4691
    public const int PackedSfixed64FieldNumber = 99;
4692 4693
    private static readonly pb::FieldCodec<long> _repeated_packedSfixed64_codec
        = pb::FieldCodec.ForSFixed64(794);
4694 4695 4696 4697 4698
    private readonly pbc::RepeatedField<long> packedSfixed64_ = new pbc::RepeatedField<long>();
    public pbc::RepeatedField<long> PackedSfixed64 {
      get { return packedSfixed64_; }
    }

4699
    /// <summary>Field number for the "packed_float" field.</summary>
4700
    public const int PackedFloatFieldNumber = 100;
4701 4702
    private static readonly pb::FieldCodec<float> _repeated_packedFloat_codec
        = pb::FieldCodec.ForFloat(802);
4703 4704 4705 4706 4707
    private readonly pbc::RepeatedField<float> packedFloat_ = new pbc::RepeatedField<float>();
    public pbc::RepeatedField<float> PackedFloat {
      get { return packedFloat_; }
    }

4708
    /// <summary>Field number for the "packed_double" field.</summary>
4709
    public const int PackedDoubleFieldNumber = 101;
4710 4711
    private static readonly pb::FieldCodec<double> _repeated_packedDouble_codec
        = pb::FieldCodec.ForDouble(810);
4712 4713 4714 4715 4716
    private readonly pbc::RepeatedField<double> packedDouble_ = new pbc::RepeatedField<double>();
    public pbc::RepeatedField<double> PackedDouble {
      get { return packedDouble_; }
    }

4717
    /// <summary>Field number for the "packed_bool" field.</summary>
4718
    public const int PackedBoolFieldNumber = 102;
4719 4720
    private static readonly pb::FieldCodec<bool> _repeated_packedBool_codec
        = pb::FieldCodec.ForBool(818);
4721 4722 4723 4724 4725
    private readonly pbc::RepeatedField<bool> packedBool_ = new pbc::RepeatedField<bool>();
    public pbc::RepeatedField<bool> PackedBool {
      get { return packedBool_; }
    }

4726
    /// <summary>Field number for the "packed_enum" field.</summary>
4727
    public const int PackedEnumFieldNumber = 103;
4728
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_packedEnum_codec
4729 4730
        = pb::FieldCodec.ForEnum(826, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> packedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> PackedEnum {
      get { return packedEnum_; }
    }

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

    public bool Equals(TestPackedTypes other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!packedInt32_.Equals(other.packedInt32_)) return false;
      if(!packedInt64_.Equals(other.packedInt64_)) return false;
      if(!packedUint32_.Equals(other.packedUint32_)) return false;
      if(!packedUint64_.Equals(other.packedUint64_)) return false;
      if(!packedSint32_.Equals(other.packedSint32_)) return false;
      if(!packedSint64_.Equals(other.packedSint64_)) return false;
      if(!packedFixed32_.Equals(other.packedFixed32_)) return false;
      if(!packedFixed64_.Equals(other.packedFixed64_)) return false;
      if(!packedSfixed32_.Equals(other.packedSfixed32_)) return false;
      if(!packedSfixed64_.Equals(other.packedSfixed64_)) return false;
      if(!packedFloat_.Equals(other.packedFloat_)) return false;
      if(!packedDouble_.Equals(other.packedDouble_)) return false;
      if(!packedBool_.Equals(other.packedBool_)) return false;
      if(!packedEnum_.Equals(other.packedEnum_)) return false;
      return true;
    }

    public override int GetHashCode() {
4764
      int hash = 1;
4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781
      hash ^= packedInt32_.GetHashCode();
      hash ^= packedInt64_.GetHashCode();
      hash ^= packedUint32_.GetHashCode();
      hash ^= packedUint64_.GetHashCode();
      hash ^= packedSint32_.GetHashCode();
      hash ^= packedSint64_.GetHashCode();
      hash ^= packedFixed32_.GetHashCode();
      hash ^= packedFixed64_.GetHashCode();
      hash ^= packedSfixed32_.GetHashCode();
      hash ^= packedSfixed64_.GetHashCode();
      hash ^= packedFloat_.GetHashCode();
      hash ^= packedDouble_.GetHashCode();
      hash ^= packedBool_.GetHashCode();
      hash ^= packedEnum_.GetHashCode();
      return hash;
    }

4782
    public override string ToString() {
4783
      return pb::JsonFormatter.ToDiagnosticString(this);
4784 4785
    }

Jon Skeet's avatar
Jon Skeet committed
4786
    public void WriteTo(pb::CodedOutputStream output) {
4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800
      packedInt32_.WriteTo(output, _repeated_packedInt32_codec);
      packedInt64_.WriteTo(output, _repeated_packedInt64_codec);
      packedUint32_.WriteTo(output, _repeated_packedUint32_codec);
      packedUint64_.WriteTo(output, _repeated_packedUint64_codec);
      packedSint32_.WriteTo(output, _repeated_packedSint32_codec);
      packedSint64_.WriteTo(output, _repeated_packedSint64_codec);
      packedFixed32_.WriteTo(output, _repeated_packedFixed32_codec);
      packedFixed64_.WriteTo(output, _repeated_packedFixed64_codec);
      packedSfixed32_.WriteTo(output, _repeated_packedSfixed32_codec);
      packedSfixed64_.WriteTo(output, _repeated_packedSfixed64_codec);
      packedFloat_.WriteTo(output, _repeated_packedFloat_codec);
      packedDouble_.WriteTo(output, _repeated_packedDouble_codec);
      packedBool_.WriteTo(output, _repeated_packedBool_codec);
      packedEnum_.WriteTo(output, _repeated_packedEnum_codec);
4801 4802 4803 4804
    }

    public int CalculateSize() {
      int size = 0;
4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818
      size += packedInt32_.CalculateSize(_repeated_packedInt32_codec);
      size += packedInt64_.CalculateSize(_repeated_packedInt64_codec);
      size += packedUint32_.CalculateSize(_repeated_packedUint32_codec);
      size += packedUint64_.CalculateSize(_repeated_packedUint64_codec);
      size += packedSint32_.CalculateSize(_repeated_packedSint32_codec);
      size += packedSint64_.CalculateSize(_repeated_packedSint64_codec);
      size += packedFixed32_.CalculateSize(_repeated_packedFixed32_codec);
      size += packedFixed64_.CalculateSize(_repeated_packedFixed64_codec);
      size += packedSfixed32_.CalculateSize(_repeated_packedSfixed32_codec);
      size += packedSfixed64_.CalculateSize(_repeated_packedSfixed64_codec);
      size += packedFloat_.CalculateSize(_repeated_packedFloat_codec);
      size += packedDouble_.CalculateSize(_repeated_packedDouble_codec);
      size += packedBool_.CalculateSize(_repeated_packedBool_codec);
      size += packedEnum_.CalculateSize(_repeated_packedEnum_codec);
4819 4820
      return size;
    }
4821

4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841
    public void MergeFrom(TestPackedTypes other) {
      if (other == null) {
        return;
      }
      packedInt32_.Add(other.packedInt32_);
      packedInt64_.Add(other.packedInt64_);
      packedUint32_.Add(other.packedUint32_);
      packedUint64_.Add(other.packedUint64_);
      packedSint32_.Add(other.packedSint32_);
      packedSint64_.Add(other.packedSint64_);
      packedFixed32_.Add(other.packedFixed32_);
      packedFixed64_.Add(other.packedFixed64_);
      packedSfixed32_.Add(other.packedSfixed32_);
      packedSfixed64_.Add(other.packedSfixed64_);
      packedFloat_.Add(other.packedFloat_);
      packedDouble_.Add(other.packedDouble_);
      packedBool_.Add(other.packedBool_);
      packedEnum_.Add(other.packedEnum_);
    }

Jon Skeet's avatar
Jon Skeet committed
4842
    public void MergeFrom(pb::CodedInputStream input) {
4843
      uint tag;
4844
      while ((tag = input.ReadTag()) != 0) {
4845 4846
        switch(tag) {
          default:
4847
            input.SkipLastField();
4848 4849 4850
            break;
          case 722:
          case 720: {
4851
            packedInt32_.AddEntriesFrom(input, _repeated_packedInt32_codec);
4852 4853 4854 4855
            break;
          }
          case 730:
          case 728: {
4856
            packedInt64_.AddEntriesFrom(input, _repeated_packedInt64_codec);
4857 4858 4859 4860
            break;
          }
          case 738:
          case 736: {
4861
            packedUint32_.AddEntriesFrom(input, _repeated_packedUint32_codec);
4862 4863 4864 4865
            break;
          }
          case 746:
          case 744: {
4866
            packedUint64_.AddEntriesFrom(input, _repeated_packedUint64_codec);
4867 4868 4869 4870
            break;
          }
          case 754:
          case 752: {
4871
            packedSint32_.AddEntriesFrom(input, _repeated_packedSint32_codec);
4872 4873 4874 4875
            break;
          }
          case 762:
          case 760: {
4876
            packedSint64_.AddEntriesFrom(input, _repeated_packedSint64_codec);
4877 4878 4879 4880
            break;
          }
          case 770:
          case 773: {
4881
            packedFixed32_.AddEntriesFrom(input, _repeated_packedFixed32_codec);
4882 4883 4884 4885
            break;
          }
          case 778:
          case 777: {
4886
            packedFixed64_.AddEntriesFrom(input, _repeated_packedFixed64_codec);
4887 4888 4889 4890
            break;
          }
          case 786:
          case 789: {
4891
            packedSfixed32_.AddEntriesFrom(input, _repeated_packedSfixed32_codec);
4892 4893 4894 4895
            break;
          }
          case 794:
          case 793: {
4896
            packedSfixed64_.AddEntriesFrom(input, _repeated_packedSfixed64_codec);
4897 4898 4899 4900
            break;
          }
          case 802:
          case 805: {
4901
            packedFloat_.AddEntriesFrom(input, _repeated_packedFloat_codec);
4902 4903 4904 4905
            break;
          }
          case 810:
          case 809: {
4906
            packedDouble_.AddEntriesFrom(input, _repeated_packedDouble_codec);
4907 4908 4909 4910
            break;
          }
          case 818:
          case 816: {
4911
            packedBool_.AddEntriesFrom(input, _repeated_packedBool_codec);
4912 4913 4914 4915
            break;
          }
          case 826:
          case 824: {
4916
            packedEnum_.AddEntriesFrom(input, _repeated_packedEnum_codec);
4917 4918 4919 4920 4921 4922 4923 4924
            break;
          }
        }
      }
    }

  }

4925 4926 4927 4928
  /// <summary>
  ///  A message with the same fields as TestPackedTypes, but without packing. Used
  ///  to test packed &lt;-> unpacked wire compatibility.
  /// </summary>
4929
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
4930
  public sealed partial class TestUnpackedTypes : pb::IMessage<TestUnpackedTypes> {
4931 4932 4933
    private static readonly pb::MessageParser<TestUnpackedTypes> _parser = new pb::MessageParser<TestUnpackedTypes>(() => new TestUnpackedTypes());
    public static pb::MessageParser<TestUnpackedTypes> Parser { get { return _parser; } }

4934
    public static pbr::MessageDescriptor Descriptor {
4935
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[24]; }
4936 4937
    }

4938 4939
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
4940 4941
    }

4942 4943 4944
    public TestUnpackedTypes() {
      OnConstruction();
    }
Jon Skeet's avatar
Jon Skeet committed
4945

4946 4947 4948
    partial void OnConstruction();

    public TestUnpackedTypes(TestUnpackedTypes other) : this() {
Jon Skeet's avatar
Jon Skeet committed
4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966
      unpackedInt32_ = other.unpackedInt32_.Clone();
      unpackedInt64_ = other.unpackedInt64_.Clone();
      unpackedUint32_ = other.unpackedUint32_.Clone();
      unpackedUint64_ = other.unpackedUint64_.Clone();
      unpackedSint32_ = other.unpackedSint32_.Clone();
      unpackedSint64_ = other.unpackedSint64_.Clone();
      unpackedFixed32_ = other.unpackedFixed32_.Clone();
      unpackedFixed64_ = other.unpackedFixed64_.Clone();
      unpackedSfixed32_ = other.unpackedSfixed32_.Clone();
      unpackedSfixed64_ = other.unpackedSfixed64_.Clone();
      unpackedFloat_ = other.unpackedFloat_.Clone();
      unpackedDouble_ = other.unpackedDouble_.Clone();
      unpackedBool_ = other.unpackedBool_.Clone();
      unpackedEnum_ = other.unpackedEnum_.Clone();
    }

    public TestUnpackedTypes Clone() {
      return new TestUnpackedTypes(this);
4967
    }
Jon Skeet's avatar
Jon Skeet committed
4968

4969
    /// <summary>Field number for the "unpacked_int32" field.</summary>
4970
    public const int UnpackedInt32FieldNumber = 90;
4971 4972
    private static readonly pb::FieldCodec<int> _repeated_unpackedInt32_codec
        = pb::FieldCodec.ForInt32(720);
4973 4974 4975 4976 4977
    private readonly pbc::RepeatedField<int> unpackedInt32_ = new pbc::RepeatedField<int>();
    public pbc::RepeatedField<int> UnpackedInt32 {
      get { return unpackedInt32_; }
    }

4978
    /// <summary>Field number for the "unpacked_int64" field.</summary>
4979
    public const int UnpackedInt64FieldNumber = 91;
4980 4981
    private static readonly pb::FieldCodec<long> _repeated_unpackedInt64_codec
        = pb::FieldCodec.ForInt64(728);
4982 4983 4984 4985 4986
    private readonly pbc::RepeatedField<long> unpackedInt64_ = new pbc::RepeatedField<long>();
    public pbc::RepeatedField<long> UnpackedInt64 {
      get { return unpackedInt64_; }
    }

4987
    /// <summary>Field number for the "unpacked_uint32" field.</summary>
4988
    public const int UnpackedUint32FieldNumber = 92;
4989 4990
    private static readonly pb::FieldCodec<uint> _repeated_unpackedUint32_codec
        = pb::FieldCodec.ForUInt32(736);
4991 4992 4993 4994 4995
    private readonly pbc::RepeatedField<uint> unpackedUint32_ = new pbc::RepeatedField<uint>();
    public pbc::RepeatedField<uint> UnpackedUint32 {
      get { return unpackedUint32_; }
    }

4996
    /// <summary>Field number for the "unpacked_uint64" field.</summary>
4997
    public const int UnpackedUint64FieldNumber = 93;
4998 4999
    private static readonly pb::FieldCodec<ulong> _repeated_unpackedUint64_codec
        = pb::FieldCodec.ForUInt64(744);
5000 5001 5002 5003 5004
    private readonly pbc::RepeatedField<ulong> unpackedUint64_ = new pbc::RepeatedField<ulong>();
    public pbc::RepeatedField<ulong> UnpackedUint64 {
      get { return unpackedUint64_; }
    }

5005
    /// <summary>Field number for the "unpacked_sint32" field.</summary>
5006
    public const int UnpackedSint32FieldNumber = 94;
5007 5008
    private static readonly pb::FieldCodec<int> _repeated_unpackedSint32_codec
        = pb::FieldCodec.ForSInt32(752);
5009 5010 5011 5012 5013
    private readonly pbc::RepeatedField<int> unpackedSint32_ = new pbc::RepeatedField<int>();
    public pbc::RepeatedField<int> UnpackedSint32 {
      get { return unpackedSint32_; }
    }

5014
    /// <summary>Field number for the "unpacked_sint64" field.</summary>
5015
    public const int UnpackedSint64FieldNumber = 95;
5016 5017
    private static readonly pb::FieldCodec<long> _repeated_unpackedSint64_codec
        = pb::FieldCodec.ForSInt64(760);
5018 5019 5020 5021 5022
    private readonly pbc::RepeatedField<long> unpackedSint64_ = new pbc::RepeatedField<long>();
    public pbc::RepeatedField<long> UnpackedSint64 {
      get { return unpackedSint64_; }
    }

5023
    /// <summary>Field number for the "unpacked_fixed32" field.</summary>
5024
    public const int UnpackedFixed32FieldNumber = 96;
5025 5026
    private static readonly pb::FieldCodec<uint> _repeated_unpackedFixed32_codec
        = pb::FieldCodec.ForFixed32(773);
5027 5028 5029 5030 5031
    private readonly pbc::RepeatedField<uint> unpackedFixed32_ = new pbc::RepeatedField<uint>();
    public pbc::RepeatedField<uint> UnpackedFixed32 {
      get { return unpackedFixed32_; }
    }

5032
    /// <summary>Field number for the "unpacked_fixed64" field.</summary>
5033
    public const int UnpackedFixed64FieldNumber = 97;
5034 5035
    private static readonly pb::FieldCodec<ulong> _repeated_unpackedFixed64_codec
        = pb::FieldCodec.ForFixed64(777);
5036 5037 5038 5039 5040
    private readonly pbc::RepeatedField<ulong> unpackedFixed64_ = new pbc::RepeatedField<ulong>();
    public pbc::RepeatedField<ulong> UnpackedFixed64 {
      get { return unpackedFixed64_; }
    }

5041
    /// <summary>Field number for the "unpacked_sfixed32" field.</summary>
5042
    public const int UnpackedSfixed32FieldNumber = 98;
5043 5044
    private static readonly pb::FieldCodec<int> _repeated_unpackedSfixed32_codec
        = pb::FieldCodec.ForSFixed32(789);
5045 5046 5047 5048 5049
    private readonly pbc::RepeatedField<int> unpackedSfixed32_ = new pbc::RepeatedField<int>();
    public pbc::RepeatedField<int> UnpackedSfixed32 {
      get { return unpackedSfixed32_; }
    }

5050
    /// <summary>Field number for the "unpacked_sfixed64" field.</summary>
5051
    public const int UnpackedSfixed64FieldNumber = 99;
5052 5053
    private static readonly pb::FieldCodec<long> _repeated_unpackedSfixed64_codec
        = pb::FieldCodec.ForSFixed64(793);
5054 5055 5056 5057 5058
    private readonly pbc::RepeatedField<long> unpackedSfixed64_ = new pbc::RepeatedField<long>();
    public pbc::RepeatedField<long> UnpackedSfixed64 {
      get { return unpackedSfixed64_; }
    }

5059
    /// <summary>Field number for the "unpacked_float" field.</summary>
5060
    public const int UnpackedFloatFieldNumber = 100;
5061 5062
    private static readonly pb::FieldCodec<float> _repeated_unpackedFloat_codec
        = pb::FieldCodec.ForFloat(805);
5063 5064 5065 5066 5067
    private readonly pbc::RepeatedField<float> unpackedFloat_ = new pbc::RepeatedField<float>();
    public pbc::RepeatedField<float> UnpackedFloat {
      get { return unpackedFloat_; }
    }

5068
    /// <summary>Field number for the "unpacked_double" field.</summary>
5069
    public const int UnpackedDoubleFieldNumber = 101;
5070 5071
    private static readonly pb::FieldCodec<double> _repeated_unpackedDouble_codec
        = pb::FieldCodec.ForDouble(809);
5072 5073 5074 5075 5076
    private readonly pbc::RepeatedField<double> unpackedDouble_ = new pbc::RepeatedField<double>();
    public pbc::RepeatedField<double> UnpackedDouble {
      get { return unpackedDouble_; }
    }

5077
    /// <summary>Field number for the "unpacked_bool" field.</summary>
5078
    public const int UnpackedBoolFieldNumber = 102;
5079 5080
    private static readonly pb::FieldCodec<bool> _repeated_unpackedBool_codec
        = pb::FieldCodec.ForBool(816);
5081 5082 5083 5084 5085
    private readonly pbc::RepeatedField<bool> unpackedBool_ = new pbc::RepeatedField<bool>();
    public pbc::RepeatedField<bool> UnpackedBool {
      get { return unpackedBool_; }
    }

5086
    /// <summary>Field number for the "unpacked_enum" field.</summary>
5087
    public const int UnpackedEnumFieldNumber = 103;
5088
    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_unpackedEnum_codec
5089 5090
        = pb::FieldCodec.ForEnum(824, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> unpackedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123
    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> UnpackedEnum {
      get { return unpackedEnum_; }
    }

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

    public bool Equals(TestUnpackedTypes other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!unpackedInt32_.Equals(other.unpackedInt32_)) return false;
      if(!unpackedInt64_.Equals(other.unpackedInt64_)) return false;
      if(!unpackedUint32_.Equals(other.unpackedUint32_)) return false;
      if(!unpackedUint64_.Equals(other.unpackedUint64_)) return false;
      if(!unpackedSint32_.Equals(other.unpackedSint32_)) return false;
      if(!unpackedSint64_.Equals(other.unpackedSint64_)) return false;
      if(!unpackedFixed32_.Equals(other.unpackedFixed32_)) return false;
      if(!unpackedFixed64_.Equals(other.unpackedFixed64_)) return false;
      if(!unpackedSfixed32_.Equals(other.unpackedSfixed32_)) return false;
      if(!unpackedSfixed64_.Equals(other.unpackedSfixed64_)) return false;
      if(!unpackedFloat_.Equals(other.unpackedFloat_)) return false;
      if(!unpackedDouble_.Equals(other.unpackedDouble_)) return false;
      if(!unpackedBool_.Equals(other.unpackedBool_)) return false;
      if(!unpackedEnum_.Equals(other.unpackedEnum_)) return false;
      return true;
    }

    public override int GetHashCode() {
5124
      int hash = 1;
5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141
      hash ^= unpackedInt32_.GetHashCode();
      hash ^= unpackedInt64_.GetHashCode();
      hash ^= unpackedUint32_.GetHashCode();
      hash ^= unpackedUint64_.GetHashCode();
      hash ^= unpackedSint32_.GetHashCode();
      hash ^= unpackedSint64_.GetHashCode();
      hash ^= unpackedFixed32_.GetHashCode();
      hash ^= unpackedFixed64_.GetHashCode();
      hash ^= unpackedSfixed32_.GetHashCode();
      hash ^= unpackedSfixed64_.GetHashCode();
      hash ^= unpackedFloat_.GetHashCode();
      hash ^= unpackedDouble_.GetHashCode();
      hash ^= unpackedBool_.GetHashCode();
      hash ^= unpackedEnum_.GetHashCode();
      return hash;
    }

5142
    public override string ToString() {
5143
      return pb::JsonFormatter.ToDiagnosticString(this);
5144 5145
    }

Jon Skeet's avatar
Jon Skeet committed
5146
    public void WriteTo(pb::CodedOutputStream output) {
5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160
      unpackedInt32_.WriteTo(output, _repeated_unpackedInt32_codec);
      unpackedInt64_.WriteTo(output, _repeated_unpackedInt64_codec);
      unpackedUint32_.WriteTo(output, _repeated_unpackedUint32_codec);
      unpackedUint64_.WriteTo(output, _repeated_unpackedUint64_codec);
      unpackedSint32_.WriteTo(output, _repeated_unpackedSint32_codec);
      unpackedSint64_.WriteTo(output, _repeated_unpackedSint64_codec);
      unpackedFixed32_.WriteTo(output, _repeated_unpackedFixed32_codec);
      unpackedFixed64_.WriteTo(output, _repeated_unpackedFixed64_codec);
      unpackedSfixed32_.WriteTo(output, _repeated_unpackedSfixed32_codec);
      unpackedSfixed64_.WriteTo(output, _repeated_unpackedSfixed64_codec);
      unpackedFloat_.WriteTo(output, _repeated_unpackedFloat_codec);
      unpackedDouble_.WriteTo(output, _repeated_unpackedDouble_codec);
      unpackedBool_.WriteTo(output, _repeated_unpackedBool_codec);
      unpackedEnum_.WriteTo(output, _repeated_unpackedEnum_codec);
5161 5162 5163 5164
    }

    public int CalculateSize() {
      int size = 0;
5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178
      size += unpackedInt32_.CalculateSize(_repeated_unpackedInt32_codec);
      size += unpackedInt64_.CalculateSize(_repeated_unpackedInt64_codec);
      size += unpackedUint32_.CalculateSize(_repeated_unpackedUint32_codec);
      size += unpackedUint64_.CalculateSize(_repeated_unpackedUint64_codec);
      size += unpackedSint32_.CalculateSize(_repeated_unpackedSint32_codec);
      size += unpackedSint64_.CalculateSize(_repeated_unpackedSint64_codec);
      size += unpackedFixed32_.CalculateSize(_repeated_unpackedFixed32_codec);
      size += unpackedFixed64_.CalculateSize(_repeated_unpackedFixed64_codec);
      size += unpackedSfixed32_.CalculateSize(_repeated_unpackedSfixed32_codec);
      size += unpackedSfixed64_.CalculateSize(_repeated_unpackedSfixed64_codec);
      size += unpackedFloat_.CalculateSize(_repeated_unpackedFloat_codec);
      size += unpackedDouble_.CalculateSize(_repeated_unpackedDouble_codec);
      size += unpackedBool_.CalculateSize(_repeated_unpackedBool_codec);
      size += unpackedEnum_.CalculateSize(_repeated_unpackedEnum_codec);
5179 5180
      return size;
    }
5181

5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201
    public void MergeFrom(TestUnpackedTypes other) {
      if (other == null) {
        return;
      }
      unpackedInt32_.Add(other.unpackedInt32_);
      unpackedInt64_.Add(other.unpackedInt64_);
      unpackedUint32_.Add(other.unpackedUint32_);
      unpackedUint64_.Add(other.unpackedUint64_);
      unpackedSint32_.Add(other.unpackedSint32_);
      unpackedSint64_.Add(other.unpackedSint64_);
      unpackedFixed32_.Add(other.unpackedFixed32_);
      unpackedFixed64_.Add(other.unpackedFixed64_);
      unpackedSfixed32_.Add(other.unpackedSfixed32_);
      unpackedSfixed64_.Add(other.unpackedSfixed64_);
      unpackedFloat_.Add(other.unpackedFloat_);
      unpackedDouble_.Add(other.unpackedDouble_);
      unpackedBool_.Add(other.unpackedBool_);
      unpackedEnum_.Add(other.unpackedEnum_);
    }

Jon Skeet's avatar
Jon Skeet committed
5202
    public void MergeFrom(pb::CodedInputStream input) {
5203
      uint tag;
5204
      while ((tag = input.ReadTag()) != 0) {
5205 5206
        switch(tag) {
          default:
5207
            input.SkipLastField();
5208 5209 5210
            break;
          case 722:
          case 720: {
5211
            unpackedInt32_.AddEntriesFrom(input, _repeated_unpackedInt32_codec);
5212 5213 5214 5215
            break;
          }
          case 730:
          case 728: {
5216
            unpackedInt64_.AddEntriesFrom(input, _repeated_unpackedInt64_codec);
5217 5218 5219 5220
            break;
          }
          case 738:
          case 736: {
5221
            unpackedUint32_.AddEntriesFrom(input, _repeated_unpackedUint32_codec);
5222 5223 5224 5225
            break;
          }
          case 746:
          case 744: {
5226
            unpackedUint64_.AddEntriesFrom(input, _repeated_unpackedUint64_codec);
5227 5228 5229 5230
            break;
          }
          case 754:
          case 752: {
5231
            unpackedSint32_.AddEntriesFrom(input, _repeated_unpackedSint32_codec);
5232 5233 5234 5235
            break;
          }
          case 762:
          case 760: {
5236
            unpackedSint64_.AddEntriesFrom(input, _repeated_unpackedSint64_codec);
5237 5238 5239 5240
            break;
          }
          case 770:
          case 773: {
5241
            unpackedFixed32_.AddEntriesFrom(input, _repeated_unpackedFixed32_codec);
5242 5243 5244 5245
            break;
          }
          case 778:
          case 777: {
5246
            unpackedFixed64_.AddEntriesFrom(input, _repeated_unpackedFixed64_codec);
5247 5248 5249 5250
            break;
          }
          case 786:
          case 789: {
5251
            unpackedSfixed32_.AddEntriesFrom(input, _repeated_unpackedSfixed32_codec);
5252 5253 5254 5255
            break;
          }
          case 794:
          case 793: {
5256
            unpackedSfixed64_.AddEntriesFrom(input, _repeated_unpackedSfixed64_codec);
5257 5258 5259 5260
            break;
          }
          case 802:
          case 805: {
5261
            unpackedFloat_.AddEntriesFrom(input, _repeated_unpackedFloat_codec);
5262 5263 5264 5265
            break;
          }
          case 810:
          case 809: {
5266
            unpackedDouble_.AddEntriesFrom(input, _repeated_unpackedDouble_codec);
5267 5268 5269 5270
            break;
          }
          case 818:
          case 816: {
5271
            unpackedBool_.AddEntriesFrom(input, _repeated_unpackedBool_codec);
5272 5273 5274 5275
            break;
          }
          case 826:
          case 824: {
5276
            unpackedEnum_.AddEntriesFrom(input, _repeated_unpackedEnum_codec);
5277 5278 5279 5280 5281 5282 5283 5284 5285
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
5286
  public sealed partial class TestRepeatedScalarDifferentTagSizes : pb::IMessage<TestRepeatedScalarDifferentTagSizes> {
5287 5288 5289
    private static readonly pb::MessageParser<TestRepeatedScalarDifferentTagSizes> _parser = new pb::MessageParser<TestRepeatedScalarDifferentTagSizes>(() => new TestRepeatedScalarDifferentTagSizes());
    public static pb::MessageParser<TestRepeatedScalarDifferentTagSizes> Parser { get { return _parser; } }

5290
    public static pbr::MessageDescriptor Descriptor {
5291
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[25]; }
5292 5293
    }

5294 5295
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
5296 5297
    }

5298 5299 5300 5301 5302
    public TestRepeatedScalarDifferentTagSizes() {
      OnConstruction();
    }

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

5304
    public TestRepeatedScalarDifferentTagSizes(TestRepeatedScalarDifferentTagSizes other) : this() {
Jon Skeet's avatar
Jon Skeet committed
5305 5306 5307 5308 5309 5310 5311 5312 5313 5314
      repeatedFixed32_ = other.repeatedFixed32_.Clone();
      repeatedInt32_ = other.repeatedInt32_.Clone();
      repeatedFixed64_ = other.repeatedFixed64_.Clone();
      repeatedInt64_ = other.repeatedInt64_.Clone();
      repeatedFloat_ = other.repeatedFloat_.Clone();
      repeatedUint64_ = other.repeatedUint64_.Clone();
    }

    public TestRepeatedScalarDifferentTagSizes Clone() {
      return new TestRepeatedScalarDifferentTagSizes(this);
5315
    }
Jon Skeet's avatar
Jon Skeet committed
5316

5317
    /// <summary>Field number for the "repeated_fixed32" field.</summary>
5318
    public const int RepeatedFixed32FieldNumber = 12;
5319 5320
    private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec
        = pb::FieldCodec.ForFixed32(98);
5321
    private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
5322 5323 5324 5325 5326
    /// <summary>
    ///  Parsing repeated fixed size values used to fail. This message needs to be
    ///  used in order to get a tag of the right size; all of the repeated fields
    ///  in TestAllTypes didn't trigger the check.
    /// </summary>
5327 5328 5329 5330
    public pbc::RepeatedField<uint> RepeatedFixed32 {
      get { return repeatedFixed32_; }
    }

5331
    /// <summary>Field number for the "repeated_int32" field.</summary>
5332
    public const int RepeatedInt32FieldNumber = 13;
5333 5334
    private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
        = pb::FieldCodec.ForInt32(106);
5335
    private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
5336 5337 5338
    /// <summary>
    ///  Check for a varint type, just for good measure.
    /// </summary>
5339 5340 5341 5342
    public pbc::RepeatedField<int> RepeatedInt32 {
      get { return repeatedInt32_; }
    }

5343
    /// <summary>Field number for the "repeated_fixed64" field.</summary>
5344
    public const int RepeatedFixed64FieldNumber = 2046;
5345 5346
    private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec
        = pb::FieldCodec.ForFixed64(16370);
5347
    private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
5348 5349 5350
    /// <summary>
    ///  These have two-byte tags.
    /// </summary>
5351 5352 5353 5354
    public pbc::RepeatedField<ulong> RepeatedFixed64 {
      get { return repeatedFixed64_; }
    }

5355
    /// <summary>Field number for the "repeated_int64" field.</summary>
5356
    public const int RepeatedInt64FieldNumber = 2047;
5357 5358
    private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
        = pb::FieldCodec.ForInt64(16378);
5359 5360 5361 5362 5363
    private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>();
    public pbc::RepeatedField<long> RepeatedInt64 {
      get { return repeatedInt64_; }
    }

5364
    /// <summary>Field number for the "repeated_float" field.</summary>
5365
    public const int RepeatedFloatFieldNumber = 262142;
5366 5367
    private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec
        = pb::FieldCodec.ForFloat(2097138);
5368
    private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
5369 5370 5371
    /// <summary>
    ///  Three byte tags.
    /// </summary>
5372 5373 5374 5375
    public pbc::RepeatedField<float> RepeatedFloat {
      get { return repeatedFloat_; }
    }

5376
    /// <summary>Field number for the "repeated_uint64" field.</summary>
5377
    public const int RepeatedUint64FieldNumber = 262143;
5378 5379
    private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
        = pb::FieldCodec.ForUInt64(2097146);
5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405
    private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>();
    public pbc::RepeatedField<ulong> RepeatedUint64 {
      get { return repeatedUint64_; }
    }

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

    public bool Equals(TestRepeatedScalarDifferentTagSizes other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
      if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
      if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
      if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
      if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
      if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
      return true;
    }

    public override int GetHashCode() {
5406
      int hash = 1;
5407 5408 5409 5410 5411 5412 5413 5414 5415
      hash ^= repeatedFixed32_.GetHashCode();
      hash ^= repeatedInt32_.GetHashCode();
      hash ^= repeatedFixed64_.GetHashCode();
      hash ^= repeatedInt64_.GetHashCode();
      hash ^= repeatedFloat_.GetHashCode();
      hash ^= repeatedUint64_.GetHashCode();
      return hash;
    }

5416
    public override string ToString() {
5417
      return pb::JsonFormatter.ToDiagnosticString(this);
5418 5419
    }

Jon Skeet's avatar
Jon Skeet committed
5420
    public void WriteTo(pb::CodedOutputStream output) {
5421 5422 5423 5424 5425 5426
      repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
      repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
      repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
      repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
      repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
      repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
5427 5428 5429 5430
    }

    public int CalculateSize() {
      int size = 0;
5431 5432 5433 5434 5435 5436
      size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
      size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
      size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
      size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
      size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
      size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
5437 5438
      return size;
    }
5439

5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451
    public void MergeFrom(TestRepeatedScalarDifferentTagSizes other) {
      if (other == null) {
        return;
      }
      repeatedFixed32_.Add(other.repeatedFixed32_);
      repeatedInt32_.Add(other.repeatedInt32_);
      repeatedFixed64_.Add(other.repeatedFixed64_);
      repeatedInt64_.Add(other.repeatedInt64_);
      repeatedFloat_.Add(other.repeatedFloat_);
      repeatedUint64_.Add(other.repeatedUint64_);
    }

Jon Skeet's avatar
Jon Skeet committed
5452
    public void MergeFrom(pb::CodedInputStream input) {
5453
      uint tag;
5454
      while ((tag = input.ReadTag()) != 0) {
5455 5456
        switch(tag) {
          default:
5457
            input.SkipLastField();
5458 5459 5460
            break;
          case 98:
          case 101: {
5461
            repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
5462 5463 5464 5465
            break;
          }
          case 106:
          case 104: {
5466
            repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
5467 5468 5469 5470
            break;
          }
          case 16370:
          case 16369: {
5471
            repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
5472 5473 5474 5475
            break;
          }
          case 16378:
          case 16376: {
5476
            repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
5477 5478 5479 5480
            break;
          }
          case 2097138:
          case 2097141: {
5481
            repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
5482 5483 5484 5485
            break;
          }
          case 2097146:
          case 2097144: {
5486
            repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
5487 5488 5489 5490 5491 5492 5493 5494 5495
            break;
          }
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
5496
  public sealed partial class TestCommentInjectionMessage : pb::IMessage<TestCommentInjectionMessage> {
5497 5498 5499
    private static readonly pb::MessageParser<TestCommentInjectionMessage> _parser = new pb::MessageParser<TestCommentInjectionMessage>(() => new TestCommentInjectionMessage());
    public static pb::MessageParser<TestCommentInjectionMessage> Parser { get { return _parser; } }

5500
    public static pbr::MessageDescriptor Descriptor {
5501
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[26]; }
5502 5503
    }

5504 5505
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
5506 5507
    }

5508 5509 5510 5511 5512
    public TestCommentInjectionMessage() {
      OnConstruction();
    }

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

5514
    public TestCommentInjectionMessage(TestCommentInjectionMessage other) : this() {
Jon Skeet's avatar
Jon Skeet committed
5515 5516 5517 5518 5519
      a_ = other.a_;
    }

    public TestCommentInjectionMessage Clone() {
      return new TestCommentInjectionMessage(this);
5520
    }
Jon Skeet's avatar
Jon Skeet committed
5521

5522
    /// <summary>Field number for the "a" field.</summary>
5523 5524
    public const int AFieldNumber = 1;
    private string a_ = "";
5525 5526 5527
    /// <summary>
    ///  */ &lt;- This should not close the generated doc comment
    /// </summary>
5528 5529
    public string A {
      get { return a_; }
5530
      set {
5531
        a_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
5532
      }
5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550
    }

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

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

    public override int GetHashCode() {
5551
      int hash = 1;
Jon Skeet's avatar
Jon Skeet committed
5552
      if (A.Length != 0) hash ^= A.GetHashCode();
5553 5554 5555
      return hash;
    }

5556
    public override string ToString() {
5557
      return pb::JsonFormatter.ToDiagnosticString(this);
5558 5559
    }

Jon Skeet's avatar
Jon Skeet committed
5560
    public void WriteTo(pb::CodedOutputStream output) {
Jon Skeet's avatar
Jon Skeet committed
5561
      if (A.Length != 0) {
5562 5563
        output.WriteRawTag(10);
        output.WriteString(A);
5564 5565 5566 5567 5568
      }
    }

    public int CalculateSize() {
      int size = 0;
Jon Skeet's avatar
Jon Skeet committed
5569
      if (A.Length != 0) {
5570
        size += 1 + pb::CodedOutputStream.ComputeStringSize(A);
5571 5572 5573
      }
      return size;
    }
5574

5575 5576 5577 5578
    public void MergeFrom(TestCommentInjectionMessage other) {
      if (other == null) {
        return;
      }
Jon Skeet's avatar
Jon Skeet committed
5579
      if (other.A.Length != 0) {
5580 5581 5582 5583
        A = other.A;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
5584
    public void MergeFrom(pb::CodedInputStream input) {
5585
      uint tag;
5586
      while ((tag = input.ReadTag()) != 0) {
5587 5588
        switch(tag) {
          default:
5589
            input.SkipLastField();
5590 5591
            break;
          case 10: {
Jon Skeet's avatar
Jon Skeet committed
5592
            A = input.ReadString();
5593 5594 5595 5596 5597 5598 5599 5600
            break;
          }
        }
      }
    }

  }

5601 5602 5603
  /// <summary>
  ///  Test that RPC services work.
  /// </summary>
5604
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
5605
  public sealed partial class FooRequest : pb::IMessage<FooRequest> {
5606 5607 5608
    private static readonly pb::MessageParser<FooRequest> _parser = new pb::MessageParser<FooRequest>(() => new FooRequest());
    public static pb::MessageParser<FooRequest> Parser { get { return _parser; } }

5609
    public static pbr::MessageDescriptor Descriptor {
5610
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[27]; }
5611 5612
    }

5613 5614
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
5615 5616
    }

5617 5618 5619 5620 5621
    public FooRequest() {
      OnConstruction();
    }

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

5623
    public FooRequest(FooRequest other) : this() {
5624
    }
Jon Skeet's avatar
Jon Skeet committed
5625 5626 5627 5628 5629

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

5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644
    public override bool Equals(object other) {
      return Equals(other as FooRequest);
    }

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

    public override int GetHashCode() {
5645
      int hash = 1;
5646 5647 5648
      return hash;
    }

5649
    public override string ToString() {
5650
      return pb::JsonFormatter.ToDiagnosticString(this);
5651 5652
    }

Jon Skeet's avatar
Jon Skeet committed
5653
    public void WriteTo(pb::CodedOutputStream output) {
5654 5655 5656 5657 5658 5659
    }

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

5661 5662 5663 5664 5665 5666
    public void MergeFrom(FooRequest other) {
      if (other == null) {
        return;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
5667
    public void MergeFrom(pb::CodedInputStream input) {
5668
      uint tag;
5669
      while ((tag = input.ReadTag()) != 0) {
5670 5671
        switch(tag) {
          default:
5672
            input.SkipLastField();
5673 5674 5675 5676 5677 5678 5679 5680
            break;
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
5681
  public sealed partial class FooResponse : pb::IMessage<FooResponse> {
5682 5683 5684
    private static readonly pb::MessageParser<FooResponse> _parser = new pb::MessageParser<FooResponse>(() => new FooResponse());
    public static pb::MessageParser<FooResponse> Parser { get { return _parser; } }

5685
    public static pbr::MessageDescriptor Descriptor {
5686
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[28]; }
5687 5688
    }

5689 5690
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
5691 5692
    }

5693 5694 5695 5696 5697
    public FooResponse() {
      OnConstruction();
    }

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

5699
    public FooResponse(FooResponse other) : this() {
5700
    }
Jon Skeet's avatar
Jon Skeet committed
5701 5702 5703 5704 5705

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

5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720
    public override bool Equals(object other) {
      return Equals(other as FooResponse);
    }

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

    public override int GetHashCode() {
5721
      int hash = 1;
5722 5723 5724
      return hash;
    }

5725
    public override string ToString() {
5726
      return pb::JsonFormatter.ToDiagnosticString(this);
5727 5728
    }

Jon Skeet's avatar
Jon Skeet committed
5729
    public void WriteTo(pb::CodedOutputStream output) {
5730 5731 5732 5733 5734 5735
    }

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

5737 5738 5739 5740 5741 5742
    public void MergeFrom(FooResponse other) {
      if (other == null) {
        return;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
5743
    public void MergeFrom(pb::CodedInputStream input) {
5744
      uint tag;
5745
      while ((tag = input.ReadTag()) != 0) {
5746 5747
        switch(tag) {
          default:
5748
            input.SkipLastField();
5749 5750 5751 5752 5753 5754 5755 5756
            break;
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
5757
  public sealed partial class FooClientMessage : pb::IMessage<FooClientMessage> {
5758 5759 5760
    private static readonly pb::MessageParser<FooClientMessage> _parser = new pb::MessageParser<FooClientMessage>(() => new FooClientMessage());
    public static pb::MessageParser<FooClientMessage> Parser { get { return _parser; } }

5761
    public static pbr::MessageDescriptor Descriptor {
5762
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[29]; }
5763 5764
    }

5765 5766
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
5767 5768
    }

5769 5770 5771 5772 5773
    public FooClientMessage() {
      OnConstruction();
    }

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

5775
    public FooClientMessage(FooClientMessage other) : this() {
5776
    }
Jon Skeet's avatar
Jon Skeet committed
5777 5778 5779 5780 5781

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

5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796
    public override bool Equals(object other) {
      return Equals(other as FooClientMessage);
    }

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

    public override int GetHashCode() {
5797
      int hash = 1;
5798 5799 5800
      return hash;
    }

5801
    public override string ToString() {
5802
      return pb::JsonFormatter.ToDiagnosticString(this);
5803 5804
    }

Jon Skeet's avatar
Jon Skeet committed
5805
    public void WriteTo(pb::CodedOutputStream output) {
5806 5807 5808 5809 5810 5811
    }

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

5813 5814 5815 5816 5817 5818
    public void MergeFrom(FooClientMessage other) {
      if (other == null) {
        return;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
5819
    public void MergeFrom(pb::CodedInputStream input) {
5820
      uint tag;
5821
      while ((tag = input.ReadTag()) != 0) {
5822 5823
        switch(tag) {
          default:
5824
            input.SkipLastField();
5825 5826 5827 5828 5829 5830 5831 5832
            break;
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
5833
  public sealed partial class FooServerMessage : pb::IMessage<FooServerMessage> {
5834 5835 5836
    private static readonly pb::MessageParser<FooServerMessage> _parser = new pb::MessageParser<FooServerMessage>(() => new FooServerMessage());
    public static pb::MessageParser<FooServerMessage> Parser { get { return _parser; } }

5837
    public static pbr::MessageDescriptor Descriptor {
5838
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[30]; }
5839 5840
    }

5841 5842
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
5843 5844
    }

5845 5846 5847 5848 5849
    public FooServerMessage() {
      OnConstruction();
    }

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

5851
    public FooServerMessage(FooServerMessage other) : this() {
5852
    }
Jon Skeet's avatar
Jon Skeet committed
5853 5854 5855 5856 5857

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

5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872
    public override bool Equals(object other) {
      return Equals(other as FooServerMessage);
    }

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

    public override int GetHashCode() {
5873
      int hash = 1;
5874 5875 5876
      return hash;
    }

5877
    public override string ToString() {
5878
      return pb::JsonFormatter.ToDiagnosticString(this);
5879 5880
    }

Jon Skeet's avatar
Jon Skeet committed
5881
    public void WriteTo(pb::CodedOutputStream output) {
5882 5883 5884 5885 5886 5887
    }

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

5889 5890 5891 5892 5893 5894
    public void MergeFrom(FooServerMessage other) {
      if (other == null) {
        return;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
5895
    public void MergeFrom(pb::CodedInputStream input) {
5896
      uint tag;
5897
      while ((tag = input.ReadTag()) != 0) {
5898 5899
        switch(tag) {
          default:
5900
            input.SkipLastField();
5901 5902 5903 5904 5905 5906 5907 5908
            break;
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
5909
  public sealed partial class BarRequest : pb::IMessage<BarRequest> {
5910 5911 5912
    private static readonly pb::MessageParser<BarRequest> _parser = new pb::MessageParser<BarRequest>(() => new BarRequest());
    public static pb::MessageParser<BarRequest> Parser { get { return _parser; } }

5913
    public static pbr::MessageDescriptor Descriptor {
5914
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[31]; }
5915 5916
    }

5917 5918
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
5919 5920
    }

5921 5922 5923 5924 5925
    public BarRequest() {
      OnConstruction();
    }

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

5927
    public BarRequest(BarRequest other) : this() {
5928
    }
Jon Skeet's avatar
Jon Skeet committed
5929 5930 5931 5932 5933

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

5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948
    public override bool Equals(object other) {
      return Equals(other as BarRequest);
    }

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

    public override int GetHashCode() {
5949
      int hash = 1;
5950 5951 5952
      return hash;
    }

5953
    public override string ToString() {
5954
      return pb::JsonFormatter.ToDiagnosticString(this);
5955 5956
    }

Jon Skeet's avatar
Jon Skeet committed
5957
    public void WriteTo(pb::CodedOutputStream output) {
5958 5959 5960 5961 5962 5963
    }

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

5965 5966 5967 5968 5969 5970
    public void MergeFrom(BarRequest other) {
      if (other == null) {
        return;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
5971
    public void MergeFrom(pb::CodedInputStream input) {
5972
      uint tag;
5973
      while ((tag = input.ReadTag()) != 0) {
5974 5975
        switch(tag) {
          default:
5976
            input.SkipLastField();
5977 5978 5979 5980 5981 5982 5983 5984
            break;
        }
      }
    }

  }

  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
5985
  public sealed partial class BarResponse : pb::IMessage<BarResponse> {
5986 5987 5988
    private static readonly pb::MessageParser<BarResponse> _parser = new pb::MessageParser<BarResponse>(() => new BarResponse());
    public static pb::MessageParser<BarResponse> Parser { get { return _parser; } }

5989
    public static pbr::MessageDescriptor Descriptor {
5990
      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[32]; }
5991 5992
    }

5993 5994
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
5995 5996
    }

5997 5998 5999 6000 6001
    public BarResponse() {
      OnConstruction();
    }

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

6003
    public BarResponse(BarResponse other) : this() {
6004
    }
Jon Skeet's avatar
Jon Skeet committed
6005 6006 6007 6008 6009

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

6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024
    public override bool Equals(object other) {
      return Equals(other as BarResponse);
    }

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

    public override int GetHashCode() {
6025
      int hash = 1;
6026 6027 6028
      return hash;
    }

6029
    public override string ToString() {
6030
      return pb::JsonFormatter.ToDiagnosticString(this);
6031 6032
    }

Jon Skeet's avatar
Jon Skeet committed
6033
    public void WriteTo(pb::CodedOutputStream output) {
6034 6035 6036 6037 6038 6039
    }

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

6041 6042 6043 6044 6045 6046
    public void MergeFrom(BarResponse other) {
      if (other == null) {
        return;
      }
    }

Jon Skeet's avatar
Jon Skeet committed
6047
    public void MergeFrom(pb::CodedInputStream input) {
6048
      uint tag;
6049
      while ((tag = input.ReadTag()) != 0) {
6050 6051
        switch(tag) {
          default:
6052
            input.SkipLastField();
6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064
            break;
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code