blob: 27c04787c8e7414155fdb2f2aaab56bc85b103fb [file] [log] [blame]
Jon Skeete6fc9772015-06-26 10:32:50 +01001// 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
6using pb = global::Google.Protobuf;
7using pbc = global::Google.Protobuf.Collections;
Jon Skeet76940942015-07-14 10:25:40 +01008using pbr = global::Google.Protobuf.Reflection;
Jon Skeete6fc9772015-06-26 10:32:50 +01009using scg = global::System.Collections.Generic;
10namespace Google.Protobuf.TestProtos {
11
Jon Skeetb0888a42015-09-29 13:37:30 +010012 /// <summary>Holder for reflection information generated from google/protobuf/map_unittest_proto3.proto</summary>
Jon Skeete2c82302015-09-29 14:34:31 +010013 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jon Skeet284bb452015-11-05 09:13:53 +000014 public static partial class MapUnittestProto3Reflection {
Jon Skeete6fc9772015-06-26 10:32:50 +010015
Jon Skeete6fc9772015-06-26 10:32:50 +010016 #region Descriptor
Jon Skeetb0888a42015-09-29 13:37:30 +010017 /// <summary>File descriptor for google/protobuf/map_unittest_proto3.proto</summary>
Jon Skeet76940942015-07-14 10:25:40 +010018 public static pbr::FileDescriptor Descriptor {
Jon Skeete6fc9772015-06-26 10:32:50 +010019 get { return descriptor; }
20 }
Jon Skeet76940942015-07-14 10:25:40 +010021 private static pbr::FileDescriptor descriptor;
Jon Skeete6fc9772015-06-26 10:32:50 +010022
Jon Skeet284bb452015-11-05 09:13:53 +000023 static MapUnittestProto3Reflection() {
Jon Skeete6fc9772015-06-26 10:32:50 +010024 byte[] descriptorData = global::System.Convert.FromBase64String(
25 string.Concat(
Jon Skeet94898172015-09-01 15:47:48 +010026 "Cilnb29nbGUvcHJvdG9idWYvbWFwX3VuaXR0ZXN0X3Byb3RvMy5wcm90bxIR",
27 "cHJvdG9idWZfdW5pdHRlc3QaJWdvb2dsZS9wcm90b2J1Zi91bml0dGVzdF9w",
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50cnkSSwoPbWFwX2ludDMyX2Zsb2F0",
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 "Rml4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VzdC5NZXNzYWdlQ29udGFpbmluZ0VudW1D",
143 "YWxsZWRUeXBlOgI4ASIUCgRUeXBlEgwKCFRZUEVfRk9PEAAinQEKH01lc3Nh",
144 "Z2VDb250YWluaW5nTWFwQ2FsbGVkRW50cnkSTAoFZW50cnkYASADKAsyPS5w",
145 "cm90b2J1Zl91bml0dGVzdC5NZXNzYWdlQ29udGFpbmluZ01hcENhbGxlZEVu",
146 "dHJ5LkVudHJ5RW50cnkaLAoKRW50cnlFbnRyeRILCgNrZXkYASABKAUSDQoF",
147 "dmFsdWUYAiABKAU6AjgBKj8KB01hcEVudW0SEAoMTUFQX0VOVU1fRk9PEAAS",
148 "EAoMTUFQX0VOVU1fQkFSEAESEAoMTUFQX0VOVU1fQkFaEAJCIPgBAaoCGkdv",
Jon Skeet47bf49b2015-07-22 11:39:38 +0100149 "b2dsZS5Qcm90b2J1Zi5UZXN0UHJvdG9zYgZwcm90bzM="));
Jon Skeeta2667aa2015-11-19 17:14:23 +0000150 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
Jon Skeet284bb452015-11-05 09:13:53 +0000151 new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor, },
Jon Skeetb6159962016-02-04 07:08:55 +0000152 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, })
Jon Skeet47bf49b2015-07-22 11:39:38 +0100160 }));
Jon Skeete6fc9772015-06-26 10:32:50 +0100161 }
162 #endregion
163
164 }
165 #region Enums
166 public enum MapEnum {
167 MAP_ENUM_FOO = 0,
168 MAP_ENUM_BAR = 1,
169 MAP_ENUM_BAZ = 2,
170 }
171
172 #endregion
173
174 #region Messages
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100175 /// <summary>
176 /// Tests maps.
177 /// </summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100178 [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
Jon Skeet76940942015-07-14 10:25:40 +0100183 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +0000184 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[0]; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100185 }
186
Jon Skeet96cffaa2015-07-20 19:25:07 +0100187 pbr::MessageDescriptor pb::IMessage.Descriptor {
188 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100189 }
190
Jon Skeet53508222015-07-01 17:16:55 +0100191 public TestMap() {
192 OnConstruction();
193 }
Jon Skeete6fc9772015-06-26 10:32:50 +0100194
Jon Skeet53508222015-07-01 17:16:55 +0100195 partial void OnConstruction();
196
197 public TestMap(TestMap other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +0100198 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
217 public TestMap Clone() {
218 return new TestMap(this);
219 }
220
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100221 /// <summary>Field number for the "map_int32_int32" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100222 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100230 /// <summary>Field number for the "map_int64_int64" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100231 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100239 /// <summary>Field number for the "map_uint32_uint32" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100240 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100248 /// <summary>Field number for the "map_uint64_uint64" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100249 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100257 /// <summary>Field number for the "map_sint32_sint32" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100258 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100266 /// <summary>Field number for the "map_sint64_sint64" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100267 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100275 /// <summary>Field number for the "map_fixed32_fixed32" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100276 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100284 /// <summary>Field number for the "map_fixed64_fixed64" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100285 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100293 /// <summary>Field number for the "map_sfixed32_sfixed32" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100294 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100302 /// <summary>Field number for the "map_sfixed64_sfixed64" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100303 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100311 /// <summary>Field number for the "map_int32_float" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100312 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100320 /// <summary>Field number for the "map_int32_double" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100321 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100329 /// <summary>Field number for the "map_bool_bool" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100330 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100338 /// <summary>Field number for the "map_string_string" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100339 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100347 /// <summary>Field number for the "map_int32_bytes" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100348 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100356 /// <summary>Field number for the "map_int32_enum" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100357 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100365 /// <summary>Field number for the "map_int32_foreign_message" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100366 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
374 public override bool Equals(object other) {
375 return Equals(other as TestMap);
376 }
377
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
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
Jon Skeet5b9288e2015-07-03 12:45:36 +0100427 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000428 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet5b9288e2015-07-03 12:45:36 +0100429 }
430
Jon Skeete6fc9772015-06-26 10:32:50 +0100431 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
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
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
496 public void MergeFrom(pb::CodedInputStream input) {
497 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100498 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100499 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100500 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100501 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +0100502 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
Jon Skeete6fc9772015-06-26 10:32:50 +0100575 }
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
Jon Skeet76940942015-07-14 10:25:40 +0100582 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +0000583 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[1]; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100584 }
585
Jon Skeet96cffaa2015-07-20 19:25:07 +0100586 pbr::MessageDescriptor pb::IMessage.Descriptor {
587 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100588 }
589
Jon Skeet53508222015-07-01 17:16:55 +0100590 public TestMapSubmessage() {
591 OnConstruction();
592 }
Jon Skeete6fc9772015-06-26 10:32:50 +0100593
Jon Skeet53508222015-07-01 17:16:55 +0100594 partial void OnConstruction();
595
596 public TestMapSubmessage(TestMapSubmessage other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +0100597 TestMap = other.testMap_ != null ? other.TestMap.Clone() : null;
598 }
599
600 public TestMapSubmessage Clone() {
601 return new TestMapSubmessage(this);
602 }
603
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100604 /// <summary>Field number for the "test_map" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100605 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 {
Jon Skeete6fc9772015-06-26 10:32:50 +0100610 testMap_ = value;
611 }
612 }
613
614 public override bool Equals(object other) {
615 return Equals(other as TestMapSubmessage);
616 }
617
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
629 public override int GetHashCode() {
630 int hash = 1;
631 if (testMap_ != null) hash ^= TestMap.GetHashCode();
632 return hash;
633 }
634
Jon Skeet5b9288e2015-07-03 12:45:36 +0100635 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000636 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet5b9288e2015-07-03 12:45:36 +0100637 }
638
Jon Skeete6fc9772015-06-26 10:32:50 +0100639 public void WriteTo(pb::CodedOutputStream output) {
640 if (testMap_ != null) {
641 output.WriteRawTag(10);
642 output.WriteMessage(TestMap);
643 }
644 }
645
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
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
666 public void MergeFrom(pb::CodedInputStream input) {
667 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100668 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100669 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100670 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100671 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +0100672 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
Jon Skeet76940942015-07-14 10:25:40 +0100691 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +0000692 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[2]; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100693 }
694
Jon Skeet96cffaa2015-07-20 19:25:07 +0100695 pbr::MessageDescriptor pb::IMessage.Descriptor {
696 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100697 }
698
Jon Skeet53508222015-07-01 17:16:55 +0100699 public TestMessageMap() {
700 OnConstruction();
701 }
Jon Skeete6fc9772015-06-26 10:32:50 +0100702
Jon Skeet53508222015-07-01 17:16:55 +0100703 partial void OnConstruction();
704
705 public TestMessageMap(TestMessageMap other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +0100706 mapInt32Message_ = other.mapInt32Message_.Clone();
707 }
708
709 public TestMessageMap Clone() {
710 return new TestMessageMap(this);
711 }
712
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100713 /// <summary>Field number for the "map_int32_message" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100714 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
722 public override bool Equals(object other) {
723 return Equals(other as TestMessageMap);
724 }
725
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
737 public override int GetHashCode() {
738 int hash = 1;
739 hash ^= MapInt32Message.GetHashCode();
740 return hash;
741 }
742
Jon Skeet5b9288e2015-07-03 12:45:36 +0100743 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000744 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet5b9288e2015-07-03 12:45:36 +0100745 }
746
Jon Skeete6fc9772015-06-26 10:32:50 +0100747 public void WriteTo(pb::CodedOutputStream output) {
748 mapInt32Message_.WriteTo(output, _map_mapInt32Message_codec);
749 }
750
751 public int CalculateSize() {
752 int size = 0;
753 size += mapInt32Message_.CalculateSize(_map_mapInt32Message_codec);
754 return size;
755 }
756
757 public void MergeFrom(TestMessageMap other) {
758 if (other == null) {
759 return;
760 }
761 mapInt32Message_.Add(other.mapInt32Message_);
762 }
763
764 public void MergeFrom(pb::CodedInputStream input) {
765 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100766 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100767 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100768 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100769 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +0100770 break;
771 case 10: {
772 mapInt32Message_.AddEntriesFrom(input, _map_mapInt32Message_codec);
773 break;
774 }
775 }
776 }
777 }
778
Jon Skeete6fc9772015-06-26 10:32:50 +0100779 }
780
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100781 /// <summary>
782 /// Two map fields share the same entry default instance.
783 /// </summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100784 [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
Jon Skeet76940942015-07-14 10:25:40 +0100789 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +0000790 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[3]; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100791 }
792
Jon Skeet96cffaa2015-07-20 19:25:07 +0100793 pbr::MessageDescriptor pb::IMessage.Descriptor {
794 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100795 }
796
Jon Skeet53508222015-07-01 17:16:55 +0100797 public TestSameTypeMap() {
798 OnConstruction();
799 }
Jon Skeete6fc9772015-06-26 10:32:50 +0100800
Jon Skeet53508222015-07-01 17:16:55 +0100801 partial void OnConstruction();
802
803 public TestSameTypeMap(TestSameTypeMap other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +0100804 map1_ = other.map1_.Clone();
805 map2_ = other.map2_.Clone();
806 }
807
808 public TestSameTypeMap Clone() {
809 return new TestSameTypeMap(this);
810 }
811
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100812 /// <summary>Field number for the "map1" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100813 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100821 /// <summary>Field number for the "map2" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100822 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
830 public override bool Equals(object other) {
831 return Equals(other as TestSameTypeMap);
832 }
833
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
846 public override int GetHashCode() {
847 int hash = 1;
848 hash ^= Map1.GetHashCode();
849 hash ^= Map2.GetHashCode();
850 return hash;
851 }
852
Jon Skeet5b9288e2015-07-03 12:45:36 +0100853 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +0000854 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet5b9288e2015-07-03 12:45:36 +0100855 }
856
Jon Skeete6fc9772015-06-26 10:32:50 +0100857 public void WriteTo(pb::CodedOutputStream output) {
858 map1_.WriteTo(output, _map_map1_codec);
859 map2_.WriteTo(output, _map_map2_codec);
860 }
861
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
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
877 public void MergeFrom(pb::CodedInputStream input) {
878 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100879 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100880 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100881 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100882 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +0100883 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
Jon Skeete6fc9772015-06-26 10:32:50 +0100896 }
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
Jon Skeet76940942015-07-14 10:25:40 +0100903 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +0000904 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[4]; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100905 }
906
Jon Skeet96cffaa2015-07-20 19:25:07 +0100907 pbr::MessageDescriptor pb::IMessage.Descriptor {
908 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100909 }
910
Jon Skeet53508222015-07-01 17:16:55 +0100911 public TestArenaMap() {
912 OnConstruction();
913 }
Jon Skeete6fc9772015-06-26 10:32:50 +0100914
Jon Skeet53508222015-07-01 17:16:55 +0100915 partial void OnConstruction();
916
917 public TestArenaMap(TestArenaMap other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +0100918 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
935 public TestArenaMap Clone() {
936 return new TestArenaMap(this);
937 }
938
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100939 /// <summary>Field number for the "map_int32_int32" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100940 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100948 /// <summary>Field number for the "map_int64_int64" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100949 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100957 /// <summary>Field number for the "map_uint32_uint32" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100958 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100966 /// <summary>Field number for the "map_uint64_uint64" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100967 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100975 /// <summary>Field number for the "map_sint32_sint32" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100976 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100984 /// <summary>Field number for the "map_sint64_sint64" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100985 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +0100993 /// <summary>Field number for the "map_fixed32_fixed32" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +0100994 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001002 /// <summary>Field number for the "map_fixed64_fixed64" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001003 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001011 /// <summary>Field number for the "map_sfixed32_sfixed32" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001012 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001020 /// <summary>Field number for the "map_sfixed64_sfixed64" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001021 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001029 /// <summary>Field number for the "map_int32_float" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001030 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001038 /// <summary>Field number for the "map_int32_double" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001039 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001047 /// <summary>Field number for the "map_bool_bool" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001048 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001056 /// <summary>Field number for the "map_int32_enum" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001057 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
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001065 /// <summary>Field number for the "map_int32_foreign_message" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001066 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
1074 public override bool Equals(object other) {
1075 return Equals(other as TestArenaMap);
1076 }
1077
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
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
Jon Skeet5b9288e2015-07-03 12:45:36 +01001123 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +00001124 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet5b9288e2015-07-03 12:45:36 +01001125 }
1126
Jon Skeete6fc9772015-06-26 10:32:50 +01001127 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
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
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
1186 public void MergeFrom(pb::CodedInputStream input) {
1187 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +01001188 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001189 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001190 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +01001191 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +01001192 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
Jon Skeete6fc9772015-06-26 10:32:50 +01001257 }
1258
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001259 /// <summary>
1260 /// Previously, message containing enum called Type cannot be used as value of
1261 /// map field.
1262 /// </summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001263 [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
Jon Skeet76940942015-07-14 10:25:40 +01001268 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +00001269 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[5]; }
Jon Skeete6fc9772015-06-26 10:32:50 +01001270 }
1271
Jon Skeet96cffaa2015-07-20 19:25:07 +01001272 pbr::MessageDescriptor pb::IMessage.Descriptor {
1273 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +01001274 }
1275
Jon Skeet53508222015-07-01 17:16:55 +01001276 public MessageContainingEnumCalledType() {
1277 OnConstruction();
1278 }
Jon Skeete6fc9772015-06-26 10:32:50 +01001279
Jon Skeet53508222015-07-01 17:16:55 +01001280 partial void OnConstruction();
1281
1282 public MessageContainingEnumCalledType(MessageContainingEnumCalledType other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +01001283 type_ = other.type_.Clone();
1284 }
1285
1286 public MessageContainingEnumCalledType Clone() {
1287 return new MessageContainingEnumCalledType(this);
1288 }
1289
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001290 /// <summary>Field number for the "type" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001291 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
1299 public override bool Equals(object other) {
1300 return Equals(other as MessageContainingEnumCalledType);
1301 }
1302
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
1314 public override int GetHashCode() {
1315 int hash = 1;
1316 hash ^= Type.GetHashCode();
1317 return hash;
1318 }
1319
Jon Skeet5b9288e2015-07-03 12:45:36 +01001320 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +00001321 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet5b9288e2015-07-03 12:45:36 +01001322 }
1323
Jon Skeete6fc9772015-06-26 10:32:50 +01001324 public void WriteTo(pb::CodedOutputStream output) {
1325 type_.WriteTo(output, _map_type_codec);
1326 }
1327
1328 public int CalculateSize() {
1329 int size = 0;
1330 size += type_.CalculateSize(_map_type_codec);
1331 return size;
1332 }
1333
1334 public void MergeFrom(MessageContainingEnumCalledType other) {
1335 if (other == null) {
1336 return;
1337 }
1338 type_.Add(other.type_);
1339 }
1340
1341 public void MergeFrom(pb::CodedInputStream input) {
1342 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +01001343 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001344 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001345 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +01001346 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +01001347 break;
1348 case 10: {
1349 type_.AddEntriesFrom(input, _map_type_codec);
1350 break;
1351 }
1352 }
1353 }
1354 }
1355
1356 #region Nested types
Jon Skeetb0888a42015-09-29 13:37:30 +01001357 /// <summary>Container for nested types declared in the MessageContainingEnumCalledType message type.</summary>
Jon Skeete2c82302015-09-29 14:34:31 +01001358 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
Jon Skeete6fc9772015-06-26 10:32:50 +01001359 public static partial class Types {
1360 public enum Type {
1361 TYPE_FOO = 0,
1362 }
1363
Jon Skeete6fc9772015-06-26 10:32:50 +01001364 }
1365 #endregion
1366
1367 }
1368
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001369 /// <summary>
1370 /// Previously, message cannot contain map field called "entry".
1371 /// </summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001372 [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
Jon Skeet76940942015-07-14 10:25:40 +01001377 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +00001378 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[6]; }
Jon Skeete6fc9772015-06-26 10:32:50 +01001379 }
1380
Jon Skeet96cffaa2015-07-20 19:25:07 +01001381 pbr::MessageDescriptor pb::IMessage.Descriptor {
1382 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +01001383 }
1384
Jon Skeet53508222015-07-01 17:16:55 +01001385 public MessageContainingMapCalledEntry() {
1386 OnConstruction();
1387 }
Jon Skeete6fc9772015-06-26 10:32:50 +01001388
Jon Skeet53508222015-07-01 17:16:55 +01001389 partial void OnConstruction();
1390
1391 public MessageContainingMapCalledEntry(MessageContainingMapCalledEntry other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +01001392 entry_ = other.entry_.Clone();
1393 }
1394
1395 public MessageContainingMapCalledEntry Clone() {
1396 return new MessageContainingMapCalledEntry(this);
1397 }
1398
Jon Skeet18e0a2e2015-10-01 10:38:01 +01001399 /// <summary>Field number for the "entry" field.</summary>
Jon Skeete6fc9772015-06-26 10:32:50 +01001400 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
1408 public override bool Equals(object other) {
1409 return Equals(other as MessageContainingMapCalledEntry);
1410 }
1411
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
1423 public override int GetHashCode() {
1424 int hash = 1;
1425 hash ^= Entry.GetHashCode();
1426 return hash;
1427 }
1428
Jon Skeet5b9288e2015-07-03 12:45:36 +01001429 public override string ToString() {
Jon Skeetadee6fe2015-12-15 09:24:04 +00001430 return pb::JsonFormatter.ToDiagnosticString(this);
Jon Skeet5b9288e2015-07-03 12:45:36 +01001431 }
1432
Jon Skeete6fc9772015-06-26 10:32:50 +01001433 public void WriteTo(pb::CodedOutputStream output) {
1434 entry_.WriteTo(output, _map_entry_codec);
1435 }
1436
1437 public int CalculateSize() {
1438 int size = 0;
1439 size += entry_.CalculateSize(_map_entry_codec);
1440 return size;
1441 }
1442
1443 public void MergeFrom(MessageContainingMapCalledEntry other) {
1444 if (other == null) {
1445 return;
1446 }
1447 entry_.Add(other.entry_);
1448 }
1449
1450 public void MergeFrom(pb::CodedInputStream input) {
1451 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +01001452 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001453 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001454 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +01001455 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +01001456 break;
1457 case 10: {
1458 entry_.AddEntriesFrom(input, _map_entry_codec);
1459 break;
1460 }
1461 }
1462 }
1463 }
1464
Jon Skeete6fc9772015-06-26 10:32:50 +01001465 }
1466
1467 #endregion
1468
1469}
1470
1471#endregion Designer generated code