• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: google/protobuf/map_unittest_proto3.proto
3 #pragma warning disable 1591, 0612, 3021
4 #region Designer generated code
5 
6 using pb = global::Google.Protobuf;
7 using pbc = global::Google.Protobuf.Collections;
8 using pbr = global::Google.Protobuf.Reflection;
9 using scg = global::System.Collections.Generic;
10 namespace Google.Protobuf.TestProtos {
11 
12   /// <summary>Holder for reflection information generated from google/protobuf/map_unittest_proto3.proto</summary>
13   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14   public static partial class MapUnittestProto3Reflection {
15 
16     #region Descriptor
17     /// <summary>File descriptor for google/protobuf/map_unittest_proto3.proto</summary>
18     public static pbr::FileDescriptor Descriptor {
19       get { return descriptor; }
20     }
21     private static pbr::FileDescriptor descriptor;
22 
MapUnittestProto3Reflection()23     static MapUnittestProto3Reflection() {
24       byte[] descriptorData = global::System.Convert.FromBase64String(
25           string.Concat(
26             "Cilnb29nbGUvcHJvdG9idWYvbWFwX3VuaXR0ZXN0X3Byb3RvMy5wcm90bxIR",
27             "cHJvdG9idWZfdW5pdHRlc3QaJWdvb2dsZS9wcm90b2J1Zi91bml0dGVzdF9w",
28             "cm90bzMucHJvdG8ilhIKB1Rlc3RNYXASRgoPbWFwX2ludDMyX2ludDMyGAEg",
29             "AygLMi0ucHJvdG9idWZfdW5pdHRlc3QuVGVzdE1hcC5NYXBJbnQzMkludDMy",
30             "RW50cnkSRgoPbWFwX2ludDY0X2ludDY0GAIgAygLMi0ucHJvdG9idWZfdW5p",
31             "dHRlc3QuVGVzdE1hcC5NYXBJbnQ2NEludDY0RW50cnkSSgoRbWFwX3VpbnQz",
32             "Ml91aW50MzIYAyADKAsyLy5wcm90b2J1Zl91bml0dGVzdC5UZXN0TWFwLk1h",
33             "cFVpbnQzMlVpbnQzMkVudHJ5EkoKEW1hcF91aW50NjRfdWludDY0GAQgAygL",
34             "Mi8ucHJvdG9idWZfdW5pdHRlc3QuVGVzdE1hcC5NYXBVaW50NjRVaW50NjRF",
35             "bnRyeRJKChFtYXBfc2ludDMyX3NpbnQzMhgFIAMoCzIvLnByb3RvYnVmX3Vu",
36             "aXR0ZXN0LlRlc3RNYXAuTWFwU2ludDMyU2ludDMyRW50cnkSSgoRbWFwX3Np",
37             "bnQ2NF9zaW50NjQYBiADKAsyLy5wcm90b2J1Zl91bml0dGVzdC5UZXN0TWFw",
38             "Lk1hcFNpbnQ2NFNpbnQ2NEVudHJ5Ek4KE21hcF9maXhlZDMyX2ZpeGVkMzIY",
39             "ByADKAsyMS5wcm90b2J1Zl91bml0dGVzdC5UZXN0TWFwLk1hcEZpeGVkMzJG",
40             "aXhlZDMyRW50cnkSTgoTbWFwX2ZpeGVkNjRfZml4ZWQ2NBgIIAMoCzIxLnBy",
41             "b3RvYnVmX3VuaXR0ZXN0LlRlc3RNYXAuTWFwRml4ZWQ2NEZpeGVkNjRFbnRy",
42             "eRJSChVtYXBfc2ZpeGVkMzJfc2ZpeGVkMzIYCSADKAsyMy5wcm90b2J1Zl91",
43             "bml0dGVzdC5UZXN0TWFwLk1hcFNmaXhlZDMyU2ZpeGVkMzJFbnRyeRJSChVt",
44             "YXBfc2ZpeGVkNjRfc2ZpeGVkNjQYCiADKAsyMy5wcm90b2J1Zl91bml0dGVz",
45             "dC5UZXN0TWFwLk1hcFNmaXhlZDY0U2ZpeGVkNjRFbnRyeRJGCg9tYXBfaW50",
46             "MzJfZmxvYXQYCyADKAsyLS5wcm90b2J1Zl91bml0dGVzdC5UZXN0TWFwLk1h",
47             "cEludDMyRmxvYXRFbnRyeRJIChBtYXBfaW50MzJfZG91YmxlGAwgAygLMi4u",
48             "cHJvdG9idWZfdW5pdHRlc3QuVGVzdE1hcC5NYXBJbnQzMkRvdWJsZUVudHJ5",
49             "EkIKDW1hcF9ib29sX2Jvb2wYDSADKAsyKy5wcm90b2J1Zl91bml0dGVzdC5U",
50             "ZXN0TWFwLk1hcEJvb2xCb29sRW50cnkSSgoRbWFwX3N0cmluZ19zdHJpbmcY",
51             "DiADKAsyLy5wcm90b2J1Zl91bml0dGVzdC5UZXN0TWFwLk1hcFN0cmluZ1N0",
52             "cmluZ0VudHJ5EkYKD21hcF9pbnQzMl9ieXRlcxgPIAMoCzItLnByb3RvYnVm",
53             "X3VuaXR0ZXN0LlRlc3RNYXAuTWFwSW50MzJCeXRlc0VudHJ5EkQKDm1hcF9p",
54             "bnQzMl9lbnVtGBAgAygLMiwucHJvdG9idWZfdW5pdHRlc3QuVGVzdE1hcC5N",
55             "YXBJbnQzMkVudW1FbnRyeRJZChltYXBfaW50MzJfZm9yZWlnbl9tZXNzYWdl",
56             "GBEgAygLMjYucHJvdG9idWZfdW5pdHRlc3QuVGVzdE1hcC5NYXBJbnQzMkZv",
57             "cmVpZ25NZXNzYWdlRW50cnkaNAoSTWFwSW50MzJJbnQzMkVudHJ5EgsKA2tl",
58             "eRgBIAEoBRINCgV2YWx1ZRgCIAEoBToCOAEaNAoSTWFwSW50NjRJbnQ2NEVu",
59             "dHJ5EgsKA2tleRgBIAEoAxINCgV2YWx1ZRgCIAEoAzoCOAEaNgoUTWFwVWlu",
60             "dDMyVWludDMyRW50cnkSCwoDa2V5GAEgASgNEg0KBXZhbHVlGAIgASgNOgI4",
61             "ARo2ChRNYXBVaW50NjRVaW50NjRFbnRyeRILCgNrZXkYASABKAQSDQoFdmFs",
62             "dWUYAiABKAQ6AjgBGjYKFE1hcFNpbnQzMlNpbnQzMkVudHJ5EgsKA2tleRgB",
63             "IAEoERINCgV2YWx1ZRgCIAEoEToCOAEaNgoUTWFwU2ludDY0U2ludDY0RW50",
64             "cnkSCwoDa2V5GAEgASgSEg0KBXZhbHVlGAIgASgSOgI4ARo4ChZNYXBGaXhl",
65             "ZDMyRml4ZWQzMkVudHJ5EgsKA2tleRgBIAEoBxINCgV2YWx1ZRgCIAEoBzoC",
66             "OAEaOAoWTWFwRml4ZWQ2NEZpeGVkNjRFbnRyeRILCgNrZXkYASABKAYSDQoF",
67             "dmFsdWUYAiABKAY6AjgBGjoKGE1hcFNmaXhlZDMyU2ZpeGVkMzJFbnRyeRIL",
68             "CgNrZXkYASABKA8SDQoFdmFsdWUYAiABKA86AjgBGjoKGE1hcFNmaXhlZDY0",
69             "U2ZpeGVkNjRFbnRyeRILCgNrZXkYASABKBASDQoFdmFsdWUYAiABKBA6AjgB",
70             "GjQKEk1hcEludDMyRmxvYXRFbnRyeRILCgNrZXkYASABKAUSDQoFdmFsdWUY",
71             "AiABKAI6AjgBGjUKE01hcEludDMyRG91YmxlRW50cnkSCwoDa2V5GAEgASgF",
72             "Eg0KBXZhbHVlGAIgASgBOgI4ARoyChBNYXBCb29sQm9vbEVudHJ5EgsKA2tl",
73             "eRgBIAEoCBINCgV2YWx1ZRgCIAEoCDoCOAEaNgoUTWFwU3RyaW5nU3RyaW5n",
74             "RW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ARo0ChJNYXBJ",
75             "bnQzMkJ5dGVzRW50cnkSCwoDa2V5GAEgASgFEg0KBXZhbHVlGAIgASgMOgI4",
76             "ARpPChFNYXBJbnQzMkVudW1FbnRyeRILCgNrZXkYASABKAUSKQoFdmFsdWUY",
77             "AiABKA4yGi5wcm90b2J1Zl91bml0dGVzdC5NYXBFbnVtOgI4ARpgChtNYXBJ",
78             "bnQzMkZvcmVpZ25NZXNzYWdlRW50cnkSCwoDa2V5GAEgASgFEjAKBXZhbHVl",
79             "GAIgASgLMiEucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2U6AjgB",
80             "IkEKEVRlc3RNYXBTdWJtZXNzYWdlEiwKCHRlc3RfbWFwGAEgASgLMhoucHJv",
81             "dG9idWZfdW5pdHRlc3QuVGVzdE1hcCK8AQoOVGVzdE1lc3NhZ2VNYXASUQoR",
82             "bWFwX2ludDMyX21lc3NhZ2UYASADKAsyNi5wcm90b2J1Zl91bml0dGVzdC5U",
83             "ZXN0TWVzc2FnZU1hcC5NYXBJbnQzMk1lc3NhZ2VFbnRyeRpXChRNYXBJbnQz",
84             "Mk1lc3NhZ2VFbnRyeRILCgNrZXkYASABKAUSLgoFdmFsdWUYAiABKAsyHy5w",
85             "cm90b2J1Zl91bml0dGVzdC5UZXN0QWxsVHlwZXM6AjgBIuMBCg9UZXN0U2Ft",
86             "ZVR5cGVNYXASOgoEbWFwMRgBIAMoCzIsLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
87             "c3RTYW1lVHlwZU1hcC5NYXAxRW50cnkSOgoEbWFwMhgCIAMoCzIsLnByb3Rv",
88             "YnVmX3VuaXR0ZXN0LlRlc3RTYW1lVHlwZU1hcC5NYXAyRW50cnkaKwoJTWFw",
89             "MUVudHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1ZRgCIAEoBToCOAEaKwoJTWFw",
90             "MkVudHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1ZRgCIAEoBToCOAEi5BAKDFRl",
91             "c3RBcmVuYU1hcBJLCg9tYXBfaW50MzJfaW50MzIYASADKAsyMi5wcm90b2J1",
92             "Zl91bml0dGVzdC5UZXN0QXJlbmFNYXAuTWFwSW50MzJJbnQzMkVudHJ5EksK",
93             "D21hcF9pbnQ2NF9pbnQ2NBgCIAMoCzIyLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
94             "c3RBcmVuYU1hcC5NYXBJbnQ2NEludDY0RW50cnkSTwoRbWFwX3VpbnQzMl91",
95             "aW50MzIYAyADKAsyNC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QXJlbmFNYXAu",
96             "TWFwVWludDMyVWludDMyRW50cnkSTwoRbWFwX3VpbnQ2NF91aW50NjQYBCAD",
97             "KAsyNC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QXJlbmFNYXAuTWFwVWludDY0",
98             "VWludDY0RW50cnkSTwoRbWFwX3NpbnQzMl9zaW50MzIYBSADKAsyNC5wcm90",
99             "b2J1Zl91bml0dGVzdC5UZXN0QXJlbmFNYXAuTWFwU2ludDMyU2ludDMyRW50",
100             "cnkSTwoRbWFwX3NpbnQ2NF9zaW50NjQYBiADKAsyNC5wcm90b2J1Zl91bml0",
101             "dGVzdC5UZXN0QXJlbmFNYXAuTWFwU2ludDY0U2ludDY0RW50cnkSUwoTbWFw",
102             "X2ZpeGVkMzJfZml4ZWQzMhgHIAMoCzI2LnByb3RvYnVmX3VuaXR0ZXN0LlRl",
103             "c3RBcmVuYU1hcC5NYXBGaXhlZDMyRml4ZWQzMkVudHJ5ElMKE21hcF9maXhl",
104             "ZDY0X2ZpeGVkNjQYCCADKAsyNi5wcm90b2J1Zl91bml0dGVzdC5UZXN0QXJl",
105             "bmFNYXAuTWFwRml4ZWQ2NEZpeGVkNjRFbnRyeRJXChVtYXBfc2ZpeGVkMzJf",
106             "c2ZpeGVkMzIYCSADKAsyOC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QXJlbmFN",
107             "YXAuTWFwU2ZpeGVkMzJTZml4ZWQzMkVudHJ5ElcKFW1hcF9zZml4ZWQ2NF9z",
108             "Zml4ZWQ2NBgKIAMoCzI4LnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBcmVuYU1h",
109             "cC5NYXBTZml4ZWQ2NFNmaXhlZDY0RW50cnkSSwoPbWFwX2ludDMyX2Zsb2F0",
110             "GAsgAygLMjIucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFyZW5hTWFwLk1hcElu",
111             "dDMyRmxvYXRFbnRyeRJNChBtYXBfaW50MzJfZG91YmxlGAwgAygLMjMucHJv",
112             "dG9idWZfdW5pdHRlc3QuVGVzdEFyZW5hTWFwLk1hcEludDMyRG91YmxlRW50",
113             "cnkSRwoNbWFwX2Jvb2xfYm9vbBgNIAMoCzIwLnByb3RvYnVmX3VuaXR0ZXN0",
114             "LlRlc3RBcmVuYU1hcC5NYXBCb29sQm9vbEVudHJ5EkkKDm1hcF9pbnQzMl9l",
115             "bnVtGA4gAygLMjEucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFyZW5hTWFwLk1h",
116             "cEludDMyRW51bUVudHJ5El4KGW1hcF9pbnQzMl9mb3JlaWduX21lc3NhZ2UY",
117             "DyADKAsyOy5wcm90b2J1Zl91bml0dGVzdC5UZXN0QXJlbmFNYXAuTWFwSW50",
118             "MzJGb3JlaWduTWVzc2FnZUVudHJ5GjQKEk1hcEludDMySW50MzJFbnRyeRIL",
119             "CgNrZXkYASABKAUSDQoFdmFsdWUYAiABKAU6AjgBGjQKEk1hcEludDY0SW50",
120             "NjRFbnRyeRILCgNrZXkYASABKAMSDQoFdmFsdWUYAiABKAM6AjgBGjYKFE1h",
121             "cFVpbnQzMlVpbnQzMkVudHJ5EgsKA2tleRgBIAEoDRINCgV2YWx1ZRgCIAEo",
122             "DToCOAEaNgoUTWFwVWludDY0VWludDY0RW50cnkSCwoDa2V5GAEgASgEEg0K",
123             "BXZhbHVlGAIgASgEOgI4ARo2ChRNYXBTaW50MzJTaW50MzJFbnRyeRILCgNr",
124             "ZXkYASABKBESDQoFdmFsdWUYAiABKBE6AjgBGjYKFE1hcFNpbnQ2NFNpbnQ2",
125             "NEVudHJ5EgsKA2tleRgBIAEoEhINCgV2YWx1ZRgCIAEoEjoCOAEaOAoWTWFw",
126             "Rml4ZWQzMkZpeGVkMzJFbnRyeRILCgNrZXkYASABKAcSDQoFdmFsdWUYAiAB",
127             "KAc6AjgBGjgKFk1hcEZpeGVkNjRGaXhlZDY0RW50cnkSCwoDa2V5GAEgASgG",
128             "Eg0KBXZhbHVlGAIgASgGOgI4ARo6ChhNYXBTZml4ZWQzMlNmaXhlZDMyRW50",
129             "cnkSCwoDa2V5GAEgASgPEg0KBXZhbHVlGAIgASgPOgI4ARo6ChhNYXBTZml4",
130             "ZWQ2NFNmaXhlZDY0RW50cnkSCwoDa2V5GAEgASgQEg0KBXZhbHVlGAIgASgQ",
131             "OgI4ARo0ChJNYXBJbnQzMkZsb2F0RW50cnkSCwoDa2V5GAEgASgFEg0KBXZh",
132             "bHVlGAIgASgCOgI4ARo1ChNNYXBJbnQzMkRvdWJsZUVudHJ5EgsKA2tleRgB",
133             "IAEoBRINCgV2YWx1ZRgCIAEoAToCOAEaMgoQTWFwQm9vbEJvb2xFbnRyeRIL",
134             "CgNrZXkYASABKAgSDQoFdmFsdWUYAiABKAg6AjgBGk8KEU1hcEludDMyRW51",
135             "bUVudHJ5EgsKA2tleRgBIAEoBRIpCgV2YWx1ZRgCIAEoDjIaLnByb3RvYnVm",
136             "X3VuaXR0ZXN0Lk1hcEVudW06AjgBGmAKG01hcEludDMyRm9yZWlnbk1lc3Nh",
137             "Z2VFbnRyeRILCgNrZXkYASABKAUSMAoFdmFsdWUYAiABKAsyIS5wcm90b2J1",
138             "Zl91bml0dGVzdC5Gb3JlaWduTWVzc2FnZToCOAEi5AEKH01lc3NhZ2VDb250",
139             "YWluaW5nRW51bUNhbGxlZFR5cGUSSgoEdHlwZRgBIAMoCzI8LnByb3RvYnVm",
140             "X3VuaXR0ZXN0Lk1lc3NhZ2VDb250YWluaW5nRW51bUNhbGxlZFR5cGUuVHlw",
141             "ZUVudHJ5Gl8KCVR5cGVFbnRyeRILCgNrZXkYASABKAUSQQoFdmFsdWUYAiAB",
142             "KAsyMi5wcm90b2J1Zl91bml0dGVzdC5NZXNzYWdlQ29udGFpbmluZ0VudW1D",
143             "YWxsZWRUeXBlOgI4ASIUCgRUeXBlEgwKCFRZUEVfRk9PEAAinQEKH01lc3Nh",
144             "Z2VDb250YWluaW5nTWFwQ2FsbGVkRW50cnkSTAoFZW50cnkYASADKAsyPS5w",
145             "cm90b2J1Zl91bml0dGVzdC5NZXNzYWdlQ29udGFpbmluZ01hcENhbGxlZEVu",
146             "dHJ5LkVudHJ5RW50cnkaLAoKRW50cnlFbnRyeRILCgNrZXkYASABKAUSDQoF",
147             "dmFsdWUYAiABKAU6AjgBKj8KB01hcEVudW0SEAoMTUFQX0VOVU1fRk9PEAAS",
148             "EAoMTUFQX0VOVU1fQkFSEAESEAoMTUFQX0VOVU1fQkFaEAJCIPgBAaoCGkdv",
149             "b2dsZS5Qcm90b2J1Zi5UZXN0UHJvdG9zYgZwcm90bzM="));
150       descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
151           new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor, },
152           new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.MapEnum), }, new pbr::GeneratedClrTypeInfo[] {
153             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMap), global::Google.Protobuf.TestProtos.TestMap.Parser, new[]{ "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapInt32Bytes", "MapInt32Enum", "MapInt32ForeignMessage" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }),
154             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMapSubmessage), global::Google.Protobuf.TestProtos.TestMapSubmessage.Parser, new[]{ "TestMap" }, null, null, null),
155             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMessageMap), global::Google.Protobuf.TestProtos.TestMessageMap.Parser, new[]{ "MapInt32Message" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
156             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestSameTypeMap), global::Google.Protobuf.TestProtos.TestSameTypeMap.Parser, new[]{ "Map1", "Map2" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }),
157             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestArenaMap), global::Google.Protobuf.TestProtos.TestArenaMap.Parser, new[]{ "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapInt32Enum", "MapInt32ForeignMessage" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }),
158             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType), global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType.Parser, new[]{ "Type" }, null, new[]{ typeof(global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType.Types.Type) }, new pbr::GeneratedClrTypeInfo[] { null, }),
159             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.MessageContainingMapCalledEntry), global::Google.Protobuf.TestProtos.MessageContainingMapCalledEntry.Parser, new[]{ "Entry" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
160           }));
161     }
162     #endregion
163 
164   }
165   #region Enums
166   public enum MapEnum {
167     [pbr::OriginalName("MAP_ENUM_FOO")] Foo = 0,
168     [pbr::OriginalName("MAP_ENUM_BAR")] Bar = 1,
169     [pbr::OriginalName("MAP_ENUM_BAZ")] Baz = 2,
170   }
171 
172   #endregion
173 
174   #region Messages
175   /// <summary>
176   ///  Tests maps.
177   /// </summary>
178   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
179   public sealed partial class TestMap : pb::IMessage<TestMap> {
180     private static readonly pb::MessageParser<TestMap> _parser = new pb::MessageParser<TestMap>(() => new TestMap());
181     public static pb::MessageParser<TestMap> Parser { get { return _parser; } }
182 
183     public static pbr::MessageDescriptor Descriptor {
184       get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[0]; }
185     }
186 
187     pbr::MessageDescriptor pb::IMessage.Descriptor {
188       get { return Descriptor; }
189     }
190 
TestMap()191     public TestMap() {
192       OnConstruction();
193     }
194 
OnConstruction()195     partial void OnConstruction();
196 
TestMap(TestMap other)197     public TestMap(TestMap other) : this() {
198       mapInt32Int32_ = other.mapInt32Int32_.Clone();
199       mapInt64Int64_ = other.mapInt64Int64_.Clone();
200       mapUint32Uint32_ = other.mapUint32Uint32_.Clone();
201       mapUint64Uint64_ = other.mapUint64Uint64_.Clone();
202       mapSint32Sint32_ = other.mapSint32Sint32_.Clone();
203       mapSint64Sint64_ = other.mapSint64Sint64_.Clone();
204       mapFixed32Fixed32_ = other.mapFixed32Fixed32_.Clone();
205       mapFixed64Fixed64_ = other.mapFixed64Fixed64_.Clone();
206       mapSfixed32Sfixed32_ = other.mapSfixed32Sfixed32_.Clone();
207       mapSfixed64Sfixed64_ = other.mapSfixed64Sfixed64_.Clone();
208       mapInt32Float_ = other.mapInt32Float_.Clone();
209       mapInt32Double_ = other.mapInt32Double_.Clone();
210       mapBoolBool_ = other.mapBoolBool_.Clone();
211       mapStringString_ = other.mapStringString_.Clone();
212       mapInt32Bytes_ = other.mapInt32Bytes_.Clone();
213       mapInt32Enum_ = other.mapInt32Enum_.Clone();
214       mapInt32ForeignMessage_ = other.mapInt32ForeignMessage_.Clone();
215     }
216 
Clone()217     public TestMap Clone() {
218       return new TestMap(this);
219     }
220 
221     /// <summary>Field number for the "map_int32_int32" field.</summary>
222     public const int MapInt32Int32FieldNumber = 1;
223     private static readonly pbc::MapField<int, int>.Codec _map_mapInt32Int32_codec
224         = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 10);
225     private readonly pbc::MapField<int, int> mapInt32Int32_ = new pbc::MapField<int, int>();
226     public pbc::MapField<int, int> MapInt32Int32 {
227       get { return mapInt32Int32_; }
228     }
229 
230     /// <summary>Field number for the "map_int64_int64" field.</summary>
231     public const int MapInt64Int64FieldNumber = 2;
232     private static readonly pbc::MapField<long, long>.Codec _map_mapInt64Int64_codec
233         = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForInt64(8), pb::FieldCodec.ForInt64(16), 18);
234     private readonly pbc::MapField<long, long> mapInt64Int64_ = new pbc::MapField<long, long>();
235     public pbc::MapField<long, long> MapInt64Int64 {
236       get { return mapInt64Int64_; }
237     }
238 
239     /// <summary>Field number for the "map_uint32_uint32" field.</summary>
240     public const int MapUint32Uint32FieldNumber = 3;
241     private static readonly pbc::MapField<uint, uint>.Codec _map_mapUint32Uint32_codec
242         = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8), pb::FieldCodec.ForUInt32(16), 26);
243     private readonly pbc::MapField<uint, uint> mapUint32Uint32_ = new pbc::MapField<uint, uint>();
244     public pbc::MapField<uint, uint> MapUint32Uint32 {
245       get { return mapUint32Uint32_; }
246     }
247 
248     /// <summary>Field number for the "map_uint64_uint64" field.</summary>
249     public const int MapUint64Uint64FieldNumber = 4;
250     private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapUint64Uint64_codec
251         = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForUInt64(8), pb::FieldCodec.ForUInt64(16), 34);
252     private readonly pbc::MapField<ulong, ulong> mapUint64Uint64_ = new pbc::MapField<ulong, ulong>();
253     public pbc::MapField<ulong, ulong> MapUint64Uint64 {
254       get { return mapUint64Uint64_; }
255     }
256 
257     /// <summary>Field number for the "map_sint32_sint32" field.</summary>
258     public const int MapSint32Sint32FieldNumber = 5;
259     private static readonly pbc::MapField<int, int>.Codec _map_mapSint32Sint32_codec
260         = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSInt32(8), pb::FieldCodec.ForSInt32(16), 42);
261     private readonly pbc::MapField<int, int> mapSint32Sint32_ = new pbc::MapField<int, int>();
262     public pbc::MapField<int, int> MapSint32Sint32 {
263       get { return mapSint32Sint32_; }
264     }
265 
266     /// <summary>Field number for the "map_sint64_sint64" field.</summary>
267     public const int MapSint64Sint64FieldNumber = 6;
268     private static readonly pbc::MapField<long, long>.Codec _map_mapSint64Sint64_codec
269         = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSInt64(8), pb::FieldCodec.ForSInt64(16), 50);
270     private readonly pbc::MapField<long, long> mapSint64Sint64_ = new pbc::MapField<long, long>();
271     public pbc::MapField<long, long> MapSint64Sint64 {
272       get { return mapSint64Sint64_; }
273     }
274 
275     /// <summary>Field number for the "map_fixed32_fixed32" field.</summary>
276     public const int MapFixed32Fixed32FieldNumber = 7;
277     private static readonly pbc::MapField<uint, uint>.Codec _map_mapFixed32Fixed32_codec
278         = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForFixed32(13), pb::FieldCodec.ForFixed32(21), 58);
279     private readonly pbc::MapField<uint, uint> mapFixed32Fixed32_ = new pbc::MapField<uint, uint>();
280     public pbc::MapField<uint, uint> MapFixed32Fixed32 {
281       get { return mapFixed32Fixed32_; }
282     }
283 
284     /// <summary>Field number for the "map_fixed64_fixed64" field.</summary>
285     public const int MapFixed64Fixed64FieldNumber = 8;
286     private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapFixed64Fixed64_codec
287         = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForFixed64(9), pb::FieldCodec.ForFixed64(17), 66);
288     private readonly pbc::MapField<ulong, ulong> mapFixed64Fixed64_ = new pbc::MapField<ulong, ulong>();
289     public pbc::MapField<ulong, ulong> MapFixed64Fixed64 {
290       get { return mapFixed64Fixed64_; }
291     }
292 
293     /// <summary>Field number for the "map_sfixed32_sfixed32" field.</summary>
294     public const int MapSfixed32Sfixed32FieldNumber = 9;
295     private static readonly pbc::MapField<int, int>.Codec _map_mapSfixed32Sfixed32_codec
296         = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSFixed32(13), pb::FieldCodec.ForSFixed32(21), 74);
297     private readonly pbc::MapField<int, int> mapSfixed32Sfixed32_ = new pbc::MapField<int, int>();
298     public pbc::MapField<int, int> MapSfixed32Sfixed32 {
299       get { return mapSfixed32Sfixed32_; }
300     }
301 
302     /// <summary>Field number for the "map_sfixed64_sfixed64" field.</summary>
303     public const int MapSfixed64Sfixed64FieldNumber = 10;
304     private static readonly pbc::MapField<long, long>.Codec _map_mapSfixed64Sfixed64_codec
305         = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSFixed64(9), pb::FieldCodec.ForSFixed64(17), 82);
306     private readonly pbc::MapField<long, long> mapSfixed64Sfixed64_ = new pbc::MapField<long, long>();
307     public pbc::MapField<long, long> MapSfixed64Sfixed64 {
308       get { return mapSfixed64Sfixed64_; }
309     }
310 
311     /// <summary>Field number for the "map_int32_float" field.</summary>
312     public const int MapInt32FloatFieldNumber = 11;
313     private static readonly pbc::MapField<int, float>.Codec _map_mapInt32Float_codec
314         = new pbc::MapField<int, float>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForFloat(21), 90);
315     private readonly pbc::MapField<int, float> mapInt32Float_ = new pbc::MapField<int, float>();
316     public pbc::MapField<int, float> MapInt32Float {
317       get { return mapInt32Float_; }
318     }
319 
320     /// <summary>Field number for the "map_int32_double" field.</summary>
321     public const int MapInt32DoubleFieldNumber = 12;
322     private static readonly pbc::MapField<int, double>.Codec _map_mapInt32Double_codec
323         = new pbc::MapField<int, double>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForDouble(17), 98);
324     private readonly pbc::MapField<int, double> mapInt32Double_ = new pbc::MapField<int, double>();
325     public pbc::MapField<int, double> MapInt32Double {
326       get { return mapInt32Double_; }
327     }
328 
329     /// <summary>Field number for the "map_bool_bool" field.</summary>
330     public const int MapBoolBoolFieldNumber = 13;
331     private static readonly pbc::MapField<bool, bool>.Codec _map_mapBoolBool_codec
332         = new pbc::MapField<bool, bool>.Codec(pb::FieldCodec.ForBool(8), pb::FieldCodec.ForBool(16), 106);
333     private readonly pbc::MapField<bool, bool> mapBoolBool_ = new pbc::MapField<bool, bool>();
334     public pbc::MapField<bool, bool> MapBoolBool {
335       get { return mapBoolBool_; }
336     }
337 
338     /// <summary>Field number for the "map_string_string" field.</summary>
339     public const int MapStringStringFieldNumber = 14;
340     private static readonly pbc::MapField<string, string>.Codec _map_mapStringString_codec
341         = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 114);
342     private readonly pbc::MapField<string, string> mapStringString_ = new pbc::MapField<string, string>();
343     public pbc::MapField<string, string> MapStringString {
344       get { return mapStringString_; }
345     }
346 
347     /// <summary>Field number for the "map_int32_bytes" field.</summary>
348     public const int MapInt32BytesFieldNumber = 15;
349     private static readonly pbc::MapField<int, pb::ByteString>.Codec _map_mapInt32Bytes_codec
350         = new pbc::MapField<int, pb::ByteString>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForBytes(18), 122);
351     private readonly pbc::MapField<int, pb::ByteString> mapInt32Bytes_ = new pbc::MapField<int, pb::ByteString>();
352     public pbc::MapField<int, pb::ByteString> MapInt32Bytes {
353       get { return mapInt32Bytes_; }
354     }
355 
356     /// <summary>Field number for the "map_int32_enum" field.</summary>
357     public const int MapInt32EnumFieldNumber = 16;
358     private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum>.Codec _map_mapInt32Enum_codec
359         = new pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::Google.Protobuf.TestProtos.MapEnum) x), 130);
360     private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum> mapInt32Enum_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum>();
361     public pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum> MapInt32Enum {
362       get { return mapInt32Enum_; }
363     }
364 
365     /// <summary>Field number for the "map_int32_foreign_message" field.</summary>
366     public const int MapInt32ForeignMessageFieldNumber = 17;
367     private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage>.Codec _map_mapInt32ForeignMessage_codec
368         = new pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.ForeignMessage.Parser), 138);
369     private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage> mapInt32ForeignMessage_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage>();
370     public pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage> MapInt32ForeignMessage {
371       get { return mapInt32ForeignMessage_; }
372     }
373 
Equals(object other)374     public override bool Equals(object other) {
375       return Equals(other as TestMap);
376     }
377 
Equals(TestMap other)378     public bool Equals(TestMap other) {
379       if (ReferenceEquals(other, null)) {
380         return false;
381       }
382       if (ReferenceEquals(other, this)) {
383         return true;
384       }
385       if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false;
386       if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false;
387       if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false;
388       if (!MapUint64Uint64.Equals(other.MapUint64Uint64)) return false;
389       if (!MapSint32Sint32.Equals(other.MapSint32Sint32)) return false;
390       if (!MapSint64Sint64.Equals(other.MapSint64Sint64)) return false;
391       if (!MapFixed32Fixed32.Equals(other.MapFixed32Fixed32)) return false;
392       if (!MapFixed64Fixed64.Equals(other.MapFixed64Fixed64)) return false;
393       if (!MapSfixed32Sfixed32.Equals(other.MapSfixed32Sfixed32)) return false;
394       if (!MapSfixed64Sfixed64.Equals(other.MapSfixed64Sfixed64)) return false;
395       if (!MapInt32Float.Equals(other.MapInt32Float)) return false;
396       if (!MapInt32Double.Equals(other.MapInt32Double)) return false;
397       if (!MapBoolBool.Equals(other.MapBoolBool)) return false;
398       if (!MapStringString.Equals(other.MapStringString)) return false;
399       if (!MapInt32Bytes.Equals(other.MapInt32Bytes)) return false;
400       if (!MapInt32Enum.Equals(other.MapInt32Enum)) return false;
401       if (!MapInt32ForeignMessage.Equals(other.MapInt32ForeignMessage)) return false;
402       return true;
403     }
404 
GetHashCode()405     public override int GetHashCode() {
406       int hash = 1;
407       hash ^= MapInt32Int32.GetHashCode();
408       hash ^= MapInt64Int64.GetHashCode();
409       hash ^= MapUint32Uint32.GetHashCode();
410       hash ^= MapUint64Uint64.GetHashCode();
411       hash ^= MapSint32Sint32.GetHashCode();
412       hash ^= MapSint64Sint64.GetHashCode();
413       hash ^= MapFixed32Fixed32.GetHashCode();
414       hash ^= MapFixed64Fixed64.GetHashCode();
415       hash ^= MapSfixed32Sfixed32.GetHashCode();
416       hash ^= MapSfixed64Sfixed64.GetHashCode();
417       hash ^= MapInt32Float.GetHashCode();
418       hash ^= MapInt32Double.GetHashCode();
419       hash ^= MapBoolBool.GetHashCode();
420       hash ^= MapStringString.GetHashCode();
421       hash ^= MapInt32Bytes.GetHashCode();
422       hash ^= MapInt32Enum.GetHashCode();
423       hash ^= MapInt32ForeignMessage.GetHashCode();
424       return hash;
425     }
426 
ToString()427     public override string ToString() {
428       return pb::JsonFormatter.ToDiagnosticString(this);
429     }
430 
WriteTo(pb::CodedOutputStream output)431     public void WriteTo(pb::CodedOutputStream output) {
432       mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec);
433       mapInt64Int64_.WriteTo(output, _map_mapInt64Int64_codec);
434       mapUint32Uint32_.WriteTo(output, _map_mapUint32Uint32_codec);
435       mapUint64Uint64_.WriteTo(output, _map_mapUint64Uint64_codec);
436       mapSint32Sint32_.WriteTo(output, _map_mapSint32Sint32_codec);
437       mapSint64Sint64_.WriteTo(output, _map_mapSint64Sint64_codec);
438       mapFixed32Fixed32_.WriteTo(output, _map_mapFixed32Fixed32_codec);
439       mapFixed64Fixed64_.WriteTo(output, _map_mapFixed64Fixed64_codec);
440       mapSfixed32Sfixed32_.WriteTo(output, _map_mapSfixed32Sfixed32_codec);
441       mapSfixed64Sfixed64_.WriteTo(output, _map_mapSfixed64Sfixed64_codec);
442       mapInt32Float_.WriteTo(output, _map_mapInt32Float_codec);
443       mapInt32Double_.WriteTo(output, _map_mapInt32Double_codec);
444       mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec);
445       mapStringString_.WriteTo(output, _map_mapStringString_codec);
446       mapInt32Bytes_.WriteTo(output, _map_mapInt32Bytes_codec);
447       mapInt32Enum_.WriteTo(output, _map_mapInt32Enum_codec);
448       mapInt32ForeignMessage_.WriteTo(output, _map_mapInt32ForeignMessage_codec);
449     }
450 
CalculateSize()451     public int CalculateSize() {
452       int size = 0;
453       size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec);
454       size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec);
455       size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec);
456       size += mapUint64Uint64_.CalculateSize(_map_mapUint64Uint64_codec);
457       size += mapSint32Sint32_.CalculateSize(_map_mapSint32Sint32_codec);
458       size += mapSint64Sint64_.CalculateSize(_map_mapSint64Sint64_codec);
459       size += mapFixed32Fixed32_.CalculateSize(_map_mapFixed32Fixed32_codec);
460       size += mapFixed64Fixed64_.CalculateSize(_map_mapFixed64Fixed64_codec);
461       size += mapSfixed32Sfixed32_.CalculateSize(_map_mapSfixed32Sfixed32_codec);
462       size += mapSfixed64Sfixed64_.CalculateSize(_map_mapSfixed64Sfixed64_codec);
463       size += mapInt32Float_.CalculateSize(_map_mapInt32Float_codec);
464       size += mapInt32Double_.CalculateSize(_map_mapInt32Double_codec);
465       size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec);
466       size += mapStringString_.CalculateSize(_map_mapStringString_codec);
467       size += mapInt32Bytes_.CalculateSize(_map_mapInt32Bytes_codec);
468       size += mapInt32Enum_.CalculateSize(_map_mapInt32Enum_codec);
469       size += mapInt32ForeignMessage_.CalculateSize(_map_mapInt32ForeignMessage_codec);
470       return size;
471     }
472 
MergeFrom(TestMap other)473     public void MergeFrom(TestMap other) {
474       if (other == null) {
475         return;
476       }
477       mapInt32Int32_.Add(other.mapInt32Int32_);
478       mapInt64Int64_.Add(other.mapInt64Int64_);
479       mapUint32Uint32_.Add(other.mapUint32Uint32_);
480       mapUint64Uint64_.Add(other.mapUint64Uint64_);
481       mapSint32Sint32_.Add(other.mapSint32Sint32_);
482       mapSint64Sint64_.Add(other.mapSint64Sint64_);
483       mapFixed32Fixed32_.Add(other.mapFixed32Fixed32_);
484       mapFixed64Fixed64_.Add(other.mapFixed64Fixed64_);
485       mapSfixed32Sfixed32_.Add(other.mapSfixed32Sfixed32_);
486       mapSfixed64Sfixed64_.Add(other.mapSfixed64Sfixed64_);
487       mapInt32Float_.Add(other.mapInt32Float_);
488       mapInt32Double_.Add(other.mapInt32Double_);
489       mapBoolBool_.Add(other.mapBoolBool_);
490       mapStringString_.Add(other.mapStringString_);
491       mapInt32Bytes_.Add(other.mapInt32Bytes_);
492       mapInt32Enum_.Add(other.mapInt32Enum_);
493       mapInt32ForeignMessage_.Add(other.mapInt32ForeignMessage_);
494     }
495 
MergeFrom(pb::CodedInputStream input)496     public void MergeFrom(pb::CodedInputStream input) {
497       uint tag;
498       while ((tag = input.ReadTag()) != 0) {
499         switch(tag) {
500           default:
501             input.SkipLastField();
502             break;
503           case 10: {
504             mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
505             break;
506           }
507           case 18: {
508             mapInt64Int64_.AddEntriesFrom(input, _map_mapInt64Int64_codec);
509             break;
510           }
511           case 26: {
512             mapUint32Uint32_.AddEntriesFrom(input, _map_mapUint32Uint32_codec);
513             break;
514           }
515           case 34: {
516             mapUint64Uint64_.AddEntriesFrom(input, _map_mapUint64Uint64_codec);
517             break;
518           }
519           case 42: {
520             mapSint32Sint32_.AddEntriesFrom(input, _map_mapSint32Sint32_codec);
521             break;
522           }
523           case 50: {
524             mapSint64Sint64_.AddEntriesFrom(input, _map_mapSint64Sint64_codec);
525             break;
526           }
527           case 58: {
528             mapFixed32Fixed32_.AddEntriesFrom(input, _map_mapFixed32Fixed32_codec);
529             break;
530           }
531           case 66: {
532             mapFixed64Fixed64_.AddEntriesFrom(input, _map_mapFixed64Fixed64_codec);
533             break;
534           }
535           case 74: {
536             mapSfixed32Sfixed32_.AddEntriesFrom(input, _map_mapSfixed32Sfixed32_codec);
537             break;
538           }
539           case 82: {
540             mapSfixed64Sfixed64_.AddEntriesFrom(input, _map_mapSfixed64Sfixed64_codec);
541             break;
542           }
543           case 90: {
544             mapInt32Float_.AddEntriesFrom(input, _map_mapInt32Float_codec);
545             break;
546           }
547           case 98: {
548             mapInt32Double_.AddEntriesFrom(input, _map_mapInt32Double_codec);
549             break;
550           }
551           case 106: {
552             mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec);
553             break;
554           }
555           case 114: {
556             mapStringString_.AddEntriesFrom(input, _map_mapStringString_codec);
557             break;
558           }
559           case 122: {
560             mapInt32Bytes_.AddEntriesFrom(input, _map_mapInt32Bytes_codec);
561             break;
562           }
563           case 130: {
564             mapInt32Enum_.AddEntriesFrom(input, _map_mapInt32Enum_codec);
565             break;
566           }
567           case 138: {
568             mapInt32ForeignMessage_.AddEntriesFrom(input, _map_mapInt32ForeignMessage_codec);
569             break;
570           }
571         }
572       }
573     }
574 
575   }
576 
577   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
578   public sealed partial class TestMapSubmessage : pb::IMessage<TestMapSubmessage> {
579     private static readonly pb::MessageParser<TestMapSubmessage> _parser = new pb::MessageParser<TestMapSubmessage>(() => new TestMapSubmessage());
580     public static pb::MessageParser<TestMapSubmessage> Parser { get { return _parser; } }
581 
582     public static pbr::MessageDescriptor Descriptor {
583       get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[1]; }
584     }
585 
586     pbr::MessageDescriptor pb::IMessage.Descriptor {
587       get { return Descriptor; }
588     }
589 
TestMapSubmessage()590     public TestMapSubmessage() {
591       OnConstruction();
592     }
593 
OnConstruction()594     partial void OnConstruction();
595 
TestMapSubmessage(TestMapSubmessage other)596     public TestMapSubmessage(TestMapSubmessage other) : this() {
597       TestMap = other.testMap_ != null ? other.TestMap.Clone() : null;
598     }
599 
Clone()600     public TestMapSubmessage Clone() {
601       return new TestMapSubmessage(this);
602     }
603 
604     /// <summary>Field number for the "test_map" field.</summary>
605     public const int TestMapFieldNumber = 1;
606     private global::Google.Protobuf.TestProtos.TestMap testMap_;
607     public global::Google.Protobuf.TestProtos.TestMap TestMap {
608       get { return testMap_; }
609       set {
610         testMap_ = value;
611       }
612     }
613 
Equals(object other)614     public override bool Equals(object other) {
615       return Equals(other as TestMapSubmessage);
616     }
617 
Equals(TestMapSubmessage other)618     public bool Equals(TestMapSubmessage other) {
619       if (ReferenceEquals(other, null)) {
620         return false;
621       }
622       if (ReferenceEquals(other, this)) {
623         return true;
624       }
625       if (!object.Equals(TestMap, other.TestMap)) return false;
626       return true;
627     }
628 
GetHashCode()629     public override int GetHashCode() {
630       int hash = 1;
631       if (testMap_ != null) hash ^= TestMap.GetHashCode();
632       return hash;
633     }
634 
ToString()635     public override string ToString() {
636       return pb::JsonFormatter.ToDiagnosticString(this);
637     }
638 
WriteTo(pb::CodedOutputStream output)639     public void WriteTo(pb::CodedOutputStream output) {
640       if (testMap_ != null) {
641         output.WriteRawTag(10);
642         output.WriteMessage(TestMap);
643       }
644     }
645 
CalculateSize()646     public int CalculateSize() {
647       int size = 0;
648       if (testMap_ != null) {
649         size += 1 + pb::CodedOutputStream.ComputeMessageSize(TestMap);
650       }
651       return size;
652     }
653 
MergeFrom(TestMapSubmessage other)654     public void MergeFrom(TestMapSubmessage other) {
655       if (other == null) {
656         return;
657       }
658       if (other.testMap_ != null) {
659         if (testMap_ == null) {
660           testMap_ = new global::Google.Protobuf.TestProtos.TestMap();
661         }
662         TestMap.MergeFrom(other.TestMap);
663       }
664     }
665 
MergeFrom(pb::CodedInputStream input)666     public void MergeFrom(pb::CodedInputStream input) {
667       uint tag;
668       while ((tag = input.ReadTag()) != 0) {
669         switch(tag) {
670           default:
671             input.SkipLastField();
672             break;
673           case 10: {
674             if (testMap_ == null) {
675               testMap_ = new global::Google.Protobuf.TestProtos.TestMap();
676             }
677             input.ReadMessage(testMap_);
678             break;
679           }
680         }
681       }
682     }
683 
684   }
685 
686   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
687   public sealed partial class TestMessageMap : pb::IMessage<TestMessageMap> {
688     private static readonly pb::MessageParser<TestMessageMap> _parser = new pb::MessageParser<TestMessageMap>(() => new TestMessageMap());
689     public static pb::MessageParser<TestMessageMap> Parser { get { return _parser; } }
690 
691     public static pbr::MessageDescriptor Descriptor {
692       get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[2]; }
693     }
694 
695     pbr::MessageDescriptor pb::IMessage.Descriptor {
696       get { return Descriptor; }
697     }
698 
TestMessageMap()699     public TestMessageMap() {
700       OnConstruction();
701     }
702 
OnConstruction()703     partial void OnConstruction();
704 
TestMessageMap(TestMessageMap other)705     public TestMessageMap(TestMessageMap other) : this() {
706       mapInt32Message_ = other.mapInt32Message_.Clone();
707     }
708 
Clone()709     public TestMessageMap Clone() {
710       return new TestMessageMap(this);
711     }
712 
713     /// <summary>Field number for the "map_int32_message" field.</summary>
714     public const int MapInt32MessageFieldNumber = 1;
715     private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.TestAllTypes>.Codec _map_mapInt32Message_codec
716         = new pbc::MapField<int, global::Google.Protobuf.TestProtos.TestAllTypes>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.TestAllTypes.Parser), 10);
717     private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.TestAllTypes> mapInt32Message_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.TestAllTypes>();
718     public pbc::MapField<int, global::Google.Protobuf.TestProtos.TestAllTypes> MapInt32Message {
719       get { return mapInt32Message_; }
720     }
721 
Equals(object other)722     public override bool Equals(object other) {
723       return Equals(other as TestMessageMap);
724     }
725 
Equals(TestMessageMap other)726     public bool Equals(TestMessageMap other) {
727       if (ReferenceEquals(other, null)) {
728         return false;
729       }
730       if (ReferenceEquals(other, this)) {
731         return true;
732       }
733       if (!MapInt32Message.Equals(other.MapInt32Message)) return false;
734       return true;
735     }
736 
GetHashCode()737     public override int GetHashCode() {
738       int hash = 1;
739       hash ^= MapInt32Message.GetHashCode();
740       return hash;
741     }
742 
ToString()743     public override string ToString() {
744       return pb::JsonFormatter.ToDiagnosticString(this);
745     }
746 
WriteTo(pb::CodedOutputStream output)747     public void WriteTo(pb::CodedOutputStream output) {
748       mapInt32Message_.WriteTo(output, _map_mapInt32Message_codec);
749     }
750 
CalculateSize()751     public int CalculateSize() {
752       int size = 0;
753       size += mapInt32Message_.CalculateSize(_map_mapInt32Message_codec);
754       return size;
755     }
756 
MergeFrom(TestMessageMap other)757     public void MergeFrom(TestMessageMap other) {
758       if (other == null) {
759         return;
760       }
761       mapInt32Message_.Add(other.mapInt32Message_);
762     }
763 
MergeFrom(pb::CodedInputStream input)764     public void MergeFrom(pb::CodedInputStream input) {
765       uint tag;
766       while ((tag = input.ReadTag()) != 0) {
767         switch(tag) {
768           default:
769             input.SkipLastField();
770             break;
771           case 10: {
772             mapInt32Message_.AddEntriesFrom(input, _map_mapInt32Message_codec);
773             break;
774           }
775         }
776       }
777     }
778 
779   }
780 
781   /// <summary>
782   ///  Two map fields share the same entry default instance.
783   /// </summary>
784   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
785   public sealed partial class TestSameTypeMap : pb::IMessage<TestSameTypeMap> {
786     private static readonly pb::MessageParser<TestSameTypeMap> _parser = new pb::MessageParser<TestSameTypeMap>(() => new TestSameTypeMap());
787     public static pb::MessageParser<TestSameTypeMap> Parser { get { return _parser; } }
788 
789     public static pbr::MessageDescriptor Descriptor {
790       get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[3]; }
791     }
792 
793     pbr::MessageDescriptor pb::IMessage.Descriptor {
794       get { return Descriptor; }
795     }
796 
TestSameTypeMap()797     public TestSameTypeMap() {
798       OnConstruction();
799     }
800 
OnConstruction()801     partial void OnConstruction();
802 
TestSameTypeMap(TestSameTypeMap other)803     public TestSameTypeMap(TestSameTypeMap other) : this() {
804       map1_ = other.map1_.Clone();
805       map2_ = other.map2_.Clone();
806     }
807 
Clone()808     public TestSameTypeMap Clone() {
809       return new TestSameTypeMap(this);
810     }
811 
812     /// <summary>Field number for the "map1" field.</summary>
813     public const int Map1FieldNumber = 1;
814     private static readonly pbc::MapField<int, int>.Codec _map_map1_codec
815         = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 10);
816     private readonly pbc::MapField<int, int> map1_ = new pbc::MapField<int, int>();
817     public pbc::MapField<int, int> Map1 {
818       get { return map1_; }
819     }
820 
821     /// <summary>Field number for the "map2" field.</summary>
822     public const int Map2FieldNumber = 2;
823     private static readonly pbc::MapField<int, int>.Codec _map_map2_codec
824         = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 18);
825     private readonly pbc::MapField<int, int> map2_ = new pbc::MapField<int, int>();
826     public pbc::MapField<int, int> Map2 {
827       get { return map2_; }
828     }
829 
Equals(object other)830     public override bool Equals(object other) {
831       return Equals(other as TestSameTypeMap);
832     }
833 
Equals(TestSameTypeMap other)834     public bool Equals(TestSameTypeMap other) {
835       if (ReferenceEquals(other, null)) {
836         return false;
837       }
838       if (ReferenceEquals(other, this)) {
839         return true;
840       }
841       if (!Map1.Equals(other.Map1)) return false;
842       if (!Map2.Equals(other.Map2)) return false;
843       return true;
844     }
845 
GetHashCode()846     public override int GetHashCode() {
847       int hash = 1;
848       hash ^= Map1.GetHashCode();
849       hash ^= Map2.GetHashCode();
850       return hash;
851     }
852 
ToString()853     public override string ToString() {
854       return pb::JsonFormatter.ToDiagnosticString(this);
855     }
856 
WriteTo(pb::CodedOutputStream output)857     public void WriteTo(pb::CodedOutputStream output) {
858       map1_.WriteTo(output, _map_map1_codec);
859       map2_.WriteTo(output, _map_map2_codec);
860     }
861 
CalculateSize()862     public int CalculateSize() {
863       int size = 0;
864       size += map1_.CalculateSize(_map_map1_codec);
865       size += map2_.CalculateSize(_map_map2_codec);
866       return size;
867     }
868 
MergeFrom(TestSameTypeMap other)869     public void MergeFrom(TestSameTypeMap other) {
870       if (other == null) {
871         return;
872       }
873       map1_.Add(other.map1_);
874       map2_.Add(other.map2_);
875     }
876 
MergeFrom(pb::CodedInputStream input)877     public void MergeFrom(pb::CodedInputStream input) {
878       uint tag;
879       while ((tag = input.ReadTag()) != 0) {
880         switch(tag) {
881           default:
882             input.SkipLastField();
883             break;
884           case 10: {
885             map1_.AddEntriesFrom(input, _map_map1_codec);
886             break;
887           }
888           case 18: {
889             map2_.AddEntriesFrom(input, _map_map2_codec);
890             break;
891           }
892         }
893       }
894     }
895 
896   }
897 
898   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
899   public sealed partial class TestArenaMap : pb::IMessage<TestArenaMap> {
900     private static readonly pb::MessageParser<TestArenaMap> _parser = new pb::MessageParser<TestArenaMap>(() => new TestArenaMap());
901     public static pb::MessageParser<TestArenaMap> Parser { get { return _parser; } }
902 
903     public static pbr::MessageDescriptor Descriptor {
904       get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[4]; }
905     }
906 
907     pbr::MessageDescriptor pb::IMessage.Descriptor {
908       get { return Descriptor; }
909     }
910 
TestArenaMap()911     public TestArenaMap() {
912       OnConstruction();
913     }
914 
OnConstruction()915     partial void OnConstruction();
916 
TestArenaMap(TestArenaMap other)917     public TestArenaMap(TestArenaMap other) : this() {
918       mapInt32Int32_ = other.mapInt32Int32_.Clone();
919       mapInt64Int64_ = other.mapInt64Int64_.Clone();
920       mapUint32Uint32_ = other.mapUint32Uint32_.Clone();
921       mapUint64Uint64_ = other.mapUint64Uint64_.Clone();
922       mapSint32Sint32_ = other.mapSint32Sint32_.Clone();
923       mapSint64Sint64_ = other.mapSint64Sint64_.Clone();
924       mapFixed32Fixed32_ = other.mapFixed32Fixed32_.Clone();
925       mapFixed64Fixed64_ = other.mapFixed64Fixed64_.Clone();
926       mapSfixed32Sfixed32_ = other.mapSfixed32Sfixed32_.Clone();
927       mapSfixed64Sfixed64_ = other.mapSfixed64Sfixed64_.Clone();
928       mapInt32Float_ = other.mapInt32Float_.Clone();
929       mapInt32Double_ = other.mapInt32Double_.Clone();
930       mapBoolBool_ = other.mapBoolBool_.Clone();
931       mapInt32Enum_ = other.mapInt32Enum_.Clone();
932       mapInt32ForeignMessage_ = other.mapInt32ForeignMessage_.Clone();
933     }
934 
Clone()935     public TestArenaMap Clone() {
936       return new TestArenaMap(this);
937     }
938 
939     /// <summary>Field number for the "map_int32_int32" field.</summary>
940     public const int MapInt32Int32FieldNumber = 1;
941     private static readonly pbc::MapField<int, int>.Codec _map_mapInt32Int32_codec
942         = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 10);
943     private readonly pbc::MapField<int, int> mapInt32Int32_ = new pbc::MapField<int, int>();
944     public pbc::MapField<int, int> MapInt32Int32 {
945       get { return mapInt32Int32_; }
946     }
947 
948     /// <summary>Field number for the "map_int64_int64" field.</summary>
949     public const int MapInt64Int64FieldNumber = 2;
950     private static readonly pbc::MapField<long, long>.Codec _map_mapInt64Int64_codec
951         = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForInt64(8), pb::FieldCodec.ForInt64(16), 18);
952     private readonly pbc::MapField<long, long> mapInt64Int64_ = new pbc::MapField<long, long>();
953     public pbc::MapField<long, long> MapInt64Int64 {
954       get { return mapInt64Int64_; }
955     }
956 
957     /// <summary>Field number for the "map_uint32_uint32" field.</summary>
958     public const int MapUint32Uint32FieldNumber = 3;
959     private static readonly pbc::MapField<uint, uint>.Codec _map_mapUint32Uint32_codec
960         = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8), pb::FieldCodec.ForUInt32(16), 26);
961     private readonly pbc::MapField<uint, uint> mapUint32Uint32_ = new pbc::MapField<uint, uint>();
962     public pbc::MapField<uint, uint> MapUint32Uint32 {
963       get { return mapUint32Uint32_; }
964     }
965 
966     /// <summary>Field number for the "map_uint64_uint64" field.</summary>
967     public const int MapUint64Uint64FieldNumber = 4;
968     private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapUint64Uint64_codec
969         = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForUInt64(8), pb::FieldCodec.ForUInt64(16), 34);
970     private readonly pbc::MapField<ulong, ulong> mapUint64Uint64_ = new pbc::MapField<ulong, ulong>();
971     public pbc::MapField<ulong, ulong> MapUint64Uint64 {
972       get { return mapUint64Uint64_; }
973     }
974 
975     /// <summary>Field number for the "map_sint32_sint32" field.</summary>
976     public const int MapSint32Sint32FieldNumber = 5;
977     private static readonly pbc::MapField<int, int>.Codec _map_mapSint32Sint32_codec
978         = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSInt32(8), pb::FieldCodec.ForSInt32(16), 42);
979     private readonly pbc::MapField<int, int> mapSint32Sint32_ = new pbc::MapField<int, int>();
980     public pbc::MapField<int, int> MapSint32Sint32 {
981       get { return mapSint32Sint32_; }
982     }
983 
984     /// <summary>Field number for the "map_sint64_sint64" field.</summary>
985     public const int MapSint64Sint64FieldNumber = 6;
986     private static readonly pbc::MapField<long, long>.Codec _map_mapSint64Sint64_codec
987         = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSInt64(8), pb::FieldCodec.ForSInt64(16), 50);
988     private readonly pbc::MapField<long, long> mapSint64Sint64_ = new pbc::MapField<long, long>();
989     public pbc::MapField<long, long> MapSint64Sint64 {
990       get { return mapSint64Sint64_; }
991     }
992 
993     /// <summary>Field number for the "map_fixed32_fixed32" field.</summary>
994     public const int MapFixed32Fixed32FieldNumber = 7;
995     private static readonly pbc::MapField<uint, uint>.Codec _map_mapFixed32Fixed32_codec
996         = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForFixed32(13), pb::FieldCodec.ForFixed32(21), 58);
997     private readonly pbc::MapField<uint, uint> mapFixed32Fixed32_ = new pbc::MapField<uint, uint>();
998     public pbc::MapField<uint, uint> MapFixed32Fixed32 {
999       get { return mapFixed32Fixed32_; }
1000     }
1001 
1002     /// <summary>Field number for the "map_fixed64_fixed64" field.</summary>
1003     public const int MapFixed64Fixed64FieldNumber = 8;
1004     private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapFixed64Fixed64_codec
1005         = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForFixed64(9), pb::FieldCodec.ForFixed64(17), 66);
1006     private readonly pbc::MapField<ulong, ulong> mapFixed64Fixed64_ = new pbc::MapField<ulong, ulong>();
1007     public pbc::MapField<ulong, ulong> MapFixed64Fixed64 {
1008       get { return mapFixed64Fixed64_; }
1009     }
1010 
1011     /// <summary>Field number for the "map_sfixed32_sfixed32" field.</summary>
1012     public const int MapSfixed32Sfixed32FieldNumber = 9;
1013     private static readonly pbc::MapField<int, int>.Codec _map_mapSfixed32Sfixed32_codec
1014         = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSFixed32(13), pb::FieldCodec.ForSFixed32(21), 74);
1015     private readonly pbc::MapField<int, int> mapSfixed32Sfixed32_ = new pbc::MapField<int, int>();
1016     public pbc::MapField<int, int> MapSfixed32Sfixed32 {
1017       get { return mapSfixed32Sfixed32_; }
1018     }
1019 
1020     /// <summary>Field number for the "map_sfixed64_sfixed64" field.</summary>
1021     public const int MapSfixed64Sfixed64FieldNumber = 10;
1022     private static readonly pbc::MapField<long, long>.Codec _map_mapSfixed64Sfixed64_codec
1023         = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSFixed64(9), pb::FieldCodec.ForSFixed64(17), 82);
1024     private readonly pbc::MapField<long, long> mapSfixed64Sfixed64_ = new pbc::MapField<long, long>();
1025     public pbc::MapField<long, long> MapSfixed64Sfixed64 {
1026       get { return mapSfixed64Sfixed64_; }
1027     }
1028 
1029     /// <summary>Field number for the "map_int32_float" field.</summary>
1030     public const int MapInt32FloatFieldNumber = 11;
1031     private static readonly pbc::MapField<int, float>.Codec _map_mapInt32Float_codec
1032         = new pbc::MapField<int, float>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForFloat(21), 90);
1033     private readonly pbc::MapField<int, float> mapInt32Float_ = new pbc::MapField<int, float>();
1034     public pbc::MapField<int, float> MapInt32Float {
1035       get { return mapInt32Float_; }
1036     }
1037 
1038     /// <summary>Field number for the "map_int32_double" field.</summary>
1039     public const int MapInt32DoubleFieldNumber = 12;
1040     private static readonly pbc::MapField<int, double>.Codec _map_mapInt32Double_codec
1041         = new pbc::MapField<int, double>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForDouble(17), 98);
1042     private readonly pbc::MapField<int, double> mapInt32Double_ = new pbc::MapField<int, double>();
1043     public pbc::MapField<int, double> MapInt32Double {
1044       get { return mapInt32Double_; }
1045     }
1046 
1047     /// <summary>Field number for the "map_bool_bool" field.</summary>
1048     public const int MapBoolBoolFieldNumber = 13;
1049     private static readonly pbc::MapField<bool, bool>.Codec _map_mapBoolBool_codec
1050         = new pbc::MapField<bool, bool>.Codec(pb::FieldCodec.ForBool(8), pb::FieldCodec.ForBool(16), 106);
1051     private readonly pbc::MapField<bool, bool> mapBoolBool_ = new pbc::MapField<bool, bool>();
1052     public pbc::MapField<bool, bool> MapBoolBool {
1053       get { return mapBoolBool_; }
1054     }
1055 
1056     /// <summary>Field number for the "map_int32_enum" field.</summary>
1057     public const int MapInt32EnumFieldNumber = 14;
1058     private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum>.Codec _map_mapInt32Enum_codec
1059         = new pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::Google.Protobuf.TestProtos.MapEnum) x), 114);
1060     private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum> mapInt32Enum_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum>();
1061     public pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum> MapInt32Enum {
1062       get { return mapInt32Enum_; }
1063     }
1064 
1065     /// <summary>Field number for the "map_int32_foreign_message" field.</summary>
1066     public const int MapInt32ForeignMessageFieldNumber = 15;
1067     private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage>.Codec _map_mapInt32ForeignMessage_codec
1068         = new pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.ForeignMessage.Parser), 122);
1069     private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage> mapInt32ForeignMessage_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage>();
1070     public pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage> MapInt32ForeignMessage {
1071       get { return mapInt32ForeignMessage_; }
1072     }
1073 
Equals(object other)1074     public override bool Equals(object other) {
1075       return Equals(other as TestArenaMap);
1076     }
1077 
Equals(TestArenaMap other)1078     public bool Equals(TestArenaMap other) {
1079       if (ReferenceEquals(other, null)) {
1080         return false;
1081       }
1082       if (ReferenceEquals(other, this)) {
1083         return true;
1084       }
1085       if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false;
1086       if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false;
1087       if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false;
1088       if (!MapUint64Uint64.Equals(other.MapUint64Uint64)) return false;
1089       if (!MapSint32Sint32.Equals(other.MapSint32Sint32)) return false;
1090       if (!MapSint64Sint64.Equals(other.MapSint64Sint64)) return false;
1091       if (!MapFixed32Fixed32.Equals(other.MapFixed32Fixed32)) return false;
1092       if (!MapFixed64Fixed64.Equals(other.MapFixed64Fixed64)) return false;
1093       if (!MapSfixed32Sfixed32.Equals(other.MapSfixed32Sfixed32)) return false;
1094       if (!MapSfixed64Sfixed64.Equals(other.MapSfixed64Sfixed64)) return false;
1095       if (!MapInt32Float.Equals(other.MapInt32Float)) return false;
1096       if (!MapInt32Double.Equals(other.MapInt32Double)) return false;
1097       if (!MapBoolBool.Equals(other.MapBoolBool)) return false;
1098       if (!MapInt32Enum.Equals(other.MapInt32Enum)) return false;
1099       if (!MapInt32ForeignMessage.Equals(other.MapInt32ForeignMessage)) return false;
1100       return true;
1101     }
1102 
GetHashCode()1103     public override int GetHashCode() {
1104       int hash = 1;
1105       hash ^= MapInt32Int32.GetHashCode();
1106       hash ^= MapInt64Int64.GetHashCode();
1107       hash ^= MapUint32Uint32.GetHashCode();
1108       hash ^= MapUint64Uint64.GetHashCode();
1109       hash ^= MapSint32Sint32.GetHashCode();
1110       hash ^= MapSint64Sint64.GetHashCode();
1111       hash ^= MapFixed32Fixed32.GetHashCode();
1112       hash ^= MapFixed64Fixed64.GetHashCode();
1113       hash ^= MapSfixed32Sfixed32.GetHashCode();
1114       hash ^= MapSfixed64Sfixed64.GetHashCode();
1115       hash ^= MapInt32Float.GetHashCode();
1116       hash ^= MapInt32Double.GetHashCode();
1117       hash ^= MapBoolBool.GetHashCode();
1118       hash ^= MapInt32Enum.GetHashCode();
1119       hash ^= MapInt32ForeignMessage.GetHashCode();
1120       return hash;
1121     }
1122 
ToString()1123     public override string ToString() {
1124       return pb::JsonFormatter.ToDiagnosticString(this);
1125     }
1126 
WriteTo(pb::CodedOutputStream output)1127     public void WriteTo(pb::CodedOutputStream output) {
1128       mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec);
1129       mapInt64Int64_.WriteTo(output, _map_mapInt64Int64_codec);
1130       mapUint32Uint32_.WriteTo(output, _map_mapUint32Uint32_codec);
1131       mapUint64Uint64_.WriteTo(output, _map_mapUint64Uint64_codec);
1132       mapSint32Sint32_.WriteTo(output, _map_mapSint32Sint32_codec);
1133       mapSint64Sint64_.WriteTo(output, _map_mapSint64Sint64_codec);
1134       mapFixed32Fixed32_.WriteTo(output, _map_mapFixed32Fixed32_codec);
1135       mapFixed64Fixed64_.WriteTo(output, _map_mapFixed64Fixed64_codec);
1136       mapSfixed32Sfixed32_.WriteTo(output, _map_mapSfixed32Sfixed32_codec);
1137       mapSfixed64Sfixed64_.WriteTo(output, _map_mapSfixed64Sfixed64_codec);
1138       mapInt32Float_.WriteTo(output, _map_mapInt32Float_codec);
1139       mapInt32Double_.WriteTo(output, _map_mapInt32Double_codec);
1140       mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec);
1141       mapInt32Enum_.WriteTo(output, _map_mapInt32Enum_codec);
1142       mapInt32ForeignMessage_.WriteTo(output, _map_mapInt32ForeignMessage_codec);
1143     }
1144 
CalculateSize()1145     public int CalculateSize() {
1146       int size = 0;
1147       size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec);
1148       size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec);
1149       size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec);
1150       size += mapUint64Uint64_.CalculateSize(_map_mapUint64Uint64_codec);
1151       size += mapSint32Sint32_.CalculateSize(_map_mapSint32Sint32_codec);
1152       size += mapSint64Sint64_.CalculateSize(_map_mapSint64Sint64_codec);
1153       size += mapFixed32Fixed32_.CalculateSize(_map_mapFixed32Fixed32_codec);
1154       size += mapFixed64Fixed64_.CalculateSize(_map_mapFixed64Fixed64_codec);
1155       size += mapSfixed32Sfixed32_.CalculateSize(_map_mapSfixed32Sfixed32_codec);
1156       size += mapSfixed64Sfixed64_.CalculateSize(_map_mapSfixed64Sfixed64_codec);
1157       size += mapInt32Float_.CalculateSize(_map_mapInt32Float_codec);
1158       size += mapInt32Double_.CalculateSize(_map_mapInt32Double_codec);
1159       size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec);
1160       size += mapInt32Enum_.CalculateSize(_map_mapInt32Enum_codec);
1161       size += mapInt32ForeignMessage_.CalculateSize(_map_mapInt32ForeignMessage_codec);
1162       return size;
1163     }
1164 
MergeFrom(TestArenaMap other)1165     public void MergeFrom(TestArenaMap other) {
1166       if (other == null) {
1167         return;
1168       }
1169       mapInt32Int32_.Add(other.mapInt32Int32_);
1170       mapInt64Int64_.Add(other.mapInt64Int64_);
1171       mapUint32Uint32_.Add(other.mapUint32Uint32_);
1172       mapUint64Uint64_.Add(other.mapUint64Uint64_);
1173       mapSint32Sint32_.Add(other.mapSint32Sint32_);
1174       mapSint64Sint64_.Add(other.mapSint64Sint64_);
1175       mapFixed32Fixed32_.Add(other.mapFixed32Fixed32_);
1176       mapFixed64Fixed64_.Add(other.mapFixed64Fixed64_);
1177       mapSfixed32Sfixed32_.Add(other.mapSfixed32Sfixed32_);
1178       mapSfixed64Sfixed64_.Add(other.mapSfixed64Sfixed64_);
1179       mapInt32Float_.Add(other.mapInt32Float_);
1180       mapInt32Double_.Add(other.mapInt32Double_);
1181       mapBoolBool_.Add(other.mapBoolBool_);
1182       mapInt32Enum_.Add(other.mapInt32Enum_);
1183       mapInt32ForeignMessage_.Add(other.mapInt32ForeignMessage_);
1184     }
1185 
MergeFrom(pb::CodedInputStream input)1186     public void MergeFrom(pb::CodedInputStream input) {
1187       uint tag;
1188       while ((tag = input.ReadTag()) != 0) {
1189         switch(tag) {
1190           default:
1191             input.SkipLastField();
1192             break;
1193           case 10: {
1194             mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
1195             break;
1196           }
1197           case 18: {
1198             mapInt64Int64_.AddEntriesFrom(input, _map_mapInt64Int64_codec);
1199             break;
1200           }
1201           case 26: {
1202             mapUint32Uint32_.AddEntriesFrom(input, _map_mapUint32Uint32_codec);
1203             break;
1204           }
1205           case 34: {
1206             mapUint64Uint64_.AddEntriesFrom(input, _map_mapUint64Uint64_codec);
1207             break;
1208           }
1209           case 42: {
1210             mapSint32Sint32_.AddEntriesFrom(input, _map_mapSint32Sint32_codec);
1211             break;
1212           }
1213           case 50: {
1214             mapSint64Sint64_.AddEntriesFrom(input, _map_mapSint64Sint64_codec);
1215             break;
1216           }
1217           case 58: {
1218             mapFixed32Fixed32_.AddEntriesFrom(input, _map_mapFixed32Fixed32_codec);
1219             break;
1220           }
1221           case 66: {
1222             mapFixed64Fixed64_.AddEntriesFrom(input, _map_mapFixed64Fixed64_codec);
1223             break;
1224           }
1225           case 74: {
1226             mapSfixed32Sfixed32_.AddEntriesFrom(input, _map_mapSfixed32Sfixed32_codec);
1227             break;
1228           }
1229           case 82: {
1230             mapSfixed64Sfixed64_.AddEntriesFrom(input, _map_mapSfixed64Sfixed64_codec);
1231             break;
1232           }
1233           case 90: {
1234             mapInt32Float_.AddEntriesFrom(input, _map_mapInt32Float_codec);
1235             break;
1236           }
1237           case 98: {
1238             mapInt32Double_.AddEntriesFrom(input, _map_mapInt32Double_codec);
1239             break;
1240           }
1241           case 106: {
1242             mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec);
1243             break;
1244           }
1245           case 114: {
1246             mapInt32Enum_.AddEntriesFrom(input, _map_mapInt32Enum_codec);
1247             break;
1248           }
1249           case 122: {
1250             mapInt32ForeignMessage_.AddEntriesFrom(input, _map_mapInt32ForeignMessage_codec);
1251             break;
1252           }
1253         }
1254       }
1255     }
1256 
1257   }
1258 
1259   /// <summary>
1260   ///  Previously, message containing enum called Type cannot be used as value of
1261   ///  map field.
1262   /// </summary>
1263   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1264   public sealed partial class MessageContainingEnumCalledType : pb::IMessage<MessageContainingEnumCalledType> {
1265     private static readonly pb::MessageParser<MessageContainingEnumCalledType> _parser = new pb::MessageParser<MessageContainingEnumCalledType>(() => new MessageContainingEnumCalledType());
1266     public static pb::MessageParser<MessageContainingEnumCalledType> Parser { get { return _parser; } }
1267 
1268     public static pbr::MessageDescriptor Descriptor {
1269       get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[5]; }
1270     }
1271 
1272     pbr::MessageDescriptor pb::IMessage.Descriptor {
1273       get { return Descriptor; }
1274     }
1275 
MessageContainingEnumCalledType()1276     public MessageContainingEnumCalledType() {
1277       OnConstruction();
1278     }
1279 
OnConstruction()1280     partial void OnConstruction();
1281 
MessageContainingEnumCalledType(MessageContainingEnumCalledType other)1282     public MessageContainingEnumCalledType(MessageContainingEnumCalledType other) : this() {
1283       type_ = other.type_.Clone();
1284     }
1285 
Clone()1286     public MessageContainingEnumCalledType Clone() {
1287       return new MessageContainingEnumCalledType(this);
1288     }
1289 
1290     /// <summary>Field number for the "type" field.</summary>
1291     public const int TypeFieldNumber = 1;
1292     private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType>.Codec _map_type_codec
1293         = new pbc::MapField<int, global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType.Parser), 10);
1294     private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType> type_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType>();
1295     public pbc::MapField<int, global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType> Type {
1296       get { return type_; }
1297     }
1298 
Equals(object other)1299     public override bool Equals(object other) {
1300       return Equals(other as MessageContainingEnumCalledType);
1301     }
1302 
Equals(MessageContainingEnumCalledType other)1303     public bool Equals(MessageContainingEnumCalledType other) {
1304       if (ReferenceEquals(other, null)) {
1305         return false;
1306       }
1307       if (ReferenceEquals(other, this)) {
1308         return true;
1309       }
1310       if (!Type.Equals(other.Type)) return false;
1311       return true;
1312     }
1313 
GetHashCode()1314     public override int GetHashCode() {
1315       int hash = 1;
1316       hash ^= Type.GetHashCode();
1317       return hash;
1318     }
1319 
ToString()1320     public override string ToString() {
1321       return pb::JsonFormatter.ToDiagnosticString(this);
1322     }
1323 
WriteTo(pb::CodedOutputStream output)1324     public void WriteTo(pb::CodedOutputStream output) {
1325       type_.WriteTo(output, _map_type_codec);
1326     }
1327 
CalculateSize()1328     public int CalculateSize() {
1329       int size = 0;
1330       size += type_.CalculateSize(_map_type_codec);
1331       return size;
1332     }
1333 
MergeFrom(MessageContainingEnumCalledType other)1334     public void MergeFrom(MessageContainingEnumCalledType other) {
1335       if (other == null) {
1336         return;
1337       }
1338       type_.Add(other.type_);
1339     }
1340 
MergeFrom(pb::CodedInputStream input)1341     public void MergeFrom(pb::CodedInputStream input) {
1342       uint tag;
1343       while ((tag = input.ReadTag()) != 0) {
1344         switch(tag) {
1345           default:
1346             input.SkipLastField();
1347             break;
1348           case 10: {
1349             type_.AddEntriesFrom(input, _map_type_codec);
1350             break;
1351           }
1352         }
1353       }
1354     }
1355 
1356     #region Nested types
1357     /// <summary>Container for nested types declared in the MessageContainingEnumCalledType message type.</summary>
1358     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1359     public static partial class Types {
1360       public enum Type {
1361         [pbr::OriginalName("TYPE_FOO")] Foo = 0,
1362       }
1363 
1364     }
1365     #endregion
1366 
1367   }
1368 
1369   /// <summary>
1370   ///  Previously, message cannot contain map field called "entry".
1371   /// </summary>
1372   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1373   public sealed partial class MessageContainingMapCalledEntry : pb::IMessage<MessageContainingMapCalledEntry> {
1374     private static readonly pb::MessageParser<MessageContainingMapCalledEntry> _parser = new pb::MessageParser<MessageContainingMapCalledEntry>(() => new MessageContainingMapCalledEntry());
1375     public static pb::MessageParser<MessageContainingMapCalledEntry> Parser { get { return _parser; } }
1376 
1377     public static pbr::MessageDescriptor Descriptor {
1378       get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[6]; }
1379     }
1380 
1381     pbr::MessageDescriptor pb::IMessage.Descriptor {
1382       get { return Descriptor; }
1383     }
1384 
MessageContainingMapCalledEntry()1385     public MessageContainingMapCalledEntry() {
1386       OnConstruction();
1387     }
1388 
OnConstruction()1389     partial void OnConstruction();
1390 
MessageContainingMapCalledEntry(MessageContainingMapCalledEntry other)1391     public MessageContainingMapCalledEntry(MessageContainingMapCalledEntry other) : this() {
1392       entry_ = other.entry_.Clone();
1393     }
1394 
Clone()1395     public MessageContainingMapCalledEntry Clone() {
1396       return new MessageContainingMapCalledEntry(this);
1397     }
1398 
1399     /// <summary>Field number for the "entry" field.</summary>
1400     public const int EntryFieldNumber = 1;
1401     private static readonly pbc::MapField<int, int>.Codec _map_entry_codec
1402         = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 10);
1403     private readonly pbc::MapField<int, int> entry_ = new pbc::MapField<int, int>();
1404     public pbc::MapField<int, int> Entry {
1405       get { return entry_; }
1406     }
1407 
Equals(object other)1408     public override bool Equals(object other) {
1409       return Equals(other as MessageContainingMapCalledEntry);
1410     }
1411 
Equals(MessageContainingMapCalledEntry other)1412     public bool Equals(MessageContainingMapCalledEntry other) {
1413       if (ReferenceEquals(other, null)) {
1414         return false;
1415       }
1416       if (ReferenceEquals(other, this)) {
1417         return true;
1418       }
1419       if (!Entry.Equals(other.Entry)) return false;
1420       return true;
1421     }
1422 
GetHashCode()1423     public override int GetHashCode() {
1424       int hash = 1;
1425       hash ^= Entry.GetHashCode();
1426       return hash;
1427     }
1428 
ToString()1429     public override string ToString() {
1430       return pb::JsonFormatter.ToDiagnosticString(this);
1431     }
1432 
WriteTo(pb::CodedOutputStream output)1433     public void WriteTo(pb::CodedOutputStream output) {
1434       entry_.WriteTo(output, _map_entry_codec);
1435     }
1436 
CalculateSize()1437     public int CalculateSize() {
1438       int size = 0;
1439       size += entry_.CalculateSize(_map_entry_codec);
1440       return size;
1441     }
1442 
MergeFrom(MessageContainingMapCalledEntry other)1443     public void MergeFrom(MessageContainingMapCalledEntry other) {
1444       if (other == null) {
1445         return;
1446       }
1447       entry_.Add(other.entry_);
1448     }
1449 
MergeFrom(pb::CodedInputStream input)1450     public void MergeFrom(pb::CodedInputStream input) {
1451       uint tag;
1452       while ((tag = input.ReadTag()) != 0) {
1453         switch(tag) {
1454           default:
1455             input.SkipLastField();
1456             break;
1457           case 10: {
1458             entry_.AddEntriesFrom(input, _map_entry_codec);
1459             break;
1460           }
1461         }
1462       }
1463     }
1464 
1465   }
1466 
1467   #endregion
1468 
1469 }
1470 
1471 #endregion Designer generated code
1472