1// <auto-generated>
2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
3//     source: unittest_proto3.proto
4// </auto-generated>
5#pragma warning disable 1591, 0612, 3021
6#region Designer generated code
7
8using pb = global::Google.Protobuf;
9using pbc = global::Google.Protobuf.Collections;
10using pbr = global::Google.Protobuf.Reflection;
11using scg = global::System.Collections.Generic;
12namespace Google.Protobuf.TestProtos {
13
14  /// <summary>Holder for reflection information generated from unittest_proto3.proto</summary>
15  public static partial class UnittestProto3Reflection {
16
17    #region Descriptor
18    /// <summary>File descriptor for unittest_proto3.proto</summary>
19    public static pbr::FileDescriptor Descriptor {
20      get { return descriptor; }
21    }
22    private static pbr::FileDescriptor descriptor;
23
24    static UnittestProto3Reflection() {
25      byte[] descriptorData = global::System.Convert.FromBase64String(
26          string.Concat(
27            "ChV1bml0dGVzdF9wcm90bzMucHJvdG8SEnByb3RvYnVmX3VuaXR0ZXN0Mxoc",
28            "dW5pdHRlc3RfaW1wb3J0X3Byb3RvMy5wcm90byL5DwoMVGVzdEFsbFR5cGVz",
29            "EhQKDHNpbmdsZV9pbnQzMhgBIAEoBRIUCgxzaW5nbGVfaW50NjQYAiABKAMS",
30            "FQoNc2luZ2xlX3VpbnQzMhgDIAEoDRIVCg1zaW5nbGVfdWludDY0GAQgASgE",
31            "EhUKDXNpbmdsZV9zaW50MzIYBSABKBESFQoNc2luZ2xlX3NpbnQ2NBgGIAEo",
32            "EhIWCg5zaW5nbGVfZml4ZWQzMhgHIAEoBxIWCg5zaW5nbGVfZml4ZWQ2NBgI",
33            "IAEoBhIXCg9zaW5nbGVfc2ZpeGVkMzIYCSABKA8SFwoPc2luZ2xlX3NmaXhl",
34            "ZDY0GAogASgQEhQKDHNpbmdsZV9mbG9hdBgLIAEoAhIVCg1zaW5nbGVfZG91",
35            "YmxlGAwgASgBEhMKC3NpbmdsZV9ib29sGA0gASgIEhUKDXNpbmdsZV9zdHJp",
36            "bmcYDiABKAkSFAoMc2luZ2xlX2J5dGVzGA8gASgMEk0KFXNpbmdsZV9uZXN0",
37            "ZWRfbWVzc2FnZRgSIAEoCzIuLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxs",
38            "VHlwZXMuTmVzdGVkTWVzc2FnZRJCChZzaW5nbGVfZm9yZWlnbl9tZXNzYWdl",
39            "GBMgASgLMiIucHJvdG9idWZfdW5pdHRlc3QzLkZvcmVpZ25NZXNzYWdlEkYK",
40            "FXNpbmdsZV9pbXBvcnRfbWVzc2FnZRgUIAEoCzInLnByb3RvYnVmX3VuaXR0",
41            "ZXN0X2ltcG9ydC5JbXBvcnRNZXNzYWdlEkcKEnNpbmdsZV9uZXN0ZWRfZW51",
42            "bRgVIAEoDjIrLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlwZXMuTmVz",
43            "dGVkRW51bRI8ChNzaW5nbGVfZm9yZWlnbl9lbnVtGBYgASgOMh8ucHJvdG9i",
44            "dWZfdW5pdHRlc3QzLkZvcmVpZ25FbnVtEkAKEnNpbmdsZV9pbXBvcnRfZW51",
45            "bRgXIAEoDjIkLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydC5JbXBvcnRFbnVt",
46            "ElMKHHNpbmdsZV9wdWJsaWNfaW1wb3J0X21lc3NhZ2UYGiABKAsyLS5wcm90",
47            "b2J1Zl91bml0dGVzdF9pbXBvcnQuUHVibGljSW1wb3J0TWVzc2FnZRIWCg5y",
48            "ZXBlYXRlZF9pbnQzMhgfIAMoBRIWCg5yZXBlYXRlZF9pbnQ2NBggIAMoAxIX",
49            "Cg9yZXBlYXRlZF91aW50MzIYISADKA0SFwoPcmVwZWF0ZWRfdWludDY0GCIg",
50            "AygEEhcKD3JlcGVhdGVkX3NpbnQzMhgjIAMoERIXCg9yZXBlYXRlZF9zaW50",
51            "NjQYJCADKBISGAoQcmVwZWF0ZWRfZml4ZWQzMhglIAMoBxIYChByZXBlYXRl",
52            "ZF9maXhlZDY0GCYgAygGEhkKEXJlcGVhdGVkX3NmaXhlZDMyGCcgAygPEhkK",
53            "EXJlcGVhdGVkX3NmaXhlZDY0GCggAygQEhYKDnJlcGVhdGVkX2Zsb2F0GCkg",
54            "AygCEhcKD3JlcGVhdGVkX2RvdWJsZRgqIAMoARIVCg1yZXBlYXRlZF9ib29s",
55            "GCsgAygIEhcKD3JlcGVhdGVkX3N0cmluZxgsIAMoCRIWCg5yZXBlYXRlZF9i",
56            "eXRlcxgtIAMoDBJPChdyZXBlYXRlZF9uZXN0ZWRfbWVzc2FnZRgwIAMoCzIu",
57            "LnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2Fn",
58            "ZRJEChhyZXBlYXRlZF9mb3JlaWduX21lc3NhZ2UYMSADKAsyIi5wcm90b2J1",
59            "Zl91bml0dGVzdDMuRm9yZWlnbk1lc3NhZ2USSAoXcmVwZWF0ZWRfaW1wb3J0",
60            "X21lc3NhZ2UYMiADKAsyJy5wcm90b2J1Zl91bml0dGVzdF9pbXBvcnQuSW1w",
61            "b3J0TWVzc2FnZRJJChRyZXBlYXRlZF9uZXN0ZWRfZW51bRgzIAMoDjIrLnBy",
62            "b3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlwZXMuTmVzdGVkRW51bRI+ChVy",
63            "ZXBlYXRlZF9mb3JlaWduX2VudW0YNCADKA4yHy5wcm90b2J1Zl91bml0dGVz",
64            "dDMuRm9yZWlnbkVudW0SQgoUcmVwZWF0ZWRfaW1wb3J0X2VudW0YNSADKA4y",
65            "JC5wcm90b2J1Zl91bml0dGVzdF9pbXBvcnQuSW1wb3J0RW51bRJVCh5yZXBl",
66            "YXRlZF9wdWJsaWNfaW1wb3J0X21lc3NhZ2UYNiADKAsyLS5wcm90b2J1Zl91",
67            "bml0dGVzdF9pbXBvcnQuUHVibGljSW1wb3J0TWVzc2FnZRIWCgxvbmVvZl91",
68            "aW50MzIYbyABKA1IABJOChRvbmVvZl9uZXN0ZWRfbWVzc2FnZRhwIAEoCzIu",
69            "LnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2Fn",
70            "ZUgAEhYKDG9uZW9mX3N0cmluZxhxIAEoCUgAEhUKC29uZW9mX2J5dGVzGHIg",
71            "ASgMSAAaGwoNTmVzdGVkTWVzc2FnZRIKCgJiYhgBIAEoBSJWCgpOZXN0ZWRF",
72            "bnVtEhsKF05FU1RFRF9FTlVNX1VOU1BFQ0lGSUVEEAASBwoDRk9PEAESBwoD",
73            "QkFSEAISBwoDQkFaEAMSEAoDTkVHEP///////////wFCDQoLb25lb2ZfZmll",
74            "bGQivgEKEk5lc3RlZFRlc3RBbGxUeXBlcxI1CgVjaGlsZBgBIAEoCzImLnBy",
75            "b3RvYnVmX3VuaXR0ZXN0My5OZXN0ZWRUZXN0QWxsVHlwZXMSMQoHcGF5bG9h",
76            "ZBgCIAEoCzIgLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlwZXMSPgoO",
77            "cmVwZWF0ZWRfY2hpbGQYAyADKAsyJi5wcm90b2J1Zl91bml0dGVzdDMuTmVz",
78            "dGVkVGVzdEFsbFR5cGVzIjQKFFRlc3REZXByZWNhdGVkRmllbGRzEhwKEGRl",
79            "cHJlY2F0ZWRfaW50MzIYASABKAVCAhgBIhsKDkZvcmVpZ25NZXNzYWdlEgkK",
80            "AWMYASABKAUiMAoSVGVzdFJlc2VydmVkRmllbGRzSgQIAhADSgQIDxAQSgQI",
81            "CRAMUgNiYXJSA2JheiJbChFUZXN0Rm9yZWlnbk5lc3RlZBJGCg5mb3JlaWdu",
82            "X25lc3RlZBgBIAEoCzIuLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QWxsVHlw",
83            "ZXMuTmVzdGVkTWVzc2FnZSI0ChhUZXN0UmVhbGx5TGFyZ2VUYWdOdW1iZXIS",
84            "CQoBYRgBIAEoBRINCgJiYhj///9/IAEoBSJWChRUZXN0UmVjdXJzaXZlTWVz",
85            "c2FnZRIzCgFhGAEgASgLMigucHJvdG9idWZfdW5pdHRlc3QzLlRlc3RSZWN1",
86            "cnNpdmVNZXNzYWdlEgkKAWkYAiABKAUiTAoUVGVzdE11dHVhbFJlY3Vyc2lv",
87            "bkESNAoCYmIYASABKAsyKC5wcm90b2J1Zl91bml0dGVzdDMuVGVzdE11dHVh",
88            "bFJlY3Vyc2lvbkIiYwoUVGVzdE11dHVhbFJlY3Vyc2lvbkISMwoBYRgBIAEo",
89            "CzIoLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0TXV0dWFsUmVjdXJzaW9uQRIW",
90            "Cg5vcHRpb25hbF9pbnQzMhgCIAEoBSJNChJUZXN0RW51bUFsbG93QWxpYXMS",
91            "NwoFdmFsdWUYASABKA4yKC5wcm90b2J1Zl91bml0dGVzdDMuVGVzdEVudW1X",
92            "aXRoRHVwVmFsdWUi7wIKF1Rlc3RDYW1lbENhc2VGaWVsZE5hbWVzEhYKDlBy",
93            "aW1pdGl2ZUZpZWxkGAEgASgFEhMKC1N0cmluZ0ZpZWxkGAIgASgJEjIKCUVu",
94            "dW1GaWVsZBgDIAEoDjIfLnByb3RvYnVmX3VuaXR0ZXN0My5Gb3JlaWduRW51",
95            "bRI4CgxNZXNzYWdlRmllbGQYBCABKAsyIi5wcm90b2J1Zl91bml0dGVzdDMu",
96            "Rm9yZWlnbk1lc3NhZ2USHgoWUmVwZWF0ZWRQcmltaXRpdmVGaWVsZBgHIAMo",
97            "BRIbChNSZXBlYXRlZFN0cmluZ0ZpZWxkGAggAygJEjoKEVJlcGVhdGVkRW51",
98            "bUZpZWxkGAkgAygOMh8ucHJvdG9idWZfdW5pdHRlc3QzLkZvcmVpZ25FbnVt",
99            "EkAKFFJlcGVhdGVkTWVzc2FnZUZpZWxkGAogAygLMiIucHJvdG9idWZfdW5p",
100            "dHRlc3QzLkZvcmVpZ25NZXNzYWdlIsgBChJUZXN0RmllbGRPcmRlcmluZ3MS",
101            "EQoJbXlfc3RyaW5nGAsgASgJEg4KBm15X2ludBgBIAEoAxIQCghteV9mbG9h",
102            "dBhlIAEoAhJUChVzaW5nbGVfbmVzdGVkX21lc3NhZ2UYyAEgASgLMjQucHJv",
103            "dG9idWZfdW5pdHRlc3QzLlRlc3RGaWVsZE9yZGVyaW5ncy5OZXN0ZWRNZXNz",
104            "YWdlGicKDU5lc3RlZE1lc3NhZ2USCgoCb28YAiABKAMSCgoCYmIYASABKAUi",
105            "TAoRU3BhcnNlRW51bU1lc3NhZ2USNwoLc3BhcnNlX2VudW0YASABKA4yIi5w",
106            "cm90b2J1Zl91bml0dGVzdDMuVGVzdFNwYXJzZUVudW0iGQoJT25lU3RyaW5n",
107            "EgwKBGRhdGEYASABKAkiGgoKTW9yZVN0cmluZxIMCgRkYXRhGAEgAygJIhgK",
108            "CE9uZUJ5dGVzEgwKBGRhdGEYASABKAwiGQoJTW9yZUJ5dGVzEgwKBGRhdGEY",
109            "ASABKAwiHAoMSW50MzJNZXNzYWdlEgwKBGRhdGEYASABKAUiHQoNVWludDMy",
110            "TWVzc2FnZRIMCgRkYXRhGAEgASgNIhwKDEludDY0TWVzc2FnZRIMCgRkYXRh",
111            "GAEgASgDIh0KDVVpbnQ2NE1lc3NhZ2USDAoEZGF0YRgBIAEoBCIbCgtCb29s",
112            "TWVzc2FnZRIMCgRkYXRhGAEgASgIInQKCVRlc3RPbmVvZhIRCgdmb29faW50",
113            "GAEgASgFSAASFAoKZm9vX3N0cmluZxgCIAEoCUgAEjcKC2Zvb19tZXNzYWdl",
114            "GAMgASgLMiAucHJvdG9idWZfdW5pdHRlc3QzLlRlc3RBbGxUeXBlc0gAQgUK",
115            "A2ZvbyKrAwoPVGVzdFBhY2tlZFR5cGVzEhgKDHBhY2tlZF9pbnQzMhhaIAMo",
116            "BUICEAESGAoMcGFja2VkX2ludDY0GFsgAygDQgIQARIZCg1wYWNrZWRfdWlu",
117            "dDMyGFwgAygNQgIQARIZCg1wYWNrZWRfdWludDY0GF0gAygEQgIQARIZCg1w",
118            "YWNrZWRfc2ludDMyGF4gAygRQgIQARIZCg1wYWNrZWRfc2ludDY0GF8gAygS",
119            "QgIQARIaCg5wYWNrZWRfZml4ZWQzMhhgIAMoB0ICEAESGgoOcGFja2VkX2Zp",
120            "eGVkNjQYYSADKAZCAhABEhsKD3BhY2tlZF9zZml4ZWQzMhhiIAMoD0ICEAES",
121            "GwoPcGFja2VkX3NmaXhlZDY0GGMgAygQQgIQARIYCgxwYWNrZWRfZmxvYXQY",
122            "ZCADKAJCAhABEhkKDXBhY2tlZF9kb3VibGUYZSADKAFCAhABEhcKC3BhY2tl",
123            "ZF9ib29sGGYgAygIQgIQARI4CgtwYWNrZWRfZW51bRhnIAMoDjIfLnByb3Rv",
124            "YnVmX3VuaXR0ZXN0My5Gb3JlaWduRW51bUICEAEiyQMKEVRlc3RVbnBhY2tl",
125            "ZFR5cGVzEhoKDnVucGFja2VkX2ludDMyGFogAygFQgIQABIaCg51bnBhY2tl",
126            "ZF9pbnQ2NBhbIAMoA0ICEAASGwoPdW5wYWNrZWRfdWludDMyGFwgAygNQgIQ",
127            "ABIbCg91bnBhY2tlZF91aW50NjQYXSADKARCAhAAEhsKD3VucGFja2VkX3Np",
128            "bnQzMhheIAMoEUICEAASGwoPdW5wYWNrZWRfc2ludDY0GF8gAygSQgIQABIc",
129            "ChB1bnBhY2tlZF9maXhlZDMyGGAgAygHQgIQABIcChB1bnBhY2tlZF9maXhl",
130            "ZDY0GGEgAygGQgIQABIdChF1bnBhY2tlZF9zZml4ZWQzMhhiIAMoD0ICEAAS",
131            "HQoRdW5wYWNrZWRfc2ZpeGVkNjQYYyADKBBCAhAAEhoKDnVucGFja2VkX2Zs",
132            "b2F0GGQgAygCQgIQABIbCg91bnBhY2tlZF9kb3VibGUYZSADKAFCAhAAEhkK",
133            "DXVucGFja2VkX2Jvb2wYZiADKAhCAhAAEjoKDXVucGFja2VkX2VudW0YZyAD",
134            "KA4yHy5wcm90b2J1Zl91bml0dGVzdDMuRm9yZWlnbkVudW1CAhAAIsABCiNU",
135            "ZXN0UmVwZWF0ZWRTY2FsYXJEaWZmZXJlbnRUYWdTaXplcxIYChByZXBlYXRl",
136            "ZF9maXhlZDMyGAwgAygHEhYKDnJlcGVhdGVkX2ludDMyGA0gAygFEhkKEHJl",
137            "cGVhdGVkX2ZpeGVkNjQY/g8gAygGEhcKDnJlcGVhdGVkX2ludDY0GP8PIAMo",
138            "AxIYCg5yZXBlYXRlZF9mbG9hdBj+/w8gAygCEhkKD3JlcGVhdGVkX3VpbnQ2",
139            "NBj//w8gAygEIigKG1Rlc3RDb21tZW50SW5qZWN0aW9uTWVzc2FnZRIJCgFh",
140            "GAEgASgJIgwKCkZvb1JlcXVlc3QiDQoLRm9vUmVzcG9uc2UiEgoQRm9vQ2xp",
141            "ZW50TWVzc2FnZSISChBGb29TZXJ2ZXJNZXNzYWdlIgwKCkJhclJlcXVlc3Qi",
142            "DQoLQmFyUmVzcG9uc2UiEgoQVGVzdEVtcHR5TWVzc2FnZSJwCg5Db21tZW50",
143            "TWVzc2FnZRIMCgR0ZXh0GAEgASgJGisKFE5lc3RlZENvbW1lbnRNZXNzYWdl",
144            "EhMKC25lc3RlZF90ZXh0GAEgASgJIiMKEU5lc3RlZENvbW1lbnRFbnVtEg4K",
145            "ClpFUk9fVkFMVUUQACpZCgtGb3JlaWduRW51bRIXChNGT1JFSUdOX1VOU1BF",
146            "Q0lGSUVEEAASDwoLRk9SRUlHTl9GT08QBBIPCgtGT1JFSUdOX0JBUhAFEg8K",
147            "C0ZPUkVJR05fQkFaEAYqdQoUVGVzdEVudW1XaXRoRHVwVmFsdWUSKAokVEVT",
148            "VF9FTlVNX1dJVEhfRFVQX1ZBTFVFX1VOU1BFQ0lGSUVEEAASCAoERk9PMRAB",
149            "EggKBEJBUjEQAhIHCgNCQVoQAxIICgRGT08yEAESCAoEQkFSMhACGgIQASqd",
150            "AQoOVGVzdFNwYXJzZUVudW0SIAocVEVTVF9TUEFSU0VfRU5VTV9VTlNQRUNJ",
151            "RklFRBAAEgwKCFNQQVJTRV9BEHsSDgoIU1BBUlNFX0IQpucDEg8KCFNQQVJT",
152            "RV9DELKxgAYSFQoIU1BBUlNFX0QQ8f//////////ARIVCghTUEFSU0VfRRC0",
153            "3vz///////8BEgwKCFNQQVJTRV9HEAIqHQoLQ29tbWVudEVudW0SDgoKWkVS",
154            "T19WQUxVRRAAMp0BCgtUZXN0U2VydmljZRJGCgNGb28SHi5wcm90b2J1Zl91",
155            "bml0dGVzdDMuRm9vUmVxdWVzdBofLnByb3RvYnVmX3VuaXR0ZXN0My5Gb29S",
156            "ZXNwb25zZRJGCgNCYXISHi5wcm90b2J1Zl91bml0dGVzdDMuQmFyUmVxdWVz",
157            "dBofLnByb3RvYnVmX3VuaXR0ZXN0My5CYXJSZXNwb25zZUIsQg1Vbml0dGVz",
158            "dFByb3RvqgIaR29vZ2xlLlByb3RvYnVmLlRlc3RQcm90b3NiBnByb3RvMw=="));
159      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
160          new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.UnittestImportProto3Reflection.Descriptor, },
161          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.ForeignEnum), typeof(global::Google.Protobuf.TestProtos.TestEnumWithDupValue), typeof(global::Google.Protobuf.TestProtos.TestSparseEnum), typeof(global::Google.Protobuf.TestProtos.CommentEnum), }, null, new pbr::GeneratedClrTypeInfo[] {
162            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) }, null, 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, null)}),
163            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.NestedTestAllTypes), global::Google.Protobuf.TestProtos.NestedTestAllTypes.Parser, new[]{ "Child", "Payload", "RepeatedChild" }, null, null, null, null),
164            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestDeprecatedFields), global::Google.Protobuf.TestProtos.TestDeprecatedFields.Parser, new[]{ "DeprecatedInt32" }, null, null, null, null),
165            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.ForeignMessage), global::Google.Protobuf.TestProtos.ForeignMessage.Parser, new[]{ "C" }, null, null, null, null),
166            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestReservedFields), global::Google.Protobuf.TestProtos.TestReservedFields.Parser, null, null, null, null, null),
167            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestForeignNested), global::Google.Protobuf.TestProtos.TestForeignNested.Parser, new[]{ "ForeignNested" }, null, null, null, null),
168            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestReallyLargeTagNumber), global::Google.Protobuf.TestProtos.TestReallyLargeTagNumber.Parser, new[]{ "A", "Bb" }, null, null, null, null),
169            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestRecursiveMessage), global::Google.Protobuf.TestProtos.TestRecursiveMessage.Parser, new[]{ "A", "I" }, null, null, null, null),
170            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMutualRecursionA), global::Google.Protobuf.TestProtos.TestMutualRecursionA.Parser, new[]{ "Bb" }, null, null, null, null),
171            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMutualRecursionB), global::Google.Protobuf.TestProtos.TestMutualRecursionB.Parser, new[]{ "A", "OptionalInt32" }, null, null, null, null),
172            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestEnumAllowAlias), global::Google.Protobuf.TestProtos.TestEnumAllowAlias.Parser, new[]{ "Value" }, null, null, null, null),
173            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, null),
174            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestFieldOrderings), global::Google.Protobuf.TestProtos.TestFieldOrderings.Parser, new[]{ "MyString", "MyInt", "MyFloat", "SingleNestedMessage" }, null, 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, null)}),
175            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.SparseEnumMessage), global::Google.Protobuf.TestProtos.SparseEnumMessage.Parser, new[]{ "SparseEnum" }, null, null, null, null),
176            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.OneString), global::Google.Protobuf.TestProtos.OneString.Parser, new[]{ "Data" }, null, null, null, null),
177            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.MoreString), global::Google.Protobuf.TestProtos.MoreString.Parser, new[]{ "Data" }, null, null, null, null),
178            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.OneBytes), global::Google.Protobuf.TestProtos.OneBytes.Parser, new[]{ "Data" }, null, null, null, null),
179            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.MoreBytes), global::Google.Protobuf.TestProtos.MoreBytes.Parser, new[]{ "Data" }, null, null, null, null),
180            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Int32Message), global::Google.Protobuf.TestProtos.Int32Message.Parser, new[]{ "Data" }, null, null, null, null),
181            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Uint32Message), global::Google.Protobuf.TestProtos.Uint32Message.Parser, new[]{ "Data" }, null, null, null, null),
182            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Int64Message), global::Google.Protobuf.TestProtos.Int64Message.Parser, new[]{ "Data" }, null, null, null, null),
183            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Uint64Message), global::Google.Protobuf.TestProtos.Uint64Message.Parser, new[]{ "Data" }, null, null, null, null),
184            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.BoolMessage), global::Google.Protobuf.TestProtos.BoolMessage.Parser, new[]{ "Data" }, null, null, null, null),
185            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestOneof), global::Google.Protobuf.TestProtos.TestOneof.Parser, new[]{ "FooInt", "FooString", "FooMessage" }, new[]{ "Foo" }, null, null, null),
186            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, null),
187            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, null),
188            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, null),
189            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestCommentInjectionMessage), global::Google.Protobuf.TestProtos.TestCommentInjectionMessage.Parser, new[]{ "A" }, null, null, null, null),
190            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooRequest), global::Google.Protobuf.TestProtos.FooRequest.Parser, null, null, null, null, null),
191            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooResponse), global::Google.Protobuf.TestProtos.FooResponse.Parser, null, null, null, null, null),
192            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooClientMessage), global::Google.Protobuf.TestProtos.FooClientMessage.Parser, null, null, null, null, null),
193            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.FooServerMessage), global::Google.Protobuf.TestProtos.FooServerMessage.Parser, null, null, null, null, null),
194            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.BarRequest), global::Google.Protobuf.TestProtos.BarRequest.Parser, null, null, null, null, null),
195            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.BarResponse), global::Google.Protobuf.TestProtos.BarResponse.Parser, null, null, null, null, null),
196            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestEmptyMessage), global::Google.Protobuf.TestProtos.TestEmptyMessage.Parser, null, null, null, null, null),
197            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.CommentMessage), global::Google.Protobuf.TestProtos.CommentMessage.Parser, new[]{ "Text" }, null, new[]{ typeof(global::Google.Protobuf.TestProtos.CommentMessage.Types.NestedCommentEnum) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.CommentMessage.Types.NestedCommentMessage), global::Google.Protobuf.TestProtos.CommentMessage.Types.NestedCommentMessage.Parser, new[]{ "NestedText" }, null, null, null, null)})
198          }));
199    }
200    #endregion
201
202  }
203  #region Enums
204  public enum ForeignEnum {
205    [pbr::OriginalName("FOREIGN_UNSPECIFIED")] ForeignUnspecified = 0,
206    [pbr::OriginalName("FOREIGN_FOO")] ForeignFoo = 4,
207    [pbr::OriginalName("FOREIGN_BAR")] ForeignBar = 5,
208    [pbr::OriginalName("FOREIGN_BAZ")] ForeignBaz = 6,
209  }
210
211  /// <summary>
212  /// Test an enum that has multiple values with the same number.
213  /// </summary>
214  public enum TestEnumWithDupValue {
215    [pbr::OriginalName("TEST_ENUM_WITH_DUP_VALUE_UNSPECIFIED")] Unspecified = 0,
216    [pbr::OriginalName("FOO1")] Foo1 = 1,
217    [pbr::OriginalName("BAR1")] Bar1 = 2,
218    [pbr::OriginalName("BAZ")] Baz = 3,
219    [pbr::OriginalName("FOO2", PreferredAlias = false)] Foo2 = 1,
220    [pbr::OriginalName("BAR2", PreferredAlias = false)] Bar2 = 2,
221  }
222
223  /// <summary>
224  /// Test an enum with large, unordered values.
225  /// </summary>
226  public enum TestSparseEnum {
227    [pbr::OriginalName("TEST_SPARSE_ENUM_UNSPECIFIED")] Unspecified = 0,
228    [pbr::OriginalName("SPARSE_A")] SparseA = 123,
229    [pbr::OriginalName("SPARSE_B")] SparseB = 62374,
230    [pbr::OriginalName("SPARSE_C")] SparseC = 12589234,
231    [pbr::OriginalName("SPARSE_D")] SparseD = -15,
232    [pbr::OriginalName("SPARSE_E")] SparseE = -53452,
233    /// <summary>
234    /// In proto3, value 0 must be the first one specified
235    /// SPARSE_F = 0;
236    /// </summary>
237    [pbr::OriginalName("SPARSE_G")] SparseG = 2,
238  }
239
240  /// <summary>
241  /// Leading enum comment
242  /// </summary>
243  public enum CommentEnum {
244    /// <summary>
245    /// Zero value comment
246    /// </summary>
247    [pbr::OriginalName("ZERO_VALUE")] ZeroValue = 0,
248  }
249
250  #endregion
251
252  #region Messages
253  /// <summary>
254  /// This proto includes every type of field in both singular and repeated
255  /// forms.
256  /// </summary>
257  public sealed partial class TestAllTypes : pb::IMessage<TestAllTypes>
258  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
259      , pb::IBufferMessage
260  #endif
261  {
262    private static readonly pb::MessageParser<TestAllTypes> _parser = new pb::MessageParser<TestAllTypes>(() => new TestAllTypes());
263    private pb::UnknownFieldSet _unknownFields;
264    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
265    public static pb::MessageParser<TestAllTypes> Parser { get { return _parser; } }
266
267    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
268    public static pbr::MessageDescriptor Descriptor {
269      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[0]; }
270    }
271
272    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
273    pbr::MessageDescriptor pb::IMessage.Descriptor {
274      get { return Descriptor; }
275    }
276
277    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
278    public TestAllTypes() {
279      OnConstruction();
280    }
281
282    partial void OnConstruction();
283
284    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
285    public TestAllTypes(TestAllTypes other) : this() {
286      singleInt32_ = other.singleInt32_;
287      singleInt64_ = other.singleInt64_;
288      singleUint32_ = other.singleUint32_;
289      singleUint64_ = other.singleUint64_;
290      singleSint32_ = other.singleSint32_;
291      singleSint64_ = other.singleSint64_;
292      singleFixed32_ = other.singleFixed32_;
293      singleFixed64_ = other.singleFixed64_;
294      singleSfixed32_ = other.singleSfixed32_;
295      singleSfixed64_ = other.singleSfixed64_;
296      singleFloat_ = other.singleFloat_;
297      singleDouble_ = other.singleDouble_;
298      singleBool_ = other.singleBool_;
299      singleString_ = other.singleString_;
300      singleBytes_ = other.singleBytes_;
301      singleNestedMessage_ = other.singleNestedMessage_ != null ? other.singleNestedMessage_.Clone() : null;
302      singleForeignMessage_ = other.singleForeignMessage_ != null ? other.singleForeignMessage_.Clone() : null;
303      singleImportMessage_ = other.singleImportMessage_ != null ? other.singleImportMessage_.Clone() : null;
304      singleNestedEnum_ = other.singleNestedEnum_;
305      singleForeignEnum_ = other.singleForeignEnum_;
306      singleImportEnum_ = other.singleImportEnum_;
307      singlePublicImportMessage_ = other.singlePublicImportMessage_ != null ? other.singlePublicImportMessage_.Clone() : null;
308      repeatedInt32_ = other.repeatedInt32_.Clone();
309      repeatedInt64_ = other.repeatedInt64_.Clone();
310      repeatedUint32_ = other.repeatedUint32_.Clone();
311      repeatedUint64_ = other.repeatedUint64_.Clone();
312      repeatedSint32_ = other.repeatedSint32_.Clone();
313      repeatedSint64_ = other.repeatedSint64_.Clone();
314      repeatedFixed32_ = other.repeatedFixed32_.Clone();
315      repeatedFixed64_ = other.repeatedFixed64_.Clone();
316      repeatedSfixed32_ = other.repeatedSfixed32_.Clone();
317      repeatedSfixed64_ = other.repeatedSfixed64_.Clone();
318      repeatedFloat_ = other.repeatedFloat_.Clone();
319      repeatedDouble_ = other.repeatedDouble_.Clone();
320      repeatedBool_ = other.repeatedBool_.Clone();
321      repeatedString_ = other.repeatedString_.Clone();
322      repeatedBytes_ = other.repeatedBytes_.Clone();
323      repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone();
324      repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone();
325      repeatedImportMessage_ = other.repeatedImportMessage_.Clone();
326      repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone();
327      repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone();
328      repeatedImportEnum_ = other.repeatedImportEnum_.Clone();
329      repeatedPublicImportMessage_ = other.repeatedPublicImportMessage_.Clone();
330      switch (other.OneofFieldCase) {
331        case OneofFieldOneofCase.OneofUint32:
332          OneofUint32 = other.OneofUint32;
333          break;
334        case OneofFieldOneofCase.OneofNestedMessage:
335          OneofNestedMessage = other.OneofNestedMessage.Clone();
336          break;
337        case OneofFieldOneofCase.OneofString:
338          OneofString = other.OneofString;
339          break;
340        case OneofFieldOneofCase.OneofBytes:
341          OneofBytes = other.OneofBytes;
342          break;
343      }
344
345      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
346    }
347
348    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
349    public TestAllTypes Clone() {
350      return new TestAllTypes(this);
351    }
352
353    /// <summary>Field number for the "single_int32" field.</summary>
354    public const int SingleInt32FieldNumber = 1;
355    private int singleInt32_;
356    /// <summary>
357    /// Singular
358    /// </summary>
359    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
360    public int SingleInt32 {
361      get { return singleInt32_; }
362      set {
363        singleInt32_ = value;
364      }
365    }
366
367    /// <summary>Field number for the "single_int64" field.</summary>
368    public const int SingleInt64FieldNumber = 2;
369    private long singleInt64_;
370    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
371    public long SingleInt64 {
372      get { return singleInt64_; }
373      set {
374        singleInt64_ = value;
375      }
376    }
377
378    /// <summary>Field number for the "single_uint32" field.</summary>
379    public const int SingleUint32FieldNumber = 3;
380    private uint singleUint32_;
381    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
382    public uint SingleUint32 {
383      get { return singleUint32_; }
384      set {
385        singleUint32_ = value;
386      }
387    }
388
389    /// <summary>Field number for the "single_uint64" field.</summary>
390    public const int SingleUint64FieldNumber = 4;
391    private ulong singleUint64_;
392    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
393    public ulong SingleUint64 {
394      get { return singleUint64_; }
395      set {
396        singleUint64_ = value;
397      }
398    }
399
400    /// <summary>Field number for the "single_sint32" field.</summary>
401    public const int SingleSint32FieldNumber = 5;
402    private int singleSint32_;
403    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
404    public int SingleSint32 {
405      get { return singleSint32_; }
406      set {
407        singleSint32_ = value;
408      }
409    }
410
411    /// <summary>Field number for the "single_sint64" field.</summary>
412    public const int SingleSint64FieldNumber = 6;
413    private long singleSint64_;
414    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
415    public long SingleSint64 {
416      get { return singleSint64_; }
417      set {
418        singleSint64_ = value;
419      }
420    }
421
422    /// <summary>Field number for the "single_fixed32" field.</summary>
423    public const int SingleFixed32FieldNumber = 7;
424    private uint singleFixed32_;
425    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
426    public uint SingleFixed32 {
427      get { return singleFixed32_; }
428      set {
429        singleFixed32_ = value;
430      }
431    }
432
433    /// <summary>Field number for the "single_fixed64" field.</summary>
434    public const int SingleFixed64FieldNumber = 8;
435    private ulong singleFixed64_;
436    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
437    public ulong SingleFixed64 {
438      get { return singleFixed64_; }
439      set {
440        singleFixed64_ = value;
441      }
442    }
443
444    /// <summary>Field number for the "single_sfixed32" field.</summary>
445    public const int SingleSfixed32FieldNumber = 9;
446    private int singleSfixed32_;
447    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
448    public int SingleSfixed32 {
449      get { return singleSfixed32_; }
450      set {
451        singleSfixed32_ = value;
452      }
453    }
454
455    /// <summary>Field number for the "single_sfixed64" field.</summary>
456    public const int SingleSfixed64FieldNumber = 10;
457    private long singleSfixed64_;
458    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
459    public long SingleSfixed64 {
460      get { return singleSfixed64_; }
461      set {
462        singleSfixed64_ = value;
463      }
464    }
465
466    /// <summary>Field number for the "single_float" field.</summary>
467    public const int SingleFloatFieldNumber = 11;
468    private float singleFloat_;
469    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
470    public float SingleFloat {
471      get { return singleFloat_; }
472      set {
473        singleFloat_ = value;
474      }
475    }
476
477    /// <summary>Field number for the "single_double" field.</summary>
478    public const int SingleDoubleFieldNumber = 12;
479    private double singleDouble_;
480    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
481    public double SingleDouble {
482      get { return singleDouble_; }
483      set {
484        singleDouble_ = value;
485      }
486    }
487
488    /// <summary>Field number for the "single_bool" field.</summary>
489    public const int SingleBoolFieldNumber = 13;
490    private bool singleBool_;
491    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
492    public bool SingleBool {
493      get { return singleBool_; }
494      set {
495        singleBool_ = value;
496      }
497    }
498
499    /// <summary>Field number for the "single_string" field.</summary>
500    public const int SingleStringFieldNumber = 14;
501    private string singleString_ = "";
502    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
503    public string SingleString {
504      get { return singleString_; }
505      set {
506        singleString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
507      }
508    }
509
510    /// <summary>Field number for the "single_bytes" field.</summary>
511    public const int SingleBytesFieldNumber = 15;
512    private pb::ByteString singleBytes_ = pb::ByteString.Empty;
513    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
514    public pb::ByteString SingleBytes {
515      get { return singleBytes_; }
516      set {
517        singleBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
518      }
519    }
520
521    /// <summary>Field number for the "single_nested_message" field.</summary>
522    public const int SingleNestedMessageFieldNumber = 18;
523    private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage singleNestedMessage_;
524    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
525    public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage SingleNestedMessage {
526      get { return singleNestedMessage_; }
527      set {
528        singleNestedMessage_ = value;
529      }
530    }
531
532    /// <summary>Field number for the "single_foreign_message" field.</summary>
533    public const int SingleForeignMessageFieldNumber = 19;
534    private global::Google.Protobuf.TestProtos.ForeignMessage singleForeignMessage_;
535    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
536    public global::Google.Protobuf.TestProtos.ForeignMessage SingleForeignMessage {
537      get { return singleForeignMessage_; }
538      set {
539        singleForeignMessage_ = value;
540      }
541    }
542
543    /// <summary>Field number for the "single_import_message" field.</summary>
544    public const int SingleImportMessageFieldNumber = 20;
545    private global::Google.Protobuf.TestProtos.ImportMessage singleImportMessage_;
546    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
547    public global::Google.Protobuf.TestProtos.ImportMessage SingleImportMessage {
548      get { return singleImportMessage_; }
549      set {
550        singleImportMessage_ = value;
551      }
552    }
553
554    /// <summary>Field number for the "single_nested_enum" field.</summary>
555    public const int SingleNestedEnumFieldNumber = 21;
556    private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum singleNestedEnum_ = global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.Unspecified;
557    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
558    public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum SingleNestedEnum {
559      get { return singleNestedEnum_; }
560      set {
561        singleNestedEnum_ = value;
562      }
563    }
564
565    /// <summary>Field number for the "single_foreign_enum" field.</summary>
566    public const int SingleForeignEnumFieldNumber = 22;
567    private global::Google.Protobuf.TestProtos.ForeignEnum singleForeignEnum_ = global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified;
568    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
569    public global::Google.Protobuf.TestProtos.ForeignEnum SingleForeignEnum {
570      get { return singleForeignEnum_; }
571      set {
572        singleForeignEnum_ = value;
573      }
574    }
575
576    /// <summary>Field number for the "single_import_enum" field.</summary>
577    public const int SingleImportEnumFieldNumber = 23;
578    private global::Google.Protobuf.TestProtos.ImportEnum singleImportEnum_ = global::Google.Protobuf.TestProtos.ImportEnum.Unspecified;
579    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
580    public global::Google.Protobuf.TestProtos.ImportEnum SingleImportEnum {
581      get { return singleImportEnum_; }
582      set {
583        singleImportEnum_ = value;
584      }
585    }
586
587    /// <summary>Field number for the "single_public_import_message" field.</summary>
588    public const int SinglePublicImportMessageFieldNumber = 26;
589    private global::Google.Protobuf.TestProtos.PublicImportMessage singlePublicImportMessage_;
590    /// <summary>
591    /// Defined in unittest_import_public.proto
592    /// </summary>
593    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
594    public global::Google.Protobuf.TestProtos.PublicImportMessage SinglePublicImportMessage {
595      get { return singlePublicImportMessage_; }
596      set {
597        singlePublicImportMessage_ = value;
598      }
599    }
600
601    /// <summary>Field number for the "repeated_int32" field.</summary>
602    public const int RepeatedInt32FieldNumber = 31;
603    private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
604        = pb::FieldCodec.ForInt32(250);
605    private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
606    /// <summary>
607    /// Repeated
608    /// </summary>
609    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
610    public pbc::RepeatedField<int> RepeatedInt32 {
611      get { return repeatedInt32_; }
612    }
613
614    /// <summary>Field number for the "repeated_int64" field.</summary>
615    public const int RepeatedInt64FieldNumber = 32;
616    private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
617        = pb::FieldCodec.ForInt64(258);
618    private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>();
619    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
620    public pbc::RepeatedField<long> RepeatedInt64 {
621      get { return repeatedInt64_; }
622    }
623
624    /// <summary>Field number for the "repeated_uint32" field.</summary>
625    public const int RepeatedUint32FieldNumber = 33;
626    private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
627        = pb::FieldCodec.ForUInt32(266);
628    private readonly pbc::RepeatedField<uint> repeatedUint32_ = new pbc::RepeatedField<uint>();
629    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
630    public pbc::RepeatedField<uint> RepeatedUint32 {
631      get { return repeatedUint32_; }
632    }
633
634    /// <summary>Field number for the "repeated_uint64" field.</summary>
635    public const int RepeatedUint64FieldNumber = 34;
636    private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
637        = pb::FieldCodec.ForUInt64(274);
638    private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>();
639    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
640    public pbc::RepeatedField<ulong> RepeatedUint64 {
641      get { return repeatedUint64_; }
642    }
643
644    /// <summary>Field number for the "repeated_sint32" field.</summary>
645    public const int RepeatedSint32FieldNumber = 35;
646    private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec
647        = pb::FieldCodec.ForSInt32(282);
648    private readonly pbc::RepeatedField<int> repeatedSint32_ = new pbc::RepeatedField<int>();
649    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
650    public pbc::RepeatedField<int> RepeatedSint32 {
651      get { return repeatedSint32_; }
652    }
653
654    /// <summary>Field number for the "repeated_sint64" field.</summary>
655    public const int RepeatedSint64FieldNumber = 36;
656    private static readonly pb::FieldCodec<long> _repeated_repeatedSint64_codec
657        = pb::FieldCodec.ForSInt64(290);
658    private readonly pbc::RepeatedField<long> repeatedSint64_ = new pbc::RepeatedField<long>();
659    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
660    public pbc::RepeatedField<long> RepeatedSint64 {
661      get { return repeatedSint64_; }
662    }
663
664    /// <summary>Field number for the "repeated_fixed32" field.</summary>
665    public const int RepeatedFixed32FieldNumber = 37;
666    private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec
667        = pb::FieldCodec.ForFixed32(298);
668    private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
669    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
670    public pbc::RepeatedField<uint> RepeatedFixed32 {
671      get { return repeatedFixed32_; }
672    }
673
674    /// <summary>Field number for the "repeated_fixed64" field.</summary>
675    public const int RepeatedFixed64FieldNumber = 38;
676    private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec
677        = pb::FieldCodec.ForFixed64(306);
678    private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
679    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
680    public pbc::RepeatedField<ulong> RepeatedFixed64 {
681      get { return repeatedFixed64_; }
682    }
683
684    /// <summary>Field number for the "repeated_sfixed32" field.</summary>
685    public const int RepeatedSfixed32FieldNumber = 39;
686    private static readonly pb::FieldCodec<int> _repeated_repeatedSfixed32_codec
687        = pb::FieldCodec.ForSFixed32(314);
688    private readonly pbc::RepeatedField<int> repeatedSfixed32_ = new pbc::RepeatedField<int>();
689    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
690    public pbc::RepeatedField<int> RepeatedSfixed32 {
691      get { return repeatedSfixed32_; }
692    }
693
694    /// <summary>Field number for the "repeated_sfixed64" field.</summary>
695    public const int RepeatedSfixed64FieldNumber = 40;
696    private static readonly pb::FieldCodec<long> _repeated_repeatedSfixed64_codec
697        = pb::FieldCodec.ForSFixed64(322);
698    private readonly pbc::RepeatedField<long> repeatedSfixed64_ = new pbc::RepeatedField<long>();
699    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
700    public pbc::RepeatedField<long> RepeatedSfixed64 {
701      get { return repeatedSfixed64_; }
702    }
703
704    /// <summary>Field number for the "repeated_float" field.</summary>
705    public const int RepeatedFloatFieldNumber = 41;
706    private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec
707        = pb::FieldCodec.ForFloat(330);
708    private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
709    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
710    public pbc::RepeatedField<float> RepeatedFloat {
711      get { return repeatedFloat_; }
712    }
713
714    /// <summary>Field number for the "repeated_double" field.</summary>
715    public const int RepeatedDoubleFieldNumber = 42;
716    private static readonly pb::FieldCodec<double> _repeated_repeatedDouble_codec
717        = pb::FieldCodec.ForDouble(338);
718    private readonly pbc::RepeatedField<double> repeatedDouble_ = new pbc::RepeatedField<double>();
719    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
720    public pbc::RepeatedField<double> RepeatedDouble {
721      get { return repeatedDouble_; }
722    }
723
724    /// <summary>Field number for the "repeated_bool" field.</summary>
725    public const int RepeatedBoolFieldNumber = 43;
726    private static readonly pb::FieldCodec<bool> _repeated_repeatedBool_codec
727        = pb::FieldCodec.ForBool(346);
728    private readonly pbc::RepeatedField<bool> repeatedBool_ = new pbc::RepeatedField<bool>();
729    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
730    public pbc::RepeatedField<bool> RepeatedBool {
731      get { return repeatedBool_; }
732    }
733
734    /// <summary>Field number for the "repeated_string" field.</summary>
735    public const int RepeatedStringFieldNumber = 44;
736    private static readonly pb::FieldCodec<string> _repeated_repeatedString_codec
737        = pb::FieldCodec.ForString(354);
738    private readonly pbc::RepeatedField<string> repeatedString_ = new pbc::RepeatedField<string>();
739    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
740    public pbc::RepeatedField<string> RepeatedString {
741      get { return repeatedString_; }
742    }
743
744    /// <summary>Field number for the "repeated_bytes" field.</summary>
745    public const int RepeatedBytesFieldNumber = 45;
746    private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytes_codec
747        = pb::FieldCodec.ForBytes(362);
748    private readonly pbc::RepeatedField<pb::ByteString> repeatedBytes_ = new pbc::RepeatedField<pb::ByteString>();
749    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
750    public pbc::RepeatedField<pb::ByteString> RepeatedBytes {
751      get { return repeatedBytes_; }
752    }
753
754    /// <summary>Field number for the "repeated_nested_message" field.</summary>
755    public const int RepeatedNestedMessageFieldNumber = 48;
756    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> _repeated_repeatedNestedMessage_codec
757        = pb::FieldCodec.ForMessage(386, global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage.Parser);
758    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage>();
759    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
760    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> RepeatedNestedMessage {
761      get { return repeatedNestedMessage_; }
762    }
763
764    /// <summary>Field number for the "repeated_foreign_message" field.</summary>
765    public const int RepeatedForeignMessageFieldNumber = 49;
766    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignMessage> _repeated_repeatedForeignMessage_codec
767        = pb::FieldCodec.ForMessage(394, global::Google.Protobuf.TestProtos.ForeignMessage.Parser);
768    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> repeatedForeignMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage>();
769    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
770    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> RepeatedForeignMessage {
771      get { return repeatedForeignMessage_; }
772    }
773
774    /// <summary>Field number for the "repeated_import_message" field.</summary>
775    public const int RepeatedImportMessageFieldNumber = 50;
776    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ImportMessage> _repeated_repeatedImportMessage_codec
777        = pb::FieldCodec.ForMessage(402, global::Google.Protobuf.TestProtos.ImportMessage.Parser);
778    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage> repeatedImportMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage>();
779    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
780    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage> RepeatedImportMessage {
781      get { return repeatedImportMessage_; }
782    }
783
784    /// <summary>Field number for the "repeated_nested_enum" field.</summary>
785    public const int RepeatedNestedEnumFieldNumber = 51;
786    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> _repeated_repeatedNestedEnum_codec
787        = pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) x);
788    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum>();
789    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
790    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> RepeatedNestedEnum {
791      get { return repeatedNestedEnum_; }
792    }
793
794    /// <summary>Field number for the "repeated_foreign_enum" field.</summary>
795    public const int RepeatedForeignEnumFieldNumber = 52;
796    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_repeatedForeignEnum_codec
797        = pb::FieldCodec.ForEnum(418, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
798    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> repeatedForeignEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
799    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
800    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> RepeatedForeignEnum {
801      get { return repeatedForeignEnum_; }
802    }
803
804    /// <summary>Field number for the "repeated_import_enum" field.</summary>
805    public const int RepeatedImportEnumFieldNumber = 53;
806    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ImportEnum> _repeated_repeatedImportEnum_codec
807        = pb::FieldCodec.ForEnum(426, x => (int) x, x => (global::Google.Protobuf.TestProtos.ImportEnum) x);
808    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum> repeatedImportEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum>();
809    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
810    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum> RepeatedImportEnum {
811      get { return repeatedImportEnum_; }
812    }
813
814    /// <summary>Field number for the "repeated_public_import_message" field.</summary>
815    public const int RepeatedPublicImportMessageFieldNumber = 54;
816    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.PublicImportMessage> _repeated_repeatedPublicImportMessage_codec
817        = pb::FieldCodec.ForMessage(434, global::Google.Protobuf.TestProtos.PublicImportMessage.Parser);
818    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage> repeatedPublicImportMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage>();
819    /// <summary>
820    /// Defined in unittest_import_public.proto
821    /// </summary>
822    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
823    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage> RepeatedPublicImportMessage {
824      get { return repeatedPublicImportMessage_; }
825    }
826
827    /// <summary>Field number for the "oneof_uint32" field.</summary>
828    public const int OneofUint32FieldNumber = 111;
829    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
830    public uint OneofUint32 {
831      get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32 ? (uint) oneofField_ : 0; }
832      set {
833        oneofField_ = value;
834        oneofFieldCase_ = OneofFieldOneofCase.OneofUint32;
835      }
836    }
837
838    /// <summary>Field number for the "oneof_nested_message" field.</summary>
839    public const int OneofNestedMessageFieldNumber = 112;
840    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
841    public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage OneofNestedMessage {
842      get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage) oneofField_ : null; }
843      set {
844        oneofField_ = value;
845        oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage;
846      }
847    }
848
849    /// <summary>Field number for the "oneof_string" field.</summary>
850    public const int OneofStringFieldNumber = 113;
851    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
852    public string OneofString {
853      get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString ? (string) oneofField_ : ""; }
854      set {
855        oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
856        oneofFieldCase_ = OneofFieldOneofCase.OneofString;
857      }
858    }
859
860    /// <summary>Field number for the "oneof_bytes" field.</summary>
861    public const int OneofBytesFieldNumber = 114;
862    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
863    public pb::ByteString OneofBytes {
864      get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; }
865      set {
866        oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
867        oneofFieldCase_ = OneofFieldOneofCase.OneofBytes;
868      }
869    }
870
871    private object oneofField_;
872    /// <summary>Enum of possible cases for the "oneof_field" oneof.</summary>
873    public enum OneofFieldOneofCase {
874      None = 0,
875      OneofUint32 = 111,
876      OneofNestedMessage = 112,
877      OneofString = 113,
878      OneofBytes = 114,
879    }
880    private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
881    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
882    public OneofFieldOneofCase OneofFieldCase {
883      get { return oneofFieldCase_; }
884    }
885
886    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
887    public void ClearOneofField() {
888      oneofFieldCase_ = OneofFieldOneofCase.None;
889      oneofField_ = null;
890    }
891
892    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
893    public override bool Equals(object other) {
894      return Equals(other as TestAllTypes);
895    }
896
897    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
898    public bool Equals(TestAllTypes other) {
899      if (ReferenceEquals(other, null)) {
900        return false;
901      }
902      if (ReferenceEquals(other, this)) {
903        return true;
904      }
905      if (SingleInt32 != other.SingleInt32) return false;
906      if (SingleInt64 != other.SingleInt64) return false;
907      if (SingleUint32 != other.SingleUint32) return false;
908      if (SingleUint64 != other.SingleUint64) return false;
909      if (SingleSint32 != other.SingleSint32) return false;
910      if (SingleSint64 != other.SingleSint64) return false;
911      if (SingleFixed32 != other.SingleFixed32) return false;
912      if (SingleFixed64 != other.SingleFixed64) return false;
913      if (SingleSfixed32 != other.SingleSfixed32) return false;
914      if (SingleSfixed64 != other.SingleSfixed64) return false;
915      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SingleFloat, other.SingleFloat)) return false;
916      if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(SingleDouble, other.SingleDouble)) return false;
917      if (SingleBool != other.SingleBool) return false;
918      if (SingleString != other.SingleString) return false;
919      if (SingleBytes != other.SingleBytes) return false;
920      if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return false;
921      if (!object.Equals(SingleForeignMessage, other.SingleForeignMessage)) return false;
922      if (!object.Equals(SingleImportMessage, other.SingleImportMessage)) return false;
923      if (SingleNestedEnum != other.SingleNestedEnum) return false;
924      if (SingleForeignEnum != other.SingleForeignEnum) return false;
925      if (SingleImportEnum != other.SingleImportEnum) return false;
926      if (!object.Equals(SinglePublicImportMessage, other.SinglePublicImportMessage)) return false;
927      if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
928      if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
929      if(!repeatedUint32_.Equals(other.repeatedUint32_)) return false;
930      if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
931      if(!repeatedSint32_.Equals(other.repeatedSint32_)) return false;
932      if(!repeatedSint64_.Equals(other.repeatedSint64_)) return false;
933      if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
934      if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
935      if(!repeatedSfixed32_.Equals(other.repeatedSfixed32_)) return false;
936      if(!repeatedSfixed64_.Equals(other.repeatedSfixed64_)) return false;
937      if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
938      if(!repeatedDouble_.Equals(other.repeatedDouble_)) return false;
939      if(!repeatedBool_.Equals(other.repeatedBool_)) return false;
940      if(!repeatedString_.Equals(other.repeatedString_)) return false;
941      if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false;
942      if(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return false;
943      if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false;
944      if(!repeatedImportMessage_.Equals(other.repeatedImportMessage_)) return false;
945      if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false;
946      if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false;
947      if(!repeatedImportEnum_.Equals(other.repeatedImportEnum_)) return false;
948      if(!repeatedPublicImportMessage_.Equals(other.repeatedPublicImportMessage_)) return false;
949      if (OneofUint32 != other.OneofUint32) return false;
950      if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return false;
951      if (OneofString != other.OneofString) return false;
952      if (OneofBytes != other.OneofBytes) return false;
953      if (OneofFieldCase != other.OneofFieldCase) return false;
954      return Equals(_unknownFields, other._unknownFields);
955    }
956
957    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
958    public override int GetHashCode() {
959      int hash = 1;
960      if (SingleInt32 != 0) hash ^= SingleInt32.GetHashCode();
961      if (SingleInt64 != 0L) hash ^= SingleInt64.GetHashCode();
962      if (SingleUint32 != 0) hash ^= SingleUint32.GetHashCode();
963      if (SingleUint64 != 0UL) hash ^= SingleUint64.GetHashCode();
964      if (SingleSint32 != 0) hash ^= SingleSint32.GetHashCode();
965      if (SingleSint64 != 0L) hash ^= SingleSint64.GetHashCode();
966      if (SingleFixed32 != 0) hash ^= SingleFixed32.GetHashCode();
967      if (SingleFixed64 != 0UL) hash ^= SingleFixed64.GetHashCode();
968      if (SingleSfixed32 != 0) hash ^= SingleSfixed32.GetHashCode();
969      if (SingleSfixed64 != 0L) hash ^= SingleSfixed64.GetHashCode();
970      if (SingleFloat != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SingleFloat);
971      if (SingleDouble != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SingleDouble);
972      if (SingleBool != false) hash ^= SingleBool.GetHashCode();
973      if (SingleString.Length != 0) hash ^= SingleString.GetHashCode();
974      if (SingleBytes.Length != 0) hash ^= SingleBytes.GetHashCode();
975      if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode();
976      if (singleForeignMessage_ != null) hash ^= SingleForeignMessage.GetHashCode();
977      if (singleImportMessage_ != null) hash ^= SingleImportMessage.GetHashCode();
978      if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.Unspecified) hash ^= SingleNestedEnum.GetHashCode();
979      if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified) hash ^= SingleForeignEnum.GetHashCode();
980      if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.Unspecified) hash ^= SingleImportEnum.GetHashCode();
981      if (singlePublicImportMessage_ != null) hash ^= SinglePublicImportMessage.GetHashCode();
982      hash ^= repeatedInt32_.GetHashCode();
983      hash ^= repeatedInt64_.GetHashCode();
984      hash ^= repeatedUint32_.GetHashCode();
985      hash ^= repeatedUint64_.GetHashCode();
986      hash ^= repeatedSint32_.GetHashCode();
987      hash ^= repeatedSint64_.GetHashCode();
988      hash ^= repeatedFixed32_.GetHashCode();
989      hash ^= repeatedFixed64_.GetHashCode();
990      hash ^= repeatedSfixed32_.GetHashCode();
991      hash ^= repeatedSfixed64_.GetHashCode();
992      hash ^= repeatedFloat_.GetHashCode();
993      hash ^= repeatedDouble_.GetHashCode();
994      hash ^= repeatedBool_.GetHashCode();
995      hash ^= repeatedString_.GetHashCode();
996      hash ^= repeatedBytes_.GetHashCode();
997      hash ^= repeatedNestedMessage_.GetHashCode();
998      hash ^= repeatedForeignMessage_.GetHashCode();
999      hash ^= repeatedImportMessage_.GetHashCode();
1000      hash ^= repeatedNestedEnum_.GetHashCode();
1001      hash ^= repeatedForeignEnum_.GetHashCode();
1002      hash ^= repeatedImportEnum_.GetHashCode();
1003      hash ^= repeatedPublicImportMessage_.GetHashCode();
1004      if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) hash ^= OneofUint32.GetHashCode();
1005      if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode();
1006      if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) hash ^= OneofString.GetHashCode();
1007      if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.GetHashCode();
1008      hash ^= (int) oneofFieldCase_;
1009      if (_unknownFields != null) {
1010        hash ^= _unknownFields.GetHashCode();
1011      }
1012      return hash;
1013    }
1014
1015    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1016    public override string ToString() {
1017      return pb::JsonFormatter.ToDiagnosticString(this);
1018    }
1019
1020    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1021    public void WriteTo(pb::CodedOutputStream output) {
1022    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1023      output.WriteRawMessage(this);
1024    #else
1025      if (SingleInt32 != 0) {
1026        output.WriteRawTag(8);
1027        output.WriteInt32(SingleInt32);
1028      }
1029      if (SingleInt64 != 0L) {
1030        output.WriteRawTag(16);
1031        output.WriteInt64(SingleInt64);
1032      }
1033      if (SingleUint32 != 0) {
1034        output.WriteRawTag(24);
1035        output.WriteUInt32(SingleUint32);
1036      }
1037      if (SingleUint64 != 0UL) {
1038        output.WriteRawTag(32);
1039        output.WriteUInt64(SingleUint64);
1040      }
1041      if (SingleSint32 != 0) {
1042        output.WriteRawTag(40);
1043        output.WriteSInt32(SingleSint32);
1044      }
1045      if (SingleSint64 != 0L) {
1046        output.WriteRawTag(48);
1047        output.WriteSInt64(SingleSint64);
1048      }
1049      if (SingleFixed32 != 0) {
1050        output.WriteRawTag(61);
1051        output.WriteFixed32(SingleFixed32);
1052      }
1053      if (SingleFixed64 != 0UL) {
1054        output.WriteRawTag(65);
1055        output.WriteFixed64(SingleFixed64);
1056      }
1057      if (SingleSfixed32 != 0) {
1058        output.WriteRawTag(77);
1059        output.WriteSFixed32(SingleSfixed32);
1060      }
1061      if (SingleSfixed64 != 0L) {
1062        output.WriteRawTag(81);
1063        output.WriteSFixed64(SingleSfixed64);
1064      }
1065      if (SingleFloat != 0F) {
1066        output.WriteRawTag(93);
1067        output.WriteFloat(SingleFloat);
1068      }
1069      if (SingleDouble != 0D) {
1070        output.WriteRawTag(97);
1071        output.WriteDouble(SingleDouble);
1072      }
1073      if (SingleBool != false) {
1074        output.WriteRawTag(104);
1075        output.WriteBool(SingleBool);
1076      }
1077      if (SingleString.Length != 0) {
1078        output.WriteRawTag(114);
1079        output.WriteString(SingleString);
1080      }
1081      if (SingleBytes.Length != 0) {
1082        output.WriteRawTag(122);
1083        output.WriteBytes(SingleBytes);
1084      }
1085      if (singleNestedMessage_ != null) {
1086        output.WriteRawTag(146, 1);
1087        output.WriteMessage(SingleNestedMessage);
1088      }
1089      if (singleForeignMessage_ != null) {
1090        output.WriteRawTag(154, 1);
1091        output.WriteMessage(SingleForeignMessage);
1092      }
1093      if (singleImportMessage_ != null) {
1094        output.WriteRawTag(162, 1);
1095        output.WriteMessage(SingleImportMessage);
1096      }
1097      if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.Unspecified) {
1098        output.WriteRawTag(168, 1);
1099        output.WriteEnum((int) SingleNestedEnum);
1100      }
1101      if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified) {
1102        output.WriteRawTag(176, 1);
1103        output.WriteEnum((int) SingleForeignEnum);
1104      }
1105      if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.Unspecified) {
1106        output.WriteRawTag(184, 1);
1107        output.WriteEnum((int) SingleImportEnum);
1108      }
1109      if (singlePublicImportMessage_ != null) {
1110        output.WriteRawTag(210, 1);
1111        output.WriteMessage(SinglePublicImportMessage);
1112      }
1113      repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
1114      repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
1115      repeatedUint32_.WriteTo(output, _repeated_repeatedUint32_codec);
1116      repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
1117      repeatedSint32_.WriteTo(output, _repeated_repeatedSint32_codec);
1118      repeatedSint64_.WriteTo(output, _repeated_repeatedSint64_codec);
1119      repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
1120      repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
1121      repeatedSfixed32_.WriteTo(output, _repeated_repeatedSfixed32_codec);
1122      repeatedSfixed64_.WriteTo(output, _repeated_repeatedSfixed64_codec);
1123      repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
1124      repeatedDouble_.WriteTo(output, _repeated_repeatedDouble_codec);
1125      repeatedBool_.WriteTo(output, _repeated_repeatedBool_codec);
1126      repeatedString_.WriteTo(output, _repeated_repeatedString_codec);
1127      repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec);
1128      repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_codec);
1129      repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec);
1130      repeatedImportMessage_.WriteTo(output, _repeated_repeatedImportMessage_codec);
1131      repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec);
1132      repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec);
1133      repeatedImportEnum_.WriteTo(output, _repeated_repeatedImportEnum_codec);
1134      repeatedPublicImportMessage_.WriteTo(output, _repeated_repeatedPublicImportMessage_codec);
1135      if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
1136        output.WriteRawTag(248, 6);
1137        output.WriteUInt32(OneofUint32);
1138      }
1139      if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
1140        output.WriteRawTag(130, 7);
1141        output.WriteMessage(OneofNestedMessage);
1142      }
1143      if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
1144        output.WriteRawTag(138, 7);
1145        output.WriteString(OneofString);
1146      }
1147      if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
1148        output.WriteRawTag(146, 7);
1149        output.WriteBytes(OneofBytes);
1150      }
1151      if (_unknownFields != null) {
1152        _unknownFields.WriteTo(output);
1153      }
1154    #endif
1155    }
1156
1157    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1158    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1159    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
1160      if (SingleInt32 != 0) {
1161        output.WriteRawTag(8);
1162        output.WriteInt32(SingleInt32);
1163      }
1164      if (SingleInt64 != 0L) {
1165        output.WriteRawTag(16);
1166        output.WriteInt64(SingleInt64);
1167      }
1168      if (SingleUint32 != 0) {
1169        output.WriteRawTag(24);
1170        output.WriteUInt32(SingleUint32);
1171      }
1172      if (SingleUint64 != 0UL) {
1173        output.WriteRawTag(32);
1174        output.WriteUInt64(SingleUint64);
1175      }
1176      if (SingleSint32 != 0) {
1177        output.WriteRawTag(40);
1178        output.WriteSInt32(SingleSint32);
1179      }
1180      if (SingleSint64 != 0L) {
1181        output.WriteRawTag(48);
1182        output.WriteSInt64(SingleSint64);
1183      }
1184      if (SingleFixed32 != 0) {
1185        output.WriteRawTag(61);
1186        output.WriteFixed32(SingleFixed32);
1187      }
1188      if (SingleFixed64 != 0UL) {
1189        output.WriteRawTag(65);
1190        output.WriteFixed64(SingleFixed64);
1191      }
1192      if (SingleSfixed32 != 0) {
1193        output.WriteRawTag(77);
1194        output.WriteSFixed32(SingleSfixed32);
1195      }
1196      if (SingleSfixed64 != 0L) {
1197        output.WriteRawTag(81);
1198        output.WriteSFixed64(SingleSfixed64);
1199      }
1200      if (SingleFloat != 0F) {
1201        output.WriteRawTag(93);
1202        output.WriteFloat(SingleFloat);
1203      }
1204      if (SingleDouble != 0D) {
1205        output.WriteRawTag(97);
1206        output.WriteDouble(SingleDouble);
1207      }
1208      if (SingleBool != false) {
1209        output.WriteRawTag(104);
1210        output.WriteBool(SingleBool);
1211      }
1212      if (SingleString.Length != 0) {
1213        output.WriteRawTag(114);
1214        output.WriteString(SingleString);
1215      }
1216      if (SingleBytes.Length != 0) {
1217        output.WriteRawTag(122);
1218        output.WriteBytes(SingleBytes);
1219      }
1220      if (singleNestedMessage_ != null) {
1221        output.WriteRawTag(146, 1);
1222        output.WriteMessage(SingleNestedMessage);
1223      }
1224      if (singleForeignMessage_ != null) {
1225        output.WriteRawTag(154, 1);
1226        output.WriteMessage(SingleForeignMessage);
1227      }
1228      if (singleImportMessage_ != null) {
1229        output.WriteRawTag(162, 1);
1230        output.WriteMessage(SingleImportMessage);
1231      }
1232      if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.Unspecified) {
1233        output.WriteRawTag(168, 1);
1234        output.WriteEnum((int) SingleNestedEnum);
1235      }
1236      if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified) {
1237        output.WriteRawTag(176, 1);
1238        output.WriteEnum((int) SingleForeignEnum);
1239      }
1240      if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.Unspecified) {
1241        output.WriteRawTag(184, 1);
1242        output.WriteEnum((int) SingleImportEnum);
1243      }
1244      if (singlePublicImportMessage_ != null) {
1245        output.WriteRawTag(210, 1);
1246        output.WriteMessage(SinglePublicImportMessage);
1247      }
1248      repeatedInt32_.WriteTo(ref output, _repeated_repeatedInt32_codec);
1249      repeatedInt64_.WriteTo(ref output, _repeated_repeatedInt64_codec);
1250      repeatedUint32_.WriteTo(ref output, _repeated_repeatedUint32_codec);
1251      repeatedUint64_.WriteTo(ref output, _repeated_repeatedUint64_codec);
1252      repeatedSint32_.WriteTo(ref output, _repeated_repeatedSint32_codec);
1253      repeatedSint64_.WriteTo(ref output, _repeated_repeatedSint64_codec);
1254      repeatedFixed32_.WriteTo(ref output, _repeated_repeatedFixed32_codec);
1255      repeatedFixed64_.WriteTo(ref output, _repeated_repeatedFixed64_codec);
1256      repeatedSfixed32_.WriteTo(ref output, _repeated_repeatedSfixed32_codec);
1257      repeatedSfixed64_.WriteTo(ref output, _repeated_repeatedSfixed64_codec);
1258      repeatedFloat_.WriteTo(ref output, _repeated_repeatedFloat_codec);
1259      repeatedDouble_.WriteTo(ref output, _repeated_repeatedDouble_codec);
1260      repeatedBool_.WriteTo(ref output, _repeated_repeatedBool_codec);
1261      repeatedString_.WriteTo(ref output, _repeated_repeatedString_codec);
1262      repeatedBytes_.WriteTo(ref output, _repeated_repeatedBytes_codec);
1263      repeatedNestedMessage_.WriteTo(ref output, _repeated_repeatedNestedMessage_codec);
1264      repeatedForeignMessage_.WriteTo(ref output, _repeated_repeatedForeignMessage_codec);
1265      repeatedImportMessage_.WriteTo(ref output, _repeated_repeatedImportMessage_codec);
1266      repeatedNestedEnum_.WriteTo(ref output, _repeated_repeatedNestedEnum_codec);
1267      repeatedForeignEnum_.WriteTo(ref output, _repeated_repeatedForeignEnum_codec);
1268      repeatedImportEnum_.WriteTo(ref output, _repeated_repeatedImportEnum_codec);
1269      repeatedPublicImportMessage_.WriteTo(ref output, _repeated_repeatedPublicImportMessage_codec);
1270      if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
1271        output.WriteRawTag(248, 6);
1272        output.WriteUInt32(OneofUint32);
1273      }
1274      if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
1275        output.WriteRawTag(130, 7);
1276        output.WriteMessage(OneofNestedMessage);
1277      }
1278      if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
1279        output.WriteRawTag(138, 7);
1280        output.WriteString(OneofString);
1281      }
1282      if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
1283        output.WriteRawTag(146, 7);
1284        output.WriteBytes(OneofBytes);
1285      }
1286      if (_unknownFields != null) {
1287        _unknownFields.WriteTo(ref output);
1288      }
1289    }
1290    #endif
1291
1292    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1293    public int CalculateSize() {
1294      int size = 0;
1295      if (SingleInt32 != 0) {
1296        size += 1 + pb::CodedOutputStream.ComputeInt32Size(SingleInt32);
1297      }
1298      if (SingleInt64 != 0L) {
1299        size += 1 + pb::CodedOutputStream.ComputeInt64Size(SingleInt64);
1300      }
1301      if (SingleUint32 != 0) {
1302        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SingleUint32);
1303      }
1304      if (SingleUint64 != 0UL) {
1305        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SingleUint64);
1306      }
1307      if (SingleSint32 != 0) {
1308        size += 1 + pb::CodedOutputStream.ComputeSInt32Size(SingleSint32);
1309      }
1310      if (SingleSint64 != 0L) {
1311        size += 1 + pb::CodedOutputStream.ComputeSInt64Size(SingleSint64);
1312      }
1313      if (SingleFixed32 != 0) {
1314        size += 1 + 4;
1315      }
1316      if (SingleFixed64 != 0UL) {
1317        size += 1 + 8;
1318      }
1319      if (SingleSfixed32 != 0) {
1320        size += 1 + 4;
1321      }
1322      if (SingleSfixed64 != 0L) {
1323        size += 1 + 8;
1324      }
1325      if (SingleFloat != 0F) {
1326        size += 1 + 4;
1327      }
1328      if (SingleDouble != 0D) {
1329        size += 1 + 8;
1330      }
1331      if (SingleBool != false) {
1332        size += 1 + 1;
1333      }
1334      if (SingleString.Length != 0) {
1335        size += 1 + pb::CodedOutputStream.ComputeStringSize(SingleString);
1336      }
1337      if (SingleBytes.Length != 0) {
1338        size += 1 + pb::CodedOutputStream.ComputeBytesSize(SingleBytes);
1339      }
1340      if (singleNestedMessage_ != null) {
1341        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage);
1342      }
1343      if (singleForeignMessage_ != null) {
1344        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleForeignMessage);
1345      }
1346      if (singleImportMessage_ != null) {
1347        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleImportMessage);
1348      }
1349      if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.Unspecified) {
1350        size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleNestedEnum);
1351      }
1352      if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified) {
1353        size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleForeignEnum);
1354      }
1355      if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.Unspecified) {
1356        size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleImportEnum);
1357      }
1358      if (singlePublicImportMessage_ != null) {
1359        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SinglePublicImportMessage);
1360      }
1361      size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
1362      size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
1363      size += repeatedUint32_.CalculateSize(_repeated_repeatedUint32_codec);
1364      size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
1365      size += repeatedSint32_.CalculateSize(_repeated_repeatedSint32_codec);
1366      size += repeatedSint64_.CalculateSize(_repeated_repeatedSint64_codec);
1367      size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
1368      size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
1369      size += repeatedSfixed32_.CalculateSize(_repeated_repeatedSfixed32_codec);
1370      size += repeatedSfixed64_.CalculateSize(_repeated_repeatedSfixed64_codec);
1371      size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
1372      size += repeatedDouble_.CalculateSize(_repeated_repeatedDouble_codec);
1373      size += repeatedBool_.CalculateSize(_repeated_repeatedBool_codec);
1374      size += repeatedString_.CalculateSize(_repeated_repeatedString_codec);
1375      size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec);
1376      size += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessage_codec);
1377      size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec);
1378      size += repeatedImportMessage_.CalculateSize(_repeated_repeatedImportMessage_codec);
1379      size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_codec);
1380      size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec);
1381      size += repeatedImportEnum_.CalculateSize(_repeated_repeatedImportEnum_codec);
1382      size += repeatedPublicImportMessage_.CalculateSize(_repeated_repeatedPublicImportMessage_codec);
1383      if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
1384        size += 2 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32);
1385      }
1386      if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
1387        size += 2 + pb::CodedOutputStream.ComputeMessageSize(OneofNestedMessage);
1388      }
1389      if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
1390        size += 2 + pb::CodedOutputStream.ComputeStringSize(OneofString);
1391      }
1392      if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
1393        size += 2 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes);
1394      }
1395      if (_unknownFields != null) {
1396        size += _unknownFields.CalculateSize();
1397      }
1398      return size;
1399    }
1400
1401    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1402    public void MergeFrom(TestAllTypes other) {
1403      if (other == null) {
1404        return;
1405      }
1406      if (other.SingleInt32 != 0) {
1407        SingleInt32 = other.SingleInt32;
1408      }
1409      if (other.SingleInt64 != 0L) {
1410        SingleInt64 = other.SingleInt64;
1411      }
1412      if (other.SingleUint32 != 0) {
1413        SingleUint32 = other.SingleUint32;
1414      }
1415      if (other.SingleUint64 != 0UL) {
1416        SingleUint64 = other.SingleUint64;
1417      }
1418      if (other.SingleSint32 != 0) {
1419        SingleSint32 = other.SingleSint32;
1420      }
1421      if (other.SingleSint64 != 0L) {
1422        SingleSint64 = other.SingleSint64;
1423      }
1424      if (other.SingleFixed32 != 0) {
1425        SingleFixed32 = other.SingleFixed32;
1426      }
1427      if (other.SingleFixed64 != 0UL) {
1428        SingleFixed64 = other.SingleFixed64;
1429      }
1430      if (other.SingleSfixed32 != 0) {
1431        SingleSfixed32 = other.SingleSfixed32;
1432      }
1433      if (other.SingleSfixed64 != 0L) {
1434        SingleSfixed64 = other.SingleSfixed64;
1435      }
1436      if (other.SingleFloat != 0F) {
1437        SingleFloat = other.SingleFloat;
1438      }
1439      if (other.SingleDouble != 0D) {
1440        SingleDouble = other.SingleDouble;
1441      }
1442      if (other.SingleBool != false) {
1443        SingleBool = other.SingleBool;
1444      }
1445      if (other.SingleString.Length != 0) {
1446        SingleString = other.SingleString;
1447      }
1448      if (other.SingleBytes.Length != 0) {
1449        SingleBytes = other.SingleBytes;
1450      }
1451      if (other.singleNestedMessage_ != null) {
1452        if (singleNestedMessage_ == null) {
1453          SingleNestedMessage = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
1454        }
1455        SingleNestedMessage.MergeFrom(other.SingleNestedMessage);
1456      }
1457      if (other.singleForeignMessage_ != null) {
1458        if (singleForeignMessage_ == null) {
1459          SingleForeignMessage = new global::Google.Protobuf.TestProtos.ForeignMessage();
1460        }
1461        SingleForeignMessage.MergeFrom(other.SingleForeignMessage);
1462      }
1463      if (other.singleImportMessage_ != null) {
1464        if (singleImportMessage_ == null) {
1465          SingleImportMessage = new global::Google.Protobuf.TestProtos.ImportMessage();
1466        }
1467        SingleImportMessage.MergeFrom(other.SingleImportMessage);
1468      }
1469      if (other.SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.Unspecified) {
1470        SingleNestedEnum = other.SingleNestedEnum;
1471      }
1472      if (other.SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified) {
1473        SingleForeignEnum = other.SingleForeignEnum;
1474      }
1475      if (other.SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.Unspecified) {
1476        SingleImportEnum = other.SingleImportEnum;
1477      }
1478      if (other.singlePublicImportMessage_ != null) {
1479        if (singlePublicImportMessage_ == null) {
1480          SinglePublicImportMessage = new global::Google.Protobuf.TestProtos.PublicImportMessage();
1481        }
1482        SinglePublicImportMessage.MergeFrom(other.SinglePublicImportMessage);
1483      }
1484      repeatedInt32_.Add(other.repeatedInt32_);
1485      repeatedInt64_.Add(other.repeatedInt64_);
1486      repeatedUint32_.Add(other.repeatedUint32_);
1487      repeatedUint64_.Add(other.repeatedUint64_);
1488      repeatedSint32_.Add(other.repeatedSint32_);
1489      repeatedSint64_.Add(other.repeatedSint64_);
1490      repeatedFixed32_.Add(other.repeatedFixed32_);
1491      repeatedFixed64_.Add(other.repeatedFixed64_);
1492      repeatedSfixed32_.Add(other.repeatedSfixed32_);
1493      repeatedSfixed64_.Add(other.repeatedSfixed64_);
1494      repeatedFloat_.Add(other.repeatedFloat_);
1495      repeatedDouble_.Add(other.repeatedDouble_);
1496      repeatedBool_.Add(other.repeatedBool_);
1497      repeatedString_.Add(other.repeatedString_);
1498      repeatedBytes_.Add(other.repeatedBytes_);
1499      repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
1500      repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
1501      repeatedImportMessage_.Add(other.repeatedImportMessage_);
1502      repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
1503      repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
1504      repeatedImportEnum_.Add(other.repeatedImportEnum_);
1505      repeatedPublicImportMessage_.Add(other.repeatedPublicImportMessage_);
1506      switch (other.OneofFieldCase) {
1507        case OneofFieldOneofCase.OneofUint32:
1508          OneofUint32 = other.OneofUint32;
1509          break;
1510        case OneofFieldOneofCase.OneofNestedMessage:
1511          if (OneofNestedMessage == null) {
1512            OneofNestedMessage = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
1513          }
1514          OneofNestedMessage.MergeFrom(other.OneofNestedMessage);
1515          break;
1516        case OneofFieldOneofCase.OneofString:
1517          OneofString = other.OneofString;
1518          break;
1519        case OneofFieldOneofCase.OneofBytes:
1520          OneofBytes = other.OneofBytes;
1521          break;
1522      }
1523
1524      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1525    }
1526
1527    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1528    public void MergeFrom(pb::CodedInputStream input) {
1529    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1530      input.ReadRawMessage(this);
1531    #else
1532      uint tag;
1533      while ((tag = input.ReadTag()) != 0) {
1534        switch(tag) {
1535          default:
1536            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1537            break;
1538          case 8: {
1539            SingleInt32 = input.ReadInt32();
1540            break;
1541          }
1542          case 16: {
1543            SingleInt64 = input.ReadInt64();
1544            break;
1545          }
1546          case 24: {
1547            SingleUint32 = input.ReadUInt32();
1548            break;
1549          }
1550          case 32: {
1551            SingleUint64 = input.ReadUInt64();
1552            break;
1553          }
1554          case 40: {
1555            SingleSint32 = input.ReadSInt32();
1556            break;
1557          }
1558          case 48: {
1559            SingleSint64 = input.ReadSInt64();
1560            break;
1561          }
1562          case 61: {
1563            SingleFixed32 = input.ReadFixed32();
1564            break;
1565          }
1566          case 65: {
1567            SingleFixed64 = input.ReadFixed64();
1568            break;
1569          }
1570          case 77: {
1571            SingleSfixed32 = input.ReadSFixed32();
1572            break;
1573          }
1574          case 81: {
1575            SingleSfixed64 = input.ReadSFixed64();
1576            break;
1577          }
1578          case 93: {
1579            SingleFloat = input.ReadFloat();
1580            break;
1581          }
1582          case 97: {
1583            SingleDouble = input.ReadDouble();
1584            break;
1585          }
1586          case 104: {
1587            SingleBool = input.ReadBool();
1588            break;
1589          }
1590          case 114: {
1591            SingleString = input.ReadString();
1592            break;
1593          }
1594          case 122: {
1595            SingleBytes = input.ReadBytes();
1596            break;
1597          }
1598          case 146: {
1599            if (singleNestedMessage_ == null) {
1600              SingleNestedMessage = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
1601            }
1602            input.ReadMessage(SingleNestedMessage);
1603            break;
1604          }
1605          case 154: {
1606            if (singleForeignMessage_ == null) {
1607              SingleForeignMessage = new global::Google.Protobuf.TestProtos.ForeignMessage();
1608            }
1609            input.ReadMessage(SingleForeignMessage);
1610            break;
1611          }
1612          case 162: {
1613            if (singleImportMessage_ == null) {
1614              SingleImportMessage = new global::Google.Protobuf.TestProtos.ImportMessage();
1615            }
1616            input.ReadMessage(SingleImportMessage);
1617            break;
1618          }
1619          case 168: {
1620            SingleNestedEnum = (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) input.ReadEnum();
1621            break;
1622          }
1623          case 176: {
1624            SingleForeignEnum = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum();
1625            break;
1626          }
1627          case 184: {
1628            SingleImportEnum = (global::Google.Protobuf.TestProtos.ImportEnum) input.ReadEnum();
1629            break;
1630          }
1631          case 210: {
1632            if (singlePublicImportMessage_ == null) {
1633              SinglePublicImportMessage = new global::Google.Protobuf.TestProtos.PublicImportMessage();
1634            }
1635            input.ReadMessage(SinglePublicImportMessage);
1636            break;
1637          }
1638          case 250:
1639          case 248: {
1640            repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
1641            break;
1642          }
1643          case 258:
1644          case 256: {
1645            repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
1646            break;
1647          }
1648          case 266:
1649          case 264: {
1650            repeatedUint32_.AddEntriesFrom(input, _repeated_repeatedUint32_codec);
1651            break;
1652          }
1653          case 274:
1654          case 272: {
1655            repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
1656            break;
1657          }
1658          case 282:
1659          case 280: {
1660            repeatedSint32_.AddEntriesFrom(input, _repeated_repeatedSint32_codec);
1661            break;
1662          }
1663          case 290:
1664          case 288: {
1665            repeatedSint64_.AddEntriesFrom(input, _repeated_repeatedSint64_codec);
1666            break;
1667          }
1668          case 298:
1669          case 301: {
1670            repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
1671            break;
1672          }
1673          case 306:
1674          case 305: {
1675            repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
1676            break;
1677          }
1678          case 314:
1679          case 317: {
1680            repeatedSfixed32_.AddEntriesFrom(input, _repeated_repeatedSfixed32_codec);
1681            break;
1682          }
1683          case 322:
1684          case 321: {
1685            repeatedSfixed64_.AddEntriesFrom(input, _repeated_repeatedSfixed64_codec);
1686            break;
1687          }
1688          case 330:
1689          case 333: {
1690            repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
1691            break;
1692          }
1693          case 338:
1694          case 337: {
1695            repeatedDouble_.AddEntriesFrom(input, _repeated_repeatedDouble_codec);
1696            break;
1697          }
1698          case 346:
1699          case 344: {
1700            repeatedBool_.AddEntriesFrom(input, _repeated_repeatedBool_codec);
1701            break;
1702          }
1703          case 354: {
1704            repeatedString_.AddEntriesFrom(input, _repeated_repeatedString_codec);
1705            break;
1706          }
1707          case 362: {
1708            repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec);
1709            break;
1710          }
1711          case 386: {
1712            repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNestedMessage_codec);
1713            break;
1714          }
1715          case 394: {
1716            repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_codec);
1717            break;
1718          }
1719          case 402: {
1720            repeatedImportMessage_.AddEntriesFrom(input, _repeated_repeatedImportMessage_codec);
1721            break;
1722          }
1723          case 410:
1724          case 408: {
1725            repeatedNestedEnum_.AddEntriesFrom(input, _repeated_repeatedNestedEnum_codec);
1726            break;
1727          }
1728          case 418:
1729          case 416: {
1730            repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeignEnum_codec);
1731            break;
1732          }
1733          case 426:
1734          case 424: {
1735            repeatedImportEnum_.AddEntriesFrom(input, _repeated_repeatedImportEnum_codec);
1736            break;
1737          }
1738          case 434: {
1739            repeatedPublicImportMessage_.AddEntriesFrom(input, _repeated_repeatedPublicImportMessage_codec);
1740            break;
1741          }
1742          case 888: {
1743            OneofUint32 = input.ReadUInt32();
1744            break;
1745          }
1746          case 898: {
1747            global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
1748            if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
1749              subBuilder.MergeFrom(OneofNestedMessage);
1750            }
1751            input.ReadMessage(subBuilder);
1752            OneofNestedMessage = subBuilder;
1753            break;
1754          }
1755          case 906: {
1756            OneofString = input.ReadString();
1757            break;
1758          }
1759          case 914: {
1760            OneofBytes = input.ReadBytes();
1761            break;
1762          }
1763        }
1764      }
1765    #endif
1766    }
1767
1768    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1769    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1770    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
1771      uint tag;
1772      while ((tag = input.ReadTag()) != 0) {
1773        switch(tag) {
1774          default:
1775            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1776            break;
1777          case 8: {
1778            SingleInt32 = input.ReadInt32();
1779            break;
1780          }
1781          case 16: {
1782            SingleInt64 = input.ReadInt64();
1783            break;
1784          }
1785          case 24: {
1786            SingleUint32 = input.ReadUInt32();
1787            break;
1788          }
1789          case 32: {
1790            SingleUint64 = input.ReadUInt64();
1791            break;
1792          }
1793          case 40: {
1794            SingleSint32 = input.ReadSInt32();
1795            break;
1796          }
1797          case 48: {
1798            SingleSint64 = input.ReadSInt64();
1799            break;
1800          }
1801          case 61: {
1802            SingleFixed32 = input.ReadFixed32();
1803            break;
1804          }
1805          case 65: {
1806            SingleFixed64 = input.ReadFixed64();
1807            break;
1808          }
1809          case 77: {
1810            SingleSfixed32 = input.ReadSFixed32();
1811            break;
1812          }
1813          case 81: {
1814            SingleSfixed64 = input.ReadSFixed64();
1815            break;
1816          }
1817          case 93: {
1818            SingleFloat = input.ReadFloat();
1819            break;
1820          }
1821          case 97: {
1822            SingleDouble = input.ReadDouble();
1823            break;
1824          }
1825          case 104: {
1826            SingleBool = input.ReadBool();
1827            break;
1828          }
1829          case 114: {
1830            SingleString = input.ReadString();
1831            break;
1832          }
1833          case 122: {
1834            SingleBytes = input.ReadBytes();
1835            break;
1836          }
1837          case 146: {
1838            if (singleNestedMessage_ == null) {
1839              SingleNestedMessage = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
1840            }
1841            input.ReadMessage(SingleNestedMessage);
1842            break;
1843          }
1844          case 154: {
1845            if (singleForeignMessage_ == null) {
1846              SingleForeignMessage = new global::Google.Protobuf.TestProtos.ForeignMessage();
1847            }
1848            input.ReadMessage(SingleForeignMessage);
1849            break;
1850          }
1851          case 162: {
1852            if (singleImportMessage_ == null) {
1853              SingleImportMessage = new global::Google.Protobuf.TestProtos.ImportMessage();
1854            }
1855            input.ReadMessage(SingleImportMessage);
1856            break;
1857          }
1858          case 168: {
1859            SingleNestedEnum = (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) input.ReadEnum();
1860            break;
1861          }
1862          case 176: {
1863            SingleForeignEnum = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum();
1864            break;
1865          }
1866          case 184: {
1867            SingleImportEnum = (global::Google.Protobuf.TestProtos.ImportEnum) input.ReadEnum();
1868            break;
1869          }
1870          case 210: {
1871            if (singlePublicImportMessage_ == null) {
1872              SinglePublicImportMessage = new global::Google.Protobuf.TestProtos.PublicImportMessage();
1873            }
1874            input.ReadMessage(SinglePublicImportMessage);
1875            break;
1876          }
1877          case 250:
1878          case 248: {
1879            repeatedInt32_.AddEntriesFrom(ref input, _repeated_repeatedInt32_codec);
1880            break;
1881          }
1882          case 258:
1883          case 256: {
1884            repeatedInt64_.AddEntriesFrom(ref input, _repeated_repeatedInt64_codec);
1885            break;
1886          }
1887          case 266:
1888          case 264: {
1889            repeatedUint32_.AddEntriesFrom(ref input, _repeated_repeatedUint32_codec);
1890            break;
1891          }
1892          case 274:
1893          case 272: {
1894            repeatedUint64_.AddEntriesFrom(ref input, _repeated_repeatedUint64_codec);
1895            break;
1896          }
1897          case 282:
1898          case 280: {
1899            repeatedSint32_.AddEntriesFrom(ref input, _repeated_repeatedSint32_codec);
1900            break;
1901          }
1902          case 290:
1903          case 288: {
1904            repeatedSint64_.AddEntriesFrom(ref input, _repeated_repeatedSint64_codec);
1905            break;
1906          }
1907          case 298:
1908          case 301: {
1909            repeatedFixed32_.AddEntriesFrom(ref input, _repeated_repeatedFixed32_codec);
1910            break;
1911          }
1912          case 306:
1913          case 305: {
1914            repeatedFixed64_.AddEntriesFrom(ref input, _repeated_repeatedFixed64_codec);
1915            break;
1916          }
1917          case 314:
1918          case 317: {
1919            repeatedSfixed32_.AddEntriesFrom(ref input, _repeated_repeatedSfixed32_codec);
1920            break;
1921          }
1922          case 322:
1923          case 321: {
1924            repeatedSfixed64_.AddEntriesFrom(ref input, _repeated_repeatedSfixed64_codec);
1925            break;
1926          }
1927          case 330:
1928          case 333: {
1929            repeatedFloat_.AddEntriesFrom(ref input, _repeated_repeatedFloat_codec);
1930            break;
1931          }
1932          case 338:
1933          case 337: {
1934            repeatedDouble_.AddEntriesFrom(ref input, _repeated_repeatedDouble_codec);
1935            break;
1936          }
1937          case 346:
1938          case 344: {
1939            repeatedBool_.AddEntriesFrom(ref input, _repeated_repeatedBool_codec);
1940            break;
1941          }
1942          case 354: {
1943            repeatedString_.AddEntriesFrom(ref input, _repeated_repeatedString_codec);
1944            break;
1945          }
1946          case 362: {
1947            repeatedBytes_.AddEntriesFrom(ref input, _repeated_repeatedBytes_codec);
1948            break;
1949          }
1950          case 386: {
1951            repeatedNestedMessage_.AddEntriesFrom(ref input, _repeated_repeatedNestedMessage_codec);
1952            break;
1953          }
1954          case 394: {
1955            repeatedForeignMessage_.AddEntriesFrom(ref input, _repeated_repeatedForeignMessage_codec);
1956            break;
1957          }
1958          case 402: {
1959            repeatedImportMessage_.AddEntriesFrom(ref input, _repeated_repeatedImportMessage_codec);
1960            break;
1961          }
1962          case 410:
1963          case 408: {
1964            repeatedNestedEnum_.AddEntriesFrom(ref input, _repeated_repeatedNestedEnum_codec);
1965            break;
1966          }
1967          case 418:
1968          case 416: {
1969            repeatedForeignEnum_.AddEntriesFrom(ref input, _repeated_repeatedForeignEnum_codec);
1970            break;
1971          }
1972          case 426:
1973          case 424: {
1974            repeatedImportEnum_.AddEntriesFrom(ref input, _repeated_repeatedImportEnum_codec);
1975            break;
1976          }
1977          case 434: {
1978            repeatedPublicImportMessage_.AddEntriesFrom(ref input, _repeated_repeatedPublicImportMessage_codec);
1979            break;
1980          }
1981          case 888: {
1982            OneofUint32 = input.ReadUInt32();
1983            break;
1984          }
1985          case 898: {
1986            global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
1987            if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
1988              subBuilder.MergeFrom(OneofNestedMessage);
1989            }
1990            input.ReadMessage(subBuilder);
1991            OneofNestedMessage = subBuilder;
1992            break;
1993          }
1994          case 906: {
1995            OneofString = input.ReadString();
1996            break;
1997          }
1998          case 914: {
1999            OneofBytes = input.ReadBytes();
2000            break;
2001          }
2002        }
2003      }
2004    }
2005    #endif
2006
2007    #region Nested types
2008    /// <summary>Container for nested types declared in the TestAllTypes message type.</summary>
2009    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2010    public static partial class Types {
2011      public enum NestedEnum {
2012        [pbr::OriginalName("NESTED_ENUM_UNSPECIFIED")] Unspecified = 0,
2013        [pbr::OriginalName("FOO")] Foo = 1,
2014        [pbr::OriginalName("BAR")] Bar = 2,
2015        [pbr::OriginalName("BAZ")] Baz = 3,
2016        /// <summary>
2017        /// Intentionally negative.
2018        /// </summary>
2019        [pbr::OriginalName("NEG")] Neg = -1,
2020      }
2021
2022      public sealed partial class NestedMessage : pb::IMessage<NestedMessage>
2023      #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2024          , pb::IBufferMessage
2025      #endif
2026      {
2027        private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
2028        private pb::UnknownFieldSet _unknownFields;
2029        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2030        public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
2031
2032        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2033        public static pbr::MessageDescriptor Descriptor {
2034          get { return global::Google.Protobuf.TestProtos.TestAllTypes.Descriptor.NestedTypes[0]; }
2035        }
2036
2037        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2038        pbr::MessageDescriptor pb::IMessage.Descriptor {
2039          get { return Descriptor; }
2040        }
2041
2042        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2043        public NestedMessage() {
2044          OnConstruction();
2045        }
2046
2047        partial void OnConstruction();
2048
2049        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2050        public NestedMessage(NestedMessage other) : this() {
2051          bb_ = other.bb_;
2052          _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2053        }
2054
2055        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2056        public NestedMessage Clone() {
2057          return new NestedMessage(this);
2058        }
2059
2060        /// <summary>Field number for the "bb" field.</summary>
2061        public const int BbFieldNumber = 1;
2062        private int bb_;
2063        /// <summary>
2064        /// The field name "b" fails to compile in proto1 because it conflicts with
2065        /// a local variable named "b" in one of the generated methods.  Doh.
2066        /// This file needs to compile in proto1 to test backwards-compatibility.
2067        /// </summary>
2068        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2069        public int Bb {
2070          get { return bb_; }
2071          set {
2072            bb_ = value;
2073          }
2074        }
2075
2076        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2077        public override bool Equals(object other) {
2078          return Equals(other as NestedMessage);
2079        }
2080
2081        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2082        public bool Equals(NestedMessage other) {
2083          if (ReferenceEquals(other, null)) {
2084            return false;
2085          }
2086          if (ReferenceEquals(other, this)) {
2087            return true;
2088          }
2089          if (Bb != other.Bb) return false;
2090          return Equals(_unknownFields, other._unknownFields);
2091        }
2092
2093        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2094        public override int GetHashCode() {
2095          int hash = 1;
2096          if (Bb != 0) hash ^= Bb.GetHashCode();
2097          if (_unknownFields != null) {
2098            hash ^= _unknownFields.GetHashCode();
2099          }
2100          return hash;
2101        }
2102
2103        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2104        public override string ToString() {
2105          return pb::JsonFormatter.ToDiagnosticString(this);
2106        }
2107
2108        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2109        public void WriteTo(pb::CodedOutputStream output) {
2110        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2111          output.WriteRawMessage(this);
2112        #else
2113          if (Bb != 0) {
2114            output.WriteRawTag(8);
2115            output.WriteInt32(Bb);
2116          }
2117          if (_unknownFields != null) {
2118            _unknownFields.WriteTo(output);
2119          }
2120        #endif
2121        }
2122
2123        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2124        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2125        void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2126          if (Bb != 0) {
2127            output.WriteRawTag(8);
2128            output.WriteInt32(Bb);
2129          }
2130          if (_unknownFields != null) {
2131            _unknownFields.WriteTo(ref output);
2132          }
2133        }
2134        #endif
2135
2136        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2137        public int CalculateSize() {
2138          int size = 0;
2139          if (Bb != 0) {
2140            size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb);
2141          }
2142          if (_unknownFields != null) {
2143            size += _unknownFields.CalculateSize();
2144          }
2145          return size;
2146        }
2147
2148        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2149        public void MergeFrom(NestedMessage other) {
2150          if (other == null) {
2151            return;
2152          }
2153          if (other.Bb != 0) {
2154            Bb = other.Bb;
2155          }
2156          _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2157        }
2158
2159        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2160        public void MergeFrom(pb::CodedInputStream input) {
2161        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2162          input.ReadRawMessage(this);
2163        #else
2164          uint tag;
2165          while ((tag = input.ReadTag()) != 0) {
2166            switch(tag) {
2167              default:
2168                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2169                break;
2170              case 8: {
2171                Bb = input.ReadInt32();
2172                break;
2173              }
2174            }
2175          }
2176        #endif
2177        }
2178
2179        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2180        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2181        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2182          uint tag;
2183          while ((tag = input.ReadTag()) != 0) {
2184            switch(tag) {
2185              default:
2186                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2187                break;
2188              case 8: {
2189                Bb = input.ReadInt32();
2190                break;
2191              }
2192            }
2193          }
2194        }
2195        #endif
2196
2197      }
2198
2199    }
2200    #endregion
2201
2202  }
2203
2204  /// <summary>
2205  /// This proto includes a recursively nested message.
2206  /// </summary>
2207  public sealed partial class NestedTestAllTypes : pb::IMessage<NestedTestAllTypes>
2208  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2209      , pb::IBufferMessage
2210  #endif
2211  {
2212    private static readonly pb::MessageParser<NestedTestAllTypes> _parser = new pb::MessageParser<NestedTestAllTypes>(() => new NestedTestAllTypes());
2213    private pb::UnknownFieldSet _unknownFields;
2214    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2215    public static pb::MessageParser<NestedTestAllTypes> Parser { get { return _parser; } }
2216
2217    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2218    public static pbr::MessageDescriptor Descriptor {
2219      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[1]; }
2220    }
2221
2222    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2223    pbr::MessageDescriptor pb::IMessage.Descriptor {
2224      get { return Descriptor; }
2225    }
2226
2227    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2228    public NestedTestAllTypes() {
2229      OnConstruction();
2230    }
2231
2232    partial void OnConstruction();
2233
2234    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2235    public NestedTestAllTypes(NestedTestAllTypes other) : this() {
2236      child_ = other.child_ != null ? other.child_.Clone() : null;
2237      payload_ = other.payload_ != null ? other.payload_.Clone() : null;
2238      repeatedChild_ = other.repeatedChild_.Clone();
2239      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2240    }
2241
2242    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2243    public NestedTestAllTypes Clone() {
2244      return new NestedTestAllTypes(this);
2245    }
2246
2247    /// <summary>Field number for the "child" field.</summary>
2248    public const int ChildFieldNumber = 1;
2249    private global::Google.Protobuf.TestProtos.NestedTestAllTypes child_;
2250    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2251    public global::Google.Protobuf.TestProtos.NestedTestAllTypes Child {
2252      get { return child_; }
2253      set {
2254        child_ = value;
2255      }
2256    }
2257
2258    /// <summary>Field number for the "payload" field.</summary>
2259    public const int PayloadFieldNumber = 2;
2260    private global::Google.Protobuf.TestProtos.TestAllTypes payload_;
2261    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2262    public global::Google.Protobuf.TestProtos.TestAllTypes Payload {
2263      get { return payload_; }
2264      set {
2265        payload_ = value;
2266      }
2267    }
2268
2269    /// <summary>Field number for the "repeated_child" field.</summary>
2270    public const int RepeatedChildFieldNumber = 3;
2271    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.NestedTestAllTypes> _repeated_repeatedChild_codec
2272        = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.NestedTestAllTypes.Parser);
2273    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes> repeatedChild_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes>();
2274    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2275    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes> RepeatedChild {
2276      get { return repeatedChild_; }
2277    }
2278
2279    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2280    public override bool Equals(object other) {
2281      return Equals(other as NestedTestAllTypes);
2282    }
2283
2284    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2285    public bool Equals(NestedTestAllTypes other) {
2286      if (ReferenceEquals(other, null)) {
2287        return false;
2288      }
2289      if (ReferenceEquals(other, this)) {
2290        return true;
2291      }
2292      if (!object.Equals(Child, other.Child)) return false;
2293      if (!object.Equals(Payload, other.Payload)) return false;
2294      if(!repeatedChild_.Equals(other.repeatedChild_)) return false;
2295      return Equals(_unknownFields, other._unknownFields);
2296    }
2297
2298    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2299    public override int GetHashCode() {
2300      int hash = 1;
2301      if (child_ != null) hash ^= Child.GetHashCode();
2302      if (payload_ != null) hash ^= Payload.GetHashCode();
2303      hash ^= repeatedChild_.GetHashCode();
2304      if (_unknownFields != null) {
2305        hash ^= _unknownFields.GetHashCode();
2306      }
2307      return hash;
2308    }
2309
2310    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2311    public override string ToString() {
2312      return pb::JsonFormatter.ToDiagnosticString(this);
2313    }
2314
2315    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2316    public void WriteTo(pb::CodedOutputStream output) {
2317    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2318      output.WriteRawMessage(this);
2319    #else
2320      if (child_ != null) {
2321        output.WriteRawTag(10);
2322        output.WriteMessage(Child);
2323      }
2324      if (payload_ != null) {
2325        output.WriteRawTag(18);
2326        output.WriteMessage(Payload);
2327      }
2328      repeatedChild_.WriteTo(output, _repeated_repeatedChild_codec);
2329      if (_unknownFields != null) {
2330        _unknownFields.WriteTo(output);
2331      }
2332    #endif
2333    }
2334
2335    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2336    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2337    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2338      if (child_ != null) {
2339        output.WriteRawTag(10);
2340        output.WriteMessage(Child);
2341      }
2342      if (payload_ != null) {
2343        output.WriteRawTag(18);
2344        output.WriteMessage(Payload);
2345      }
2346      repeatedChild_.WriteTo(ref output, _repeated_repeatedChild_codec);
2347      if (_unknownFields != null) {
2348        _unknownFields.WriteTo(ref output);
2349      }
2350    }
2351    #endif
2352
2353    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2354    public int CalculateSize() {
2355      int size = 0;
2356      if (child_ != null) {
2357        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Child);
2358      }
2359      if (payload_ != null) {
2360        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload);
2361      }
2362      size += repeatedChild_.CalculateSize(_repeated_repeatedChild_codec);
2363      if (_unknownFields != null) {
2364        size += _unknownFields.CalculateSize();
2365      }
2366      return size;
2367    }
2368
2369    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2370    public void MergeFrom(NestedTestAllTypes other) {
2371      if (other == null) {
2372        return;
2373      }
2374      if (other.child_ != null) {
2375        if (child_ == null) {
2376          Child = new global::Google.Protobuf.TestProtos.NestedTestAllTypes();
2377        }
2378        Child.MergeFrom(other.Child);
2379      }
2380      if (other.payload_ != null) {
2381        if (payload_ == null) {
2382          Payload = new global::Google.Protobuf.TestProtos.TestAllTypes();
2383        }
2384        Payload.MergeFrom(other.Payload);
2385      }
2386      repeatedChild_.Add(other.repeatedChild_);
2387      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2388    }
2389
2390    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2391    public void MergeFrom(pb::CodedInputStream input) {
2392    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2393      input.ReadRawMessage(this);
2394    #else
2395      uint tag;
2396      while ((tag = input.ReadTag()) != 0) {
2397        switch(tag) {
2398          default:
2399            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2400            break;
2401          case 10: {
2402            if (child_ == null) {
2403              Child = new global::Google.Protobuf.TestProtos.NestedTestAllTypes();
2404            }
2405            input.ReadMessage(Child);
2406            break;
2407          }
2408          case 18: {
2409            if (payload_ == null) {
2410              Payload = new global::Google.Protobuf.TestProtos.TestAllTypes();
2411            }
2412            input.ReadMessage(Payload);
2413            break;
2414          }
2415          case 26: {
2416            repeatedChild_.AddEntriesFrom(input, _repeated_repeatedChild_codec);
2417            break;
2418          }
2419        }
2420      }
2421    #endif
2422    }
2423
2424    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2425    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2426    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2427      uint tag;
2428      while ((tag = input.ReadTag()) != 0) {
2429        switch(tag) {
2430          default:
2431            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2432            break;
2433          case 10: {
2434            if (child_ == null) {
2435              Child = new global::Google.Protobuf.TestProtos.NestedTestAllTypes();
2436            }
2437            input.ReadMessage(Child);
2438            break;
2439          }
2440          case 18: {
2441            if (payload_ == null) {
2442              Payload = new global::Google.Protobuf.TestProtos.TestAllTypes();
2443            }
2444            input.ReadMessage(Payload);
2445            break;
2446          }
2447          case 26: {
2448            repeatedChild_.AddEntriesFrom(ref input, _repeated_repeatedChild_codec);
2449            break;
2450          }
2451        }
2452      }
2453    }
2454    #endif
2455
2456  }
2457
2458  public sealed partial class TestDeprecatedFields : pb::IMessage<TestDeprecatedFields>
2459  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2460      , pb::IBufferMessage
2461  #endif
2462  {
2463    private static readonly pb::MessageParser<TestDeprecatedFields> _parser = new pb::MessageParser<TestDeprecatedFields>(() => new TestDeprecatedFields());
2464    private pb::UnknownFieldSet _unknownFields;
2465    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2466    public static pb::MessageParser<TestDeprecatedFields> Parser { get { return _parser; } }
2467
2468    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2469    public static pbr::MessageDescriptor Descriptor {
2470      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[2]; }
2471    }
2472
2473    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2474    pbr::MessageDescriptor pb::IMessage.Descriptor {
2475      get { return Descriptor; }
2476    }
2477
2478    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2479    public TestDeprecatedFields() {
2480      OnConstruction();
2481    }
2482
2483    partial void OnConstruction();
2484
2485    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2486    public TestDeprecatedFields(TestDeprecatedFields other) : this() {
2487      deprecatedInt32_ = other.deprecatedInt32_;
2488      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2489    }
2490
2491    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2492    public TestDeprecatedFields Clone() {
2493      return new TestDeprecatedFields(this);
2494    }
2495
2496    /// <summary>Field number for the "deprecated_int32" field.</summary>
2497    public const int DeprecatedInt32FieldNumber = 1;
2498    private int deprecatedInt32_;
2499    [global::System.ObsoleteAttribute]
2500    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2501    public int DeprecatedInt32 {
2502      get { return deprecatedInt32_; }
2503      set {
2504        deprecatedInt32_ = value;
2505      }
2506    }
2507
2508    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2509    public override bool Equals(object other) {
2510      return Equals(other as TestDeprecatedFields);
2511    }
2512
2513    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2514    public bool Equals(TestDeprecatedFields other) {
2515      if (ReferenceEquals(other, null)) {
2516        return false;
2517      }
2518      if (ReferenceEquals(other, this)) {
2519        return true;
2520      }
2521      if (DeprecatedInt32 != other.DeprecatedInt32) return false;
2522      return Equals(_unknownFields, other._unknownFields);
2523    }
2524
2525    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2526    public override int GetHashCode() {
2527      int hash = 1;
2528      if (DeprecatedInt32 != 0) hash ^= DeprecatedInt32.GetHashCode();
2529      if (_unknownFields != null) {
2530        hash ^= _unknownFields.GetHashCode();
2531      }
2532      return hash;
2533    }
2534
2535    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2536    public override string ToString() {
2537      return pb::JsonFormatter.ToDiagnosticString(this);
2538    }
2539
2540    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2541    public void WriteTo(pb::CodedOutputStream output) {
2542    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2543      output.WriteRawMessage(this);
2544    #else
2545      if (DeprecatedInt32 != 0) {
2546        output.WriteRawTag(8);
2547        output.WriteInt32(DeprecatedInt32);
2548      }
2549      if (_unknownFields != null) {
2550        _unknownFields.WriteTo(output);
2551      }
2552    #endif
2553    }
2554
2555    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2556    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2557    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2558      if (DeprecatedInt32 != 0) {
2559        output.WriteRawTag(8);
2560        output.WriteInt32(DeprecatedInt32);
2561      }
2562      if (_unknownFields != null) {
2563        _unknownFields.WriteTo(ref output);
2564      }
2565    }
2566    #endif
2567
2568    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2569    public int CalculateSize() {
2570      int size = 0;
2571      if (DeprecatedInt32 != 0) {
2572        size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeprecatedInt32);
2573      }
2574      if (_unknownFields != null) {
2575        size += _unknownFields.CalculateSize();
2576      }
2577      return size;
2578    }
2579
2580    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2581    public void MergeFrom(TestDeprecatedFields other) {
2582      if (other == null) {
2583        return;
2584      }
2585      if (other.DeprecatedInt32 != 0) {
2586        DeprecatedInt32 = other.DeprecatedInt32;
2587      }
2588      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2589    }
2590
2591    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2592    public void MergeFrom(pb::CodedInputStream input) {
2593    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2594      input.ReadRawMessage(this);
2595    #else
2596      uint tag;
2597      while ((tag = input.ReadTag()) != 0) {
2598        switch(tag) {
2599          default:
2600            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2601            break;
2602          case 8: {
2603            DeprecatedInt32 = input.ReadInt32();
2604            break;
2605          }
2606        }
2607      }
2608    #endif
2609    }
2610
2611    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2612    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2613    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2614      uint tag;
2615      while ((tag = input.ReadTag()) != 0) {
2616        switch(tag) {
2617          default:
2618            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2619            break;
2620          case 8: {
2621            DeprecatedInt32 = input.ReadInt32();
2622            break;
2623          }
2624        }
2625      }
2626    }
2627    #endif
2628
2629  }
2630
2631  /// <summary>
2632  /// Define these after TestAllTypes to make sure the compiler can handle
2633  /// that.
2634  /// </summary>
2635  public sealed partial class ForeignMessage : pb::IMessage<ForeignMessage>
2636  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2637      , pb::IBufferMessage
2638  #endif
2639  {
2640    private static readonly pb::MessageParser<ForeignMessage> _parser = new pb::MessageParser<ForeignMessage>(() => new ForeignMessage());
2641    private pb::UnknownFieldSet _unknownFields;
2642    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2643    public static pb::MessageParser<ForeignMessage> Parser { get { return _parser; } }
2644
2645    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2646    public static pbr::MessageDescriptor Descriptor {
2647      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[3]; }
2648    }
2649
2650    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2651    pbr::MessageDescriptor pb::IMessage.Descriptor {
2652      get { return Descriptor; }
2653    }
2654
2655    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2656    public ForeignMessage() {
2657      OnConstruction();
2658    }
2659
2660    partial void OnConstruction();
2661
2662    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2663    public ForeignMessage(ForeignMessage other) : this() {
2664      c_ = other.c_;
2665      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2666    }
2667
2668    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2669    public ForeignMessage Clone() {
2670      return new ForeignMessage(this);
2671    }
2672
2673    /// <summary>Field number for the "c" field.</summary>
2674    public const int CFieldNumber = 1;
2675    private int c_;
2676    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2677    public int C {
2678      get { return c_; }
2679      set {
2680        c_ = value;
2681      }
2682    }
2683
2684    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2685    public override bool Equals(object other) {
2686      return Equals(other as ForeignMessage);
2687    }
2688
2689    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2690    public bool Equals(ForeignMessage other) {
2691      if (ReferenceEquals(other, null)) {
2692        return false;
2693      }
2694      if (ReferenceEquals(other, this)) {
2695        return true;
2696      }
2697      if (C != other.C) return false;
2698      return Equals(_unknownFields, other._unknownFields);
2699    }
2700
2701    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2702    public override int GetHashCode() {
2703      int hash = 1;
2704      if (C != 0) hash ^= C.GetHashCode();
2705      if (_unknownFields != null) {
2706        hash ^= _unknownFields.GetHashCode();
2707      }
2708      return hash;
2709    }
2710
2711    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2712    public override string ToString() {
2713      return pb::JsonFormatter.ToDiagnosticString(this);
2714    }
2715
2716    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2717    public void WriteTo(pb::CodedOutputStream output) {
2718    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2719      output.WriteRawMessage(this);
2720    #else
2721      if (C != 0) {
2722        output.WriteRawTag(8);
2723        output.WriteInt32(C);
2724      }
2725      if (_unknownFields != null) {
2726        _unknownFields.WriteTo(output);
2727      }
2728    #endif
2729    }
2730
2731    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2732    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2733    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2734      if (C != 0) {
2735        output.WriteRawTag(8);
2736        output.WriteInt32(C);
2737      }
2738      if (_unknownFields != null) {
2739        _unknownFields.WriteTo(ref output);
2740      }
2741    }
2742    #endif
2743
2744    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2745    public int CalculateSize() {
2746      int size = 0;
2747      if (C != 0) {
2748        size += 1 + pb::CodedOutputStream.ComputeInt32Size(C);
2749      }
2750      if (_unknownFields != null) {
2751        size += _unknownFields.CalculateSize();
2752      }
2753      return size;
2754    }
2755
2756    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2757    public void MergeFrom(ForeignMessage other) {
2758      if (other == null) {
2759        return;
2760      }
2761      if (other.C != 0) {
2762        C = other.C;
2763      }
2764      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2765    }
2766
2767    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2768    public void MergeFrom(pb::CodedInputStream input) {
2769    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2770      input.ReadRawMessage(this);
2771    #else
2772      uint tag;
2773      while ((tag = input.ReadTag()) != 0) {
2774        switch(tag) {
2775          default:
2776            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2777            break;
2778          case 8: {
2779            C = input.ReadInt32();
2780            break;
2781          }
2782        }
2783      }
2784    #endif
2785    }
2786
2787    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2788    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2789    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2790      uint tag;
2791      while ((tag = input.ReadTag()) != 0) {
2792        switch(tag) {
2793          default:
2794            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2795            break;
2796          case 8: {
2797            C = input.ReadInt32();
2798            break;
2799          }
2800        }
2801      }
2802    }
2803    #endif
2804
2805  }
2806
2807  public sealed partial class TestReservedFields : pb::IMessage<TestReservedFields>
2808  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2809      , pb::IBufferMessage
2810  #endif
2811  {
2812    private static readonly pb::MessageParser<TestReservedFields> _parser = new pb::MessageParser<TestReservedFields>(() => new TestReservedFields());
2813    private pb::UnknownFieldSet _unknownFields;
2814    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2815    public static pb::MessageParser<TestReservedFields> Parser { get { return _parser; } }
2816
2817    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2818    public static pbr::MessageDescriptor Descriptor {
2819      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[4]; }
2820    }
2821
2822    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2823    pbr::MessageDescriptor pb::IMessage.Descriptor {
2824      get { return Descriptor; }
2825    }
2826
2827    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2828    public TestReservedFields() {
2829      OnConstruction();
2830    }
2831
2832    partial void OnConstruction();
2833
2834    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2835    public TestReservedFields(TestReservedFields other) : this() {
2836      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2837    }
2838
2839    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2840    public TestReservedFields Clone() {
2841      return new TestReservedFields(this);
2842    }
2843
2844    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2845    public override bool Equals(object other) {
2846      return Equals(other as TestReservedFields);
2847    }
2848
2849    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2850    public bool Equals(TestReservedFields other) {
2851      if (ReferenceEquals(other, null)) {
2852        return false;
2853      }
2854      if (ReferenceEquals(other, this)) {
2855        return true;
2856      }
2857      return Equals(_unknownFields, other._unknownFields);
2858    }
2859
2860    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2861    public override int GetHashCode() {
2862      int hash = 1;
2863      if (_unknownFields != null) {
2864        hash ^= _unknownFields.GetHashCode();
2865      }
2866      return hash;
2867    }
2868
2869    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2870    public override string ToString() {
2871      return pb::JsonFormatter.ToDiagnosticString(this);
2872    }
2873
2874    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2875    public void WriteTo(pb::CodedOutputStream output) {
2876    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2877      output.WriteRawMessage(this);
2878    #else
2879      if (_unknownFields != null) {
2880        _unknownFields.WriteTo(output);
2881      }
2882    #endif
2883    }
2884
2885    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2886    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2887    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2888      if (_unknownFields != null) {
2889        _unknownFields.WriteTo(ref output);
2890      }
2891    }
2892    #endif
2893
2894    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2895    public int CalculateSize() {
2896      int size = 0;
2897      if (_unknownFields != null) {
2898        size += _unknownFields.CalculateSize();
2899      }
2900      return size;
2901    }
2902
2903    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2904    public void MergeFrom(TestReservedFields other) {
2905      if (other == null) {
2906        return;
2907      }
2908      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2909    }
2910
2911    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2912    public void MergeFrom(pb::CodedInputStream input) {
2913    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2914      input.ReadRawMessage(this);
2915    #else
2916      uint tag;
2917      while ((tag = input.ReadTag()) != 0) {
2918        switch(tag) {
2919          default:
2920            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2921            break;
2922        }
2923      }
2924    #endif
2925    }
2926
2927    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2928    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2929    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2930      uint tag;
2931      while ((tag = input.ReadTag()) != 0) {
2932        switch(tag) {
2933          default:
2934            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2935            break;
2936        }
2937      }
2938    }
2939    #endif
2940
2941  }
2942
2943  /// <summary>
2944  /// Test that we can use NestedMessage from outside TestAllTypes.
2945  /// </summary>
2946  public sealed partial class TestForeignNested : pb::IMessage<TestForeignNested>
2947  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2948      , pb::IBufferMessage
2949  #endif
2950  {
2951    private static readonly pb::MessageParser<TestForeignNested> _parser = new pb::MessageParser<TestForeignNested>(() => new TestForeignNested());
2952    private pb::UnknownFieldSet _unknownFields;
2953    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2954    public static pb::MessageParser<TestForeignNested> Parser { get { return _parser; } }
2955
2956    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2957    public static pbr::MessageDescriptor Descriptor {
2958      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[5]; }
2959    }
2960
2961    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2962    pbr::MessageDescriptor pb::IMessage.Descriptor {
2963      get { return Descriptor; }
2964    }
2965
2966    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2967    public TestForeignNested() {
2968      OnConstruction();
2969    }
2970
2971    partial void OnConstruction();
2972
2973    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2974    public TestForeignNested(TestForeignNested other) : this() {
2975      foreignNested_ = other.foreignNested_ != null ? other.foreignNested_.Clone() : null;
2976      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2977    }
2978
2979    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2980    public TestForeignNested Clone() {
2981      return new TestForeignNested(this);
2982    }
2983
2984    /// <summary>Field number for the "foreign_nested" field.</summary>
2985    public const int ForeignNestedFieldNumber = 1;
2986    private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage foreignNested_;
2987    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2988    public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage ForeignNested {
2989      get { return foreignNested_; }
2990      set {
2991        foreignNested_ = value;
2992      }
2993    }
2994
2995    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2996    public override bool Equals(object other) {
2997      return Equals(other as TestForeignNested);
2998    }
2999
3000    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3001    public bool Equals(TestForeignNested other) {
3002      if (ReferenceEquals(other, null)) {
3003        return false;
3004      }
3005      if (ReferenceEquals(other, this)) {
3006        return true;
3007      }
3008      if (!object.Equals(ForeignNested, other.ForeignNested)) return false;
3009      return Equals(_unknownFields, other._unknownFields);
3010    }
3011
3012    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3013    public override int GetHashCode() {
3014      int hash = 1;
3015      if (foreignNested_ != null) hash ^= ForeignNested.GetHashCode();
3016      if (_unknownFields != null) {
3017        hash ^= _unknownFields.GetHashCode();
3018      }
3019      return hash;
3020    }
3021
3022    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3023    public override string ToString() {
3024      return pb::JsonFormatter.ToDiagnosticString(this);
3025    }
3026
3027    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3028    public void WriteTo(pb::CodedOutputStream output) {
3029    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3030      output.WriteRawMessage(this);
3031    #else
3032      if (foreignNested_ != null) {
3033        output.WriteRawTag(10);
3034        output.WriteMessage(ForeignNested);
3035      }
3036      if (_unknownFields != null) {
3037        _unknownFields.WriteTo(output);
3038      }
3039    #endif
3040    }
3041
3042    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3043    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3044    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3045      if (foreignNested_ != null) {
3046        output.WriteRawTag(10);
3047        output.WriteMessage(ForeignNested);
3048      }
3049      if (_unknownFields != null) {
3050        _unknownFields.WriteTo(ref output);
3051      }
3052    }
3053    #endif
3054
3055    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3056    public int CalculateSize() {
3057      int size = 0;
3058      if (foreignNested_ != null) {
3059        size += 1 + pb::CodedOutputStream.ComputeMessageSize(ForeignNested);
3060      }
3061      if (_unknownFields != null) {
3062        size += _unknownFields.CalculateSize();
3063      }
3064      return size;
3065    }
3066
3067    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3068    public void MergeFrom(TestForeignNested other) {
3069      if (other == null) {
3070        return;
3071      }
3072      if (other.foreignNested_ != null) {
3073        if (foreignNested_ == null) {
3074          ForeignNested = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
3075        }
3076        ForeignNested.MergeFrom(other.ForeignNested);
3077      }
3078      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3079    }
3080
3081    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3082    public void MergeFrom(pb::CodedInputStream input) {
3083    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3084      input.ReadRawMessage(this);
3085    #else
3086      uint tag;
3087      while ((tag = input.ReadTag()) != 0) {
3088        switch(tag) {
3089          default:
3090            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3091            break;
3092          case 10: {
3093            if (foreignNested_ == null) {
3094              ForeignNested = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
3095            }
3096            input.ReadMessage(ForeignNested);
3097            break;
3098          }
3099        }
3100      }
3101    #endif
3102    }
3103
3104    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3105    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3106    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3107      uint tag;
3108      while ((tag = input.ReadTag()) != 0) {
3109        switch(tag) {
3110          default:
3111            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3112            break;
3113          case 10: {
3114            if (foreignNested_ == null) {
3115              ForeignNested = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
3116            }
3117            input.ReadMessage(ForeignNested);
3118            break;
3119          }
3120        }
3121      }
3122    }
3123    #endif
3124
3125  }
3126
3127  /// <summary>
3128  /// Test that really large tag numbers don't break anything.
3129  /// </summary>
3130  public sealed partial class TestReallyLargeTagNumber : pb::IMessage<TestReallyLargeTagNumber>
3131  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3132      , pb::IBufferMessage
3133  #endif
3134  {
3135    private static readonly pb::MessageParser<TestReallyLargeTagNumber> _parser = new pb::MessageParser<TestReallyLargeTagNumber>(() => new TestReallyLargeTagNumber());
3136    private pb::UnknownFieldSet _unknownFields;
3137    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3138    public static pb::MessageParser<TestReallyLargeTagNumber> Parser { get { return _parser; } }
3139
3140    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3141    public static pbr::MessageDescriptor Descriptor {
3142      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[6]; }
3143    }
3144
3145    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3146    pbr::MessageDescriptor pb::IMessage.Descriptor {
3147      get { return Descriptor; }
3148    }
3149
3150    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3151    public TestReallyLargeTagNumber() {
3152      OnConstruction();
3153    }
3154
3155    partial void OnConstruction();
3156
3157    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3158    public TestReallyLargeTagNumber(TestReallyLargeTagNumber other) : this() {
3159      a_ = other.a_;
3160      bb_ = other.bb_;
3161      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
3162    }
3163
3164    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3165    public TestReallyLargeTagNumber Clone() {
3166      return new TestReallyLargeTagNumber(this);
3167    }
3168
3169    /// <summary>Field number for the "a" field.</summary>
3170    public const int AFieldNumber = 1;
3171    private int a_;
3172    /// <summary>
3173    /// The largest possible tag number is 2^28 - 1, since the wire format uses
3174    /// three bits to communicate wire type.
3175    /// </summary>
3176    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3177    public int A {
3178      get { return a_; }
3179      set {
3180        a_ = value;
3181      }
3182    }
3183
3184    /// <summary>Field number for the "bb" field.</summary>
3185    public const int BbFieldNumber = 268435455;
3186    private int bb_;
3187    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3188    public int Bb {
3189      get { return bb_; }
3190      set {
3191        bb_ = value;
3192      }
3193    }
3194
3195    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3196    public override bool Equals(object other) {
3197      return Equals(other as TestReallyLargeTagNumber);
3198    }
3199
3200    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3201    public bool Equals(TestReallyLargeTagNumber other) {
3202      if (ReferenceEquals(other, null)) {
3203        return false;
3204      }
3205      if (ReferenceEquals(other, this)) {
3206        return true;
3207      }
3208      if (A != other.A) return false;
3209      if (Bb != other.Bb) return false;
3210      return Equals(_unknownFields, other._unknownFields);
3211    }
3212
3213    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3214    public override int GetHashCode() {
3215      int hash = 1;
3216      if (A != 0) hash ^= A.GetHashCode();
3217      if (Bb != 0) hash ^= Bb.GetHashCode();
3218      if (_unknownFields != null) {
3219        hash ^= _unknownFields.GetHashCode();
3220      }
3221      return hash;
3222    }
3223
3224    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3225    public override string ToString() {
3226      return pb::JsonFormatter.ToDiagnosticString(this);
3227    }
3228
3229    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3230    public void WriteTo(pb::CodedOutputStream output) {
3231    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3232      output.WriteRawMessage(this);
3233    #else
3234      if (A != 0) {
3235        output.WriteRawTag(8);
3236        output.WriteInt32(A);
3237      }
3238      if (Bb != 0) {
3239        output.WriteRawTag(248, 255, 255, 255, 7);
3240        output.WriteInt32(Bb);
3241      }
3242      if (_unknownFields != null) {
3243        _unknownFields.WriteTo(output);
3244      }
3245    #endif
3246    }
3247
3248    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3249    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3250    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3251      if (A != 0) {
3252        output.WriteRawTag(8);
3253        output.WriteInt32(A);
3254      }
3255      if (Bb != 0) {
3256        output.WriteRawTag(248, 255, 255, 255, 7);
3257        output.WriteInt32(Bb);
3258      }
3259      if (_unknownFields != null) {
3260        _unknownFields.WriteTo(ref output);
3261      }
3262    }
3263    #endif
3264
3265    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3266    public int CalculateSize() {
3267      int size = 0;
3268      if (A != 0) {
3269        size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
3270      }
3271      if (Bb != 0) {
3272        size += 5 + pb::CodedOutputStream.ComputeInt32Size(Bb);
3273      }
3274      if (_unknownFields != null) {
3275        size += _unknownFields.CalculateSize();
3276      }
3277      return size;
3278    }
3279
3280    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3281    public void MergeFrom(TestReallyLargeTagNumber other) {
3282      if (other == null) {
3283        return;
3284      }
3285      if (other.A != 0) {
3286        A = other.A;
3287      }
3288      if (other.Bb != 0) {
3289        Bb = other.Bb;
3290      }
3291      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3292    }
3293
3294    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3295    public void MergeFrom(pb::CodedInputStream input) {
3296    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3297      input.ReadRawMessage(this);
3298    #else
3299      uint tag;
3300      while ((tag = input.ReadTag()) != 0) {
3301        switch(tag) {
3302          default:
3303            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3304            break;
3305          case 8: {
3306            A = input.ReadInt32();
3307            break;
3308          }
3309          case 2147483640: {
3310            Bb = input.ReadInt32();
3311            break;
3312          }
3313        }
3314      }
3315    #endif
3316    }
3317
3318    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3319    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3320    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3321      uint tag;
3322      while ((tag = input.ReadTag()) != 0) {
3323        switch(tag) {
3324          default:
3325            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3326            break;
3327          case 8: {
3328            A = input.ReadInt32();
3329            break;
3330          }
3331          case 2147483640: {
3332            Bb = input.ReadInt32();
3333            break;
3334          }
3335        }
3336      }
3337    }
3338    #endif
3339
3340  }
3341
3342  public sealed partial class TestRecursiveMessage : pb::IMessage<TestRecursiveMessage>
3343  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3344      , pb::IBufferMessage
3345  #endif
3346  {
3347    private static readonly pb::MessageParser<TestRecursiveMessage> _parser = new pb::MessageParser<TestRecursiveMessage>(() => new TestRecursiveMessage());
3348    private pb::UnknownFieldSet _unknownFields;
3349    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3350    public static pb::MessageParser<TestRecursiveMessage> Parser { get { return _parser; } }
3351
3352    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3353    public static pbr::MessageDescriptor Descriptor {
3354      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[7]; }
3355    }
3356
3357    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3358    pbr::MessageDescriptor pb::IMessage.Descriptor {
3359      get { return Descriptor; }
3360    }
3361
3362    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3363    public TestRecursiveMessage() {
3364      OnConstruction();
3365    }
3366
3367    partial void OnConstruction();
3368
3369    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3370    public TestRecursiveMessage(TestRecursiveMessage other) : this() {
3371      a_ = other.a_ != null ? other.a_.Clone() : null;
3372      i_ = other.i_;
3373      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
3374    }
3375
3376    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3377    public TestRecursiveMessage Clone() {
3378      return new TestRecursiveMessage(this);
3379    }
3380
3381    /// <summary>Field number for the "a" field.</summary>
3382    public const int AFieldNumber = 1;
3383    private global::Google.Protobuf.TestProtos.TestRecursiveMessage a_;
3384    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3385    public global::Google.Protobuf.TestProtos.TestRecursiveMessage A {
3386      get { return a_; }
3387      set {
3388        a_ = value;
3389      }
3390    }
3391
3392    /// <summary>Field number for the "i" field.</summary>
3393    public const int IFieldNumber = 2;
3394    private int i_;
3395    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3396    public int I {
3397      get { return i_; }
3398      set {
3399        i_ = value;
3400      }
3401    }
3402
3403    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3404    public override bool Equals(object other) {
3405      return Equals(other as TestRecursiveMessage);
3406    }
3407
3408    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3409    public bool Equals(TestRecursiveMessage other) {
3410      if (ReferenceEquals(other, null)) {
3411        return false;
3412      }
3413      if (ReferenceEquals(other, this)) {
3414        return true;
3415      }
3416      if (!object.Equals(A, other.A)) return false;
3417      if (I != other.I) return false;
3418      return Equals(_unknownFields, other._unknownFields);
3419    }
3420
3421    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3422    public override int GetHashCode() {
3423      int hash = 1;
3424      if (a_ != null) hash ^= A.GetHashCode();
3425      if (I != 0) hash ^= I.GetHashCode();
3426      if (_unknownFields != null) {
3427        hash ^= _unknownFields.GetHashCode();
3428      }
3429      return hash;
3430    }
3431
3432    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3433    public override string ToString() {
3434      return pb::JsonFormatter.ToDiagnosticString(this);
3435    }
3436
3437    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3438    public void WriteTo(pb::CodedOutputStream output) {
3439    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3440      output.WriteRawMessage(this);
3441    #else
3442      if (a_ != null) {
3443        output.WriteRawTag(10);
3444        output.WriteMessage(A);
3445      }
3446      if (I != 0) {
3447        output.WriteRawTag(16);
3448        output.WriteInt32(I);
3449      }
3450      if (_unknownFields != null) {
3451        _unknownFields.WriteTo(output);
3452      }
3453    #endif
3454    }
3455
3456    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3457    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3458    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3459      if (a_ != null) {
3460        output.WriteRawTag(10);
3461        output.WriteMessage(A);
3462      }
3463      if (I != 0) {
3464        output.WriteRawTag(16);
3465        output.WriteInt32(I);
3466      }
3467      if (_unknownFields != null) {
3468        _unknownFields.WriteTo(ref output);
3469      }
3470    }
3471    #endif
3472
3473    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3474    public int CalculateSize() {
3475      int size = 0;
3476      if (a_ != null) {
3477        size += 1 + pb::CodedOutputStream.ComputeMessageSize(A);
3478      }
3479      if (I != 0) {
3480        size += 1 + pb::CodedOutputStream.ComputeInt32Size(I);
3481      }
3482      if (_unknownFields != null) {
3483        size += _unknownFields.CalculateSize();
3484      }
3485      return size;
3486    }
3487
3488    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3489    public void MergeFrom(TestRecursiveMessage other) {
3490      if (other == null) {
3491        return;
3492      }
3493      if (other.a_ != null) {
3494        if (a_ == null) {
3495          A = new global::Google.Protobuf.TestProtos.TestRecursiveMessage();
3496        }
3497        A.MergeFrom(other.A);
3498      }
3499      if (other.I != 0) {
3500        I = other.I;
3501      }
3502      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3503    }
3504
3505    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3506    public void MergeFrom(pb::CodedInputStream input) {
3507    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3508      input.ReadRawMessage(this);
3509    #else
3510      uint tag;
3511      while ((tag = input.ReadTag()) != 0) {
3512        switch(tag) {
3513          default:
3514            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3515            break;
3516          case 10: {
3517            if (a_ == null) {
3518              A = new global::Google.Protobuf.TestProtos.TestRecursiveMessage();
3519            }
3520            input.ReadMessage(A);
3521            break;
3522          }
3523          case 16: {
3524            I = input.ReadInt32();
3525            break;
3526          }
3527        }
3528      }
3529    #endif
3530    }
3531
3532    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3533    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3534    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3535      uint tag;
3536      while ((tag = input.ReadTag()) != 0) {
3537        switch(tag) {
3538          default:
3539            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3540            break;
3541          case 10: {
3542            if (a_ == null) {
3543              A = new global::Google.Protobuf.TestProtos.TestRecursiveMessage();
3544            }
3545            input.ReadMessage(A);
3546            break;
3547          }
3548          case 16: {
3549            I = input.ReadInt32();
3550            break;
3551          }
3552        }
3553      }
3554    }
3555    #endif
3556
3557  }
3558
3559  /// <summary>
3560  /// Test that mutual recursion works.
3561  /// </summary>
3562  public sealed partial class TestMutualRecursionA : pb::IMessage<TestMutualRecursionA>
3563  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3564      , pb::IBufferMessage
3565  #endif
3566  {
3567    private static readonly pb::MessageParser<TestMutualRecursionA> _parser = new pb::MessageParser<TestMutualRecursionA>(() => new TestMutualRecursionA());
3568    private pb::UnknownFieldSet _unknownFields;
3569    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3570    public static pb::MessageParser<TestMutualRecursionA> Parser { get { return _parser; } }
3571
3572    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3573    public static pbr::MessageDescriptor Descriptor {
3574      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[8]; }
3575    }
3576
3577    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3578    pbr::MessageDescriptor pb::IMessage.Descriptor {
3579      get { return Descriptor; }
3580    }
3581
3582    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3583    public TestMutualRecursionA() {
3584      OnConstruction();
3585    }
3586
3587    partial void OnConstruction();
3588
3589    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3590    public TestMutualRecursionA(TestMutualRecursionA other) : this() {
3591      bb_ = other.bb_ != null ? other.bb_.Clone() : null;
3592      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
3593    }
3594
3595    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3596    public TestMutualRecursionA Clone() {
3597      return new TestMutualRecursionA(this);
3598    }
3599
3600    /// <summary>Field number for the "bb" field.</summary>
3601    public const int BbFieldNumber = 1;
3602    private global::Google.Protobuf.TestProtos.TestMutualRecursionB bb_;
3603    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3604    public global::Google.Protobuf.TestProtos.TestMutualRecursionB Bb {
3605      get { return bb_; }
3606      set {
3607        bb_ = value;
3608      }
3609    }
3610
3611    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3612    public override bool Equals(object other) {
3613      return Equals(other as TestMutualRecursionA);
3614    }
3615
3616    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3617    public bool Equals(TestMutualRecursionA other) {
3618      if (ReferenceEquals(other, null)) {
3619        return false;
3620      }
3621      if (ReferenceEquals(other, this)) {
3622        return true;
3623      }
3624      if (!object.Equals(Bb, other.Bb)) return false;
3625      return Equals(_unknownFields, other._unknownFields);
3626    }
3627
3628    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3629    public override int GetHashCode() {
3630      int hash = 1;
3631      if (bb_ != null) hash ^= Bb.GetHashCode();
3632      if (_unknownFields != null) {
3633        hash ^= _unknownFields.GetHashCode();
3634      }
3635      return hash;
3636    }
3637
3638    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3639    public override string ToString() {
3640      return pb::JsonFormatter.ToDiagnosticString(this);
3641    }
3642
3643    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3644    public void WriteTo(pb::CodedOutputStream output) {
3645    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3646      output.WriteRawMessage(this);
3647    #else
3648      if (bb_ != null) {
3649        output.WriteRawTag(10);
3650        output.WriteMessage(Bb);
3651      }
3652      if (_unknownFields != null) {
3653        _unknownFields.WriteTo(output);
3654      }
3655    #endif
3656    }
3657
3658    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3659    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3660    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3661      if (bb_ != null) {
3662        output.WriteRawTag(10);
3663        output.WriteMessage(Bb);
3664      }
3665      if (_unknownFields != null) {
3666        _unknownFields.WriteTo(ref output);
3667      }
3668    }
3669    #endif
3670
3671    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3672    public int CalculateSize() {
3673      int size = 0;
3674      if (bb_ != null) {
3675        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bb);
3676      }
3677      if (_unknownFields != null) {
3678        size += _unknownFields.CalculateSize();
3679      }
3680      return size;
3681    }
3682
3683    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3684    public void MergeFrom(TestMutualRecursionA other) {
3685      if (other == null) {
3686        return;
3687      }
3688      if (other.bb_ != null) {
3689        if (bb_ == null) {
3690          Bb = new global::Google.Protobuf.TestProtos.TestMutualRecursionB();
3691        }
3692        Bb.MergeFrom(other.Bb);
3693      }
3694      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3695    }
3696
3697    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3698    public void MergeFrom(pb::CodedInputStream input) {
3699    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3700      input.ReadRawMessage(this);
3701    #else
3702      uint tag;
3703      while ((tag = input.ReadTag()) != 0) {
3704        switch(tag) {
3705          default:
3706            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3707            break;
3708          case 10: {
3709            if (bb_ == null) {
3710              Bb = new global::Google.Protobuf.TestProtos.TestMutualRecursionB();
3711            }
3712            input.ReadMessage(Bb);
3713            break;
3714          }
3715        }
3716      }
3717    #endif
3718    }
3719
3720    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3721    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3722    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3723      uint tag;
3724      while ((tag = input.ReadTag()) != 0) {
3725        switch(tag) {
3726          default:
3727            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3728            break;
3729          case 10: {
3730            if (bb_ == null) {
3731              Bb = new global::Google.Protobuf.TestProtos.TestMutualRecursionB();
3732            }
3733            input.ReadMessage(Bb);
3734            break;
3735          }
3736        }
3737      }
3738    }
3739    #endif
3740
3741  }
3742
3743  public sealed partial class TestMutualRecursionB : pb::IMessage<TestMutualRecursionB>
3744  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3745      , pb::IBufferMessage
3746  #endif
3747  {
3748    private static readonly pb::MessageParser<TestMutualRecursionB> _parser = new pb::MessageParser<TestMutualRecursionB>(() => new TestMutualRecursionB());
3749    private pb::UnknownFieldSet _unknownFields;
3750    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3751    public static pb::MessageParser<TestMutualRecursionB> Parser { get { return _parser; } }
3752
3753    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3754    public static pbr::MessageDescriptor Descriptor {
3755      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[9]; }
3756    }
3757
3758    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3759    pbr::MessageDescriptor pb::IMessage.Descriptor {
3760      get { return Descriptor; }
3761    }
3762
3763    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3764    public TestMutualRecursionB() {
3765      OnConstruction();
3766    }
3767
3768    partial void OnConstruction();
3769
3770    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3771    public TestMutualRecursionB(TestMutualRecursionB other) : this() {
3772      a_ = other.a_ != null ? other.a_.Clone() : null;
3773      optionalInt32_ = other.optionalInt32_;
3774      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
3775    }
3776
3777    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3778    public TestMutualRecursionB Clone() {
3779      return new TestMutualRecursionB(this);
3780    }
3781
3782    /// <summary>Field number for the "a" field.</summary>
3783    public const int AFieldNumber = 1;
3784    private global::Google.Protobuf.TestProtos.TestMutualRecursionA a_;
3785    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3786    public global::Google.Protobuf.TestProtos.TestMutualRecursionA A {
3787      get { return a_; }
3788      set {
3789        a_ = value;
3790      }
3791    }
3792
3793    /// <summary>Field number for the "optional_int32" field.</summary>
3794    public const int OptionalInt32FieldNumber = 2;
3795    private int optionalInt32_;
3796    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3797    public int OptionalInt32 {
3798      get { return optionalInt32_; }
3799      set {
3800        optionalInt32_ = value;
3801      }
3802    }
3803
3804    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3805    public override bool Equals(object other) {
3806      return Equals(other as TestMutualRecursionB);
3807    }
3808
3809    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3810    public bool Equals(TestMutualRecursionB other) {
3811      if (ReferenceEquals(other, null)) {
3812        return false;
3813      }
3814      if (ReferenceEquals(other, this)) {
3815        return true;
3816      }
3817      if (!object.Equals(A, other.A)) return false;
3818      if (OptionalInt32 != other.OptionalInt32) return false;
3819      return Equals(_unknownFields, other._unknownFields);
3820    }
3821
3822    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3823    public override int GetHashCode() {
3824      int hash = 1;
3825      if (a_ != null) hash ^= A.GetHashCode();
3826      if (OptionalInt32 != 0) hash ^= OptionalInt32.GetHashCode();
3827      if (_unknownFields != null) {
3828        hash ^= _unknownFields.GetHashCode();
3829      }
3830      return hash;
3831    }
3832
3833    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3834    public override string ToString() {
3835      return pb::JsonFormatter.ToDiagnosticString(this);
3836    }
3837
3838    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3839    public void WriteTo(pb::CodedOutputStream output) {
3840    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3841      output.WriteRawMessage(this);
3842    #else
3843      if (a_ != null) {
3844        output.WriteRawTag(10);
3845        output.WriteMessage(A);
3846      }
3847      if (OptionalInt32 != 0) {
3848        output.WriteRawTag(16);
3849        output.WriteInt32(OptionalInt32);
3850      }
3851      if (_unknownFields != null) {
3852        _unknownFields.WriteTo(output);
3853      }
3854    #endif
3855    }
3856
3857    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3858    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3859    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3860      if (a_ != null) {
3861        output.WriteRawTag(10);
3862        output.WriteMessage(A);
3863      }
3864      if (OptionalInt32 != 0) {
3865        output.WriteRawTag(16);
3866        output.WriteInt32(OptionalInt32);
3867      }
3868      if (_unknownFields != null) {
3869        _unknownFields.WriteTo(ref output);
3870      }
3871    }
3872    #endif
3873
3874    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3875    public int CalculateSize() {
3876      int size = 0;
3877      if (a_ != null) {
3878        size += 1 + pb::CodedOutputStream.ComputeMessageSize(A);
3879      }
3880      if (OptionalInt32 != 0) {
3881        size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32);
3882      }
3883      if (_unknownFields != null) {
3884        size += _unknownFields.CalculateSize();
3885      }
3886      return size;
3887    }
3888
3889    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3890    public void MergeFrom(TestMutualRecursionB other) {
3891      if (other == null) {
3892        return;
3893      }
3894      if (other.a_ != null) {
3895        if (a_ == null) {
3896          A = new global::Google.Protobuf.TestProtos.TestMutualRecursionA();
3897        }
3898        A.MergeFrom(other.A);
3899      }
3900      if (other.OptionalInt32 != 0) {
3901        OptionalInt32 = other.OptionalInt32;
3902      }
3903      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3904    }
3905
3906    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3907    public void MergeFrom(pb::CodedInputStream input) {
3908    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3909      input.ReadRawMessage(this);
3910    #else
3911      uint tag;
3912      while ((tag = input.ReadTag()) != 0) {
3913        switch(tag) {
3914          default:
3915            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3916            break;
3917          case 10: {
3918            if (a_ == null) {
3919              A = new global::Google.Protobuf.TestProtos.TestMutualRecursionA();
3920            }
3921            input.ReadMessage(A);
3922            break;
3923          }
3924          case 16: {
3925            OptionalInt32 = input.ReadInt32();
3926            break;
3927          }
3928        }
3929      }
3930    #endif
3931    }
3932
3933    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3934    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3935    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3936      uint tag;
3937      while ((tag = input.ReadTag()) != 0) {
3938        switch(tag) {
3939          default:
3940            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3941            break;
3942          case 10: {
3943            if (a_ == null) {
3944              A = new global::Google.Protobuf.TestProtos.TestMutualRecursionA();
3945            }
3946            input.ReadMessage(A);
3947            break;
3948          }
3949          case 16: {
3950            OptionalInt32 = input.ReadInt32();
3951            break;
3952          }
3953        }
3954      }
3955    }
3956    #endif
3957
3958  }
3959
3960  public sealed partial class TestEnumAllowAlias : pb::IMessage<TestEnumAllowAlias>
3961  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3962      , pb::IBufferMessage
3963  #endif
3964  {
3965    private static readonly pb::MessageParser<TestEnumAllowAlias> _parser = new pb::MessageParser<TestEnumAllowAlias>(() => new TestEnumAllowAlias());
3966    private pb::UnknownFieldSet _unknownFields;
3967    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3968    public static pb::MessageParser<TestEnumAllowAlias> Parser { get { return _parser; } }
3969
3970    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3971    public static pbr::MessageDescriptor Descriptor {
3972      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[10]; }
3973    }
3974
3975    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3976    pbr::MessageDescriptor pb::IMessage.Descriptor {
3977      get { return Descriptor; }
3978    }
3979
3980    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3981    public TestEnumAllowAlias() {
3982      OnConstruction();
3983    }
3984
3985    partial void OnConstruction();
3986
3987    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3988    public TestEnumAllowAlias(TestEnumAllowAlias other) : this() {
3989      value_ = other.value_;
3990      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
3991    }
3992
3993    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3994    public TestEnumAllowAlias Clone() {
3995      return new TestEnumAllowAlias(this);
3996    }
3997
3998    /// <summary>Field number for the "value" field.</summary>
3999    public const int ValueFieldNumber = 1;
4000    private global::Google.Protobuf.TestProtos.TestEnumWithDupValue value_ = global::Google.Protobuf.TestProtos.TestEnumWithDupValue.Unspecified;
4001    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4002    public global::Google.Protobuf.TestProtos.TestEnumWithDupValue Value {
4003      get { return value_; }
4004      set {
4005        value_ = value;
4006      }
4007    }
4008
4009    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4010    public override bool Equals(object other) {
4011      return Equals(other as TestEnumAllowAlias);
4012    }
4013
4014    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4015    public bool Equals(TestEnumAllowAlias other) {
4016      if (ReferenceEquals(other, null)) {
4017        return false;
4018      }
4019      if (ReferenceEquals(other, this)) {
4020        return true;
4021      }
4022      if (Value != other.Value) return false;
4023      return Equals(_unknownFields, other._unknownFields);
4024    }
4025
4026    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4027    public override int GetHashCode() {
4028      int hash = 1;
4029      if (Value != global::Google.Protobuf.TestProtos.TestEnumWithDupValue.Unspecified) hash ^= Value.GetHashCode();
4030      if (_unknownFields != null) {
4031        hash ^= _unknownFields.GetHashCode();
4032      }
4033      return hash;
4034    }
4035
4036    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4037    public override string ToString() {
4038      return pb::JsonFormatter.ToDiagnosticString(this);
4039    }
4040
4041    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4042    public void WriteTo(pb::CodedOutputStream output) {
4043    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4044      output.WriteRawMessage(this);
4045    #else
4046      if (Value != global::Google.Protobuf.TestProtos.TestEnumWithDupValue.Unspecified) {
4047        output.WriteRawTag(8);
4048        output.WriteEnum((int) Value);
4049      }
4050      if (_unknownFields != null) {
4051        _unknownFields.WriteTo(output);
4052      }
4053    #endif
4054    }
4055
4056    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4057    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4058    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
4059      if (Value != global::Google.Protobuf.TestProtos.TestEnumWithDupValue.Unspecified) {
4060        output.WriteRawTag(8);
4061        output.WriteEnum((int) Value);
4062      }
4063      if (_unknownFields != null) {
4064        _unknownFields.WriteTo(ref output);
4065      }
4066    }
4067    #endif
4068
4069    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4070    public int CalculateSize() {
4071      int size = 0;
4072      if (Value != global::Google.Protobuf.TestProtos.TestEnumWithDupValue.Unspecified) {
4073        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value);
4074      }
4075      if (_unknownFields != null) {
4076        size += _unknownFields.CalculateSize();
4077      }
4078      return size;
4079    }
4080
4081    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4082    public void MergeFrom(TestEnumAllowAlias other) {
4083      if (other == null) {
4084        return;
4085      }
4086      if (other.Value != global::Google.Protobuf.TestProtos.TestEnumWithDupValue.Unspecified) {
4087        Value = other.Value;
4088      }
4089      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
4090    }
4091
4092    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4093    public void MergeFrom(pb::CodedInputStream input) {
4094    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4095      input.ReadRawMessage(this);
4096    #else
4097      uint tag;
4098      while ((tag = input.ReadTag()) != 0) {
4099        switch(tag) {
4100          default:
4101            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
4102            break;
4103          case 8: {
4104            Value = (global::Google.Protobuf.TestProtos.TestEnumWithDupValue) input.ReadEnum();
4105            break;
4106          }
4107        }
4108      }
4109    #endif
4110    }
4111
4112    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4113    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4114    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
4115      uint tag;
4116      while ((tag = input.ReadTag()) != 0) {
4117        switch(tag) {
4118          default:
4119            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
4120            break;
4121          case 8: {
4122            Value = (global::Google.Protobuf.TestProtos.TestEnumWithDupValue) input.ReadEnum();
4123            break;
4124          }
4125        }
4126      }
4127    }
4128    #endif
4129
4130  }
4131
4132  /// <summary>
4133  /// Test message with CamelCase field names.  This violates Protocol Buffer
4134  /// standard style.
4135  /// </summary>
4136  public sealed partial class TestCamelCaseFieldNames : pb::IMessage<TestCamelCaseFieldNames>
4137  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4138      , pb::IBufferMessage
4139  #endif
4140  {
4141    private static readonly pb::MessageParser<TestCamelCaseFieldNames> _parser = new pb::MessageParser<TestCamelCaseFieldNames>(() => new TestCamelCaseFieldNames());
4142    private pb::UnknownFieldSet _unknownFields;
4143    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4144    public static pb::MessageParser<TestCamelCaseFieldNames> Parser { get { return _parser; } }
4145
4146    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4147    public static pbr::MessageDescriptor Descriptor {
4148      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[11]; }
4149    }
4150
4151    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4152    pbr::MessageDescriptor pb::IMessage.Descriptor {
4153      get { return Descriptor; }
4154    }
4155
4156    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4157    public TestCamelCaseFieldNames() {
4158      OnConstruction();
4159    }
4160
4161    partial void OnConstruction();
4162
4163    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4164    public TestCamelCaseFieldNames(TestCamelCaseFieldNames other) : this() {
4165      primitiveField_ = other.primitiveField_;
4166      stringField_ = other.stringField_;
4167      enumField_ = other.enumField_;
4168      messageField_ = other.messageField_ != null ? other.messageField_.Clone() : null;
4169      repeatedPrimitiveField_ = other.repeatedPrimitiveField_.Clone();
4170      repeatedStringField_ = other.repeatedStringField_.Clone();
4171      repeatedEnumField_ = other.repeatedEnumField_.Clone();
4172      repeatedMessageField_ = other.repeatedMessageField_.Clone();
4173      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
4174    }
4175
4176    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4177    public TestCamelCaseFieldNames Clone() {
4178      return new TestCamelCaseFieldNames(this);
4179    }
4180
4181    /// <summary>Field number for the "PrimitiveField" field.</summary>
4182    public const int PrimitiveFieldFieldNumber = 1;
4183    private int primitiveField_;
4184    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4185    public int PrimitiveField {
4186      get { return primitiveField_; }
4187      set {
4188        primitiveField_ = value;
4189      }
4190    }
4191
4192    /// <summary>Field number for the "StringField" field.</summary>
4193    public const int StringFieldFieldNumber = 2;
4194    private string stringField_ = "";
4195    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4196    public string StringField {
4197      get { return stringField_; }
4198      set {
4199        stringField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
4200      }
4201    }
4202
4203    /// <summary>Field number for the "EnumField" field.</summary>
4204    public const int EnumFieldFieldNumber = 3;
4205    private global::Google.Protobuf.TestProtos.ForeignEnum enumField_ = global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified;
4206    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4207    public global::Google.Protobuf.TestProtos.ForeignEnum EnumField {
4208      get { return enumField_; }
4209      set {
4210        enumField_ = value;
4211      }
4212    }
4213
4214    /// <summary>Field number for the "MessageField" field.</summary>
4215    public const int MessageFieldFieldNumber = 4;
4216    private global::Google.Protobuf.TestProtos.ForeignMessage messageField_;
4217    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4218    public global::Google.Protobuf.TestProtos.ForeignMessage MessageField {
4219      get { return messageField_; }
4220      set {
4221        messageField_ = value;
4222      }
4223    }
4224
4225    /// <summary>Field number for the "RepeatedPrimitiveField" field.</summary>
4226    public const int RepeatedPrimitiveFieldFieldNumber = 7;
4227    private static readonly pb::FieldCodec<int> _repeated_repeatedPrimitiveField_codec
4228        = pb::FieldCodec.ForInt32(58);
4229    private readonly pbc::RepeatedField<int> repeatedPrimitiveField_ = new pbc::RepeatedField<int>();
4230    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4231    public pbc::RepeatedField<int> RepeatedPrimitiveField {
4232      get { return repeatedPrimitiveField_; }
4233    }
4234
4235    /// <summary>Field number for the "RepeatedStringField" field.</summary>
4236    public const int RepeatedStringFieldFieldNumber = 8;
4237    private static readonly pb::FieldCodec<string> _repeated_repeatedStringField_codec
4238        = pb::FieldCodec.ForString(66);
4239    private readonly pbc::RepeatedField<string> repeatedStringField_ = new pbc::RepeatedField<string>();
4240    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4241    public pbc::RepeatedField<string> RepeatedStringField {
4242      get { return repeatedStringField_; }
4243    }
4244
4245    /// <summary>Field number for the "RepeatedEnumField" field.</summary>
4246    public const int RepeatedEnumFieldFieldNumber = 9;
4247    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_repeatedEnumField_codec
4248        = pb::FieldCodec.ForEnum(74, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
4249    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> repeatedEnumField_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
4250    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4251    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> RepeatedEnumField {
4252      get { return repeatedEnumField_; }
4253    }
4254
4255    /// <summary>Field number for the "RepeatedMessageField" field.</summary>
4256    public const int RepeatedMessageFieldFieldNumber = 10;
4257    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignMessage> _repeated_repeatedMessageField_codec
4258        = pb::FieldCodec.ForMessage(82, global::Google.Protobuf.TestProtos.ForeignMessage.Parser);
4259    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> repeatedMessageField_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage>();
4260    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4261    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> RepeatedMessageField {
4262      get { return repeatedMessageField_; }
4263    }
4264
4265    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4266    public override bool Equals(object other) {
4267      return Equals(other as TestCamelCaseFieldNames);
4268    }
4269
4270    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4271    public bool Equals(TestCamelCaseFieldNames other) {
4272      if (ReferenceEquals(other, null)) {
4273        return false;
4274      }
4275      if (ReferenceEquals(other, this)) {
4276        return true;
4277      }
4278      if (PrimitiveField != other.PrimitiveField) return false;
4279      if (StringField != other.StringField) return false;
4280      if (EnumField != other.EnumField) return false;
4281      if (!object.Equals(MessageField, other.MessageField)) return false;
4282      if(!repeatedPrimitiveField_.Equals(other.repeatedPrimitiveField_)) return false;
4283      if(!repeatedStringField_.Equals(other.repeatedStringField_)) return false;
4284      if(!repeatedEnumField_.Equals(other.repeatedEnumField_)) return false;
4285      if(!repeatedMessageField_.Equals(other.repeatedMessageField_)) return false;
4286      return Equals(_unknownFields, other._unknownFields);
4287    }
4288
4289    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4290    public override int GetHashCode() {
4291      int hash = 1;
4292      if (PrimitiveField != 0) hash ^= PrimitiveField.GetHashCode();
4293      if (StringField.Length != 0) hash ^= StringField.GetHashCode();
4294      if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified) hash ^= EnumField.GetHashCode();
4295      if (messageField_ != null) hash ^= MessageField.GetHashCode();
4296      hash ^= repeatedPrimitiveField_.GetHashCode();
4297      hash ^= repeatedStringField_.GetHashCode();
4298      hash ^= repeatedEnumField_.GetHashCode();
4299      hash ^= repeatedMessageField_.GetHashCode();
4300      if (_unknownFields != null) {
4301        hash ^= _unknownFields.GetHashCode();
4302      }
4303      return hash;
4304    }
4305
4306    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4307    public override string ToString() {
4308      return pb::JsonFormatter.ToDiagnosticString(this);
4309    }
4310
4311    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4312    public void WriteTo(pb::CodedOutputStream output) {
4313    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4314      output.WriteRawMessage(this);
4315    #else
4316      if (PrimitiveField != 0) {
4317        output.WriteRawTag(8);
4318        output.WriteInt32(PrimitiveField);
4319      }
4320      if (StringField.Length != 0) {
4321        output.WriteRawTag(18);
4322        output.WriteString(StringField);
4323      }
4324      if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified) {
4325        output.WriteRawTag(24);
4326        output.WriteEnum((int) EnumField);
4327      }
4328      if (messageField_ != null) {
4329        output.WriteRawTag(34);
4330        output.WriteMessage(MessageField);
4331      }
4332      repeatedPrimitiveField_.WriteTo(output, _repeated_repeatedPrimitiveField_codec);
4333      repeatedStringField_.WriteTo(output, _repeated_repeatedStringField_codec);
4334      repeatedEnumField_.WriteTo(output, _repeated_repeatedEnumField_codec);
4335      repeatedMessageField_.WriteTo(output, _repeated_repeatedMessageField_codec);
4336      if (_unknownFields != null) {
4337        _unknownFields.WriteTo(output);
4338      }
4339    #endif
4340    }
4341
4342    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4343    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4344    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
4345      if (PrimitiveField != 0) {
4346        output.WriteRawTag(8);
4347        output.WriteInt32(PrimitiveField);
4348      }
4349      if (StringField.Length != 0) {
4350        output.WriteRawTag(18);
4351        output.WriteString(StringField);
4352      }
4353      if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified) {
4354        output.WriteRawTag(24);
4355        output.WriteEnum((int) EnumField);
4356      }
4357      if (messageField_ != null) {
4358        output.WriteRawTag(34);
4359        output.WriteMessage(MessageField);
4360      }
4361      repeatedPrimitiveField_.WriteTo(ref output, _repeated_repeatedPrimitiveField_codec);
4362      repeatedStringField_.WriteTo(ref output, _repeated_repeatedStringField_codec);
4363      repeatedEnumField_.WriteTo(ref output, _repeated_repeatedEnumField_codec);
4364      repeatedMessageField_.WriteTo(ref output, _repeated_repeatedMessageField_codec);
4365      if (_unknownFields != null) {
4366        _unknownFields.WriteTo(ref output);
4367      }
4368    }
4369    #endif
4370
4371    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4372    public int CalculateSize() {
4373      int size = 0;
4374      if (PrimitiveField != 0) {
4375        size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveField);
4376      }
4377      if (StringField.Length != 0) {
4378        size += 1 + pb::CodedOutputStream.ComputeStringSize(StringField);
4379      }
4380      if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified) {
4381        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumField);
4382      }
4383      if (messageField_ != null) {
4384        size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageField);
4385      }
4386      size += repeatedPrimitiveField_.CalculateSize(_repeated_repeatedPrimitiveField_codec);
4387      size += repeatedStringField_.CalculateSize(_repeated_repeatedStringField_codec);
4388      size += repeatedEnumField_.CalculateSize(_repeated_repeatedEnumField_codec);
4389      size += repeatedMessageField_.CalculateSize(_repeated_repeatedMessageField_codec);
4390      if (_unknownFields != null) {
4391        size += _unknownFields.CalculateSize();
4392      }
4393      return size;
4394    }
4395
4396    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4397    public void MergeFrom(TestCamelCaseFieldNames other) {
4398      if (other == null) {
4399        return;
4400      }
4401      if (other.PrimitiveField != 0) {
4402        PrimitiveField = other.PrimitiveField;
4403      }
4404      if (other.StringField.Length != 0) {
4405        StringField = other.StringField;
4406      }
4407      if (other.EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.ForeignUnspecified) {
4408        EnumField = other.EnumField;
4409      }
4410      if (other.messageField_ != null) {
4411        if (messageField_ == null) {
4412          MessageField = new global::Google.Protobuf.TestProtos.ForeignMessage();
4413        }
4414        MessageField.MergeFrom(other.MessageField);
4415      }
4416      repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_);
4417      repeatedStringField_.Add(other.repeatedStringField_);
4418      repeatedEnumField_.Add(other.repeatedEnumField_);
4419      repeatedMessageField_.Add(other.repeatedMessageField_);
4420      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
4421    }
4422
4423    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4424    public void MergeFrom(pb::CodedInputStream input) {
4425    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4426      input.ReadRawMessage(this);
4427    #else
4428      uint tag;
4429      while ((tag = input.ReadTag()) != 0) {
4430        switch(tag) {
4431          default:
4432            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
4433            break;
4434          case 8: {
4435            PrimitiveField = input.ReadInt32();
4436            break;
4437          }
4438          case 18: {
4439            StringField = input.ReadString();
4440            break;
4441          }
4442          case 24: {
4443            EnumField = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum();
4444            break;
4445          }
4446          case 34: {
4447            if (messageField_ == null) {
4448              MessageField = new global::Google.Protobuf.TestProtos.ForeignMessage();
4449            }
4450            input.ReadMessage(MessageField);
4451            break;
4452          }
4453          case 58:
4454          case 56: {
4455            repeatedPrimitiveField_.AddEntriesFrom(input, _repeated_repeatedPrimitiveField_codec);
4456            break;
4457          }
4458          case 66: {
4459            repeatedStringField_.AddEntriesFrom(input, _repeated_repeatedStringField_codec);
4460            break;
4461          }
4462          case 74:
4463          case 72: {
4464            repeatedEnumField_.AddEntriesFrom(input, _repeated_repeatedEnumField_codec);
4465            break;
4466          }
4467          case 82: {
4468            repeatedMessageField_.AddEntriesFrom(input, _repeated_repeatedMessageField_codec);
4469            break;
4470          }
4471        }
4472      }
4473    #endif
4474    }
4475
4476    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4477    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4478    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
4479      uint tag;
4480      while ((tag = input.ReadTag()) != 0) {
4481        switch(tag) {
4482          default:
4483            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
4484            break;
4485          case 8: {
4486            PrimitiveField = input.ReadInt32();
4487            break;
4488          }
4489          case 18: {
4490            StringField = input.ReadString();
4491            break;
4492          }
4493          case 24: {
4494            EnumField = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum();
4495            break;
4496          }
4497          case 34: {
4498            if (messageField_ == null) {
4499              MessageField = new global::Google.Protobuf.TestProtos.ForeignMessage();
4500            }
4501            input.ReadMessage(MessageField);
4502            break;
4503          }
4504          case 58:
4505          case 56: {
4506            repeatedPrimitiveField_.AddEntriesFrom(ref input, _repeated_repeatedPrimitiveField_codec);
4507            break;
4508          }
4509          case 66: {
4510            repeatedStringField_.AddEntriesFrom(ref input, _repeated_repeatedStringField_codec);
4511            break;
4512          }
4513          case 74:
4514          case 72: {
4515            repeatedEnumField_.AddEntriesFrom(ref input, _repeated_repeatedEnumField_codec);
4516            break;
4517          }
4518          case 82: {
4519            repeatedMessageField_.AddEntriesFrom(ref input, _repeated_repeatedMessageField_codec);
4520            break;
4521          }
4522        }
4523      }
4524    }
4525    #endif
4526
4527  }
4528
4529  /// <summary>
4530  /// We list fields out of order, to ensure that we're using field number and not
4531  /// field index to determine serialization order.
4532  /// </summary>
4533  public sealed partial class TestFieldOrderings : pb::IMessage<TestFieldOrderings>
4534  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4535      , pb::IBufferMessage
4536  #endif
4537  {
4538    private static readonly pb::MessageParser<TestFieldOrderings> _parser = new pb::MessageParser<TestFieldOrderings>(() => new TestFieldOrderings());
4539    private pb::UnknownFieldSet _unknownFields;
4540    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4541    public static pb::MessageParser<TestFieldOrderings> Parser { get { return _parser; } }
4542
4543    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4544    public static pbr::MessageDescriptor Descriptor {
4545      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[12]; }
4546    }
4547
4548    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4549    pbr::MessageDescriptor pb::IMessage.Descriptor {
4550      get { return Descriptor; }
4551    }
4552
4553    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4554    public TestFieldOrderings() {
4555      OnConstruction();
4556    }
4557
4558    partial void OnConstruction();
4559
4560    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4561    public TestFieldOrderings(TestFieldOrderings other) : this() {
4562      myString_ = other.myString_;
4563      myInt_ = other.myInt_;
4564      myFloat_ = other.myFloat_;
4565      singleNestedMessage_ = other.singleNestedMessage_ != null ? other.singleNestedMessage_.Clone() : null;
4566      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
4567    }
4568
4569    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4570    public TestFieldOrderings Clone() {
4571      return new TestFieldOrderings(this);
4572    }
4573
4574    /// <summary>Field number for the "my_string" field.</summary>
4575    public const int MyStringFieldNumber = 11;
4576    private string myString_ = "";
4577    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4578    public string MyString {
4579      get { return myString_; }
4580      set {
4581        myString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
4582      }
4583    }
4584
4585    /// <summary>Field number for the "my_int" field.</summary>
4586    public const int MyIntFieldNumber = 1;
4587    private long myInt_;
4588    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4589    public long MyInt {
4590      get { return myInt_; }
4591      set {
4592        myInt_ = value;
4593      }
4594    }
4595
4596    /// <summary>Field number for the "my_float" field.</summary>
4597    public const int MyFloatFieldNumber = 101;
4598    private float myFloat_;
4599    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4600    public float MyFloat {
4601      get { return myFloat_; }
4602      set {
4603        myFloat_ = value;
4604      }
4605    }
4606
4607    /// <summary>Field number for the "single_nested_message" field.</summary>
4608    public const int SingleNestedMessageFieldNumber = 200;
4609    private global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage singleNestedMessage_;
4610    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4611    public global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage SingleNestedMessage {
4612      get { return singleNestedMessage_; }
4613      set {
4614        singleNestedMessage_ = value;
4615      }
4616    }
4617
4618    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4619    public override bool Equals(object other) {
4620      return Equals(other as TestFieldOrderings);
4621    }
4622
4623    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4624    public bool Equals(TestFieldOrderings other) {
4625      if (ReferenceEquals(other, null)) {
4626        return false;
4627      }
4628      if (ReferenceEquals(other, this)) {
4629        return true;
4630      }
4631      if (MyString != other.MyString) return false;
4632      if (MyInt != other.MyInt) return false;
4633      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MyFloat, other.MyFloat)) return false;
4634      if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return false;
4635      return Equals(_unknownFields, other._unknownFields);
4636    }
4637
4638    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4639    public override int GetHashCode() {
4640      int hash = 1;
4641      if (MyString.Length != 0) hash ^= MyString.GetHashCode();
4642      if (MyInt != 0L) hash ^= MyInt.GetHashCode();
4643      if (MyFloat != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MyFloat);
4644      if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode();
4645      if (_unknownFields != null) {
4646        hash ^= _unknownFields.GetHashCode();
4647      }
4648      return hash;
4649    }
4650
4651    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4652    public override string ToString() {
4653      return pb::JsonFormatter.ToDiagnosticString(this);
4654    }
4655
4656    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4657    public void WriteTo(pb::CodedOutputStream output) {
4658    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4659      output.WriteRawMessage(this);
4660    #else
4661      if (MyInt != 0L) {
4662        output.WriteRawTag(8);
4663        output.WriteInt64(MyInt);
4664      }
4665      if (MyString.Length != 0) {
4666        output.WriteRawTag(90);
4667        output.WriteString(MyString);
4668      }
4669      if (MyFloat != 0F) {
4670        output.WriteRawTag(173, 6);
4671        output.WriteFloat(MyFloat);
4672      }
4673      if (singleNestedMessage_ != null) {
4674        output.WriteRawTag(194, 12);
4675        output.WriteMessage(SingleNestedMessage);
4676      }
4677      if (_unknownFields != null) {
4678        _unknownFields.WriteTo(output);
4679      }
4680    #endif
4681    }
4682
4683    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4684    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4685    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
4686      if (MyInt != 0L) {
4687        output.WriteRawTag(8);
4688        output.WriteInt64(MyInt);
4689      }
4690      if (MyString.Length != 0) {
4691        output.WriteRawTag(90);
4692        output.WriteString(MyString);
4693      }
4694      if (MyFloat != 0F) {
4695        output.WriteRawTag(173, 6);
4696        output.WriteFloat(MyFloat);
4697      }
4698      if (singleNestedMessage_ != null) {
4699        output.WriteRawTag(194, 12);
4700        output.WriteMessage(SingleNestedMessage);
4701      }
4702      if (_unknownFields != null) {
4703        _unknownFields.WriteTo(ref output);
4704      }
4705    }
4706    #endif
4707
4708    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4709    public int CalculateSize() {
4710      int size = 0;
4711      if (MyString.Length != 0) {
4712        size += 1 + pb::CodedOutputStream.ComputeStringSize(MyString);
4713      }
4714      if (MyInt != 0L) {
4715        size += 1 + pb::CodedOutputStream.ComputeInt64Size(MyInt);
4716      }
4717      if (MyFloat != 0F) {
4718        size += 2 + 4;
4719      }
4720      if (singleNestedMessage_ != null) {
4721        size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage);
4722      }
4723      if (_unknownFields != null) {
4724        size += _unknownFields.CalculateSize();
4725      }
4726      return size;
4727    }
4728
4729    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4730    public void MergeFrom(TestFieldOrderings other) {
4731      if (other == null) {
4732        return;
4733      }
4734      if (other.MyString.Length != 0) {
4735        MyString = other.MyString;
4736      }
4737      if (other.MyInt != 0L) {
4738        MyInt = other.MyInt;
4739      }
4740      if (other.MyFloat != 0F) {
4741        MyFloat = other.MyFloat;
4742      }
4743      if (other.singleNestedMessage_ != null) {
4744        if (singleNestedMessage_ == null) {
4745          SingleNestedMessage = new global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage();
4746        }
4747        SingleNestedMessage.MergeFrom(other.SingleNestedMessage);
4748      }
4749      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
4750    }
4751
4752    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4753    public void MergeFrom(pb::CodedInputStream input) {
4754    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4755      input.ReadRawMessage(this);
4756    #else
4757      uint tag;
4758      while ((tag = input.ReadTag()) != 0) {
4759        switch(tag) {
4760          default:
4761            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
4762            break;
4763          case 8: {
4764            MyInt = input.ReadInt64();
4765            break;
4766          }
4767          case 90: {
4768            MyString = input.ReadString();
4769            break;
4770          }
4771          case 813: {
4772            MyFloat = input.ReadFloat();
4773            break;
4774          }
4775          case 1602: {
4776            if (singleNestedMessage_ == null) {
4777              SingleNestedMessage = new global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage();
4778            }
4779            input.ReadMessage(SingleNestedMessage);
4780            break;
4781          }
4782        }
4783      }
4784    #endif
4785    }
4786
4787    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4788    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4789    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
4790      uint tag;
4791      while ((tag = input.ReadTag()) != 0) {
4792        switch(tag) {
4793          default:
4794            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
4795            break;
4796          case 8: {
4797            MyInt = input.ReadInt64();
4798            break;
4799          }
4800          case 90: {
4801            MyString = input.ReadString();
4802            break;
4803          }
4804          case 813: {
4805            MyFloat = input.ReadFloat();
4806            break;
4807          }
4808          case 1602: {
4809            if (singleNestedMessage_ == null) {
4810              SingleNestedMessage = new global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage();
4811            }
4812            input.ReadMessage(SingleNestedMessage);
4813            break;
4814          }
4815        }
4816      }
4817    }
4818    #endif
4819
4820    #region Nested types
4821    /// <summary>Container for nested types declared in the TestFieldOrderings message type.</summary>
4822    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4823    public static partial class Types {
4824      public sealed partial class NestedMessage : pb::IMessage<NestedMessage>
4825      #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4826          , pb::IBufferMessage
4827      #endif
4828      {
4829        private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
4830        private pb::UnknownFieldSet _unknownFields;
4831        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4832        public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
4833
4834        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4835        public static pbr::MessageDescriptor Descriptor {
4836          get { return global::Google.Protobuf.TestProtos.TestFieldOrderings.Descriptor.NestedTypes[0]; }
4837        }
4838
4839        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4840        pbr::MessageDescriptor pb::IMessage.Descriptor {
4841          get { return Descriptor; }
4842        }
4843
4844        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4845        public NestedMessage() {
4846          OnConstruction();
4847        }
4848
4849        partial void OnConstruction();
4850
4851        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4852        public NestedMessage(NestedMessage other) : this() {
4853          oo_ = other.oo_;
4854          bb_ = other.bb_;
4855          _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
4856        }
4857
4858        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4859        public NestedMessage Clone() {
4860          return new NestedMessage(this);
4861        }
4862
4863        /// <summary>Field number for the "oo" field.</summary>
4864        public const int OoFieldNumber = 2;
4865        private long oo_;
4866        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4867        public long Oo {
4868          get { return oo_; }
4869          set {
4870            oo_ = value;
4871          }
4872        }
4873
4874        /// <summary>Field number for the "bb" field.</summary>
4875        public const int BbFieldNumber = 1;
4876        private int bb_;
4877        /// <summary>
4878        /// The field name "b" fails to compile in proto1 because it conflicts with
4879        /// a local variable named "b" in one of the generated methods.  Doh.
4880        /// This file needs to compile in proto1 to test backwards-compatibility.
4881        /// </summary>
4882        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4883        public int Bb {
4884          get { return bb_; }
4885          set {
4886            bb_ = value;
4887          }
4888        }
4889
4890        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4891        public override bool Equals(object other) {
4892          return Equals(other as NestedMessage);
4893        }
4894
4895        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4896        public bool Equals(NestedMessage other) {
4897          if (ReferenceEquals(other, null)) {
4898            return false;
4899          }
4900          if (ReferenceEquals(other, this)) {
4901            return true;
4902          }
4903          if (Oo != other.Oo) return false;
4904          if (Bb != other.Bb) return false;
4905          return Equals(_unknownFields, other._unknownFields);
4906        }
4907
4908        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4909        public override int GetHashCode() {
4910          int hash = 1;
4911          if (Oo != 0L) hash ^= Oo.GetHashCode();
4912          if (Bb != 0) hash ^= Bb.GetHashCode();
4913          if (_unknownFields != null) {
4914            hash ^= _unknownFields.GetHashCode();
4915          }
4916          return hash;
4917        }
4918
4919        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4920        public override string ToString() {
4921          return pb::JsonFormatter.ToDiagnosticString(this);
4922        }
4923
4924        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4925        public void WriteTo(pb::CodedOutputStream output) {
4926        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4927          output.WriteRawMessage(this);
4928        #else
4929          if (Bb != 0) {
4930            output.WriteRawTag(8);
4931            output.WriteInt32(Bb);
4932          }
4933          if (Oo != 0L) {
4934            output.WriteRawTag(16);
4935            output.WriteInt64(Oo);
4936          }
4937          if (_unknownFields != null) {
4938            _unknownFields.WriteTo(output);
4939          }
4940        #endif
4941        }
4942
4943        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4944        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4945        void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
4946          if (Bb != 0) {
4947            output.WriteRawTag(8);
4948            output.WriteInt32(Bb);
4949          }
4950          if (Oo != 0L) {
4951            output.WriteRawTag(16);
4952            output.WriteInt64(Oo);
4953          }
4954          if (_unknownFields != null) {
4955            _unknownFields.WriteTo(ref output);
4956          }
4957        }
4958        #endif
4959
4960        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4961        public int CalculateSize() {
4962          int size = 0;
4963          if (Oo != 0L) {
4964            size += 1 + pb::CodedOutputStream.ComputeInt64Size(Oo);
4965          }
4966          if (Bb != 0) {
4967            size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb);
4968          }
4969          if (_unknownFields != null) {
4970            size += _unknownFields.CalculateSize();
4971          }
4972          return size;
4973        }
4974
4975        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4976        public void MergeFrom(NestedMessage other) {
4977          if (other == null) {
4978            return;
4979          }
4980          if (other.Oo != 0L) {
4981            Oo = other.Oo;
4982          }
4983          if (other.Bb != 0) {
4984            Bb = other.Bb;
4985          }
4986          _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
4987        }
4988
4989        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4990        public void MergeFrom(pb::CodedInputStream input) {
4991        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4992          input.ReadRawMessage(this);
4993        #else
4994          uint tag;
4995          while ((tag = input.ReadTag()) != 0) {
4996            switch(tag) {
4997              default:
4998                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
4999                break;
5000              case 8: {
5001                Bb = input.ReadInt32();
5002                break;
5003              }
5004              case 16: {
5005                Oo = input.ReadInt64();
5006                break;
5007              }
5008            }
5009          }
5010        #endif
5011        }
5012
5013        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5014        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5015        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
5016          uint tag;
5017          while ((tag = input.ReadTag()) != 0) {
5018            switch(tag) {
5019              default:
5020                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
5021                break;
5022              case 8: {
5023                Bb = input.ReadInt32();
5024                break;
5025              }
5026              case 16: {
5027                Oo = input.ReadInt64();
5028                break;
5029              }
5030            }
5031          }
5032        }
5033        #endif
5034
5035      }
5036
5037    }
5038    #endregion
5039
5040  }
5041
5042  public sealed partial class SparseEnumMessage : pb::IMessage<SparseEnumMessage>
5043  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5044      , pb::IBufferMessage
5045  #endif
5046  {
5047    private static readonly pb::MessageParser<SparseEnumMessage> _parser = new pb::MessageParser<SparseEnumMessage>(() => new SparseEnumMessage());
5048    private pb::UnknownFieldSet _unknownFields;
5049    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5050    public static pb::MessageParser<SparseEnumMessage> Parser { get { return _parser; } }
5051
5052    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5053    public static pbr::MessageDescriptor Descriptor {
5054      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[13]; }
5055    }
5056
5057    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5058    pbr::MessageDescriptor pb::IMessage.Descriptor {
5059      get { return Descriptor; }
5060    }
5061
5062    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5063    public SparseEnumMessage() {
5064      OnConstruction();
5065    }
5066
5067    partial void OnConstruction();
5068
5069    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5070    public SparseEnumMessage(SparseEnumMessage other) : this() {
5071      sparseEnum_ = other.sparseEnum_;
5072      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
5073    }
5074
5075    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5076    public SparseEnumMessage Clone() {
5077      return new SparseEnumMessage(this);
5078    }
5079
5080    /// <summary>Field number for the "sparse_enum" field.</summary>
5081    public const int SparseEnumFieldNumber = 1;
5082    private global::Google.Protobuf.TestProtos.TestSparseEnum sparseEnum_ = global::Google.Protobuf.TestProtos.TestSparseEnum.Unspecified;
5083    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5084    public global::Google.Protobuf.TestProtos.TestSparseEnum SparseEnum {
5085      get { return sparseEnum_; }
5086      set {
5087        sparseEnum_ = value;
5088      }
5089    }
5090
5091    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5092    public override bool Equals(object other) {
5093      return Equals(other as SparseEnumMessage);
5094    }
5095
5096    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5097    public bool Equals(SparseEnumMessage other) {
5098      if (ReferenceEquals(other, null)) {
5099        return false;
5100      }
5101      if (ReferenceEquals(other, this)) {
5102        return true;
5103      }
5104      if (SparseEnum != other.SparseEnum) return false;
5105      return Equals(_unknownFields, other._unknownFields);
5106    }
5107
5108    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5109    public override int GetHashCode() {
5110      int hash = 1;
5111      if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.Unspecified) hash ^= SparseEnum.GetHashCode();
5112      if (_unknownFields != null) {
5113        hash ^= _unknownFields.GetHashCode();
5114      }
5115      return hash;
5116    }
5117
5118    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5119    public override string ToString() {
5120      return pb::JsonFormatter.ToDiagnosticString(this);
5121    }
5122
5123    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5124    public void WriteTo(pb::CodedOutputStream output) {
5125    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5126      output.WriteRawMessage(this);
5127    #else
5128      if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.Unspecified) {
5129        output.WriteRawTag(8);
5130        output.WriteEnum((int) SparseEnum);
5131      }
5132      if (_unknownFields != null) {
5133        _unknownFields.WriteTo(output);
5134      }
5135    #endif
5136    }
5137
5138    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5139    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5140    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
5141      if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.Unspecified) {
5142        output.WriteRawTag(8);
5143        output.WriteEnum((int) SparseEnum);
5144      }
5145      if (_unknownFields != null) {
5146        _unknownFields.WriteTo(ref output);
5147      }
5148    }
5149    #endif
5150
5151    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5152    public int CalculateSize() {
5153      int size = 0;
5154      if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.Unspecified) {
5155        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SparseEnum);
5156      }
5157      if (_unknownFields != null) {
5158        size += _unknownFields.CalculateSize();
5159      }
5160      return size;
5161    }
5162
5163    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5164    public void MergeFrom(SparseEnumMessage other) {
5165      if (other == null) {
5166        return;
5167      }
5168      if (other.SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.Unspecified) {
5169        SparseEnum = other.SparseEnum;
5170      }
5171      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
5172    }
5173
5174    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5175    public void MergeFrom(pb::CodedInputStream input) {
5176    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5177      input.ReadRawMessage(this);
5178    #else
5179      uint tag;
5180      while ((tag = input.ReadTag()) != 0) {
5181        switch(tag) {
5182          default:
5183            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
5184            break;
5185          case 8: {
5186            SparseEnum = (global::Google.Protobuf.TestProtos.TestSparseEnum) input.ReadEnum();
5187            break;
5188          }
5189        }
5190      }
5191    #endif
5192    }
5193
5194    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5195    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5196    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
5197      uint tag;
5198      while ((tag = input.ReadTag()) != 0) {
5199        switch(tag) {
5200          default:
5201            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
5202            break;
5203          case 8: {
5204            SparseEnum = (global::Google.Protobuf.TestProtos.TestSparseEnum) input.ReadEnum();
5205            break;
5206          }
5207        }
5208      }
5209    }
5210    #endif
5211
5212  }
5213
5214  /// <summary>
5215  /// Test String and Bytes: string is for valid UTF-8 strings
5216  /// </summary>
5217  public sealed partial class OneString : pb::IMessage<OneString>
5218  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5219      , pb::IBufferMessage
5220  #endif
5221  {
5222    private static readonly pb::MessageParser<OneString> _parser = new pb::MessageParser<OneString>(() => new OneString());
5223    private pb::UnknownFieldSet _unknownFields;
5224    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5225    public static pb::MessageParser<OneString> Parser { get { return _parser; } }
5226
5227    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5228    public static pbr::MessageDescriptor Descriptor {
5229      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[14]; }
5230    }
5231
5232    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5233    pbr::MessageDescriptor pb::IMessage.Descriptor {
5234      get { return Descriptor; }
5235    }
5236
5237    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5238    public OneString() {
5239      OnConstruction();
5240    }
5241
5242    partial void OnConstruction();
5243
5244    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5245    public OneString(OneString other) : this() {
5246      data_ = other.data_;
5247      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
5248    }
5249
5250    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5251    public OneString Clone() {
5252      return new OneString(this);
5253    }
5254
5255    /// <summary>Field number for the "data" field.</summary>
5256    public const int DataFieldNumber = 1;
5257    private string data_ = "";
5258    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5259    public string Data {
5260      get { return data_; }
5261      set {
5262        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
5263      }
5264    }
5265
5266    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5267    public override bool Equals(object other) {
5268      return Equals(other as OneString);
5269    }
5270
5271    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5272    public bool Equals(OneString other) {
5273      if (ReferenceEquals(other, null)) {
5274        return false;
5275      }
5276      if (ReferenceEquals(other, this)) {
5277        return true;
5278      }
5279      if (Data != other.Data) return false;
5280      return Equals(_unknownFields, other._unknownFields);
5281    }
5282
5283    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5284    public override int GetHashCode() {
5285      int hash = 1;
5286      if (Data.Length != 0) hash ^= Data.GetHashCode();
5287      if (_unknownFields != null) {
5288        hash ^= _unknownFields.GetHashCode();
5289      }
5290      return hash;
5291    }
5292
5293    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5294    public override string ToString() {
5295      return pb::JsonFormatter.ToDiagnosticString(this);
5296    }
5297
5298    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5299    public void WriteTo(pb::CodedOutputStream output) {
5300    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5301      output.WriteRawMessage(this);
5302    #else
5303      if (Data.Length != 0) {
5304        output.WriteRawTag(10);
5305        output.WriteString(Data);
5306      }
5307      if (_unknownFields != null) {
5308        _unknownFields.WriteTo(output);
5309      }
5310    #endif
5311    }
5312
5313    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5314    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5315    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
5316      if (Data.Length != 0) {
5317        output.WriteRawTag(10);
5318        output.WriteString(Data);
5319      }
5320      if (_unknownFields != null) {
5321        _unknownFields.WriteTo(ref output);
5322      }
5323    }
5324    #endif
5325
5326    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5327    public int CalculateSize() {
5328      int size = 0;
5329      if (Data.Length != 0) {
5330        size += 1 + pb::CodedOutputStream.ComputeStringSize(Data);
5331      }
5332      if (_unknownFields != null) {
5333        size += _unknownFields.CalculateSize();
5334      }
5335      return size;
5336    }
5337
5338    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5339    public void MergeFrom(OneString other) {
5340      if (other == null) {
5341        return;
5342      }
5343      if (other.Data.Length != 0) {
5344        Data = other.Data;
5345      }
5346      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
5347    }
5348
5349    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5350    public void MergeFrom(pb::CodedInputStream input) {
5351    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5352      input.ReadRawMessage(this);
5353    #else
5354      uint tag;
5355      while ((tag = input.ReadTag()) != 0) {
5356        switch(tag) {
5357          default:
5358            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
5359            break;
5360          case 10: {
5361            Data = input.ReadString();
5362            break;
5363          }
5364        }
5365      }
5366    #endif
5367    }
5368
5369    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5370    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5371    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
5372      uint tag;
5373      while ((tag = input.ReadTag()) != 0) {
5374        switch(tag) {
5375          default:
5376            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
5377            break;
5378          case 10: {
5379            Data = input.ReadString();
5380            break;
5381          }
5382        }
5383      }
5384    }
5385    #endif
5386
5387  }
5388
5389  public sealed partial class MoreString : pb::IMessage<MoreString>
5390  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5391      , pb::IBufferMessage
5392  #endif
5393  {
5394    private static readonly pb::MessageParser<MoreString> _parser = new pb::MessageParser<MoreString>(() => new MoreString());
5395    private pb::UnknownFieldSet _unknownFields;
5396    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5397    public static pb::MessageParser<MoreString> Parser { get { return _parser; } }
5398
5399    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5400    public static pbr::MessageDescriptor Descriptor {
5401      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[15]; }
5402    }
5403
5404    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5405    pbr::MessageDescriptor pb::IMessage.Descriptor {
5406      get { return Descriptor; }
5407    }
5408
5409    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5410    public MoreString() {
5411      OnConstruction();
5412    }
5413
5414    partial void OnConstruction();
5415
5416    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5417    public MoreString(MoreString other) : this() {
5418      data_ = other.data_.Clone();
5419      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
5420    }
5421
5422    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5423    public MoreString Clone() {
5424      return new MoreString(this);
5425    }
5426
5427    /// <summary>Field number for the "data" field.</summary>
5428    public const int DataFieldNumber = 1;
5429    private static readonly pb::FieldCodec<string> _repeated_data_codec
5430        = pb::FieldCodec.ForString(10);
5431    private readonly pbc::RepeatedField<string> data_ = new pbc::RepeatedField<string>();
5432    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5433    public pbc::RepeatedField<string> Data {
5434      get { return data_; }
5435    }
5436
5437    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5438    public override bool Equals(object other) {
5439      return Equals(other as MoreString);
5440    }
5441
5442    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5443    public bool Equals(MoreString other) {
5444      if (ReferenceEquals(other, null)) {
5445        return false;
5446      }
5447      if (ReferenceEquals(other, this)) {
5448        return true;
5449      }
5450      if(!data_.Equals(other.data_)) return false;
5451      return Equals(_unknownFields, other._unknownFields);
5452    }
5453
5454    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5455    public override int GetHashCode() {
5456      int hash = 1;
5457      hash ^= data_.GetHashCode();
5458      if (_unknownFields != null) {
5459        hash ^= _unknownFields.GetHashCode();
5460      }
5461      return hash;
5462    }
5463
5464    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5465    public override string ToString() {
5466      return pb::JsonFormatter.ToDiagnosticString(this);
5467    }
5468
5469    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5470    public void WriteTo(pb::CodedOutputStream output) {
5471    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5472      output.WriteRawMessage(this);
5473    #else
5474      data_.WriteTo(output, _repeated_data_codec);
5475      if (_unknownFields != null) {
5476        _unknownFields.WriteTo(output);
5477      }
5478    #endif
5479    }
5480
5481    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5482    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5483    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
5484      data_.WriteTo(ref output, _repeated_data_codec);
5485      if (_unknownFields != null) {
5486        _unknownFields.WriteTo(ref output);
5487      }
5488    }
5489    #endif
5490
5491    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5492    public int CalculateSize() {
5493      int size = 0;
5494      size += data_.CalculateSize(_repeated_data_codec);
5495      if (_unknownFields != null) {
5496        size += _unknownFields.CalculateSize();
5497      }
5498      return size;
5499    }
5500
5501    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5502    public void MergeFrom(MoreString other) {
5503      if (other == null) {
5504        return;
5505      }
5506      data_.Add(other.data_);
5507      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
5508    }
5509
5510    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5511    public void MergeFrom(pb::CodedInputStream input) {
5512    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5513      input.ReadRawMessage(this);
5514    #else
5515      uint tag;
5516      while ((tag = input.ReadTag()) != 0) {
5517        switch(tag) {
5518          default:
5519            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
5520            break;
5521          case 10: {
5522            data_.AddEntriesFrom(input, _repeated_data_codec);
5523            break;
5524          }
5525        }
5526      }
5527    #endif
5528    }
5529
5530    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5531    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5532    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
5533      uint tag;
5534      while ((tag = input.ReadTag()) != 0) {
5535        switch(tag) {
5536          default:
5537            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
5538            break;
5539          case 10: {
5540            data_.AddEntriesFrom(ref input, _repeated_data_codec);
5541            break;
5542          }
5543        }
5544      }
5545    }
5546    #endif
5547
5548  }
5549
5550  public sealed partial class OneBytes : pb::IMessage<OneBytes>
5551  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5552      , pb::IBufferMessage
5553  #endif
5554  {
5555    private static readonly pb::MessageParser<OneBytes> _parser = new pb::MessageParser<OneBytes>(() => new OneBytes());
5556    private pb::UnknownFieldSet _unknownFields;
5557    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5558    public static pb::MessageParser<OneBytes> Parser { get { return _parser; } }
5559
5560    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5561    public static pbr::MessageDescriptor Descriptor {
5562      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[16]; }
5563    }
5564
5565    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5566    pbr::MessageDescriptor pb::IMessage.Descriptor {
5567      get { return Descriptor; }
5568    }
5569
5570    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5571    public OneBytes() {
5572      OnConstruction();
5573    }
5574
5575    partial void OnConstruction();
5576
5577    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5578    public OneBytes(OneBytes other) : this() {
5579      data_ = other.data_;
5580      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
5581    }
5582
5583    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5584    public OneBytes Clone() {
5585      return new OneBytes(this);
5586    }
5587
5588    /// <summary>Field number for the "data" field.</summary>
5589    public const int DataFieldNumber = 1;
5590    private pb::ByteString data_ = pb::ByteString.Empty;
5591    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5592    public pb::ByteString Data {
5593      get { return data_; }
5594      set {
5595        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
5596      }
5597    }
5598
5599    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5600    public override bool Equals(object other) {
5601      return Equals(other as OneBytes);
5602    }
5603
5604    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5605    public bool Equals(OneBytes other) {
5606      if (ReferenceEquals(other, null)) {
5607        return false;
5608      }
5609      if (ReferenceEquals(other, this)) {
5610        return true;
5611      }
5612      if (Data != other.Data) return false;
5613      return Equals(_unknownFields, other._unknownFields);
5614    }
5615
5616    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5617    public override int GetHashCode() {
5618      int hash = 1;
5619      if (Data.Length != 0) hash ^= Data.GetHashCode();
5620      if (_unknownFields != null) {
5621        hash ^= _unknownFields.GetHashCode();
5622      }
5623      return hash;
5624    }
5625
5626    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5627    public override string ToString() {
5628      return pb::JsonFormatter.ToDiagnosticString(this);
5629    }
5630
5631    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5632    public void WriteTo(pb::CodedOutputStream output) {
5633    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5634      output.WriteRawMessage(this);
5635    #else
5636      if (Data.Length != 0) {
5637        output.WriteRawTag(10);
5638        output.WriteBytes(Data);
5639      }
5640      if (_unknownFields != null) {
5641        _unknownFields.WriteTo(output);
5642      }
5643    #endif
5644    }
5645
5646    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5647    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5648    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
5649      if (Data.Length != 0) {
5650        output.WriteRawTag(10);
5651        output.WriteBytes(Data);
5652      }
5653      if (_unknownFields != null) {
5654        _unknownFields.WriteTo(ref output);
5655      }
5656    }
5657    #endif
5658
5659    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5660    public int CalculateSize() {
5661      int size = 0;
5662      if (Data.Length != 0) {
5663        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
5664      }
5665      if (_unknownFields != null) {
5666        size += _unknownFields.CalculateSize();
5667      }
5668      return size;
5669    }
5670
5671    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5672    public void MergeFrom(OneBytes other) {
5673      if (other == null) {
5674        return;
5675      }
5676      if (other.Data.Length != 0) {
5677        Data = other.Data;
5678      }
5679      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
5680    }
5681
5682    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5683    public void MergeFrom(pb::CodedInputStream input) {
5684    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5685      input.ReadRawMessage(this);
5686    #else
5687      uint tag;
5688      while ((tag = input.ReadTag()) != 0) {
5689        switch(tag) {
5690          default:
5691            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
5692            break;
5693          case 10: {
5694            Data = input.ReadBytes();
5695            break;
5696          }
5697        }
5698      }
5699    #endif
5700    }
5701
5702    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5703    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5704    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
5705      uint tag;
5706      while ((tag = input.ReadTag()) != 0) {
5707        switch(tag) {
5708          default:
5709            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
5710            break;
5711          case 10: {
5712            Data = input.ReadBytes();
5713            break;
5714          }
5715        }
5716      }
5717    }
5718    #endif
5719
5720  }
5721
5722  public sealed partial class MoreBytes : pb::IMessage<MoreBytes>
5723  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5724      , pb::IBufferMessage
5725  #endif
5726  {
5727    private static readonly pb::MessageParser<MoreBytes> _parser = new pb::MessageParser<MoreBytes>(() => new MoreBytes());
5728    private pb::UnknownFieldSet _unknownFields;
5729    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5730    public static pb::MessageParser<MoreBytes> Parser { get { return _parser; } }
5731
5732    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5733    public static pbr::MessageDescriptor Descriptor {
5734      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[17]; }
5735    }
5736
5737    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5738    pbr::MessageDescriptor pb::IMessage.Descriptor {
5739      get { return Descriptor; }
5740    }
5741
5742    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5743    public MoreBytes() {
5744      OnConstruction();
5745    }
5746
5747    partial void OnConstruction();
5748
5749    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5750    public MoreBytes(MoreBytes other) : this() {
5751      data_ = other.data_;
5752      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
5753    }
5754
5755    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5756    public MoreBytes Clone() {
5757      return new MoreBytes(this);
5758    }
5759
5760    /// <summary>Field number for the "data" field.</summary>
5761    public const int DataFieldNumber = 1;
5762    private pb::ByteString data_ = pb::ByteString.Empty;
5763    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5764    public pb::ByteString Data {
5765      get { return data_; }
5766      set {
5767        data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
5768      }
5769    }
5770
5771    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5772    public override bool Equals(object other) {
5773      return Equals(other as MoreBytes);
5774    }
5775
5776    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5777    public bool Equals(MoreBytes other) {
5778      if (ReferenceEquals(other, null)) {
5779        return false;
5780      }
5781      if (ReferenceEquals(other, this)) {
5782        return true;
5783      }
5784      if (Data != other.Data) return false;
5785      return Equals(_unknownFields, other._unknownFields);
5786    }
5787
5788    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5789    public override int GetHashCode() {
5790      int hash = 1;
5791      if (Data.Length != 0) hash ^= Data.GetHashCode();
5792      if (_unknownFields != null) {
5793        hash ^= _unknownFields.GetHashCode();
5794      }
5795      return hash;
5796    }
5797
5798    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5799    public override string ToString() {
5800      return pb::JsonFormatter.ToDiagnosticString(this);
5801    }
5802
5803    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5804    public void WriteTo(pb::CodedOutputStream output) {
5805    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5806      output.WriteRawMessage(this);
5807    #else
5808      if (Data.Length != 0) {
5809        output.WriteRawTag(10);
5810        output.WriteBytes(Data);
5811      }
5812      if (_unknownFields != null) {
5813        _unknownFields.WriteTo(output);
5814      }
5815    #endif
5816    }
5817
5818    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5819    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5820    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
5821      if (Data.Length != 0) {
5822        output.WriteRawTag(10);
5823        output.WriteBytes(Data);
5824      }
5825      if (_unknownFields != null) {
5826        _unknownFields.WriteTo(ref output);
5827      }
5828    }
5829    #endif
5830
5831    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5832    public int CalculateSize() {
5833      int size = 0;
5834      if (Data.Length != 0) {
5835        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
5836      }
5837      if (_unknownFields != null) {
5838        size += _unknownFields.CalculateSize();
5839      }
5840      return size;
5841    }
5842
5843    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5844    public void MergeFrom(MoreBytes other) {
5845      if (other == null) {
5846        return;
5847      }
5848      if (other.Data.Length != 0) {
5849        Data = other.Data;
5850      }
5851      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
5852    }
5853
5854    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5855    public void MergeFrom(pb::CodedInputStream input) {
5856    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5857      input.ReadRawMessage(this);
5858    #else
5859      uint tag;
5860      while ((tag = input.ReadTag()) != 0) {
5861        switch(tag) {
5862          default:
5863            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
5864            break;
5865          case 10: {
5866            Data = input.ReadBytes();
5867            break;
5868          }
5869        }
5870      }
5871    #endif
5872    }
5873
5874    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5875    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5876    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
5877      uint tag;
5878      while ((tag = input.ReadTag()) != 0) {
5879        switch(tag) {
5880          default:
5881            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
5882            break;
5883          case 10: {
5884            Data = input.ReadBytes();
5885            break;
5886          }
5887        }
5888      }
5889    }
5890    #endif
5891
5892  }
5893
5894  /// <summary>
5895  /// Test int32, uint32, int64, uint64, and bool are all compatible
5896  /// </summary>
5897  public sealed partial class Int32Message : pb::IMessage<Int32Message>
5898  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5899      , pb::IBufferMessage
5900  #endif
5901  {
5902    private static readonly pb::MessageParser<Int32Message> _parser = new pb::MessageParser<Int32Message>(() => new Int32Message());
5903    private pb::UnknownFieldSet _unknownFields;
5904    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5905    public static pb::MessageParser<Int32Message> Parser { get { return _parser; } }
5906
5907    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5908    public static pbr::MessageDescriptor Descriptor {
5909      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[18]; }
5910    }
5911
5912    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5913    pbr::MessageDescriptor pb::IMessage.Descriptor {
5914      get { return Descriptor; }
5915    }
5916
5917    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5918    public Int32Message() {
5919      OnConstruction();
5920    }
5921
5922    partial void OnConstruction();
5923
5924    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5925    public Int32Message(Int32Message other) : this() {
5926      data_ = other.data_;
5927      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
5928    }
5929
5930    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5931    public Int32Message Clone() {
5932      return new Int32Message(this);
5933    }
5934
5935    /// <summary>Field number for the "data" field.</summary>
5936    public const int DataFieldNumber = 1;
5937    private int data_;
5938    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5939    public int Data {
5940      get { return data_; }
5941      set {
5942        data_ = value;
5943      }
5944    }
5945
5946    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5947    public override bool Equals(object other) {
5948      return Equals(other as Int32Message);
5949    }
5950
5951    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5952    public bool Equals(Int32Message other) {
5953      if (ReferenceEquals(other, null)) {
5954        return false;
5955      }
5956      if (ReferenceEquals(other, this)) {
5957        return true;
5958      }
5959      if (Data != other.Data) return false;
5960      return Equals(_unknownFields, other._unknownFields);
5961    }
5962
5963    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5964    public override int GetHashCode() {
5965      int hash = 1;
5966      if (Data != 0) hash ^= Data.GetHashCode();
5967      if (_unknownFields != null) {
5968        hash ^= _unknownFields.GetHashCode();
5969      }
5970      return hash;
5971    }
5972
5973    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5974    public override string ToString() {
5975      return pb::JsonFormatter.ToDiagnosticString(this);
5976    }
5977
5978    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5979    public void WriteTo(pb::CodedOutputStream output) {
5980    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5981      output.WriteRawMessage(this);
5982    #else
5983      if (Data != 0) {
5984        output.WriteRawTag(8);
5985        output.WriteInt32(Data);
5986      }
5987      if (_unknownFields != null) {
5988        _unknownFields.WriteTo(output);
5989      }
5990    #endif
5991    }
5992
5993    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
5994    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
5995    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
5996      if (Data != 0) {
5997        output.WriteRawTag(8);
5998        output.WriteInt32(Data);
5999      }
6000      if (_unknownFields != null) {
6001        _unknownFields.WriteTo(ref output);
6002      }
6003    }
6004    #endif
6005
6006    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6007    public int CalculateSize() {
6008      int size = 0;
6009      if (Data != 0) {
6010        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Data);
6011      }
6012      if (_unknownFields != null) {
6013        size += _unknownFields.CalculateSize();
6014      }
6015      return size;
6016    }
6017
6018    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6019    public void MergeFrom(Int32Message other) {
6020      if (other == null) {
6021        return;
6022      }
6023      if (other.Data != 0) {
6024        Data = other.Data;
6025      }
6026      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
6027    }
6028
6029    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6030    public void MergeFrom(pb::CodedInputStream input) {
6031    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6032      input.ReadRawMessage(this);
6033    #else
6034      uint tag;
6035      while ((tag = input.ReadTag()) != 0) {
6036        switch(tag) {
6037          default:
6038            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
6039            break;
6040          case 8: {
6041            Data = input.ReadInt32();
6042            break;
6043          }
6044        }
6045      }
6046    #endif
6047    }
6048
6049    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6050    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6051    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
6052      uint tag;
6053      while ((tag = input.ReadTag()) != 0) {
6054        switch(tag) {
6055          default:
6056            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
6057            break;
6058          case 8: {
6059            Data = input.ReadInt32();
6060            break;
6061          }
6062        }
6063      }
6064    }
6065    #endif
6066
6067  }
6068
6069  public sealed partial class Uint32Message : pb::IMessage<Uint32Message>
6070  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6071      , pb::IBufferMessage
6072  #endif
6073  {
6074    private static readonly pb::MessageParser<Uint32Message> _parser = new pb::MessageParser<Uint32Message>(() => new Uint32Message());
6075    private pb::UnknownFieldSet _unknownFields;
6076    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6077    public static pb::MessageParser<Uint32Message> Parser { get { return _parser; } }
6078
6079    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6080    public static pbr::MessageDescriptor Descriptor {
6081      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[19]; }
6082    }
6083
6084    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6085    pbr::MessageDescriptor pb::IMessage.Descriptor {
6086      get { return Descriptor; }
6087    }
6088
6089    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6090    public Uint32Message() {
6091      OnConstruction();
6092    }
6093
6094    partial void OnConstruction();
6095
6096    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6097    public Uint32Message(Uint32Message other) : this() {
6098      data_ = other.data_;
6099      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
6100    }
6101
6102    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6103    public Uint32Message Clone() {
6104      return new Uint32Message(this);
6105    }
6106
6107    /// <summary>Field number for the "data" field.</summary>
6108    public const int DataFieldNumber = 1;
6109    private uint data_;
6110    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6111    public uint Data {
6112      get { return data_; }
6113      set {
6114        data_ = value;
6115      }
6116    }
6117
6118    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6119    public override bool Equals(object other) {
6120      return Equals(other as Uint32Message);
6121    }
6122
6123    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6124    public bool Equals(Uint32Message other) {
6125      if (ReferenceEquals(other, null)) {
6126        return false;
6127      }
6128      if (ReferenceEquals(other, this)) {
6129        return true;
6130      }
6131      if (Data != other.Data) return false;
6132      return Equals(_unknownFields, other._unknownFields);
6133    }
6134
6135    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6136    public override int GetHashCode() {
6137      int hash = 1;
6138      if (Data != 0) hash ^= Data.GetHashCode();
6139      if (_unknownFields != null) {
6140        hash ^= _unknownFields.GetHashCode();
6141      }
6142      return hash;
6143    }
6144
6145    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6146    public override string ToString() {
6147      return pb::JsonFormatter.ToDiagnosticString(this);
6148    }
6149
6150    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6151    public void WriteTo(pb::CodedOutputStream output) {
6152    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6153      output.WriteRawMessage(this);
6154    #else
6155      if (Data != 0) {
6156        output.WriteRawTag(8);
6157        output.WriteUInt32(Data);
6158      }
6159      if (_unknownFields != null) {
6160        _unknownFields.WriteTo(output);
6161      }
6162    #endif
6163    }
6164
6165    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6166    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6167    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
6168      if (Data != 0) {
6169        output.WriteRawTag(8);
6170        output.WriteUInt32(Data);
6171      }
6172      if (_unknownFields != null) {
6173        _unknownFields.WriteTo(ref output);
6174      }
6175    }
6176    #endif
6177
6178    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6179    public int CalculateSize() {
6180      int size = 0;
6181      if (Data != 0) {
6182        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Data);
6183      }
6184      if (_unknownFields != null) {
6185        size += _unknownFields.CalculateSize();
6186      }
6187      return size;
6188    }
6189
6190    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6191    public void MergeFrom(Uint32Message other) {
6192      if (other == null) {
6193        return;
6194      }
6195      if (other.Data != 0) {
6196        Data = other.Data;
6197      }
6198      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
6199    }
6200
6201    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6202    public void MergeFrom(pb::CodedInputStream input) {
6203    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6204      input.ReadRawMessage(this);
6205    #else
6206      uint tag;
6207      while ((tag = input.ReadTag()) != 0) {
6208        switch(tag) {
6209          default:
6210            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
6211            break;
6212          case 8: {
6213            Data = input.ReadUInt32();
6214            break;
6215          }
6216        }
6217      }
6218    #endif
6219    }
6220
6221    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6222    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6223    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
6224      uint tag;
6225      while ((tag = input.ReadTag()) != 0) {
6226        switch(tag) {
6227          default:
6228            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
6229            break;
6230          case 8: {
6231            Data = input.ReadUInt32();
6232            break;
6233          }
6234        }
6235      }
6236    }
6237    #endif
6238
6239  }
6240
6241  public sealed partial class Int64Message : pb::IMessage<Int64Message>
6242  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6243      , pb::IBufferMessage
6244  #endif
6245  {
6246    private static readonly pb::MessageParser<Int64Message> _parser = new pb::MessageParser<Int64Message>(() => new Int64Message());
6247    private pb::UnknownFieldSet _unknownFields;
6248    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6249    public static pb::MessageParser<Int64Message> Parser { get { return _parser; } }
6250
6251    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6252    public static pbr::MessageDescriptor Descriptor {
6253      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[20]; }
6254    }
6255
6256    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6257    pbr::MessageDescriptor pb::IMessage.Descriptor {
6258      get { return Descriptor; }
6259    }
6260
6261    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6262    public Int64Message() {
6263      OnConstruction();
6264    }
6265
6266    partial void OnConstruction();
6267
6268    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6269    public Int64Message(Int64Message other) : this() {
6270      data_ = other.data_;
6271      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
6272    }
6273
6274    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6275    public Int64Message Clone() {
6276      return new Int64Message(this);
6277    }
6278
6279    /// <summary>Field number for the "data" field.</summary>
6280    public const int DataFieldNumber = 1;
6281    private long data_;
6282    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6283    public long Data {
6284      get { return data_; }
6285      set {
6286        data_ = value;
6287      }
6288    }
6289
6290    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6291    public override bool Equals(object other) {
6292      return Equals(other as Int64Message);
6293    }
6294
6295    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6296    public bool Equals(Int64Message other) {
6297      if (ReferenceEquals(other, null)) {
6298        return false;
6299      }
6300      if (ReferenceEquals(other, this)) {
6301        return true;
6302      }
6303      if (Data != other.Data) return false;
6304      return Equals(_unknownFields, other._unknownFields);
6305    }
6306
6307    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6308    public override int GetHashCode() {
6309      int hash = 1;
6310      if (Data != 0L) hash ^= Data.GetHashCode();
6311      if (_unknownFields != null) {
6312        hash ^= _unknownFields.GetHashCode();
6313      }
6314      return hash;
6315    }
6316
6317    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6318    public override string ToString() {
6319      return pb::JsonFormatter.ToDiagnosticString(this);
6320    }
6321
6322    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6323    public void WriteTo(pb::CodedOutputStream output) {
6324    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6325      output.WriteRawMessage(this);
6326    #else
6327      if (Data != 0L) {
6328        output.WriteRawTag(8);
6329        output.WriteInt64(Data);
6330      }
6331      if (_unknownFields != null) {
6332        _unknownFields.WriteTo(output);
6333      }
6334    #endif
6335    }
6336
6337    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6338    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6339    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
6340      if (Data != 0L) {
6341        output.WriteRawTag(8);
6342        output.WriteInt64(Data);
6343      }
6344      if (_unknownFields != null) {
6345        _unknownFields.WriteTo(ref output);
6346      }
6347    }
6348    #endif
6349
6350    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6351    public int CalculateSize() {
6352      int size = 0;
6353      if (Data != 0L) {
6354        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Data);
6355      }
6356      if (_unknownFields != null) {
6357        size += _unknownFields.CalculateSize();
6358      }
6359      return size;
6360    }
6361
6362    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6363    public void MergeFrom(Int64Message other) {
6364      if (other == null) {
6365        return;
6366      }
6367      if (other.Data != 0L) {
6368        Data = other.Data;
6369      }
6370      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
6371    }
6372
6373    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6374    public void MergeFrom(pb::CodedInputStream input) {
6375    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6376      input.ReadRawMessage(this);
6377    #else
6378      uint tag;
6379      while ((tag = input.ReadTag()) != 0) {
6380        switch(tag) {
6381          default:
6382            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
6383            break;
6384          case 8: {
6385            Data = input.ReadInt64();
6386            break;
6387          }
6388        }
6389      }
6390    #endif
6391    }
6392
6393    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6394    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6395    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
6396      uint tag;
6397      while ((tag = input.ReadTag()) != 0) {
6398        switch(tag) {
6399          default:
6400            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
6401            break;
6402          case 8: {
6403            Data = input.ReadInt64();
6404            break;
6405          }
6406        }
6407      }
6408    }
6409    #endif
6410
6411  }
6412
6413  public sealed partial class Uint64Message : pb::IMessage<Uint64Message>
6414  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6415      , pb::IBufferMessage
6416  #endif
6417  {
6418    private static readonly pb::MessageParser<Uint64Message> _parser = new pb::MessageParser<Uint64Message>(() => new Uint64Message());
6419    private pb::UnknownFieldSet _unknownFields;
6420    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6421    public static pb::MessageParser<Uint64Message> Parser { get { return _parser; } }
6422
6423    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6424    public static pbr::MessageDescriptor Descriptor {
6425      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[21]; }
6426    }
6427
6428    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6429    pbr::MessageDescriptor pb::IMessage.Descriptor {
6430      get { return Descriptor; }
6431    }
6432
6433    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6434    public Uint64Message() {
6435      OnConstruction();
6436    }
6437
6438    partial void OnConstruction();
6439
6440    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6441    public Uint64Message(Uint64Message other) : this() {
6442      data_ = other.data_;
6443      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
6444    }
6445
6446    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6447    public Uint64Message Clone() {
6448      return new Uint64Message(this);
6449    }
6450
6451    /// <summary>Field number for the "data" field.</summary>
6452    public const int DataFieldNumber = 1;
6453    private ulong data_;
6454    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6455    public ulong Data {
6456      get { return data_; }
6457      set {
6458        data_ = value;
6459      }
6460    }
6461
6462    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6463    public override bool Equals(object other) {
6464      return Equals(other as Uint64Message);
6465    }
6466
6467    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6468    public bool Equals(Uint64Message other) {
6469      if (ReferenceEquals(other, null)) {
6470        return false;
6471      }
6472      if (ReferenceEquals(other, this)) {
6473        return true;
6474      }
6475      if (Data != other.Data) return false;
6476      return Equals(_unknownFields, other._unknownFields);
6477    }
6478
6479    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6480    public override int GetHashCode() {
6481      int hash = 1;
6482      if (Data != 0UL) hash ^= Data.GetHashCode();
6483      if (_unknownFields != null) {
6484        hash ^= _unknownFields.GetHashCode();
6485      }
6486      return hash;
6487    }
6488
6489    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6490    public override string ToString() {
6491      return pb::JsonFormatter.ToDiagnosticString(this);
6492    }
6493
6494    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6495    public void WriteTo(pb::CodedOutputStream output) {
6496    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6497      output.WriteRawMessage(this);
6498    #else
6499      if (Data != 0UL) {
6500        output.WriteRawTag(8);
6501        output.WriteUInt64(Data);
6502      }
6503      if (_unknownFields != null) {
6504        _unknownFields.WriteTo(output);
6505      }
6506    #endif
6507    }
6508
6509    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6510    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6511    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
6512      if (Data != 0UL) {
6513        output.WriteRawTag(8);
6514        output.WriteUInt64(Data);
6515      }
6516      if (_unknownFields != null) {
6517        _unknownFields.WriteTo(ref output);
6518      }
6519    }
6520    #endif
6521
6522    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6523    public int CalculateSize() {
6524      int size = 0;
6525      if (Data != 0UL) {
6526        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Data);
6527      }
6528      if (_unknownFields != null) {
6529        size += _unknownFields.CalculateSize();
6530      }
6531      return size;
6532    }
6533
6534    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6535    public void MergeFrom(Uint64Message other) {
6536      if (other == null) {
6537        return;
6538      }
6539      if (other.Data != 0UL) {
6540        Data = other.Data;
6541      }
6542      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
6543    }
6544
6545    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6546    public void MergeFrom(pb::CodedInputStream input) {
6547    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6548      input.ReadRawMessage(this);
6549    #else
6550      uint tag;
6551      while ((tag = input.ReadTag()) != 0) {
6552        switch(tag) {
6553          default:
6554            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
6555            break;
6556          case 8: {
6557            Data = input.ReadUInt64();
6558            break;
6559          }
6560        }
6561      }
6562    #endif
6563    }
6564
6565    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6566    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6567    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
6568      uint tag;
6569      while ((tag = input.ReadTag()) != 0) {
6570        switch(tag) {
6571          default:
6572            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
6573            break;
6574          case 8: {
6575            Data = input.ReadUInt64();
6576            break;
6577          }
6578        }
6579      }
6580    }
6581    #endif
6582
6583  }
6584
6585  public sealed partial class BoolMessage : pb::IMessage<BoolMessage>
6586  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6587      , pb::IBufferMessage
6588  #endif
6589  {
6590    private static readonly pb::MessageParser<BoolMessage> _parser = new pb::MessageParser<BoolMessage>(() => new BoolMessage());
6591    private pb::UnknownFieldSet _unknownFields;
6592    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6593    public static pb::MessageParser<BoolMessage> Parser { get { return _parser; } }
6594
6595    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6596    public static pbr::MessageDescriptor Descriptor {
6597      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[22]; }
6598    }
6599
6600    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6601    pbr::MessageDescriptor pb::IMessage.Descriptor {
6602      get { return Descriptor; }
6603    }
6604
6605    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6606    public BoolMessage() {
6607      OnConstruction();
6608    }
6609
6610    partial void OnConstruction();
6611
6612    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6613    public BoolMessage(BoolMessage other) : this() {
6614      data_ = other.data_;
6615      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
6616    }
6617
6618    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6619    public BoolMessage Clone() {
6620      return new BoolMessage(this);
6621    }
6622
6623    /// <summary>Field number for the "data" field.</summary>
6624    public const int DataFieldNumber = 1;
6625    private bool data_;
6626    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6627    public bool Data {
6628      get { return data_; }
6629      set {
6630        data_ = value;
6631      }
6632    }
6633
6634    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6635    public override bool Equals(object other) {
6636      return Equals(other as BoolMessage);
6637    }
6638
6639    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6640    public bool Equals(BoolMessage other) {
6641      if (ReferenceEquals(other, null)) {
6642        return false;
6643      }
6644      if (ReferenceEquals(other, this)) {
6645        return true;
6646      }
6647      if (Data != other.Data) return false;
6648      return Equals(_unknownFields, other._unknownFields);
6649    }
6650
6651    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6652    public override int GetHashCode() {
6653      int hash = 1;
6654      if (Data != false) hash ^= Data.GetHashCode();
6655      if (_unknownFields != null) {
6656        hash ^= _unknownFields.GetHashCode();
6657      }
6658      return hash;
6659    }
6660
6661    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6662    public override string ToString() {
6663      return pb::JsonFormatter.ToDiagnosticString(this);
6664    }
6665
6666    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6667    public void WriteTo(pb::CodedOutputStream output) {
6668    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6669      output.WriteRawMessage(this);
6670    #else
6671      if (Data != false) {
6672        output.WriteRawTag(8);
6673        output.WriteBool(Data);
6674      }
6675      if (_unknownFields != null) {
6676        _unknownFields.WriteTo(output);
6677      }
6678    #endif
6679    }
6680
6681    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6682    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6683    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
6684      if (Data != false) {
6685        output.WriteRawTag(8);
6686        output.WriteBool(Data);
6687      }
6688      if (_unknownFields != null) {
6689        _unknownFields.WriteTo(ref output);
6690      }
6691    }
6692    #endif
6693
6694    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6695    public int CalculateSize() {
6696      int size = 0;
6697      if (Data != false) {
6698        size += 1 + 1;
6699      }
6700      if (_unknownFields != null) {
6701        size += _unknownFields.CalculateSize();
6702      }
6703      return size;
6704    }
6705
6706    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6707    public void MergeFrom(BoolMessage other) {
6708      if (other == null) {
6709        return;
6710      }
6711      if (other.Data != false) {
6712        Data = other.Data;
6713      }
6714      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
6715    }
6716
6717    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6718    public void MergeFrom(pb::CodedInputStream input) {
6719    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6720      input.ReadRawMessage(this);
6721    #else
6722      uint tag;
6723      while ((tag = input.ReadTag()) != 0) {
6724        switch(tag) {
6725          default:
6726            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
6727            break;
6728          case 8: {
6729            Data = input.ReadBool();
6730            break;
6731          }
6732        }
6733      }
6734    #endif
6735    }
6736
6737    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6738    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6739    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
6740      uint tag;
6741      while ((tag = input.ReadTag()) != 0) {
6742        switch(tag) {
6743          default:
6744            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
6745            break;
6746          case 8: {
6747            Data = input.ReadBool();
6748            break;
6749          }
6750        }
6751      }
6752    }
6753    #endif
6754
6755  }
6756
6757  /// <summary>
6758  /// Test oneofs.
6759  /// </summary>
6760  public sealed partial class TestOneof : pb::IMessage<TestOneof>
6761  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6762      , pb::IBufferMessage
6763  #endif
6764  {
6765    private static readonly pb::MessageParser<TestOneof> _parser = new pb::MessageParser<TestOneof>(() => new TestOneof());
6766    private pb::UnknownFieldSet _unknownFields;
6767    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6768    public static pb::MessageParser<TestOneof> Parser { get { return _parser; } }
6769
6770    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6771    public static pbr::MessageDescriptor Descriptor {
6772      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[23]; }
6773    }
6774
6775    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6776    pbr::MessageDescriptor pb::IMessage.Descriptor {
6777      get { return Descriptor; }
6778    }
6779
6780    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6781    public TestOneof() {
6782      OnConstruction();
6783    }
6784
6785    partial void OnConstruction();
6786
6787    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6788    public TestOneof(TestOneof other) : this() {
6789      switch (other.FooCase) {
6790        case FooOneofCase.FooInt:
6791          FooInt = other.FooInt;
6792          break;
6793        case FooOneofCase.FooString:
6794          FooString = other.FooString;
6795          break;
6796        case FooOneofCase.FooMessage:
6797          FooMessage = other.FooMessage.Clone();
6798          break;
6799      }
6800
6801      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
6802    }
6803
6804    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6805    public TestOneof Clone() {
6806      return new TestOneof(this);
6807    }
6808
6809    /// <summary>Field number for the "foo_int" field.</summary>
6810    public const int FooIntFieldNumber = 1;
6811    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6812    public int FooInt {
6813      get { return fooCase_ == FooOneofCase.FooInt ? (int) foo_ : 0; }
6814      set {
6815        foo_ = value;
6816        fooCase_ = FooOneofCase.FooInt;
6817      }
6818    }
6819
6820    /// <summary>Field number for the "foo_string" field.</summary>
6821    public const int FooStringFieldNumber = 2;
6822    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6823    public string FooString {
6824      get { return fooCase_ == FooOneofCase.FooString ? (string) foo_ : ""; }
6825      set {
6826        foo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
6827        fooCase_ = FooOneofCase.FooString;
6828      }
6829    }
6830
6831    /// <summary>Field number for the "foo_message" field.</summary>
6832    public const int FooMessageFieldNumber = 3;
6833    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6834    public global::Google.Protobuf.TestProtos.TestAllTypes FooMessage {
6835      get { return fooCase_ == FooOneofCase.FooMessage ? (global::Google.Protobuf.TestProtos.TestAllTypes) foo_ : null; }
6836      set {
6837        foo_ = value;
6838        fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooMessage;
6839      }
6840    }
6841
6842    private object foo_;
6843    /// <summary>Enum of possible cases for the "foo" oneof.</summary>
6844    public enum FooOneofCase {
6845      None = 0,
6846      FooInt = 1,
6847      FooString = 2,
6848      FooMessage = 3,
6849    }
6850    private FooOneofCase fooCase_ = FooOneofCase.None;
6851    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6852    public FooOneofCase FooCase {
6853      get { return fooCase_; }
6854    }
6855
6856    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6857    public void ClearFoo() {
6858      fooCase_ = FooOneofCase.None;
6859      foo_ = null;
6860    }
6861
6862    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6863    public override bool Equals(object other) {
6864      return Equals(other as TestOneof);
6865    }
6866
6867    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6868    public bool Equals(TestOneof other) {
6869      if (ReferenceEquals(other, null)) {
6870        return false;
6871      }
6872      if (ReferenceEquals(other, this)) {
6873        return true;
6874      }
6875      if (FooInt != other.FooInt) return false;
6876      if (FooString != other.FooString) return false;
6877      if (!object.Equals(FooMessage, other.FooMessage)) return false;
6878      if (FooCase != other.FooCase) return false;
6879      return Equals(_unknownFields, other._unknownFields);
6880    }
6881
6882    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6883    public override int GetHashCode() {
6884      int hash = 1;
6885      if (fooCase_ == FooOneofCase.FooInt) hash ^= FooInt.GetHashCode();
6886      if (fooCase_ == FooOneofCase.FooString) hash ^= FooString.GetHashCode();
6887      if (fooCase_ == FooOneofCase.FooMessage) hash ^= FooMessage.GetHashCode();
6888      hash ^= (int) fooCase_;
6889      if (_unknownFields != null) {
6890        hash ^= _unknownFields.GetHashCode();
6891      }
6892      return hash;
6893    }
6894
6895    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6896    public override string ToString() {
6897      return pb::JsonFormatter.ToDiagnosticString(this);
6898    }
6899
6900    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6901    public void WriteTo(pb::CodedOutputStream output) {
6902    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6903      output.WriteRawMessage(this);
6904    #else
6905      if (fooCase_ == FooOneofCase.FooInt) {
6906        output.WriteRawTag(8);
6907        output.WriteInt32(FooInt);
6908      }
6909      if (fooCase_ == FooOneofCase.FooString) {
6910        output.WriteRawTag(18);
6911        output.WriteString(FooString);
6912      }
6913      if (fooCase_ == FooOneofCase.FooMessage) {
6914        output.WriteRawTag(26);
6915        output.WriteMessage(FooMessage);
6916      }
6917      if (_unknownFields != null) {
6918        _unknownFields.WriteTo(output);
6919      }
6920    #endif
6921    }
6922
6923    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6924    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6925    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
6926      if (fooCase_ == FooOneofCase.FooInt) {
6927        output.WriteRawTag(8);
6928        output.WriteInt32(FooInt);
6929      }
6930      if (fooCase_ == FooOneofCase.FooString) {
6931        output.WriteRawTag(18);
6932        output.WriteString(FooString);
6933      }
6934      if (fooCase_ == FooOneofCase.FooMessage) {
6935        output.WriteRawTag(26);
6936        output.WriteMessage(FooMessage);
6937      }
6938      if (_unknownFields != null) {
6939        _unknownFields.WriteTo(ref output);
6940      }
6941    }
6942    #endif
6943
6944    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6945    public int CalculateSize() {
6946      int size = 0;
6947      if (fooCase_ == FooOneofCase.FooInt) {
6948        size += 1 + pb::CodedOutputStream.ComputeInt32Size(FooInt);
6949      }
6950      if (fooCase_ == FooOneofCase.FooString) {
6951        size += 1 + pb::CodedOutputStream.ComputeStringSize(FooString);
6952      }
6953      if (fooCase_ == FooOneofCase.FooMessage) {
6954        size += 1 + pb::CodedOutputStream.ComputeMessageSize(FooMessage);
6955      }
6956      if (_unknownFields != null) {
6957        size += _unknownFields.CalculateSize();
6958      }
6959      return size;
6960    }
6961
6962    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6963    public void MergeFrom(TestOneof other) {
6964      if (other == null) {
6965        return;
6966      }
6967      switch (other.FooCase) {
6968        case FooOneofCase.FooInt:
6969          FooInt = other.FooInt;
6970          break;
6971        case FooOneofCase.FooString:
6972          FooString = other.FooString;
6973          break;
6974        case FooOneofCase.FooMessage:
6975          if (FooMessage == null) {
6976            FooMessage = new global::Google.Protobuf.TestProtos.TestAllTypes();
6977          }
6978          FooMessage.MergeFrom(other.FooMessage);
6979          break;
6980      }
6981
6982      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
6983    }
6984
6985    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
6986    public void MergeFrom(pb::CodedInputStream input) {
6987    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
6988      input.ReadRawMessage(this);
6989    #else
6990      uint tag;
6991      while ((tag = input.ReadTag()) != 0) {
6992        switch(tag) {
6993          default:
6994            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
6995            break;
6996          case 8: {
6997            FooInt = input.ReadInt32();
6998            break;
6999          }
7000          case 18: {
7001            FooString = input.ReadString();
7002            break;
7003          }
7004          case 26: {
7005            global::Google.Protobuf.TestProtos.TestAllTypes subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes();
7006            if (fooCase_ == FooOneofCase.FooMessage) {
7007              subBuilder.MergeFrom(FooMessage);
7008            }
7009            input.ReadMessage(subBuilder);
7010            FooMessage = subBuilder;
7011            break;
7012          }
7013        }
7014      }
7015    #endif
7016    }
7017
7018    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
7019    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7020    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
7021      uint tag;
7022      while ((tag = input.ReadTag()) != 0) {
7023        switch(tag) {
7024          default:
7025            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
7026            break;
7027          case 8: {
7028            FooInt = input.ReadInt32();
7029            break;
7030          }
7031          case 18: {
7032            FooString = input.ReadString();
7033            break;
7034          }
7035          case 26: {
7036            global::Google.Protobuf.TestProtos.TestAllTypes subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes();
7037            if (fooCase_ == FooOneofCase.FooMessage) {
7038              subBuilder.MergeFrom(FooMessage);
7039            }
7040            input.ReadMessage(subBuilder);
7041            FooMessage = subBuilder;
7042            break;
7043          }
7044        }
7045      }
7046    }
7047    #endif
7048
7049  }
7050
7051  public sealed partial class TestPackedTypes : pb::IMessage<TestPackedTypes>
7052  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
7053      , pb::IBufferMessage
7054  #endif
7055  {
7056    private static readonly pb::MessageParser<TestPackedTypes> _parser = new pb::MessageParser<TestPackedTypes>(() => new TestPackedTypes());
7057    private pb::UnknownFieldSet _unknownFields;
7058    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7059    public static pb::MessageParser<TestPackedTypes> Parser { get { return _parser; } }
7060
7061    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7062    public static pbr::MessageDescriptor Descriptor {
7063      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[24]; }
7064    }
7065
7066    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7067    pbr::MessageDescriptor pb::IMessage.Descriptor {
7068      get { return Descriptor; }
7069    }
7070
7071    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7072    public TestPackedTypes() {
7073      OnConstruction();
7074    }
7075
7076    partial void OnConstruction();
7077
7078    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7079    public TestPackedTypes(TestPackedTypes other) : this() {
7080      packedInt32_ = other.packedInt32_.Clone();
7081      packedInt64_ = other.packedInt64_.Clone();
7082      packedUint32_ = other.packedUint32_.Clone();
7083      packedUint64_ = other.packedUint64_.Clone();
7084      packedSint32_ = other.packedSint32_.Clone();
7085      packedSint64_ = other.packedSint64_.Clone();
7086      packedFixed32_ = other.packedFixed32_.Clone();
7087      packedFixed64_ = other.packedFixed64_.Clone();
7088      packedSfixed32_ = other.packedSfixed32_.Clone();
7089      packedSfixed64_ = other.packedSfixed64_.Clone();
7090      packedFloat_ = other.packedFloat_.Clone();
7091      packedDouble_ = other.packedDouble_.Clone();
7092      packedBool_ = other.packedBool_.Clone();
7093      packedEnum_ = other.packedEnum_.Clone();
7094      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
7095    }
7096
7097    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7098    public TestPackedTypes Clone() {
7099      return new TestPackedTypes(this);
7100    }
7101
7102    /// <summary>Field number for the "packed_int32" field.</summary>
7103    public const int PackedInt32FieldNumber = 90;
7104    private static readonly pb::FieldCodec<int> _repeated_packedInt32_codec
7105        = pb::FieldCodec.ForInt32(722);
7106    private readonly pbc::RepeatedField<int> packedInt32_ = new pbc::RepeatedField<int>();
7107    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7108    public pbc::RepeatedField<int> PackedInt32 {
7109      get { return packedInt32_; }
7110    }
7111
7112    /// <summary>Field number for the "packed_int64" field.</summary>
7113    public const int PackedInt64FieldNumber = 91;
7114    private static readonly pb::FieldCodec<long> _repeated_packedInt64_codec
7115        = pb::FieldCodec.ForInt64(730);
7116    private readonly pbc::RepeatedField<long> packedInt64_ = new pbc::RepeatedField<long>();
7117    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7118    public pbc::RepeatedField<long> PackedInt64 {
7119      get { return packedInt64_; }
7120    }
7121
7122    /// <summary>Field number for the "packed_uint32" field.</summary>
7123    public const int PackedUint32FieldNumber = 92;
7124    private static readonly pb::FieldCodec<uint> _repeated_packedUint32_codec
7125        = pb::FieldCodec.ForUInt32(738);
7126    private readonly pbc::RepeatedField<uint> packedUint32_ = new pbc::RepeatedField<uint>();
7127    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7128    public pbc::RepeatedField<uint> PackedUint32 {
7129      get { return packedUint32_; }
7130    }
7131
7132    /// <summary>Field number for the "packed_uint64" field.</summary>
7133    public const int PackedUint64FieldNumber = 93;
7134    private static readonly pb::FieldCodec<ulong> _repeated_packedUint64_codec
7135        = pb::FieldCodec.ForUInt64(746);
7136    private readonly pbc::RepeatedField<ulong> packedUint64_ = new pbc::RepeatedField<ulong>();
7137    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7138    public pbc::RepeatedField<ulong> PackedUint64 {
7139      get { return packedUint64_; }
7140    }
7141
7142    /// <summary>Field number for the "packed_sint32" field.</summary>
7143    public const int PackedSint32FieldNumber = 94;
7144    private static readonly pb::FieldCodec<int> _repeated_packedSint32_codec
7145        = pb::FieldCodec.ForSInt32(754);
7146    private readonly pbc::RepeatedField<int> packedSint32_ = new pbc::RepeatedField<int>();
7147    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7148    public pbc::RepeatedField<int> PackedSint32 {
7149      get { return packedSint32_; }
7150    }
7151
7152    /// <summary>Field number for the "packed_sint64" field.</summary>
7153    public const int PackedSint64FieldNumber = 95;
7154    private static readonly pb::FieldCodec<long> _repeated_packedSint64_codec
7155        = pb::FieldCodec.ForSInt64(762);
7156    private readonly pbc::RepeatedField<long> packedSint64_ = new pbc::RepeatedField<long>();
7157    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7158    public pbc::RepeatedField<long> PackedSint64 {
7159      get { return packedSint64_; }
7160    }
7161
7162    /// <summary>Field number for the "packed_fixed32" field.</summary>
7163    public const int PackedFixed32FieldNumber = 96;
7164    private static readonly pb::FieldCodec<uint> _repeated_packedFixed32_codec
7165        = pb::FieldCodec.ForFixed32(770);
7166    private readonly pbc::RepeatedField<uint> packedFixed32_ = new pbc::RepeatedField<uint>();
7167    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7168    public pbc::RepeatedField<uint> PackedFixed32 {
7169      get { return packedFixed32_; }
7170    }
7171
7172    /// <summary>Field number for the "packed_fixed64" field.</summary>
7173    public const int PackedFixed64FieldNumber = 97;
7174    private static readonly pb::FieldCodec<ulong> _repeated_packedFixed64_codec
7175        = pb::FieldCodec.ForFixed64(778);
7176    private readonly pbc::RepeatedField<ulong> packedFixed64_ = new pbc::RepeatedField<ulong>();
7177    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7178    public pbc::RepeatedField<ulong> PackedFixed64 {
7179      get { return packedFixed64_; }
7180    }
7181
7182    /// <summary>Field number for the "packed_sfixed32" field.</summary>
7183    public const int PackedSfixed32FieldNumber = 98;
7184    private static readonly pb::FieldCodec<int> _repeated_packedSfixed32_codec
7185        = pb::FieldCodec.ForSFixed32(786);
7186    private readonly pbc::RepeatedField<int> packedSfixed32_ = new pbc::RepeatedField<int>();
7187    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7188    public pbc::RepeatedField<int> PackedSfixed32 {
7189      get { return packedSfixed32_; }
7190    }
7191
7192    /// <summary>Field number for the "packed_sfixed64" field.</summary>
7193    public const int PackedSfixed64FieldNumber = 99;
7194    private static readonly pb::FieldCodec<long> _repeated_packedSfixed64_codec
7195        = pb::FieldCodec.ForSFixed64(794);
7196    private readonly pbc::RepeatedField<long> packedSfixed64_ = new pbc::RepeatedField<long>();
7197    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7198    public pbc::RepeatedField<long> PackedSfixed64 {
7199      get { return packedSfixed64_; }
7200    }
7201
7202    /// <summary>Field number for the "packed_float" field.</summary>
7203    public const int PackedFloatFieldNumber = 100;
7204    private static readonly pb::FieldCodec<float> _repeated_packedFloat_codec
7205        = pb::FieldCodec.ForFloat(802);
7206    private readonly pbc::RepeatedField<float> packedFloat_ = new pbc::RepeatedField<float>();
7207    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7208    public pbc::RepeatedField<float> PackedFloat {
7209      get { return packedFloat_; }
7210    }
7211
7212    /// <summary>Field number for the "packed_double" field.</summary>
7213    public const int PackedDoubleFieldNumber = 101;
7214    private static readonly pb::FieldCodec<double> _repeated_packedDouble_codec
7215        = pb::FieldCodec.ForDouble(810);
7216    private readonly pbc::RepeatedField<double> packedDouble_ = new pbc::RepeatedField<double>();
7217    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7218    public pbc::RepeatedField<double> PackedDouble {
7219      get { return packedDouble_; }
7220    }
7221
7222    /// <summary>Field number for the "packed_bool" field.</summary>
7223    public const int PackedBoolFieldNumber = 102;
7224    private static readonly pb::FieldCodec<bool> _repeated_packedBool_codec
7225        = pb::FieldCodec.ForBool(818);
7226    private readonly pbc::RepeatedField<bool> packedBool_ = new pbc::RepeatedField<bool>();
7227    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7228    public pbc::RepeatedField<bool> PackedBool {
7229      get { return packedBool_; }
7230    }
7231
7232    /// <summary>Field number for the "packed_enum" field.</summary>
7233    public const int PackedEnumFieldNumber = 103;
7234    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_packedEnum_codec
7235        = pb::FieldCodec.ForEnum(826, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
7236    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> packedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
7237    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7238    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> PackedEnum {
7239      get { return packedEnum_; }
7240    }
7241
7242    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7243    public override bool Equals(object other) {
7244      return Equals(other as TestPackedTypes);
7245    }
7246
7247    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7248    public bool Equals(TestPackedTypes other) {
7249      if (ReferenceEquals(other, null)) {
7250        return false;
7251      }
7252      if (ReferenceEquals(other, this)) {
7253        return true;
7254      }
7255      if(!packedInt32_.Equals(other.packedInt32_)) return false;
7256      if(!packedInt64_.Equals(other.packedInt64_)) return false;
7257      if(!packedUint32_.Equals(other.packedUint32_)) return false;
7258      if(!packedUint64_.Equals(other.packedUint64_)) return false;
7259      if(!packedSint32_.Equals(other.packedSint32_)) return false;
7260      if(!packedSint64_.Equals(other.packedSint64_)) return false;
7261      if(!packedFixed32_.Equals(other.packedFixed32_)) return false;
7262      if(!packedFixed64_.Equals(other.packedFixed64_)) return false;
7263      if(!packedSfixed32_.Equals(other.packedSfixed32_)) return false;
7264      if(!packedSfixed64_.Equals(other.packedSfixed64_)) return false;
7265      if(!packedFloat_.Equals(other.packedFloat_)) return false;
7266      if(!packedDouble_.Equals(other.packedDouble_)) return false;
7267      if(!packedBool_.Equals(other.packedBool_)) return false;
7268      if(!packedEnum_.Equals(other.packedEnum_)) return false;
7269      return Equals(_unknownFields, other._unknownFields);
7270    }
7271
7272    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7273    public override int GetHashCode() {
7274      int hash = 1;
7275      hash ^= packedInt32_.GetHashCode();
7276      hash ^= packedInt64_.GetHashCode();
7277      hash ^= packedUint32_.GetHashCode();
7278      hash ^= packedUint64_.GetHashCode();
7279      hash ^= packedSint32_.GetHashCode();
7280      hash ^= packedSint64_.GetHashCode();
7281      hash ^= packedFixed32_.GetHashCode();
7282      hash ^= packedFixed64_.GetHashCode();
7283      hash ^= packedSfixed32_.GetHashCode();
7284      hash ^= packedSfixed64_.GetHashCode();
7285      hash ^= packedFloat_.GetHashCode();
7286      hash ^= packedDouble_.GetHashCode();
7287      hash ^= packedBool_.GetHashCode();
7288      hash ^= packedEnum_.GetHashCode();
7289      if (_unknownFields != null) {
7290        hash ^= _unknownFields.GetHashCode();
7291      }
7292      return hash;
7293    }
7294
7295    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7296    public override string ToString() {
7297      return pb::JsonFormatter.ToDiagnosticString(this);
7298    }
7299
7300    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7301    public void WriteTo(pb::CodedOutputStream output) {
7302    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
7303      output.WriteRawMessage(this);
7304    #else
7305      packedInt32_.WriteTo(output, _repeated_packedInt32_codec);
7306      packedInt64_.WriteTo(output, _repeated_packedInt64_codec);
7307      packedUint32_.WriteTo(output, _repeated_packedUint32_codec);
7308      packedUint64_.WriteTo(output, _repeated_packedUint64_codec);
7309      packedSint32_.WriteTo(output, _repeated_packedSint32_codec);
7310      packedSint64_.WriteTo(output, _repeated_packedSint64_codec);
7311      packedFixed32_.WriteTo(output, _repeated_packedFixed32_codec);
7312      packedFixed64_.WriteTo(output, _repeated_packedFixed64_codec);
7313      packedSfixed32_.WriteTo(output, _repeated_packedSfixed32_codec);
7314      packedSfixed64_.WriteTo(output, _repeated_packedSfixed64_codec);
7315      packedFloat_.WriteTo(output, _repeated_packedFloat_codec);
7316      packedDouble_.WriteTo(output, _repeated_packedDouble_codec);
7317      packedBool_.WriteTo(output, _repeated_packedBool_codec);
7318      packedEnum_.WriteTo(output, _repeated_packedEnum_codec);
7319      if (_unknownFields != null) {
7320        _unknownFields.WriteTo(output);
7321      }
7322    #endif
7323    }
7324
7325    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
7326    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7327    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
7328      packedInt32_.WriteTo(ref output, _repeated_packedInt32_codec);
7329      packedInt64_.WriteTo(ref output, _repeated_packedInt64_codec);
7330      packedUint32_.WriteTo(ref output, _repeated_packedUint32_codec);
7331      packedUint64_.WriteTo(ref output, _repeated_packedUint64_codec);
7332      packedSint32_.WriteTo(ref output, _repeated_packedSint32_codec);
7333      packedSint64_.WriteTo(ref output, _repeated_packedSint64_codec);
7334      packedFixed32_.WriteTo(ref output, _repeated_packedFixed32_codec);
7335      packedFixed64_.WriteTo(ref output, _repeated_packedFixed64_codec);
7336      packedSfixed32_.WriteTo(ref output, _repeated_packedSfixed32_codec);
7337      packedSfixed64_.WriteTo(ref output, _repeated_packedSfixed64_codec);
7338      packedFloat_.WriteTo(ref output, _repeated_packedFloat_codec);
7339      packedDouble_.WriteTo(ref output, _repeated_packedDouble_codec);
7340      packedBool_.WriteTo(ref output, _repeated_packedBool_codec);
7341      packedEnum_.WriteTo(ref output, _repeated_packedEnum_codec);
7342      if (_unknownFields != null) {
7343        _unknownFields.WriteTo(ref output);
7344      }
7345    }
7346    #endif
7347
7348    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7349    public int CalculateSize() {
7350      int size = 0;
7351      size += packedInt32_.CalculateSize(_repeated_packedInt32_codec);
7352      size += packedInt64_.CalculateSize(_repeated_packedInt64_codec);
7353      size += packedUint32_.CalculateSize(_repeated_packedUint32_codec);
7354      size += packedUint64_.CalculateSize(_repeated_packedUint64_codec);
7355      size += packedSint32_.CalculateSize(_repeated_packedSint32_codec);
7356      size += packedSint64_.CalculateSize(_repeated_packedSint64_codec);
7357      size += packedFixed32_.CalculateSize(_repeated_packedFixed32_codec);
7358      size += packedFixed64_.CalculateSize(_repeated_packedFixed64_codec);
7359      size += packedSfixed32_.CalculateSize(_repeated_packedSfixed32_codec);
7360      size += packedSfixed64_.CalculateSize(_repeated_packedSfixed64_codec);
7361      size += packedFloat_.CalculateSize(_repeated_packedFloat_codec);
7362      size += packedDouble_.CalculateSize(_repeated_packedDouble_codec);
7363      size += packedBool_.CalculateSize(_repeated_packedBool_codec);
7364      size += packedEnum_.CalculateSize(_repeated_packedEnum_codec);
7365      if (_unknownFields != null) {
7366        size += _unknownFields.CalculateSize();
7367      }
7368      return size;
7369    }
7370
7371    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7372    public void MergeFrom(TestPackedTypes other) {
7373      if (other == null) {
7374        return;
7375      }
7376      packedInt32_.Add(other.packedInt32_);
7377      packedInt64_.Add(other.packedInt64_);
7378      packedUint32_.Add(other.packedUint32_);
7379      packedUint64_.Add(other.packedUint64_);
7380      packedSint32_.Add(other.packedSint32_);
7381      packedSint64_.Add(other.packedSint64_);
7382      packedFixed32_.Add(other.packedFixed32_);
7383      packedFixed64_.Add(other.packedFixed64_);
7384      packedSfixed32_.Add(other.packedSfixed32_);
7385      packedSfixed64_.Add(other.packedSfixed64_);
7386      packedFloat_.Add(other.packedFloat_);
7387      packedDouble_.Add(other.packedDouble_);
7388      packedBool_.Add(other.packedBool_);
7389      packedEnum_.Add(other.packedEnum_);
7390      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
7391    }
7392
7393    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7394    public void MergeFrom(pb::CodedInputStream input) {
7395    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
7396      input.ReadRawMessage(this);
7397    #else
7398      uint tag;
7399      while ((tag = input.ReadTag()) != 0) {
7400        switch(tag) {
7401          default:
7402            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
7403            break;
7404          case 722:
7405          case 720: {
7406            packedInt32_.AddEntriesFrom(input, _repeated_packedInt32_codec);
7407            break;
7408          }
7409          case 730:
7410          case 728: {
7411            packedInt64_.AddEntriesFrom(input, _repeated_packedInt64_codec);
7412            break;
7413          }
7414          case 738:
7415          case 736: {
7416            packedUint32_.AddEntriesFrom(input, _repeated_packedUint32_codec);
7417            break;
7418          }
7419          case 746:
7420          case 744: {
7421            packedUint64_.AddEntriesFrom(input, _repeated_packedUint64_codec);
7422            break;
7423          }
7424          case 754:
7425          case 752: {
7426            packedSint32_.AddEntriesFrom(input, _repeated_packedSint32_codec);
7427            break;
7428          }
7429          case 762:
7430          case 760: {
7431            packedSint64_.AddEntriesFrom(input, _repeated_packedSint64_codec);
7432            break;
7433          }
7434          case 770:
7435          case 773: {
7436            packedFixed32_.AddEntriesFrom(input, _repeated_packedFixed32_codec);
7437            break;
7438          }
7439          case 778:
7440          case 777: {
7441            packedFixed64_.AddEntriesFrom(input, _repeated_packedFixed64_codec);
7442            break;
7443          }
7444          case 786:
7445          case 789: {
7446            packedSfixed32_.AddEntriesFrom(input, _repeated_packedSfixed32_codec);
7447            break;
7448          }
7449          case 794:
7450          case 793: {
7451            packedSfixed64_.AddEntriesFrom(input, _repeated_packedSfixed64_codec);
7452            break;
7453          }
7454          case 802:
7455          case 805: {
7456            packedFloat_.AddEntriesFrom(input, _repeated_packedFloat_codec);
7457            break;
7458          }
7459          case 810:
7460          case 809: {
7461            packedDouble_.AddEntriesFrom(input, _repeated_packedDouble_codec);
7462            break;
7463          }
7464          case 818:
7465          case 816: {
7466            packedBool_.AddEntriesFrom(input, _repeated_packedBool_codec);
7467            break;
7468          }
7469          case 826:
7470          case 824: {
7471            packedEnum_.AddEntriesFrom(input, _repeated_packedEnum_codec);
7472            break;
7473          }
7474        }
7475      }
7476    #endif
7477    }
7478
7479    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
7480    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7481    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
7482      uint tag;
7483      while ((tag = input.ReadTag()) != 0) {
7484        switch(tag) {
7485          default:
7486            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
7487            break;
7488          case 722:
7489          case 720: {
7490            packedInt32_.AddEntriesFrom(ref input, _repeated_packedInt32_codec);
7491            break;
7492          }
7493          case 730:
7494          case 728: {
7495            packedInt64_.AddEntriesFrom(ref input, _repeated_packedInt64_codec);
7496            break;
7497          }
7498          case 738:
7499          case 736: {
7500            packedUint32_.AddEntriesFrom(ref input, _repeated_packedUint32_codec);
7501            break;
7502          }
7503          case 746:
7504          case 744: {
7505            packedUint64_.AddEntriesFrom(ref input, _repeated_packedUint64_codec);
7506            break;
7507          }
7508          case 754:
7509          case 752: {
7510            packedSint32_.AddEntriesFrom(ref input, _repeated_packedSint32_codec);
7511            break;
7512          }
7513          case 762:
7514          case 760: {
7515            packedSint64_.AddEntriesFrom(ref input, _repeated_packedSint64_codec);
7516            break;
7517          }
7518          case 770:
7519          case 773: {
7520            packedFixed32_.AddEntriesFrom(ref input, _repeated_packedFixed32_codec);
7521            break;
7522          }
7523          case 778:
7524          case 777: {
7525            packedFixed64_.AddEntriesFrom(ref input, _repeated_packedFixed64_codec);
7526            break;
7527          }
7528          case 786:
7529          case 789: {
7530            packedSfixed32_.AddEntriesFrom(ref input, _repeated_packedSfixed32_codec);
7531            break;
7532          }
7533          case 794:
7534          case 793: {
7535            packedSfixed64_.AddEntriesFrom(ref input, _repeated_packedSfixed64_codec);
7536            break;
7537          }
7538          case 802:
7539          case 805: {
7540            packedFloat_.AddEntriesFrom(ref input, _repeated_packedFloat_codec);
7541            break;
7542          }
7543          case 810:
7544          case 809: {
7545            packedDouble_.AddEntriesFrom(ref input, _repeated_packedDouble_codec);
7546            break;
7547          }
7548          case 818:
7549          case 816: {
7550            packedBool_.AddEntriesFrom(ref input, _repeated_packedBool_codec);
7551            break;
7552          }
7553          case 826:
7554          case 824: {
7555            packedEnum_.AddEntriesFrom(ref input, _repeated_packedEnum_codec);
7556            break;
7557          }
7558        }
7559      }
7560    }
7561    #endif
7562
7563  }
7564
7565  /// <summary>
7566  /// A message with the same fields as TestPackedTypes, but without packing. Used
7567  /// to test packed &lt;-> unpacked wire compatibility.
7568  /// </summary>
7569  public sealed partial class TestUnpackedTypes : pb::IMessage<TestUnpackedTypes>
7570  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
7571      , pb::IBufferMessage
7572  #endif
7573  {
7574    private static readonly pb::MessageParser<TestUnpackedTypes> _parser = new pb::MessageParser<TestUnpackedTypes>(() => new TestUnpackedTypes());
7575    private pb::UnknownFieldSet _unknownFields;
7576    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7577    public static pb::MessageParser<TestUnpackedTypes> Parser { get { return _parser; } }
7578
7579    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7580    public static pbr::MessageDescriptor Descriptor {
7581      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[25]; }
7582    }
7583
7584    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7585    pbr::MessageDescriptor pb::IMessage.Descriptor {
7586      get { return Descriptor; }
7587    }
7588
7589    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7590    public TestUnpackedTypes() {
7591      OnConstruction();
7592    }
7593
7594    partial void OnConstruction();
7595
7596    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7597    public TestUnpackedTypes(TestUnpackedTypes other) : this() {
7598      unpackedInt32_ = other.unpackedInt32_.Clone();
7599      unpackedInt64_ = other.unpackedInt64_.Clone();
7600      unpackedUint32_ = other.unpackedUint32_.Clone();
7601      unpackedUint64_ = other.unpackedUint64_.Clone();
7602      unpackedSint32_ = other.unpackedSint32_.Clone();
7603      unpackedSint64_ = other.unpackedSint64_.Clone();
7604      unpackedFixed32_ = other.unpackedFixed32_.Clone();
7605      unpackedFixed64_ = other.unpackedFixed64_.Clone();
7606      unpackedSfixed32_ = other.unpackedSfixed32_.Clone();
7607      unpackedSfixed64_ = other.unpackedSfixed64_.Clone();
7608      unpackedFloat_ = other.unpackedFloat_.Clone();
7609      unpackedDouble_ = other.unpackedDouble_.Clone();
7610      unpackedBool_ = other.unpackedBool_.Clone();
7611      unpackedEnum_ = other.unpackedEnum_.Clone();
7612      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
7613    }
7614
7615    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7616    public TestUnpackedTypes Clone() {
7617      return new TestUnpackedTypes(this);
7618    }
7619
7620    /// <summary>Field number for the "unpacked_int32" field.</summary>
7621    public const int UnpackedInt32FieldNumber = 90;
7622    private static readonly pb::FieldCodec<int> _repeated_unpackedInt32_codec
7623        = pb::FieldCodec.ForInt32(720);
7624    private readonly pbc::RepeatedField<int> unpackedInt32_ = new pbc::RepeatedField<int>();
7625    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7626    public pbc::RepeatedField<int> UnpackedInt32 {
7627      get { return unpackedInt32_; }
7628    }
7629
7630    /// <summary>Field number for the "unpacked_int64" field.</summary>
7631    public const int UnpackedInt64FieldNumber = 91;
7632    private static readonly pb::FieldCodec<long> _repeated_unpackedInt64_codec
7633        = pb::FieldCodec.ForInt64(728);
7634    private readonly pbc::RepeatedField<long> unpackedInt64_ = new pbc::RepeatedField<long>();
7635    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7636    public pbc::RepeatedField<long> UnpackedInt64 {
7637      get { return unpackedInt64_; }
7638    }
7639
7640    /// <summary>Field number for the "unpacked_uint32" field.</summary>
7641    public const int UnpackedUint32FieldNumber = 92;
7642    private static readonly pb::FieldCodec<uint> _repeated_unpackedUint32_codec
7643        = pb::FieldCodec.ForUInt32(736);
7644    private readonly pbc::RepeatedField<uint> unpackedUint32_ = new pbc::RepeatedField<uint>();
7645    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7646    public pbc::RepeatedField<uint> UnpackedUint32 {
7647      get { return unpackedUint32_; }
7648    }
7649
7650    /// <summary>Field number for the "unpacked_uint64" field.</summary>
7651    public const int UnpackedUint64FieldNumber = 93;
7652    private static readonly pb::FieldCodec<ulong> _repeated_unpackedUint64_codec
7653        = pb::FieldCodec.ForUInt64(744);
7654    private readonly pbc::RepeatedField<ulong> unpackedUint64_ = new pbc::RepeatedField<ulong>();
7655    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7656    public pbc::RepeatedField<ulong> UnpackedUint64 {
7657      get { return unpackedUint64_; }
7658    }
7659
7660    /// <summary>Field number for the "unpacked_sint32" field.</summary>
7661    public const int UnpackedSint32FieldNumber = 94;
7662    private static readonly pb::FieldCodec<int> _repeated_unpackedSint32_codec
7663        = pb::FieldCodec.ForSInt32(752);
7664    private readonly pbc::RepeatedField<int> unpackedSint32_ = new pbc::RepeatedField<int>();
7665    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7666    public pbc::RepeatedField<int> UnpackedSint32 {
7667      get { return unpackedSint32_; }
7668    }
7669
7670    /// <summary>Field number for the "unpacked_sint64" field.</summary>
7671    public const int UnpackedSint64FieldNumber = 95;
7672    private static readonly pb::FieldCodec<long> _repeated_unpackedSint64_codec
7673        = pb::FieldCodec.ForSInt64(760);
7674    private readonly pbc::RepeatedField<long> unpackedSint64_ = new pbc::RepeatedField<long>();
7675    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7676    public pbc::RepeatedField<long> UnpackedSint64 {
7677      get { return unpackedSint64_; }
7678    }
7679
7680    /// <summary>Field number for the "unpacked_fixed32" field.</summary>
7681    public const int UnpackedFixed32FieldNumber = 96;
7682    private static readonly pb::FieldCodec<uint> _repeated_unpackedFixed32_codec
7683        = pb::FieldCodec.ForFixed32(773);
7684    private readonly pbc::RepeatedField<uint> unpackedFixed32_ = new pbc::RepeatedField<uint>();
7685    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7686    public pbc::RepeatedField<uint> UnpackedFixed32 {
7687      get { return unpackedFixed32_; }
7688    }
7689
7690    /// <summary>Field number for the "unpacked_fixed64" field.</summary>
7691    public const int UnpackedFixed64FieldNumber = 97;
7692    private static readonly pb::FieldCodec<ulong> _repeated_unpackedFixed64_codec
7693        = pb::FieldCodec.ForFixed64(777);
7694    private readonly pbc::RepeatedField<ulong> unpackedFixed64_ = new pbc::RepeatedField<ulong>();
7695    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7696    public pbc::RepeatedField<ulong> UnpackedFixed64 {
7697      get { return unpackedFixed64_; }
7698    }
7699
7700    /// <summary>Field number for the "unpacked_sfixed32" field.</summary>
7701    public const int UnpackedSfixed32FieldNumber = 98;
7702    private static readonly pb::FieldCodec<int> _repeated_unpackedSfixed32_codec
7703        = pb::FieldCodec.ForSFixed32(789);
7704    private readonly pbc::RepeatedField<int> unpackedSfixed32_ = new pbc::RepeatedField<int>();
7705    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7706    public pbc::RepeatedField<int> UnpackedSfixed32 {
7707      get { return unpackedSfixed32_; }
7708    }
7709
7710    /// <summary>Field number for the "unpacked_sfixed64" field.</summary>
7711    public const int UnpackedSfixed64FieldNumber = 99;
7712    private static readonly pb::FieldCodec<long> _repeated_unpackedSfixed64_codec
7713        = pb::FieldCodec.ForSFixed64(793);
7714    private readonly pbc::RepeatedField<long> unpackedSfixed64_ = new pbc::RepeatedField<long>();
7715    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7716    public pbc::RepeatedField<long> UnpackedSfixed64 {
7717      get { return unpackedSfixed64_; }
7718    }
7719
7720    /// <summary>Field number for the "unpacked_float" field.</summary>
7721    public const int UnpackedFloatFieldNumber = 100;
7722    private static readonly pb::FieldCodec<float> _repeated_unpackedFloat_codec
7723        = pb::FieldCodec.ForFloat(805);
7724    private readonly pbc::RepeatedField<float> unpackedFloat_ = new pbc::RepeatedField<float>();
7725    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7726    public pbc::RepeatedField<float> UnpackedFloat {
7727      get { return unpackedFloat_; }
7728    }
7729
7730    /// <summary>Field number for the "unpacked_double" field.</summary>
7731    public const int UnpackedDoubleFieldNumber = 101;
7732    private static readonly pb::FieldCodec<double> _repeated_unpackedDouble_codec
7733        = pb::FieldCodec.ForDouble(809);
7734    private readonly pbc::RepeatedField<double> unpackedDouble_ = new pbc::RepeatedField<double>();
7735    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7736    public pbc::RepeatedField<double> UnpackedDouble {
7737      get { return unpackedDouble_; }
7738    }
7739
7740    /// <summary>Field number for the "unpacked_bool" field.</summary>
7741    public const int UnpackedBoolFieldNumber = 102;
7742    private static readonly pb::FieldCodec<bool> _repeated_unpackedBool_codec
7743        = pb::FieldCodec.ForBool(816);
7744    private readonly pbc::RepeatedField<bool> unpackedBool_ = new pbc::RepeatedField<bool>();
7745    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7746    public pbc::RepeatedField<bool> UnpackedBool {
7747      get { return unpackedBool_; }
7748    }
7749
7750    /// <summary>Field number for the "unpacked_enum" field.</summary>
7751    public const int UnpackedEnumFieldNumber = 103;
7752    private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_unpackedEnum_codec
7753        = pb::FieldCodec.ForEnum(824, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
7754    private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> unpackedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
7755    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7756    public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> UnpackedEnum {
7757      get { return unpackedEnum_; }
7758    }
7759
7760    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7761    public override bool Equals(object other) {
7762      return Equals(other as TestUnpackedTypes);
7763    }
7764
7765    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7766    public bool Equals(TestUnpackedTypes other) {
7767      if (ReferenceEquals(other, null)) {
7768        return false;
7769      }
7770      if (ReferenceEquals(other, this)) {
7771        return true;
7772      }
7773      if(!unpackedInt32_.Equals(other.unpackedInt32_)) return false;
7774      if(!unpackedInt64_.Equals(other.unpackedInt64_)) return false;
7775      if(!unpackedUint32_.Equals(other.unpackedUint32_)) return false;
7776      if(!unpackedUint64_.Equals(other.unpackedUint64_)) return false;
7777      if(!unpackedSint32_.Equals(other.unpackedSint32_)) return false;
7778      if(!unpackedSint64_.Equals(other.unpackedSint64_)) return false;
7779      if(!unpackedFixed32_.Equals(other.unpackedFixed32_)) return false;
7780      if(!unpackedFixed64_.Equals(other.unpackedFixed64_)) return false;
7781      if(!unpackedSfixed32_.Equals(other.unpackedSfixed32_)) return false;
7782      if(!unpackedSfixed64_.Equals(other.unpackedSfixed64_)) return false;
7783      if(!unpackedFloat_.Equals(other.unpackedFloat_)) return false;
7784      if(!unpackedDouble_.Equals(other.unpackedDouble_)) return false;
7785      if(!unpackedBool_.Equals(other.unpackedBool_)) return false;
7786      if(!unpackedEnum_.Equals(other.unpackedEnum_)) return false;
7787      return Equals(_unknownFields, other._unknownFields);
7788    }
7789
7790    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7791    public override int GetHashCode() {
7792      int hash = 1;
7793      hash ^= unpackedInt32_.GetHashCode();
7794      hash ^= unpackedInt64_.GetHashCode();
7795      hash ^= unpackedUint32_.GetHashCode();
7796      hash ^= unpackedUint64_.GetHashCode();
7797      hash ^= unpackedSint32_.GetHashCode();
7798      hash ^= unpackedSint64_.GetHashCode();
7799      hash ^= unpackedFixed32_.GetHashCode();
7800      hash ^= unpackedFixed64_.GetHashCode();
7801      hash ^= unpackedSfixed32_.GetHashCode();
7802      hash ^= unpackedSfixed64_.GetHashCode();
7803      hash ^= unpackedFloat_.GetHashCode();
7804      hash ^= unpackedDouble_.GetHashCode();
7805      hash ^= unpackedBool_.GetHashCode();
7806      hash ^= unpackedEnum_.GetHashCode();
7807      if (_unknownFields != null) {
7808        hash ^= _unknownFields.GetHashCode();
7809      }
7810      return hash;
7811    }
7812
7813    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7814    public override string ToString() {
7815      return pb::JsonFormatter.ToDiagnosticString(this);
7816    }
7817
7818    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7819    public void WriteTo(pb::CodedOutputStream output) {
7820    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
7821      output.WriteRawMessage(this);
7822    #else
7823      unpackedInt32_.WriteTo(output, _repeated_unpackedInt32_codec);
7824      unpackedInt64_.WriteTo(output, _repeated_unpackedInt64_codec);
7825      unpackedUint32_.WriteTo(output, _repeated_unpackedUint32_codec);
7826      unpackedUint64_.WriteTo(output, _repeated_unpackedUint64_codec);
7827      unpackedSint32_.WriteTo(output, _repeated_unpackedSint32_codec);
7828      unpackedSint64_.WriteTo(output, _repeated_unpackedSint64_codec);
7829      unpackedFixed32_.WriteTo(output, _repeated_unpackedFixed32_codec);
7830      unpackedFixed64_.WriteTo(output, _repeated_unpackedFixed64_codec);
7831      unpackedSfixed32_.WriteTo(output, _repeated_unpackedSfixed32_codec);
7832      unpackedSfixed64_.WriteTo(output, _repeated_unpackedSfixed64_codec);
7833      unpackedFloat_.WriteTo(output, _repeated_unpackedFloat_codec);
7834      unpackedDouble_.WriteTo(output, _repeated_unpackedDouble_codec);
7835      unpackedBool_.WriteTo(output, _repeated_unpackedBool_codec);
7836      unpackedEnum_.WriteTo(output, _repeated_unpackedEnum_codec);
7837      if (_unknownFields != null) {
7838        _unknownFields.WriteTo(output);
7839      }
7840    #endif
7841    }
7842
7843    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
7844    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7845    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
7846      unpackedInt32_.WriteTo(ref output, _repeated_unpackedInt32_codec);
7847      unpackedInt64_.WriteTo(ref output, _repeated_unpackedInt64_codec);
7848      unpackedUint32_.WriteTo(ref output, _repeated_unpackedUint32_codec);
7849      unpackedUint64_.WriteTo(ref output, _repeated_unpackedUint64_codec);
7850      unpackedSint32_.WriteTo(ref output, _repeated_unpackedSint32_codec);
7851      unpackedSint64_.WriteTo(ref output, _repeated_unpackedSint64_codec);
7852      unpackedFixed32_.WriteTo(ref output, _repeated_unpackedFixed32_codec);
7853      unpackedFixed64_.WriteTo(ref output, _repeated_unpackedFixed64_codec);
7854      unpackedSfixed32_.WriteTo(ref output, _repeated_unpackedSfixed32_codec);
7855      unpackedSfixed64_.WriteTo(ref output, _repeated_unpackedSfixed64_codec);
7856      unpackedFloat_.WriteTo(ref output, _repeated_unpackedFloat_codec);
7857      unpackedDouble_.WriteTo(ref output, _repeated_unpackedDouble_codec);
7858      unpackedBool_.WriteTo(ref output, _repeated_unpackedBool_codec);
7859      unpackedEnum_.WriteTo(ref output, _repeated_unpackedEnum_codec);
7860      if (_unknownFields != null) {
7861        _unknownFields.WriteTo(ref output);
7862      }
7863    }
7864    #endif
7865
7866    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7867    public int CalculateSize() {
7868      int size = 0;
7869      size += unpackedInt32_.CalculateSize(_repeated_unpackedInt32_codec);
7870      size += unpackedInt64_.CalculateSize(_repeated_unpackedInt64_codec);
7871      size += unpackedUint32_.CalculateSize(_repeated_unpackedUint32_codec);
7872      size += unpackedUint64_.CalculateSize(_repeated_unpackedUint64_codec);
7873      size += unpackedSint32_.CalculateSize(_repeated_unpackedSint32_codec);
7874      size += unpackedSint64_.CalculateSize(_repeated_unpackedSint64_codec);
7875      size += unpackedFixed32_.CalculateSize(_repeated_unpackedFixed32_codec);
7876      size += unpackedFixed64_.CalculateSize(_repeated_unpackedFixed64_codec);
7877      size += unpackedSfixed32_.CalculateSize(_repeated_unpackedSfixed32_codec);
7878      size += unpackedSfixed64_.CalculateSize(_repeated_unpackedSfixed64_codec);
7879      size += unpackedFloat_.CalculateSize(_repeated_unpackedFloat_codec);
7880      size += unpackedDouble_.CalculateSize(_repeated_unpackedDouble_codec);
7881      size += unpackedBool_.CalculateSize(_repeated_unpackedBool_codec);
7882      size += unpackedEnum_.CalculateSize(_repeated_unpackedEnum_codec);
7883      if (_unknownFields != null) {
7884        size += _unknownFields.CalculateSize();
7885      }
7886      return size;
7887    }
7888
7889    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7890    public void MergeFrom(TestUnpackedTypes other) {
7891      if (other == null) {
7892        return;
7893      }
7894      unpackedInt32_.Add(other.unpackedInt32_);
7895      unpackedInt64_.Add(other.unpackedInt64_);
7896      unpackedUint32_.Add(other.unpackedUint32_);
7897      unpackedUint64_.Add(other.unpackedUint64_);
7898      unpackedSint32_.Add(other.unpackedSint32_);
7899      unpackedSint64_.Add(other.unpackedSint64_);
7900      unpackedFixed32_.Add(other.unpackedFixed32_);
7901      unpackedFixed64_.Add(other.unpackedFixed64_);
7902      unpackedSfixed32_.Add(other.unpackedSfixed32_);
7903      unpackedSfixed64_.Add(other.unpackedSfixed64_);
7904      unpackedFloat_.Add(other.unpackedFloat_);
7905      unpackedDouble_.Add(other.unpackedDouble_);
7906      unpackedBool_.Add(other.unpackedBool_);
7907      unpackedEnum_.Add(other.unpackedEnum_);
7908      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
7909    }
7910
7911    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7912    public void MergeFrom(pb::CodedInputStream input) {
7913    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
7914      input.ReadRawMessage(this);
7915    #else
7916      uint tag;
7917      while ((tag = input.ReadTag()) != 0) {
7918        switch(tag) {
7919          default:
7920            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
7921            break;
7922          case 722:
7923          case 720: {
7924            unpackedInt32_.AddEntriesFrom(input, _repeated_unpackedInt32_codec);
7925            break;
7926          }
7927          case 730:
7928          case 728: {
7929            unpackedInt64_.AddEntriesFrom(input, _repeated_unpackedInt64_codec);
7930            break;
7931          }
7932          case 738:
7933          case 736: {
7934            unpackedUint32_.AddEntriesFrom(input, _repeated_unpackedUint32_codec);
7935            break;
7936          }
7937          case 746:
7938          case 744: {
7939            unpackedUint64_.AddEntriesFrom(input, _repeated_unpackedUint64_codec);
7940            break;
7941          }
7942          case 754:
7943          case 752: {
7944            unpackedSint32_.AddEntriesFrom(input, _repeated_unpackedSint32_codec);
7945            break;
7946          }
7947          case 762:
7948          case 760: {
7949            unpackedSint64_.AddEntriesFrom(input, _repeated_unpackedSint64_codec);
7950            break;
7951          }
7952          case 770:
7953          case 773: {
7954            unpackedFixed32_.AddEntriesFrom(input, _repeated_unpackedFixed32_codec);
7955            break;
7956          }
7957          case 778:
7958          case 777: {
7959            unpackedFixed64_.AddEntriesFrom(input, _repeated_unpackedFixed64_codec);
7960            break;
7961          }
7962          case 786:
7963          case 789: {
7964            unpackedSfixed32_.AddEntriesFrom(input, _repeated_unpackedSfixed32_codec);
7965            break;
7966          }
7967          case 794:
7968          case 793: {
7969            unpackedSfixed64_.AddEntriesFrom(input, _repeated_unpackedSfixed64_codec);
7970            break;
7971          }
7972          case 802:
7973          case 805: {
7974            unpackedFloat_.AddEntriesFrom(input, _repeated_unpackedFloat_codec);
7975            break;
7976          }
7977          case 810:
7978          case 809: {
7979            unpackedDouble_.AddEntriesFrom(input, _repeated_unpackedDouble_codec);
7980            break;
7981          }
7982          case 818:
7983          case 816: {
7984            unpackedBool_.AddEntriesFrom(input, _repeated_unpackedBool_codec);
7985            break;
7986          }
7987          case 826:
7988          case 824: {
7989            unpackedEnum_.AddEntriesFrom(input, _repeated_unpackedEnum_codec);
7990            break;
7991          }
7992        }
7993      }
7994    #endif
7995    }
7996
7997    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
7998    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
7999    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
8000      uint tag;
8001      while ((tag = input.ReadTag()) != 0) {
8002        switch(tag) {
8003          default:
8004            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
8005            break;
8006          case 722:
8007          case 720: {
8008            unpackedInt32_.AddEntriesFrom(ref input, _repeated_unpackedInt32_codec);
8009            break;
8010          }
8011          case 730:
8012          case 728: {
8013            unpackedInt64_.AddEntriesFrom(ref input, _repeated_unpackedInt64_codec);
8014            break;
8015          }
8016          case 738:
8017          case 736: {
8018            unpackedUint32_.AddEntriesFrom(ref input, _repeated_unpackedUint32_codec);
8019            break;
8020          }
8021          case 746:
8022          case 744: {
8023            unpackedUint64_.AddEntriesFrom(ref input, _repeated_unpackedUint64_codec);
8024            break;
8025          }
8026          case 754:
8027          case 752: {
8028            unpackedSint32_.AddEntriesFrom(ref input, _repeated_unpackedSint32_codec);
8029            break;
8030          }
8031          case 762:
8032          case 760: {
8033            unpackedSint64_.AddEntriesFrom(ref input, _repeated_unpackedSint64_codec);
8034            break;
8035          }
8036          case 770:
8037          case 773: {
8038            unpackedFixed32_.AddEntriesFrom(ref input, _repeated_unpackedFixed32_codec);
8039            break;
8040          }
8041          case 778:
8042          case 777: {
8043            unpackedFixed64_.AddEntriesFrom(ref input, _repeated_unpackedFixed64_codec);
8044            break;
8045          }
8046          case 786:
8047          case 789: {
8048            unpackedSfixed32_.AddEntriesFrom(ref input, _repeated_unpackedSfixed32_codec);
8049            break;
8050          }
8051          case 794:
8052          case 793: {
8053            unpackedSfixed64_.AddEntriesFrom(ref input, _repeated_unpackedSfixed64_codec);
8054            break;
8055          }
8056          case 802:
8057          case 805: {
8058            unpackedFloat_.AddEntriesFrom(ref input, _repeated_unpackedFloat_codec);
8059            break;
8060          }
8061          case 810:
8062          case 809: {
8063            unpackedDouble_.AddEntriesFrom(ref input, _repeated_unpackedDouble_codec);
8064            break;
8065          }
8066          case 818:
8067          case 816: {
8068            unpackedBool_.AddEntriesFrom(ref input, _repeated_unpackedBool_codec);
8069            break;
8070          }
8071          case 826:
8072          case 824: {
8073            unpackedEnum_.AddEntriesFrom(ref input, _repeated_unpackedEnum_codec);
8074            break;
8075          }
8076        }
8077      }
8078    }
8079    #endif
8080
8081  }
8082
8083  public sealed partial class TestRepeatedScalarDifferentTagSizes : pb::IMessage<TestRepeatedScalarDifferentTagSizes>
8084  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8085      , pb::IBufferMessage
8086  #endif
8087  {
8088    private static readonly pb::MessageParser<TestRepeatedScalarDifferentTagSizes> _parser = new pb::MessageParser<TestRepeatedScalarDifferentTagSizes>(() => new TestRepeatedScalarDifferentTagSizes());
8089    private pb::UnknownFieldSet _unknownFields;
8090    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8091    public static pb::MessageParser<TestRepeatedScalarDifferentTagSizes> Parser { get { return _parser; } }
8092
8093    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8094    public static pbr::MessageDescriptor Descriptor {
8095      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[26]; }
8096    }
8097
8098    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8099    pbr::MessageDescriptor pb::IMessage.Descriptor {
8100      get { return Descriptor; }
8101    }
8102
8103    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8104    public TestRepeatedScalarDifferentTagSizes() {
8105      OnConstruction();
8106    }
8107
8108    partial void OnConstruction();
8109
8110    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8111    public TestRepeatedScalarDifferentTagSizes(TestRepeatedScalarDifferentTagSizes other) : this() {
8112      repeatedFixed32_ = other.repeatedFixed32_.Clone();
8113      repeatedInt32_ = other.repeatedInt32_.Clone();
8114      repeatedFixed64_ = other.repeatedFixed64_.Clone();
8115      repeatedInt64_ = other.repeatedInt64_.Clone();
8116      repeatedFloat_ = other.repeatedFloat_.Clone();
8117      repeatedUint64_ = other.repeatedUint64_.Clone();
8118      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
8119    }
8120
8121    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8122    public TestRepeatedScalarDifferentTagSizes Clone() {
8123      return new TestRepeatedScalarDifferentTagSizes(this);
8124    }
8125
8126    /// <summary>Field number for the "repeated_fixed32" field.</summary>
8127    public const int RepeatedFixed32FieldNumber = 12;
8128    private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec
8129        = pb::FieldCodec.ForFixed32(98);
8130    private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
8131    /// <summary>
8132    /// Parsing repeated fixed size values used to fail. This message needs to be
8133    /// used in order to get a tag of the right size; all of the repeated fields
8134    /// in TestAllTypes didn't trigger the check.
8135    /// </summary>
8136    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8137    public pbc::RepeatedField<uint> RepeatedFixed32 {
8138      get { return repeatedFixed32_; }
8139    }
8140
8141    /// <summary>Field number for the "repeated_int32" field.</summary>
8142    public const int RepeatedInt32FieldNumber = 13;
8143    private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
8144        = pb::FieldCodec.ForInt32(106);
8145    private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
8146    /// <summary>
8147    /// Check for a varint type, just for good measure.
8148    /// </summary>
8149    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8150    public pbc::RepeatedField<int> RepeatedInt32 {
8151      get { return repeatedInt32_; }
8152    }
8153
8154    /// <summary>Field number for the "repeated_fixed64" field.</summary>
8155    public const int RepeatedFixed64FieldNumber = 2046;
8156    private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec
8157        = pb::FieldCodec.ForFixed64(16370);
8158    private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
8159    /// <summary>
8160    /// These have two-byte tags.
8161    /// </summary>
8162    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8163    public pbc::RepeatedField<ulong> RepeatedFixed64 {
8164      get { return repeatedFixed64_; }
8165    }
8166
8167    /// <summary>Field number for the "repeated_int64" field.</summary>
8168    public const int RepeatedInt64FieldNumber = 2047;
8169    private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
8170        = pb::FieldCodec.ForInt64(16378);
8171    private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>();
8172    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8173    public pbc::RepeatedField<long> RepeatedInt64 {
8174      get { return repeatedInt64_; }
8175    }
8176
8177    /// <summary>Field number for the "repeated_float" field.</summary>
8178    public const int RepeatedFloatFieldNumber = 262142;
8179    private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec
8180        = pb::FieldCodec.ForFloat(2097138);
8181    private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
8182    /// <summary>
8183    /// Three byte tags.
8184    /// </summary>
8185    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8186    public pbc::RepeatedField<float> RepeatedFloat {
8187      get { return repeatedFloat_; }
8188    }
8189
8190    /// <summary>Field number for the "repeated_uint64" field.</summary>
8191    public const int RepeatedUint64FieldNumber = 262143;
8192    private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
8193        = pb::FieldCodec.ForUInt64(2097146);
8194    private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>();
8195    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8196    public pbc::RepeatedField<ulong> RepeatedUint64 {
8197      get { return repeatedUint64_; }
8198    }
8199
8200    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8201    public override bool Equals(object other) {
8202      return Equals(other as TestRepeatedScalarDifferentTagSizes);
8203    }
8204
8205    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8206    public bool Equals(TestRepeatedScalarDifferentTagSizes other) {
8207      if (ReferenceEquals(other, null)) {
8208        return false;
8209      }
8210      if (ReferenceEquals(other, this)) {
8211        return true;
8212      }
8213      if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
8214      if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
8215      if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
8216      if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
8217      if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
8218      if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
8219      return Equals(_unknownFields, other._unknownFields);
8220    }
8221
8222    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8223    public override int GetHashCode() {
8224      int hash = 1;
8225      hash ^= repeatedFixed32_.GetHashCode();
8226      hash ^= repeatedInt32_.GetHashCode();
8227      hash ^= repeatedFixed64_.GetHashCode();
8228      hash ^= repeatedInt64_.GetHashCode();
8229      hash ^= repeatedFloat_.GetHashCode();
8230      hash ^= repeatedUint64_.GetHashCode();
8231      if (_unknownFields != null) {
8232        hash ^= _unknownFields.GetHashCode();
8233      }
8234      return hash;
8235    }
8236
8237    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8238    public override string ToString() {
8239      return pb::JsonFormatter.ToDiagnosticString(this);
8240    }
8241
8242    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8243    public void WriteTo(pb::CodedOutputStream output) {
8244    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8245      output.WriteRawMessage(this);
8246    #else
8247      repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
8248      repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
8249      repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
8250      repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
8251      repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
8252      repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
8253      if (_unknownFields != null) {
8254        _unknownFields.WriteTo(output);
8255      }
8256    #endif
8257    }
8258
8259    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8260    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8261    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
8262      repeatedFixed32_.WriteTo(ref output, _repeated_repeatedFixed32_codec);
8263      repeatedInt32_.WriteTo(ref output, _repeated_repeatedInt32_codec);
8264      repeatedFixed64_.WriteTo(ref output, _repeated_repeatedFixed64_codec);
8265      repeatedInt64_.WriteTo(ref output, _repeated_repeatedInt64_codec);
8266      repeatedFloat_.WriteTo(ref output, _repeated_repeatedFloat_codec);
8267      repeatedUint64_.WriteTo(ref output, _repeated_repeatedUint64_codec);
8268      if (_unknownFields != null) {
8269        _unknownFields.WriteTo(ref output);
8270      }
8271    }
8272    #endif
8273
8274    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8275    public int CalculateSize() {
8276      int size = 0;
8277      size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
8278      size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
8279      size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
8280      size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
8281      size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
8282      size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
8283      if (_unknownFields != null) {
8284        size += _unknownFields.CalculateSize();
8285      }
8286      return size;
8287    }
8288
8289    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8290    public void MergeFrom(TestRepeatedScalarDifferentTagSizes other) {
8291      if (other == null) {
8292        return;
8293      }
8294      repeatedFixed32_.Add(other.repeatedFixed32_);
8295      repeatedInt32_.Add(other.repeatedInt32_);
8296      repeatedFixed64_.Add(other.repeatedFixed64_);
8297      repeatedInt64_.Add(other.repeatedInt64_);
8298      repeatedFloat_.Add(other.repeatedFloat_);
8299      repeatedUint64_.Add(other.repeatedUint64_);
8300      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
8301    }
8302
8303    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8304    public void MergeFrom(pb::CodedInputStream input) {
8305    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8306      input.ReadRawMessage(this);
8307    #else
8308      uint tag;
8309      while ((tag = input.ReadTag()) != 0) {
8310        switch(tag) {
8311          default:
8312            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
8313            break;
8314          case 98:
8315          case 101: {
8316            repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
8317            break;
8318          }
8319          case 106:
8320          case 104: {
8321            repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
8322            break;
8323          }
8324          case 16370:
8325          case 16369: {
8326            repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
8327            break;
8328          }
8329          case 16378:
8330          case 16376: {
8331            repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
8332            break;
8333          }
8334          case 2097138:
8335          case 2097141: {
8336            repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
8337            break;
8338          }
8339          case 2097146:
8340          case 2097144: {
8341            repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
8342            break;
8343          }
8344        }
8345      }
8346    #endif
8347    }
8348
8349    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8350    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8351    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
8352      uint tag;
8353      while ((tag = input.ReadTag()) != 0) {
8354        switch(tag) {
8355          default:
8356            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
8357            break;
8358          case 98:
8359          case 101: {
8360            repeatedFixed32_.AddEntriesFrom(ref input, _repeated_repeatedFixed32_codec);
8361            break;
8362          }
8363          case 106:
8364          case 104: {
8365            repeatedInt32_.AddEntriesFrom(ref input, _repeated_repeatedInt32_codec);
8366            break;
8367          }
8368          case 16370:
8369          case 16369: {
8370            repeatedFixed64_.AddEntriesFrom(ref input, _repeated_repeatedFixed64_codec);
8371            break;
8372          }
8373          case 16378:
8374          case 16376: {
8375            repeatedInt64_.AddEntriesFrom(ref input, _repeated_repeatedInt64_codec);
8376            break;
8377          }
8378          case 2097138:
8379          case 2097141: {
8380            repeatedFloat_.AddEntriesFrom(ref input, _repeated_repeatedFloat_codec);
8381            break;
8382          }
8383          case 2097146:
8384          case 2097144: {
8385            repeatedUint64_.AddEntriesFrom(ref input, _repeated_repeatedUint64_codec);
8386            break;
8387          }
8388        }
8389      }
8390    }
8391    #endif
8392
8393  }
8394
8395  public sealed partial class TestCommentInjectionMessage : pb::IMessage<TestCommentInjectionMessage>
8396  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8397      , pb::IBufferMessage
8398  #endif
8399  {
8400    private static readonly pb::MessageParser<TestCommentInjectionMessage> _parser = new pb::MessageParser<TestCommentInjectionMessage>(() => new TestCommentInjectionMessage());
8401    private pb::UnknownFieldSet _unknownFields;
8402    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8403    public static pb::MessageParser<TestCommentInjectionMessage> Parser { get { return _parser; } }
8404
8405    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8406    public static pbr::MessageDescriptor Descriptor {
8407      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[27]; }
8408    }
8409
8410    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8411    pbr::MessageDescriptor pb::IMessage.Descriptor {
8412      get { return Descriptor; }
8413    }
8414
8415    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8416    public TestCommentInjectionMessage() {
8417      OnConstruction();
8418    }
8419
8420    partial void OnConstruction();
8421
8422    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8423    public TestCommentInjectionMessage(TestCommentInjectionMessage other) : this() {
8424      a_ = other.a_;
8425      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
8426    }
8427
8428    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8429    public TestCommentInjectionMessage Clone() {
8430      return new TestCommentInjectionMessage(this);
8431    }
8432
8433    /// <summary>Field number for the "a" field.</summary>
8434    public const int AFieldNumber = 1;
8435    private string a_ = "";
8436    /// <summary>
8437    /// */ &lt;- This should not close the generated doc comment
8438    /// </summary>
8439    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8440    public string A {
8441      get { return a_; }
8442      set {
8443        a_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
8444      }
8445    }
8446
8447    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8448    public override bool Equals(object other) {
8449      return Equals(other as TestCommentInjectionMessage);
8450    }
8451
8452    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8453    public bool Equals(TestCommentInjectionMessage other) {
8454      if (ReferenceEquals(other, null)) {
8455        return false;
8456      }
8457      if (ReferenceEquals(other, this)) {
8458        return true;
8459      }
8460      if (A != other.A) return false;
8461      return Equals(_unknownFields, other._unknownFields);
8462    }
8463
8464    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8465    public override int GetHashCode() {
8466      int hash = 1;
8467      if (A.Length != 0) hash ^= A.GetHashCode();
8468      if (_unknownFields != null) {
8469        hash ^= _unknownFields.GetHashCode();
8470      }
8471      return hash;
8472    }
8473
8474    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8475    public override string ToString() {
8476      return pb::JsonFormatter.ToDiagnosticString(this);
8477    }
8478
8479    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8480    public void WriteTo(pb::CodedOutputStream output) {
8481    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8482      output.WriteRawMessage(this);
8483    #else
8484      if (A.Length != 0) {
8485        output.WriteRawTag(10);
8486        output.WriteString(A);
8487      }
8488      if (_unknownFields != null) {
8489        _unknownFields.WriteTo(output);
8490      }
8491    #endif
8492    }
8493
8494    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8495    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8496    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
8497      if (A.Length != 0) {
8498        output.WriteRawTag(10);
8499        output.WriteString(A);
8500      }
8501      if (_unknownFields != null) {
8502        _unknownFields.WriteTo(ref output);
8503      }
8504    }
8505    #endif
8506
8507    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8508    public int CalculateSize() {
8509      int size = 0;
8510      if (A.Length != 0) {
8511        size += 1 + pb::CodedOutputStream.ComputeStringSize(A);
8512      }
8513      if (_unknownFields != null) {
8514        size += _unknownFields.CalculateSize();
8515      }
8516      return size;
8517    }
8518
8519    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8520    public void MergeFrom(TestCommentInjectionMessage other) {
8521      if (other == null) {
8522        return;
8523      }
8524      if (other.A.Length != 0) {
8525        A = other.A;
8526      }
8527      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
8528    }
8529
8530    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8531    public void MergeFrom(pb::CodedInputStream input) {
8532    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8533      input.ReadRawMessage(this);
8534    #else
8535      uint tag;
8536      while ((tag = input.ReadTag()) != 0) {
8537        switch(tag) {
8538          default:
8539            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
8540            break;
8541          case 10: {
8542            A = input.ReadString();
8543            break;
8544          }
8545        }
8546      }
8547    #endif
8548    }
8549
8550    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8551    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8552    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
8553      uint tag;
8554      while ((tag = input.ReadTag()) != 0) {
8555        switch(tag) {
8556          default:
8557            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
8558            break;
8559          case 10: {
8560            A = input.ReadString();
8561            break;
8562          }
8563        }
8564      }
8565    }
8566    #endif
8567
8568  }
8569
8570  /// <summary>
8571  /// Test that RPC services work.
8572  /// </summary>
8573  public sealed partial class FooRequest : pb::IMessage<FooRequest>
8574  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8575      , pb::IBufferMessage
8576  #endif
8577  {
8578    private static readonly pb::MessageParser<FooRequest> _parser = new pb::MessageParser<FooRequest>(() => new FooRequest());
8579    private pb::UnknownFieldSet _unknownFields;
8580    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8581    public static pb::MessageParser<FooRequest> Parser { get { return _parser; } }
8582
8583    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8584    public static pbr::MessageDescriptor Descriptor {
8585      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[28]; }
8586    }
8587
8588    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8589    pbr::MessageDescriptor pb::IMessage.Descriptor {
8590      get { return Descriptor; }
8591    }
8592
8593    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8594    public FooRequest() {
8595      OnConstruction();
8596    }
8597
8598    partial void OnConstruction();
8599
8600    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8601    public FooRequest(FooRequest other) : this() {
8602      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
8603    }
8604
8605    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8606    public FooRequest Clone() {
8607      return new FooRequest(this);
8608    }
8609
8610    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8611    public override bool Equals(object other) {
8612      return Equals(other as FooRequest);
8613    }
8614
8615    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8616    public bool Equals(FooRequest other) {
8617      if (ReferenceEquals(other, null)) {
8618        return false;
8619      }
8620      if (ReferenceEquals(other, this)) {
8621        return true;
8622      }
8623      return Equals(_unknownFields, other._unknownFields);
8624    }
8625
8626    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8627    public override int GetHashCode() {
8628      int hash = 1;
8629      if (_unknownFields != null) {
8630        hash ^= _unknownFields.GetHashCode();
8631      }
8632      return hash;
8633    }
8634
8635    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8636    public override string ToString() {
8637      return pb::JsonFormatter.ToDiagnosticString(this);
8638    }
8639
8640    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8641    public void WriteTo(pb::CodedOutputStream output) {
8642    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8643      output.WriteRawMessage(this);
8644    #else
8645      if (_unknownFields != null) {
8646        _unknownFields.WriteTo(output);
8647      }
8648    #endif
8649    }
8650
8651    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8652    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8653    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
8654      if (_unknownFields != null) {
8655        _unknownFields.WriteTo(ref output);
8656      }
8657    }
8658    #endif
8659
8660    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8661    public int CalculateSize() {
8662      int size = 0;
8663      if (_unknownFields != null) {
8664        size += _unknownFields.CalculateSize();
8665      }
8666      return size;
8667    }
8668
8669    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8670    public void MergeFrom(FooRequest other) {
8671      if (other == null) {
8672        return;
8673      }
8674      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
8675    }
8676
8677    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8678    public void MergeFrom(pb::CodedInputStream input) {
8679    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8680      input.ReadRawMessage(this);
8681    #else
8682      uint tag;
8683      while ((tag = input.ReadTag()) != 0) {
8684        switch(tag) {
8685          default:
8686            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
8687            break;
8688        }
8689      }
8690    #endif
8691    }
8692
8693    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8694    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8695    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
8696      uint tag;
8697      while ((tag = input.ReadTag()) != 0) {
8698        switch(tag) {
8699          default:
8700            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
8701            break;
8702        }
8703      }
8704    }
8705    #endif
8706
8707  }
8708
8709  public sealed partial class FooResponse : pb::IMessage<FooResponse>
8710  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8711      , pb::IBufferMessage
8712  #endif
8713  {
8714    private static readonly pb::MessageParser<FooResponse> _parser = new pb::MessageParser<FooResponse>(() => new FooResponse());
8715    private pb::UnknownFieldSet _unknownFields;
8716    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8717    public static pb::MessageParser<FooResponse> Parser { get { return _parser; } }
8718
8719    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8720    public static pbr::MessageDescriptor Descriptor {
8721      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[29]; }
8722    }
8723
8724    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8725    pbr::MessageDescriptor pb::IMessage.Descriptor {
8726      get { return Descriptor; }
8727    }
8728
8729    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8730    public FooResponse() {
8731      OnConstruction();
8732    }
8733
8734    partial void OnConstruction();
8735
8736    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8737    public FooResponse(FooResponse other) : this() {
8738      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
8739    }
8740
8741    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8742    public FooResponse Clone() {
8743      return new FooResponse(this);
8744    }
8745
8746    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8747    public override bool Equals(object other) {
8748      return Equals(other as FooResponse);
8749    }
8750
8751    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8752    public bool Equals(FooResponse other) {
8753      if (ReferenceEquals(other, null)) {
8754        return false;
8755      }
8756      if (ReferenceEquals(other, this)) {
8757        return true;
8758      }
8759      return Equals(_unknownFields, other._unknownFields);
8760    }
8761
8762    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8763    public override int GetHashCode() {
8764      int hash = 1;
8765      if (_unknownFields != null) {
8766        hash ^= _unknownFields.GetHashCode();
8767      }
8768      return hash;
8769    }
8770
8771    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8772    public override string ToString() {
8773      return pb::JsonFormatter.ToDiagnosticString(this);
8774    }
8775
8776    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8777    public void WriteTo(pb::CodedOutputStream output) {
8778    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8779      output.WriteRawMessage(this);
8780    #else
8781      if (_unknownFields != null) {
8782        _unknownFields.WriteTo(output);
8783      }
8784    #endif
8785    }
8786
8787    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8788    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8789    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
8790      if (_unknownFields != null) {
8791        _unknownFields.WriteTo(ref output);
8792      }
8793    }
8794    #endif
8795
8796    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8797    public int CalculateSize() {
8798      int size = 0;
8799      if (_unknownFields != null) {
8800        size += _unknownFields.CalculateSize();
8801      }
8802      return size;
8803    }
8804
8805    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8806    public void MergeFrom(FooResponse other) {
8807      if (other == null) {
8808        return;
8809      }
8810      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
8811    }
8812
8813    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8814    public void MergeFrom(pb::CodedInputStream input) {
8815    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8816      input.ReadRawMessage(this);
8817    #else
8818      uint tag;
8819      while ((tag = input.ReadTag()) != 0) {
8820        switch(tag) {
8821          default:
8822            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
8823            break;
8824        }
8825      }
8826    #endif
8827    }
8828
8829    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8830    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8831    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
8832      uint tag;
8833      while ((tag = input.ReadTag()) != 0) {
8834        switch(tag) {
8835          default:
8836            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
8837            break;
8838        }
8839      }
8840    }
8841    #endif
8842
8843  }
8844
8845  public sealed partial class FooClientMessage : pb::IMessage<FooClientMessage>
8846  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8847      , pb::IBufferMessage
8848  #endif
8849  {
8850    private static readonly pb::MessageParser<FooClientMessage> _parser = new pb::MessageParser<FooClientMessage>(() => new FooClientMessage());
8851    private pb::UnknownFieldSet _unknownFields;
8852    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8853    public static pb::MessageParser<FooClientMessage> Parser { get { return _parser; } }
8854
8855    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8856    public static pbr::MessageDescriptor Descriptor {
8857      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[30]; }
8858    }
8859
8860    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8861    pbr::MessageDescriptor pb::IMessage.Descriptor {
8862      get { return Descriptor; }
8863    }
8864
8865    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8866    public FooClientMessage() {
8867      OnConstruction();
8868    }
8869
8870    partial void OnConstruction();
8871
8872    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8873    public FooClientMessage(FooClientMessage other) : this() {
8874      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
8875    }
8876
8877    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8878    public FooClientMessage Clone() {
8879      return new FooClientMessage(this);
8880    }
8881
8882    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8883    public override bool Equals(object other) {
8884      return Equals(other as FooClientMessage);
8885    }
8886
8887    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8888    public bool Equals(FooClientMessage other) {
8889      if (ReferenceEquals(other, null)) {
8890        return false;
8891      }
8892      if (ReferenceEquals(other, this)) {
8893        return true;
8894      }
8895      return Equals(_unknownFields, other._unknownFields);
8896    }
8897
8898    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8899    public override int GetHashCode() {
8900      int hash = 1;
8901      if (_unknownFields != null) {
8902        hash ^= _unknownFields.GetHashCode();
8903      }
8904      return hash;
8905    }
8906
8907    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8908    public override string ToString() {
8909      return pb::JsonFormatter.ToDiagnosticString(this);
8910    }
8911
8912    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8913    public void WriteTo(pb::CodedOutputStream output) {
8914    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8915      output.WriteRawMessage(this);
8916    #else
8917      if (_unknownFields != null) {
8918        _unknownFields.WriteTo(output);
8919      }
8920    #endif
8921    }
8922
8923    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8924    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8925    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
8926      if (_unknownFields != null) {
8927        _unknownFields.WriteTo(ref output);
8928      }
8929    }
8930    #endif
8931
8932    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8933    public int CalculateSize() {
8934      int size = 0;
8935      if (_unknownFields != null) {
8936        size += _unknownFields.CalculateSize();
8937      }
8938      return size;
8939    }
8940
8941    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8942    public void MergeFrom(FooClientMessage other) {
8943      if (other == null) {
8944        return;
8945      }
8946      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
8947    }
8948
8949    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8950    public void MergeFrom(pb::CodedInputStream input) {
8951    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8952      input.ReadRawMessage(this);
8953    #else
8954      uint tag;
8955      while ((tag = input.ReadTag()) != 0) {
8956        switch(tag) {
8957          default:
8958            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
8959            break;
8960        }
8961      }
8962    #endif
8963    }
8964
8965    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8966    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8967    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
8968      uint tag;
8969      while ((tag = input.ReadTag()) != 0) {
8970        switch(tag) {
8971          default:
8972            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
8973            break;
8974        }
8975      }
8976    }
8977    #endif
8978
8979  }
8980
8981  public sealed partial class FooServerMessage : pb::IMessage<FooServerMessage>
8982  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
8983      , pb::IBufferMessage
8984  #endif
8985  {
8986    private static readonly pb::MessageParser<FooServerMessage> _parser = new pb::MessageParser<FooServerMessage>(() => new FooServerMessage());
8987    private pb::UnknownFieldSet _unknownFields;
8988    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8989    public static pb::MessageParser<FooServerMessage> Parser { get { return _parser; } }
8990
8991    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8992    public static pbr::MessageDescriptor Descriptor {
8993      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[31]; }
8994    }
8995
8996    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
8997    pbr::MessageDescriptor pb::IMessage.Descriptor {
8998      get { return Descriptor; }
8999    }
9000
9001    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9002    public FooServerMessage() {
9003      OnConstruction();
9004    }
9005
9006    partial void OnConstruction();
9007
9008    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9009    public FooServerMessage(FooServerMessage other) : this() {
9010      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
9011    }
9012
9013    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9014    public FooServerMessage Clone() {
9015      return new FooServerMessage(this);
9016    }
9017
9018    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9019    public override bool Equals(object other) {
9020      return Equals(other as FooServerMessage);
9021    }
9022
9023    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9024    public bool Equals(FooServerMessage other) {
9025      if (ReferenceEquals(other, null)) {
9026        return false;
9027      }
9028      if (ReferenceEquals(other, this)) {
9029        return true;
9030      }
9031      return Equals(_unknownFields, other._unknownFields);
9032    }
9033
9034    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9035    public override int GetHashCode() {
9036      int hash = 1;
9037      if (_unknownFields != null) {
9038        hash ^= _unknownFields.GetHashCode();
9039      }
9040      return hash;
9041    }
9042
9043    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9044    public override string ToString() {
9045      return pb::JsonFormatter.ToDiagnosticString(this);
9046    }
9047
9048    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9049    public void WriteTo(pb::CodedOutputStream output) {
9050    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9051      output.WriteRawMessage(this);
9052    #else
9053      if (_unknownFields != null) {
9054        _unknownFields.WriteTo(output);
9055      }
9056    #endif
9057    }
9058
9059    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9060    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9061    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
9062      if (_unknownFields != null) {
9063        _unknownFields.WriteTo(ref output);
9064      }
9065    }
9066    #endif
9067
9068    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9069    public int CalculateSize() {
9070      int size = 0;
9071      if (_unknownFields != null) {
9072        size += _unknownFields.CalculateSize();
9073      }
9074      return size;
9075    }
9076
9077    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9078    public void MergeFrom(FooServerMessage other) {
9079      if (other == null) {
9080        return;
9081      }
9082      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
9083    }
9084
9085    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9086    public void MergeFrom(pb::CodedInputStream input) {
9087    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9088      input.ReadRawMessage(this);
9089    #else
9090      uint tag;
9091      while ((tag = input.ReadTag()) != 0) {
9092        switch(tag) {
9093          default:
9094            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
9095            break;
9096        }
9097      }
9098    #endif
9099    }
9100
9101    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9102    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9103    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
9104      uint tag;
9105      while ((tag = input.ReadTag()) != 0) {
9106        switch(tag) {
9107          default:
9108            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
9109            break;
9110        }
9111      }
9112    }
9113    #endif
9114
9115  }
9116
9117  public sealed partial class BarRequest : pb::IMessage<BarRequest>
9118  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9119      , pb::IBufferMessage
9120  #endif
9121  {
9122    private static readonly pb::MessageParser<BarRequest> _parser = new pb::MessageParser<BarRequest>(() => new BarRequest());
9123    private pb::UnknownFieldSet _unknownFields;
9124    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9125    public static pb::MessageParser<BarRequest> Parser { get { return _parser; } }
9126
9127    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9128    public static pbr::MessageDescriptor Descriptor {
9129      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[32]; }
9130    }
9131
9132    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9133    pbr::MessageDescriptor pb::IMessage.Descriptor {
9134      get { return Descriptor; }
9135    }
9136
9137    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9138    public BarRequest() {
9139      OnConstruction();
9140    }
9141
9142    partial void OnConstruction();
9143
9144    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9145    public BarRequest(BarRequest other) : this() {
9146      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
9147    }
9148
9149    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9150    public BarRequest Clone() {
9151      return new BarRequest(this);
9152    }
9153
9154    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9155    public override bool Equals(object other) {
9156      return Equals(other as BarRequest);
9157    }
9158
9159    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9160    public bool Equals(BarRequest other) {
9161      if (ReferenceEquals(other, null)) {
9162        return false;
9163      }
9164      if (ReferenceEquals(other, this)) {
9165        return true;
9166      }
9167      return Equals(_unknownFields, other._unknownFields);
9168    }
9169
9170    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9171    public override int GetHashCode() {
9172      int hash = 1;
9173      if (_unknownFields != null) {
9174        hash ^= _unknownFields.GetHashCode();
9175      }
9176      return hash;
9177    }
9178
9179    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9180    public override string ToString() {
9181      return pb::JsonFormatter.ToDiagnosticString(this);
9182    }
9183
9184    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9185    public void WriteTo(pb::CodedOutputStream output) {
9186    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9187      output.WriteRawMessage(this);
9188    #else
9189      if (_unknownFields != null) {
9190        _unknownFields.WriteTo(output);
9191      }
9192    #endif
9193    }
9194
9195    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9196    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9197    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
9198      if (_unknownFields != null) {
9199        _unknownFields.WriteTo(ref output);
9200      }
9201    }
9202    #endif
9203
9204    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9205    public int CalculateSize() {
9206      int size = 0;
9207      if (_unknownFields != null) {
9208        size += _unknownFields.CalculateSize();
9209      }
9210      return size;
9211    }
9212
9213    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9214    public void MergeFrom(BarRequest other) {
9215      if (other == null) {
9216        return;
9217      }
9218      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
9219    }
9220
9221    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9222    public void MergeFrom(pb::CodedInputStream input) {
9223    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9224      input.ReadRawMessage(this);
9225    #else
9226      uint tag;
9227      while ((tag = input.ReadTag()) != 0) {
9228        switch(tag) {
9229          default:
9230            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
9231            break;
9232        }
9233      }
9234    #endif
9235    }
9236
9237    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9238    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9239    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
9240      uint tag;
9241      while ((tag = input.ReadTag()) != 0) {
9242        switch(tag) {
9243          default:
9244            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
9245            break;
9246        }
9247      }
9248    }
9249    #endif
9250
9251  }
9252
9253  public sealed partial class BarResponse : pb::IMessage<BarResponse>
9254  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9255      , pb::IBufferMessage
9256  #endif
9257  {
9258    private static readonly pb::MessageParser<BarResponse> _parser = new pb::MessageParser<BarResponse>(() => new BarResponse());
9259    private pb::UnknownFieldSet _unknownFields;
9260    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9261    public static pb::MessageParser<BarResponse> Parser { get { return _parser; } }
9262
9263    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9264    public static pbr::MessageDescriptor Descriptor {
9265      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[33]; }
9266    }
9267
9268    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9269    pbr::MessageDescriptor pb::IMessage.Descriptor {
9270      get { return Descriptor; }
9271    }
9272
9273    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9274    public BarResponse() {
9275      OnConstruction();
9276    }
9277
9278    partial void OnConstruction();
9279
9280    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9281    public BarResponse(BarResponse other) : this() {
9282      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
9283    }
9284
9285    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9286    public BarResponse Clone() {
9287      return new BarResponse(this);
9288    }
9289
9290    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9291    public override bool Equals(object other) {
9292      return Equals(other as BarResponse);
9293    }
9294
9295    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9296    public bool Equals(BarResponse other) {
9297      if (ReferenceEquals(other, null)) {
9298        return false;
9299      }
9300      if (ReferenceEquals(other, this)) {
9301        return true;
9302      }
9303      return Equals(_unknownFields, other._unknownFields);
9304    }
9305
9306    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9307    public override int GetHashCode() {
9308      int hash = 1;
9309      if (_unknownFields != null) {
9310        hash ^= _unknownFields.GetHashCode();
9311      }
9312      return hash;
9313    }
9314
9315    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9316    public override string ToString() {
9317      return pb::JsonFormatter.ToDiagnosticString(this);
9318    }
9319
9320    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9321    public void WriteTo(pb::CodedOutputStream output) {
9322    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9323      output.WriteRawMessage(this);
9324    #else
9325      if (_unknownFields != null) {
9326        _unknownFields.WriteTo(output);
9327      }
9328    #endif
9329    }
9330
9331    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9332    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9333    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
9334      if (_unknownFields != null) {
9335        _unknownFields.WriteTo(ref output);
9336      }
9337    }
9338    #endif
9339
9340    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9341    public int CalculateSize() {
9342      int size = 0;
9343      if (_unknownFields != null) {
9344        size += _unknownFields.CalculateSize();
9345      }
9346      return size;
9347    }
9348
9349    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9350    public void MergeFrom(BarResponse other) {
9351      if (other == null) {
9352        return;
9353      }
9354      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
9355    }
9356
9357    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9358    public void MergeFrom(pb::CodedInputStream input) {
9359    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9360      input.ReadRawMessage(this);
9361    #else
9362      uint tag;
9363      while ((tag = input.ReadTag()) != 0) {
9364        switch(tag) {
9365          default:
9366            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
9367            break;
9368        }
9369      }
9370    #endif
9371    }
9372
9373    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9374    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9375    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
9376      uint tag;
9377      while ((tag = input.ReadTag()) != 0) {
9378        switch(tag) {
9379          default:
9380            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
9381            break;
9382        }
9383      }
9384    }
9385    #endif
9386
9387  }
9388
9389  public sealed partial class TestEmptyMessage : pb::IMessage<TestEmptyMessage>
9390  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9391      , pb::IBufferMessage
9392  #endif
9393  {
9394    private static readonly pb::MessageParser<TestEmptyMessage> _parser = new pb::MessageParser<TestEmptyMessage>(() => new TestEmptyMessage());
9395    private pb::UnknownFieldSet _unknownFields;
9396    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9397    public static pb::MessageParser<TestEmptyMessage> Parser { get { return _parser; } }
9398
9399    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9400    public static pbr::MessageDescriptor Descriptor {
9401      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[34]; }
9402    }
9403
9404    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9405    pbr::MessageDescriptor pb::IMessage.Descriptor {
9406      get { return Descriptor; }
9407    }
9408
9409    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9410    public TestEmptyMessage() {
9411      OnConstruction();
9412    }
9413
9414    partial void OnConstruction();
9415
9416    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9417    public TestEmptyMessage(TestEmptyMessage other) : this() {
9418      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
9419    }
9420
9421    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9422    public TestEmptyMessage Clone() {
9423      return new TestEmptyMessage(this);
9424    }
9425
9426    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9427    public override bool Equals(object other) {
9428      return Equals(other as TestEmptyMessage);
9429    }
9430
9431    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9432    public bool Equals(TestEmptyMessage other) {
9433      if (ReferenceEquals(other, null)) {
9434        return false;
9435      }
9436      if (ReferenceEquals(other, this)) {
9437        return true;
9438      }
9439      return Equals(_unknownFields, other._unknownFields);
9440    }
9441
9442    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9443    public override int GetHashCode() {
9444      int hash = 1;
9445      if (_unknownFields != null) {
9446        hash ^= _unknownFields.GetHashCode();
9447      }
9448      return hash;
9449    }
9450
9451    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9452    public override string ToString() {
9453      return pb::JsonFormatter.ToDiagnosticString(this);
9454    }
9455
9456    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9457    public void WriteTo(pb::CodedOutputStream output) {
9458    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9459      output.WriteRawMessage(this);
9460    #else
9461      if (_unknownFields != null) {
9462        _unknownFields.WriteTo(output);
9463      }
9464    #endif
9465    }
9466
9467    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9468    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9469    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
9470      if (_unknownFields != null) {
9471        _unknownFields.WriteTo(ref output);
9472      }
9473    }
9474    #endif
9475
9476    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9477    public int CalculateSize() {
9478      int size = 0;
9479      if (_unknownFields != null) {
9480        size += _unknownFields.CalculateSize();
9481      }
9482      return size;
9483    }
9484
9485    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9486    public void MergeFrom(TestEmptyMessage other) {
9487      if (other == null) {
9488        return;
9489      }
9490      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
9491    }
9492
9493    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9494    public void MergeFrom(pb::CodedInputStream input) {
9495    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9496      input.ReadRawMessage(this);
9497    #else
9498      uint tag;
9499      while ((tag = input.ReadTag()) != 0) {
9500        switch(tag) {
9501          default:
9502            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
9503            break;
9504        }
9505      }
9506    #endif
9507    }
9508
9509    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9510    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9511    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
9512      uint tag;
9513      while ((tag = input.ReadTag()) != 0) {
9514        switch(tag) {
9515          default:
9516            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
9517            break;
9518        }
9519      }
9520    }
9521    #endif
9522
9523  }
9524
9525  /// <summary>
9526  /// This is a leading comment
9527  /// </summary>
9528  public sealed partial class CommentMessage : pb::IMessage<CommentMessage>
9529  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9530      , pb::IBufferMessage
9531  #endif
9532  {
9533    private static readonly pb::MessageParser<CommentMessage> _parser = new pb::MessageParser<CommentMessage>(() => new CommentMessage());
9534    private pb::UnknownFieldSet _unknownFields;
9535    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9536    public static pb::MessageParser<CommentMessage> Parser { get { return _parser; } }
9537
9538    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9539    public static pbr::MessageDescriptor Descriptor {
9540      get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[35]; }
9541    }
9542
9543    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9544    pbr::MessageDescriptor pb::IMessage.Descriptor {
9545      get { return Descriptor; }
9546    }
9547
9548    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9549    public CommentMessage() {
9550      OnConstruction();
9551    }
9552
9553    partial void OnConstruction();
9554
9555    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9556    public CommentMessage(CommentMessage other) : this() {
9557      text_ = other.text_;
9558      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
9559    }
9560
9561    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9562    public CommentMessage Clone() {
9563      return new CommentMessage(this);
9564    }
9565
9566    /// <summary>Field number for the "text" field.</summary>
9567    public const int TextFieldNumber = 1;
9568    private string text_ = "";
9569    /// <summary>
9570    /// Leading field comment
9571    /// </summary>
9572    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9573    public string Text {
9574      get { return text_; }
9575      set {
9576        text_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
9577      }
9578    }
9579
9580    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9581    public override bool Equals(object other) {
9582      return Equals(other as CommentMessage);
9583    }
9584
9585    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9586    public bool Equals(CommentMessage other) {
9587      if (ReferenceEquals(other, null)) {
9588        return false;
9589      }
9590      if (ReferenceEquals(other, this)) {
9591        return true;
9592      }
9593      if (Text != other.Text) return false;
9594      return Equals(_unknownFields, other._unknownFields);
9595    }
9596
9597    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9598    public override int GetHashCode() {
9599      int hash = 1;
9600      if (Text.Length != 0) hash ^= Text.GetHashCode();
9601      if (_unknownFields != null) {
9602        hash ^= _unknownFields.GetHashCode();
9603      }
9604      return hash;
9605    }
9606
9607    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9608    public override string ToString() {
9609      return pb::JsonFormatter.ToDiagnosticString(this);
9610    }
9611
9612    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9613    public void WriteTo(pb::CodedOutputStream output) {
9614    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9615      output.WriteRawMessage(this);
9616    #else
9617      if (Text.Length != 0) {
9618        output.WriteRawTag(10);
9619        output.WriteString(Text);
9620      }
9621      if (_unknownFields != null) {
9622        _unknownFields.WriteTo(output);
9623      }
9624    #endif
9625    }
9626
9627    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9628    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9629    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
9630      if (Text.Length != 0) {
9631        output.WriteRawTag(10);
9632        output.WriteString(Text);
9633      }
9634      if (_unknownFields != null) {
9635        _unknownFields.WriteTo(ref output);
9636      }
9637    }
9638    #endif
9639
9640    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9641    public int CalculateSize() {
9642      int size = 0;
9643      if (Text.Length != 0) {
9644        size += 1 + pb::CodedOutputStream.ComputeStringSize(Text);
9645      }
9646      if (_unknownFields != null) {
9647        size += _unknownFields.CalculateSize();
9648      }
9649      return size;
9650    }
9651
9652    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9653    public void MergeFrom(CommentMessage other) {
9654      if (other == null) {
9655        return;
9656      }
9657      if (other.Text.Length != 0) {
9658        Text = other.Text;
9659      }
9660      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
9661    }
9662
9663    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9664    public void MergeFrom(pb::CodedInputStream input) {
9665    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9666      input.ReadRawMessage(this);
9667    #else
9668      uint tag;
9669      while ((tag = input.ReadTag()) != 0) {
9670        switch(tag) {
9671          default:
9672            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
9673            break;
9674          case 10: {
9675            Text = input.ReadString();
9676            break;
9677          }
9678        }
9679      }
9680    #endif
9681    }
9682
9683    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9684    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9685    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
9686      uint tag;
9687      while ((tag = input.ReadTag()) != 0) {
9688        switch(tag) {
9689          default:
9690            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
9691            break;
9692          case 10: {
9693            Text = input.ReadString();
9694            break;
9695          }
9696        }
9697      }
9698    }
9699    #endif
9700
9701    #region Nested types
9702    /// <summary>Container for nested types declared in the CommentMessage message type.</summary>
9703    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9704    public static partial class Types {
9705      /// <summary>
9706      /// Leading nested enum comment
9707      /// </summary>
9708      public enum NestedCommentEnum {
9709        /// <summary>
9710        /// Zero value comment
9711        /// </summary>
9712        [pbr::OriginalName("ZERO_VALUE")] ZeroValue = 0,
9713      }
9714
9715      /// <summary>
9716      /// Leading nested message comment
9717      /// </summary>
9718      public sealed partial class NestedCommentMessage : pb::IMessage<NestedCommentMessage>
9719      #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9720          , pb::IBufferMessage
9721      #endif
9722      {
9723        private static readonly pb::MessageParser<NestedCommentMessage> _parser = new pb::MessageParser<NestedCommentMessage>(() => new NestedCommentMessage());
9724        private pb::UnknownFieldSet _unknownFields;
9725        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9726        public static pb::MessageParser<NestedCommentMessage> Parser { get { return _parser; } }
9727
9728        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9729        public static pbr::MessageDescriptor Descriptor {
9730          get { return global::Google.Protobuf.TestProtos.CommentMessage.Descriptor.NestedTypes[0]; }
9731        }
9732
9733        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9734        pbr::MessageDescriptor pb::IMessage.Descriptor {
9735          get { return Descriptor; }
9736        }
9737
9738        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9739        public NestedCommentMessage() {
9740          OnConstruction();
9741        }
9742
9743        partial void OnConstruction();
9744
9745        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9746        public NestedCommentMessage(NestedCommentMessage other) : this() {
9747          nestedText_ = other.nestedText_;
9748          _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
9749        }
9750
9751        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9752        public NestedCommentMessage Clone() {
9753          return new NestedCommentMessage(this);
9754        }
9755
9756        /// <summary>Field number for the "nested_text" field.</summary>
9757        public const int NestedTextFieldNumber = 1;
9758        private string nestedText_ = "";
9759        /// <summary>
9760        /// Leading nested message field comment
9761        /// </summary>
9762        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9763        public string NestedText {
9764          get { return nestedText_; }
9765          set {
9766            nestedText_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
9767          }
9768        }
9769
9770        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9771        public override bool Equals(object other) {
9772          return Equals(other as NestedCommentMessage);
9773        }
9774
9775        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9776        public bool Equals(NestedCommentMessage other) {
9777          if (ReferenceEquals(other, null)) {
9778            return false;
9779          }
9780          if (ReferenceEquals(other, this)) {
9781            return true;
9782          }
9783          if (NestedText != other.NestedText) return false;
9784          return Equals(_unknownFields, other._unknownFields);
9785        }
9786
9787        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9788        public override int GetHashCode() {
9789          int hash = 1;
9790          if (NestedText.Length != 0) hash ^= NestedText.GetHashCode();
9791          if (_unknownFields != null) {
9792            hash ^= _unknownFields.GetHashCode();
9793          }
9794          return hash;
9795        }
9796
9797        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9798        public override string ToString() {
9799          return pb::JsonFormatter.ToDiagnosticString(this);
9800        }
9801
9802        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9803        public void WriteTo(pb::CodedOutputStream output) {
9804        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9805          output.WriteRawMessage(this);
9806        #else
9807          if (NestedText.Length != 0) {
9808            output.WriteRawTag(10);
9809            output.WriteString(NestedText);
9810          }
9811          if (_unknownFields != null) {
9812            _unknownFields.WriteTo(output);
9813          }
9814        #endif
9815        }
9816
9817        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9818        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9819        void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
9820          if (NestedText.Length != 0) {
9821            output.WriteRawTag(10);
9822            output.WriteString(NestedText);
9823          }
9824          if (_unknownFields != null) {
9825            _unknownFields.WriteTo(ref output);
9826          }
9827        }
9828        #endif
9829
9830        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9831        public int CalculateSize() {
9832          int size = 0;
9833          if (NestedText.Length != 0) {
9834            size += 1 + pb::CodedOutputStream.ComputeStringSize(NestedText);
9835          }
9836          if (_unknownFields != null) {
9837            size += _unknownFields.CalculateSize();
9838          }
9839          return size;
9840        }
9841
9842        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9843        public void MergeFrom(NestedCommentMessage other) {
9844          if (other == null) {
9845            return;
9846          }
9847          if (other.NestedText.Length != 0) {
9848            NestedText = other.NestedText;
9849          }
9850          _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
9851        }
9852
9853        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9854        public void MergeFrom(pb::CodedInputStream input) {
9855        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9856          input.ReadRawMessage(this);
9857        #else
9858          uint tag;
9859          while ((tag = input.ReadTag()) != 0) {
9860            switch(tag) {
9861              default:
9862                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
9863                break;
9864              case 10: {
9865                NestedText = input.ReadString();
9866                break;
9867              }
9868            }
9869          }
9870        #endif
9871        }
9872
9873        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
9874        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
9875        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
9876          uint tag;
9877          while ((tag = input.ReadTag()) != 0) {
9878            switch(tag) {
9879              default:
9880                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
9881                break;
9882              case 10: {
9883                NestedText = input.ReadString();
9884                break;
9885              }
9886            }
9887          }
9888        }
9889        #endif
9890
9891      }
9892
9893    }
9894    #endregion
9895
9896  }
9897
9898  #endregion
9899
9900}
9901
9902#endregion Designer generated code
9903