blob: e9e18193e75ed0f2da5b92abe7127a82bfba9065 [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
12 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
13 public static partial class MapUnittestProto3 {
14
Jon Skeete6fc9772015-06-26 10:32:50 +010015 #region Descriptor
Jon Skeet76940942015-07-14 10:25:40 +010016 public static pbr::FileDescriptor Descriptor {
Jon Skeete6fc9772015-06-26 10:32:50 +010017 get { return descriptor; }
18 }
Jon Skeet76940942015-07-14 10:25:40 +010019 private static pbr::FileDescriptor descriptor;
Jon Skeete6fc9772015-06-26 10:32:50 +010020
21 static MapUnittestProto3() {
22 byte[] descriptorData = global::System.Convert.FromBase64String(
23 string.Concat(
24 "Cilnb29nbGUvcHJvdG9idWYvbWFwX3VuaXR0ZXN0X3Byb3RvMy5wcm90bxIR",
25 "cHJvdG9idWZfdW5pdHRlc3QaJWdvb2dsZS9wcm90b2J1Zi91bml0dGVzdF9w",
26 "cm90bzMucHJvdG8ilhIKB1Rlc3RNYXASRgoPbWFwX2ludDMyX2ludDMyGAEg",
27 "AygLMi0ucHJvdG9idWZfdW5pdHRlc3QuVGVzdE1hcC5NYXBJbnQzMkludDMy",
28 "RW50cnkSRgoPbWFwX2ludDY0X2ludDY0GAIgAygLMi0ucHJvdG9idWZfdW5p",
29 "dHRlc3QuVGVzdE1hcC5NYXBJbnQ2NEludDY0RW50cnkSSgoRbWFwX3VpbnQz",
30 "Ml91aW50MzIYAyADKAsyLy5wcm90b2J1Zl91bml0dGVzdC5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iABKAU6AjgBKj8KB01hcEVudW0SEAoMTUFQX0VOVU1fRk9PEAAS",
146 "EAoMTUFQX0VOVU1fQkFSEAESEAoMTUFQX0VOVU1fQkFaEAJCIPgBAaoCGkdv",
Jon Skeet47bf49b2015-07-22 11:39:38 +0100147 "b2dsZS5Qcm90b2J1Zi5UZXN0UHJvdG9zYgZwcm90bzM="));
Jon Skeet76940942015-07-14 10:25:40 +0100148 descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
Jon Skeet96cffaa2015-07-20 19:25:07 +0100149 new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.UnittestProto3.Descriptor, },
Jon Skeet47bf49b2015-07-22 11:39:38 +0100150 new pbr::GeneratedCodeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.MapEnum), }, new pbr::GeneratedCodeInfo[] {
151 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestMap), new[]{ "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapInt32Bytes", "MapInt32Enum", "MapInt32ForeignMessage" }, null, null, new pbr::GeneratedCodeInfo[] { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }),
152 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestMapSubmessage), new[]{ "TestMap" }, null, null, null),
153 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestMessageMap), new[]{ "MapInt32Message" }, null, null, new pbr::GeneratedCodeInfo[] { null, }),
154 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestSameTypeMap), new[]{ "Map1", "Map2" }, null, null, new pbr::GeneratedCodeInfo[] { null, null, }),
155 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestArenaMap), new[]{ "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapInt32Enum", "MapInt32ForeignMessage" }, null, null, new pbr::GeneratedCodeInfo[] { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }),
156 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType), new[]{ "Type" }, null, new[]{ typeof(global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType.Types.Type) }, new pbr::GeneratedCodeInfo[] { null, }),
157 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.MessageContainingMapCalledEntry), new[]{ "Entry" }, null, null, new pbr::GeneratedCodeInfo[] { null, })
158 }));
Jon Skeete6fc9772015-06-26 10:32:50 +0100159 }
160 #endregion
161
162 }
163 #region Enums
164 public enum MapEnum {
165 MAP_ENUM_FOO = 0,
166 MAP_ENUM_BAR = 1,
167 MAP_ENUM_BAZ = 2,
168 }
169
170 #endregion
171
172 #region Messages
173 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
174 public sealed partial class TestMap : pb::IMessage<TestMap> {
175 private static readonly pb::MessageParser<TestMap> _parser = new pb::MessageParser<TestMap>(() => new TestMap());
176 public static pb::MessageParser<TestMap> Parser { get { return _parser; } }
177
Jon Skeet76940942015-07-14 10:25:40 +0100178 public static pbr::MessageDescriptor Descriptor {
Jon Skeet462d5692015-07-01 14:47:36 +0100179 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[0]; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100180 }
181
Jon Skeet96cffaa2015-07-20 19:25:07 +0100182 pbr::MessageDescriptor pb::IMessage.Descriptor {
183 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100184 }
185
Jon Skeet53508222015-07-01 17:16:55 +0100186 public TestMap() {
187 OnConstruction();
188 }
Jon Skeete6fc9772015-06-26 10:32:50 +0100189
Jon Skeet53508222015-07-01 17:16:55 +0100190 partial void OnConstruction();
191
192 public TestMap(TestMap other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +0100193 mapInt32Int32_ = other.mapInt32Int32_.Clone();
194 mapInt64Int64_ = other.mapInt64Int64_.Clone();
195 mapUint32Uint32_ = other.mapUint32Uint32_.Clone();
196 mapUint64Uint64_ = other.mapUint64Uint64_.Clone();
197 mapSint32Sint32_ = other.mapSint32Sint32_.Clone();
198 mapSint64Sint64_ = other.mapSint64Sint64_.Clone();
199 mapFixed32Fixed32_ = other.mapFixed32Fixed32_.Clone();
200 mapFixed64Fixed64_ = other.mapFixed64Fixed64_.Clone();
201 mapSfixed32Sfixed32_ = other.mapSfixed32Sfixed32_.Clone();
202 mapSfixed64Sfixed64_ = other.mapSfixed64Sfixed64_.Clone();
203 mapInt32Float_ = other.mapInt32Float_.Clone();
204 mapInt32Double_ = other.mapInt32Double_.Clone();
205 mapBoolBool_ = other.mapBoolBool_.Clone();
206 mapStringString_ = other.mapStringString_.Clone();
207 mapInt32Bytes_ = other.mapInt32Bytes_.Clone();
208 mapInt32Enum_ = other.mapInt32Enum_.Clone();
209 mapInt32ForeignMessage_ = other.mapInt32ForeignMessage_.Clone();
210 }
211
212 public TestMap Clone() {
213 return new TestMap(this);
214 }
215
Jon Skeete6fc9772015-06-26 10:32:50 +0100216 public const int MapInt32Int32FieldNumber = 1;
217 private static readonly pbc::MapField<int, int>.Codec _map_mapInt32Int32_codec
218 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 10);
219 private readonly pbc::MapField<int, int> mapInt32Int32_ = new pbc::MapField<int, int>();
220 public pbc::MapField<int, int> MapInt32Int32 {
221 get { return mapInt32Int32_; }
222 }
223
224 public const int MapInt64Int64FieldNumber = 2;
225 private static readonly pbc::MapField<long, long>.Codec _map_mapInt64Int64_codec
226 = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForInt64(8), pb::FieldCodec.ForInt64(16), 18);
227 private readonly pbc::MapField<long, long> mapInt64Int64_ = new pbc::MapField<long, long>();
228 public pbc::MapField<long, long> MapInt64Int64 {
229 get { return mapInt64Int64_; }
230 }
231
232 public const int MapUint32Uint32FieldNumber = 3;
233 private static readonly pbc::MapField<uint, uint>.Codec _map_mapUint32Uint32_codec
234 = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8), pb::FieldCodec.ForUInt32(16), 26);
235 private readonly pbc::MapField<uint, uint> mapUint32Uint32_ = new pbc::MapField<uint, uint>();
236 public pbc::MapField<uint, uint> MapUint32Uint32 {
237 get { return mapUint32Uint32_; }
238 }
239
240 public const int MapUint64Uint64FieldNumber = 4;
241 private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapUint64Uint64_codec
242 = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForUInt64(8), pb::FieldCodec.ForUInt64(16), 34);
243 private readonly pbc::MapField<ulong, ulong> mapUint64Uint64_ = new pbc::MapField<ulong, ulong>();
244 public pbc::MapField<ulong, ulong> MapUint64Uint64 {
245 get { return mapUint64Uint64_; }
246 }
247
248 public const int MapSint32Sint32FieldNumber = 5;
249 private static readonly pbc::MapField<int, int>.Codec _map_mapSint32Sint32_codec
250 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSInt32(8), pb::FieldCodec.ForSInt32(16), 42);
251 private readonly pbc::MapField<int, int> mapSint32Sint32_ = new pbc::MapField<int, int>();
252 public pbc::MapField<int, int> MapSint32Sint32 {
253 get { return mapSint32Sint32_; }
254 }
255
256 public const int MapSint64Sint64FieldNumber = 6;
257 private static readonly pbc::MapField<long, long>.Codec _map_mapSint64Sint64_codec
258 = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSInt64(8), pb::FieldCodec.ForSInt64(16), 50);
259 private readonly pbc::MapField<long, long> mapSint64Sint64_ = new pbc::MapField<long, long>();
260 public pbc::MapField<long, long> MapSint64Sint64 {
261 get { return mapSint64Sint64_; }
262 }
263
264 public const int MapFixed32Fixed32FieldNumber = 7;
265 private static readonly pbc::MapField<uint, uint>.Codec _map_mapFixed32Fixed32_codec
266 = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForFixed32(13), pb::FieldCodec.ForFixed32(21), 58);
267 private readonly pbc::MapField<uint, uint> mapFixed32Fixed32_ = new pbc::MapField<uint, uint>();
268 public pbc::MapField<uint, uint> MapFixed32Fixed32 {
269 get { return mapFixed32Fixed32_; }
270 }
271
272 public const int MapFixed64Fixed64FieldNumber = 8;
273 private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapFixed64Fixed64_codec
274 = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForFixed64(9), pb::FieldCodec.ForFixed64(17), 66);
275 private readonly pbc::MapField<ulong, ulong> mapFixed64Fixed64_ = new pbc::MapField<ulong, ulong>();
276 public pbc::MapField<ulong, ulong> MapFixed64Fixed64 {
277 get { return mapFixed64Fixed64_; }
278 }
279
280 public const int MapSfixed32Sfixed32FieldNumber = 9;
281 private static readonly pbc::MapField<int, int>.Codec _map_mapSfixed32Sfixed32_codec
282 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSFixed32(13), pb::FieldCodec.ForSFixed32(21), 74);
283 private readonly pbc::MapField<int, int> mapSfixed32Sfixed32_ = new pbc::MapField<int, int>();
284 public pbc::MapField<int, int> MapSfixed32Sfixed32 {
285 get { return mapSfixed32Sfixed32_; }
286 }
287
288 public const int MapSfixed64Sfixed64FieldNumber = 10;
289 private static readonly pbc::MapField<long, long>.Codec _map_mapSfixed64Sfixed64_codec
290 = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSFixed64(9), pb::FieldCodec.ForSFixed64(17), 82);
291 private readonly pbc::MapField<long, long> mapSfixed64Sfixed64_ = new pbc::MapField<long, long>();
292 public pbc::MapField<long, long> MapSfixed64Sfixed64 {
293 get { return mapSfixed64Sfixed64_; }
294 }
295
296 public const int MapInt32FloatFieldNumber = 11;
297 private static readonly pbc::MapField<int, float>.Codec _map_mapInt32Float_codec
298 = new pbc::MapField<int, float>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForFloat(21), 90);
299 private readonly pbc::MapField<int, float> mapInt32Float_ = new pbc::MapField<int, float>();
300 public pbc::MapField<int, float> MapInt32Float {
301 get { return mapInt32Float_; }
302 }
303
304 public const int MapInt32DoubleFieldNumber = 12;
305 private static readonly pbc::MapField<int, double>.Codec _map_mapInt32Double_codec
306 = new pbc::MapField<int, double>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForDouble(17), 98);
307 private readonly pbc::MapField<int, double> mapInt32Double_ = new pbc::MapField<int, double>();
308 public pbc::MapField<int, double> MapInt32Double {
309 get { return mapInt32Double_; }
310 }
311
312 public const int MapBoolBoolFieldNumber = 13;
313 private static readonly pbc::MapField<bool, bool>.Codec _map_mapBoolBool_codec
314 = new pbc::MapField<bool, bool>.Codec(pb::FieldCodec.ForBool(8), pb::FieldCodec.ForBool(16), 106);
315 private readonly pbc::MapField<bool, bool> mapBoolBool_ = new pbc::MapField<bool, bool>();
316 public pbc::MapField<bool, bool> MapBoolBool {
317 get { return mapBoolBool_; }
318 }
319
320 public const int MapStringStringFieldNumber = 14;
321 private static readonly pbc::MapField<string, string>.Codec _map_mapStringString_codec
322 = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 114);
323 private readonly pbc::MapField<string, string> mapStringString_ = new pbc::MapField<string, string>();
324 public pbc::MapField<string, string> MapStringString {
325 get { return mapStringString_; }
326 }
327
328 public const int MapInt32BytesFieldNumber = 15;
329 private static readonly pbc::MapField<int, pb::ByteString>.Codec _map_mapInt32Bytes_codec
330 = new pbc::MapField<int, pb::ByteString>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForBytes(18), 122);
331 private readonly pbc::MapField<int, pb::ByteString> mapInt32Bytes_ = new pbc::MapField<int, pb::ByteString>();
332 public pbc::MapField<int, pb::ByteString> MapInt32Bytes {
333 get { return mapInt32Bytes_; }
334 }
335
336 public const int MapInt32EnumFieldNumber = 16;
337 private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum>.Codec _map_mapInt32Enum_codec
338 = 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);
339 private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum> mapInt32Enum_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum>();
340 public pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum> MapInt32Enum {
341 get { return mapInt32Enum_; }
342 }
343
344 public const int MapInt32ForeignMessageFieldNumber = 17;
345 private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage>.Codec _map_mapInt32ForeignMessage_codec
346 = 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);
347 private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage> mapInt32ForeignMessage_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage>();
348 public pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage> MapInt32ForeignMessage {
349 get { return mapInt32ForeignMessage_; }
350 }
351
352 public override bool Equals(object other) {
353 return Equals(other as TestMap);
354 }
355
356 public bool Equals(TestMap other) {
357 if (ReferenceEquals(other, null)) {
358 return false;
359 }
360 if (ReferenceEquals(other, this)) {
361 return true;
362 }
363 if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false;
364 if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false;
365 if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false;
366 if (!MapUint64Uint64.Equals(other.MapUint64Uint64)) return false;
367 if (!MapSint32Sint32.Equals(other.MapSint32Sint32)) return false;
368 if (!MapSint64Sint64.Equals(other.MapSint64Sint64)) return false;
369 if (!MapFixed32Fixed32.Equals(other.MapFixed32Fixed32)) return false;
370 if (!MapFixed64Fixed64.Equals(other.MapFixed64Fixed64)) return false;
371 if (!MapSfixed32Sfixed32.Equals(other.MapSfixed32Sfixed32)) return false;
372 if (!MapSfixed64Sfixed64.Equals(other.MapSfixed64Sfixed64)) return false;
373 if (!MapInt32Float.Equals(other.MapInt32Float)) return false;
374 if (!MapInt32Double.Equals(other.MapInt32Double)) return false;
375 if (!MapBoolBool.Equals(other.MapBoolBool)) return false;
376 if (!MapStringString.Equals(other.MapStringString)) return false;
377 if (!MapInt32Bytes.Equals(other.MapInt32Bytes)) return false;
378 if (!MapInt32Enum.Equals(other.MapInt32Enum)) return false;
379 if (!MapInt32ForeignMessage.Equals(other.MapInt32ForeignMessage)) return false;
380 return true;
381 }
382
383 public override int GetHashCode() {
384 int hash = 1;
385 hash ^= MapInt32Int32.GetHashCode();
386 hash ^= MapInt64Int64.GetHashCode();
387 hash ^= MapUint32Uint32.GetHashCode();
388 hash ^= MapUint64Uint64.GetHashCode();
389 hash ^= MapSint32Sint32.GetHashCode();
390 hash ^= MapSint64Sint64.GetHashCode();
391 hash ^= MapFixed32Fixed32.GetHashCode();
392 hash ^= MapFixed64Fixed64.GetHashCode();
393 hash ^= MapSfixed32Sfixed32.GetHashCode();
394 hash ^= MapSfixed64Sfixed64.GetHashCode();
395 hash ^= MapInt32Float.GetHashCode();
396 hash ^= MapInt32Double.GetHashCode();
397 hash ^= MapBoolBool.GetHashCode();
398 hash ^= MapStringString.GetHashCode();
399 hash ^= MapInt32Bytes.GetHashCode();
400 hash ^= MapInt32Enum.GetHashCode();
401 hash ^= MapInt32ForeignMessage.GetHashCode();
402 return hash;
403 }
404
Jon Skeet5b9288e2015-07-03 12:45:36 +0100405 public override string ToString() {
406 return pb::JsonFormatter.Default.Format(this);
407 }
408
Jon Skeete6fc9772015-06-26 10:32:50 +0100409 public void WriteTo(pb::CodedOutputStream output) {
410 mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec);
411 mapInt64Int64_.WriteTo(output, _map_mapInt64Int64_codec);
412 mapUint32Uint32_.WriteTo(output, _map_mapUint32Uint32_codec);
413 mapUint64Uint64_.WriteTo(output, _map_mapUint64Uint64_codec);
414 mapSint32Sint32_.WriteTo(output, _map_mapSint32Sint32_codec);
415 mapSint64Sint64_.WriteTo(output, _map_mapSint64Sint64_codec);
416 mapFixed32Fixed32_.WriteTo(output, _map_mapFixed32Fixed32_codec);
417 mapFixed64Fixed64_.WriteTo(output, _map_mapFixed64Fixed64_codec);
418 mapSfixed32Sfixed32_.WriteTo(output, _map_mapSfixed32Sfixed32_codec);
419 mapSfixed64Sfixed64_.WriteTo(output, _map_mapSfixed64Sfixed64_codec);
420 mapInt32Float_.WriteTo(output, _map_mapInt32Float_codec);
421 mapInt32Double_.WriteTo(output, _map_mapInt32Double_codec);
422 mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec);
423 mapStringString_.WriteTo(output, _map_mapStringString_codec);
424 mapInt32Bytes_.WriteTo(output, _map_mapInt32Bytes_codec);
425 mapInt32Enum_.WriteTo(output, _map_mapInt32Enum_codec);
426 mapInt32ForeignMessage_.WriteTo(output, _map_mapInt32ForeignMessage_codec);
427 }
428
429 public int CalculateSize() {
430 int size = 0;
431 size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec);
432 size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec);
433 size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec);
434 size += mapUint64Uint64_.CalculateSize(_map_mapUint64Uint64_codec);
435 size += mapSint32Sint32_.CalculateSize(_map_mapSint32Sint32_codec);
436 size += mapSint64Sint64_.CalculateSize(_map_mapSint64Sint64_codec);
437 size += mapFixed32Fixed32_.CalculateSize(_map_mapFixed32Fixed32_codec);
438 size += mapFixed64Fixed64_.CalculateSize(_map_mapFixed64Fixed64_codec);
439 size += mapSfixed32Sfixed32_.CalculateSize(_map_mapSfixed32Sfixed32_codec);
440 size += mapSfixed64Sfixed64_.CalculateSize(_map_mapSfixed64Sfixed64_codec);
441 size += mapInt32Float_.CalculateSize(_map_mapInt32Float_codec);
442 size += mapInt32Double_.CalculateSize(_map_mapInt32Double_codec);
443 size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec);
444 size += mapStringString_.CalculateSize(_map_mapStringString_codec);
445 size += mapInt32Bytes_.CalculateSize(_map_mapInt32Bytes_codec);
446 size += mapInt32Enum_.CalculateSize(_map_mapInt32Enum_codec);
447 size += mapInt32ForeignMessage_.CalculateSize(_map_mapInt32ForeignMessage_codec);
448 return size;
449 }
450
451 public void MergeFrom(TestMap other) {
452 if (other == null) {
453 return;
454 }
455 mapInt32Int32_.Add(other.mapInt32Int32_);
456 mapInt64Int64_.Add(other.mapInt64Int64_);
457 mapUint32Uint32_.Add(other.mapUint32Uint32_);
458 mapUint64Uint64_.Add(other.mapUint64Uint64_);
459 mapSint32Sint32_.Add(other.mapSint32Sint32_);
460 mapSint64Sint64_.Add(other.mapSint64Sint64_);
461 mapFixed32Fixed32_.Add(other.mapFixed32Fixed32_);
462 mapFixed64Fixed64_.Add(other.mapFixed64Fixed64_);
463 mapSfixed32Sfixed32_.Add(other.mapSfixed32Sfixed32_);
464 mapSfixed64Sfixed64_.Add(other.mapSfixed64Sfixed64_);
465 mapInt32Float_.Add(other.mapInt32Float_);
466 mapInt32Double_.Add(other.mapInt32Double_);
467 mapBoolBool_.Add(other.mapBoolBool_);
468 mapStringString_.Add(other.mapStringString_);
469 mapInt32Bytes_.Add(other.mapInt32Bytes_);
470 mapInt32Enum_.Add(other.mapInt32Enum_);
471 mapInt32ForeignMessage_.Add(other.mapInt32ForeignMessage_);
472 }
473
474 public void MergeFrom(pb::CodedInputStream input) {
475 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100476 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100477 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100478 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100479 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +0100480 break;
481 case 10: {
482 mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
483 break;
484 }
485 case 18: {
486 mapInt64Int64_.AddEntriesFrom(input, _map_mapInt64Int64_codec);
487 break;
488 }
489 case 26: {
490 mapUint32Uint32_.AddEntriesFrom(input, _map_mapUint32Uint32_codec);
491 break;
492 }
493 case 34: {
494 mapUint64Uint64_.AddEntriesFrom(input, _map_mapUint64Uint64_codec);
495 break;
496 }
497 case 42: {
498 mapSint32Sint32_.AddEntriesFrom(input, _map_mapSint32Sint32_codec);
499 break;
500 }
501 case 50: {
502 mapSint64Sint64_.AddEntriesFrom(input, _map_mapSint64Sint64_codec);
503 break;
504 }
505 case 58: {
506 mapFixed32Fixed32_.AddEntriesFrom(input, _map_mapFixed32Fixed32_codec);
507 break;
508 }
509 case 66: {
510 mapFixed64Fixed64_.AddEntriesFrom(input, _map_mapFixed64Fixed64_codec);
511 break;
512 }
513 case 74: {
514 mapSfixed32Sfixed32_.AddEntriesFrom(input, _map_mapSfixed32Sfixed32_codec);
515 break;
516 }
517 case 82: {
518 mapSfixed64Sfixed64_.AddEntriesFrom(input, _map_mapSfixed64Sfixed64_codec);
519 break;
520 }
521 case 90: {
522 mapInt32Float_.AddEntriesFrom(input, _map_mapInt32Float_codec);
523 break;
524 }
525 case 98: {
526 mapInt32Double_.AddEntriesFrom(input, _map_mapInt32Double_codec);
527 break;
528 }
529 case 106: {
530 mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec);
531 break;
532 }
533 case 114: {
534 mapStringString_.AddEntriesFrom(input, _map_mapStringString_codec);
535 break;
536 }
537 case 122: {
538 mapInt32Bytes_.AddEntriesFrom(input, _map_mapInt32Bytes_codec);
539 break;
540 }
541 case 130: {
542 mapInt32Enum_.AddEntriesFrom(input, _map_mapInt32Enum_codec);
543 break;
544 }
545 case 138: {
546 mapInt32ForeignMessage_.AddEntriesFrom(input, _map_mapInt32ForeignMessage_codec);
547 break;
548 }
549 }
550 }
551 }
552
Jon Skeete6fc9772015-06-26 10:32:50 +0100553 }
554
555 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
556 public sealed partial class TestMapSubmessage : pb::IMessage<TestMapSubmessage> {
557 private static readonly pb::MessageParser<TestMapSubmessage> _parser = new pb::MessageParser<TestMapSubmessage>(() => new TestMapSubmessage());
558 public static pb::MessageParser<TestMapSubmessage> Parser { get { return _parser; } }
559
Jon Skeet76940942015-07-14 10:25:40 +0100560 public static pbr::MessageDescriptor Descriptor {
Jon Skeet462d5692015-07-01 14:47:36 +0100561 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[1]; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100562 }
563
Jon Skeet96cffaa2015-07-20 19:25:07 +0100564 pbr::MessageDescriptor pb::IMessage.Descriptor {
565 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100566 }
567
Jon Skeet53508222015-07-01 17:16:55 +0100568 public TestMapSubmessage() {
569 OnConstruction();
570 }
Jon Skeete6fc9772015-06-26 10:32:50 +0100571
Jon Skeet53508222015-07-01 17:16:55 +0100572 partial void OnConstruction();
573
574 public TestMapSubmessage(TestMapSubmessage other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +0100575 TestMap = other.testMap_ != null ? other.TestMap.Clone() : null;
576 }
577
578 public TestMapSubmessage Clone() {
579 return new TestMapSubmessage(this);
580 }
581
Jon Skeete6fc9772015-06-26 10:32:50 +0100582 public const int TestMapFieldNumber = 1;
583 private global::Google.Protobuf.TestProtos.TestMap testMap_;
584 public global::Google.Protobuf.TestProtos.TestMap TestMap {
585 get { return testMap_; }
586 set {
Jon Skeete6fc9772015-06-26 10:32:50 +0100587 testMap_ = value;
588 }
589 }
590
591 public override bool Equals(object other) {
592 return Equals(other as TestMapSubmessage);
593 }
594
595 public bool Equals(TestMapSubmessage other) {
596 if (ReferenceEquals(other, null)) {
597 return false;
598 }
599 if (ReferenceEquals(other, this)) {
600 return true;
601 }
602 if (!object.Equals(TestMap, other.TestMap)) return false;
603 return true;
604 }
605
606 public override int GetHashCode() {
607 int hash = 1;
608 if (testMap_ != null) hash ^= TestMap.GetHashCode();
609 return hash;
610 }
611
Jon Skeet5b9288e2015-07-03 12:45:36 +0100612 public override string ToString() {
613 return pb::JsonFormatter.Default.Format(this);
614 }
615
Jon Skeete6fc9772015-06-26 10:32:50 +0100616 public void WriteTo(pb::CodedOutputStream output) {
617 if (testMap_ != null) {
618 output.WriteRawTag(10);
619 output.WriteMessage(TestMap);
620 }
621 }
622
623 public int CalculateSize() {
624 int size = 0;
625 if (testMap_ != null) {
626 size += 1 + pb::CodedOutputStream.ComputeMessageSize(TestMap);
627 }
628 return size;
629 }
630
631 public void MergeFrom(TestMapSubmessage other) {
632 if (other == null) {
633 return;
634 }
635 if (other.testMap_ != null) {
636 if (testMap_ == null) {
637 testMap_ = new global::Google.Protobuf.TestProtos.TestMap();
638 }
639 TestMap.MergeFrom(other.TestMap);
640 }
641 }
642
643 public void MergeFrom(pb::CodedInputStream input) {
644 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100645 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100646 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100647 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100648 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +0100649 break;
650 case 10: {
651 if (testMap_ == null) {
652 testMap_ = new global::Google.Protobuf.TestProtos.TestMap();
653 }
654 input.ReadMessage(testMap_);
655 break;
656 }
657 }
658 }
659 }
660
661 }
662
663 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
664 public sealed partial class TestMessageMap : pb::IMessage<TestMessageMap> {
665 private static readonly pb::MessageParser<TestMessageMap> _parser = new pb::MessageParser<TestMessageMap>(() => new TestMessageMap());
666 public static pb::MessageParser<TestMessageMap> Parser { get { return _parser; } }
667
Jon Skeet76940942015-07-14 10:25:40 +0100668 public static pbr::MessageDescriptor Descriptor {
Jon Skeet462d5692015-07-01 14:47:36 +0100669 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[2]; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100670 }
671
Jon Skeet96cffaa2015-07-20 19:25:07 +0100672 pbr::MessageDescriptor pb::IMessage.Descriptor {
673 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100674 }
675
Jon Skeet53508222015-07-01 17:16:55 +0100676 public TestMessageMap() {
677 OnConstruction();
678 }
Jon Skeete6fc9772015-06-26 10:32:50 +0100679
Jon Skeet53508222015-07-01 17:16:55 +0100680 partial void OnConstruction();
681
682 public TestMessageMap(TestMessageMap other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +0100683 mapInt32Message_ = other.mapInt32Message_.Clone();
684 }
685
686 public TestMessageMap Clone() {
687 return new TestMessageMap(this);
688 }
689
Jon Skeete6fc9772015-06-26 10:32:50 +0100690 public const int MapInt32MessageFieldNumber = 1;
691 private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.TestAllTypes>.Codec _map_mapInt32Message_codec
692 = 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);
693 private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.TestAllTypes> mapInt32Message_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.TestAllTypes>();
694 public pbc::MapField<int, global::Google.Protobuf.TestProtos.TestAllTypes> MapInt32Message {
695 get { return mapInt32Message_; }
696 }
697
698 public override bool Equals(object other) {
699 return Equals(other as TestMessageMap);
700 }
701
702 public bool Equals(TestMessageMap other) {
703 if (ReferenceEquals(other, null)) {
704 return false;
705 }
706 if (ReferenceEquals(other, this)) {
707 return true;
708 }
709 if (!MapInt32Message.Equals(other.MapInt32Message)) return false;
710 return true;
711 }
712
713 public override int GetHashCode() {
714 int hash = 1;
715 hash ^= MapInt32Message.GetHashCode();
716 return hash;
717 }
718
Jon Skeet5b9288e2015-07-03 12:45:36 +0100719 public override string ToString() {
720 return pb::JsonFormatter.Default.Format(this);
721 }
722
Jon Skeete6fc9772015-06-26 10:32:50 +0100723 public void WriteTo(pb::CodedOutputStream output) {
724 mapInt32Message_.WriteTo(output, _map_mapInt32Message_codec);
725 }
726
727 public int CalculateSize() {
728 int size = 0;
729 size += mapInt32Message_.CalculateSize(_map_mapInt32Message_codec);
730 return size;
731 }
732
733 public void MergeFrom(TestMessageMap other) {
734 if (other == null) {
735 return;
736 }
737 mapInt32Message_.Add(other.mapInt32Message_);
738 }
739
740 public void MergeFrom(pb::CodedInputStream input) {
741 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100742 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100743 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100744 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100745 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +0100746 break;
747 case 10: {
748 mapInt32Message_.AddEntriesFrom(input, _map_mapInt32Message_codec);
749 break;
750 }
751 }
752 }
753 }
754
Jon Skeete6fc9772015-06-26 10:32:50 +0100755 }
756
757 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
758 public sealed partial class TestSameTypeMap : pb::IMessage<TestSameTypeMap> {
759 private static readonly pb::MessageParser<TestSameTypeMap> _parser = new pb::MessageParser<TestSameTypeMap>(() => new TestSameTypeMap());
760 public static pb::MessageParser<TestSameTypeMap> Parser { get { return _parser; } }
761
Jon Skeet76940942015-07-14 10:25:40 +0100762 public static pbr::MessageDescriptor Descriptor {
Jon Skeet462d5692015-07-01 14:47:36 +0100763 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[3]; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100764 }
765
Jon Skeet96cffaa2015-07-20 19:25:07 +0100766 pbr::MessageDescriptor pb::IMessage.Descriptor {
767 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100768 }
769
Jon Skeet53508222015-07-01 17:16:55 +0100770 public TestSameTypeMap() {
771 OnConstruction();
772 }
Jon Skeete6fc9772015-06-26 10:32:50 +0100773
Jon Skeet53508222015-07-01 17:16:55 +0100774 partial void OnConstruction();
775
776 public TestSameTypeMap(TestSameTypeMap other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +0100777 map1_ = other.map1_.Clone();
778 map2_ = other.map2_.Clone();
779 }
780
781 public TestSameTypeMap Clone() {
782 return new TestSameTypeMap(this);
783 }
784
Jon Skeete6fc9772015-06-26 10:32:50 +0100785 public const int Map1FieldNumber = 1;
786 private static readonly pbc::MapField<int, int>.Codec _map_map1_codec
787 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 10);
788 private readonly pbc::MapField<int, int> map1_ = new pbc::MapField<int, int>();
789 public pbc::MapField<int, int> Map1 {
790 get { return map1_; }
791 }
792
793 public const int Map2FieldNumber = 2;
794 private static readonly pbc::MapField<int, int>.Codec _map_map2_codec
795 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 18);
796 private readonly pbc::MapField<int, int> map2_ = new pbc::MapField<int, int>();
797 public pbc::MapField<int, int> Map2 {
798 get { return map2_; }
799 }
800
801 public override bool Equals(object other) {
802 return Equals(other as TestSameTypeMap);
803 }
804
805 public bool Equals(TestSameTypeMap other) {
806 if (ReferenceEquals(other, null)) {
807 return false;
808 }
809 if (ReferenceEquals(other, this)) {
810 return true;
811 }
812 if (!Map1.Equals(other.Map1)) return false;
813 if (!Map2.Equals(other.Map2)) return false;
814 return true;
815 }
816
817 public override int GetHashCode() {
818 int hash = 1;
819 hash ^= Map1.GetHashCode();
820 hash ^= Map2.GetHashCode();
821 return hash;
822 }
823
Jon Skeet5b9288e2015-07-03 12:45:36 +0100824 public override string ToString() {
825 return pb::JsonFormatter.Default.Format(this);
826 }
827
Jon Skeete6fc9772015-06-26 10:32:50 +0100828 public void WriteTo(pb::CodedOutputStream output) {
829 map1_.WriteTo(output, _map_map1_codec);
830 map2_.WriteTo(output, _map_map2_codec);
831 }
832
833 public int CalculateSize() {
834 int size = 0;
835 size += map1_.CalculateSize(_map_map1_codec);
836 size += map2_.CalculateSize(_map_map2_codec);
837 return size;
838 }
839
840 public void MergeFrom(TestSameTypeMap other) {
841 if (other == null) {
842 return;
843 }
844 map1_.Add(other.map1_);
845 map2_.Add(other.map2_);
846 }
847
848 public void MergeFrom(pb::CodedInputStream input) {
849 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100850 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100851 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +0100852 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100853 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +0100854 break;
855 case 10: {
856 map1_.AddEntriesFrom(input, _map_map1_codec);
857 break;
858 }
859 case 18: {
860 map2_.AddEntriesFrom(input, _map_map2_codec);
861 break;
862 }
863 }
864 }
865 }
866
Jon Skeete6fc9772015-06-26 10:32:50 +0100867 }
868
869 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
870 public sealed partial class TestArenaMap : pb::IMessage<TestArenaMap> {
871 private static readonly pb::MessageParser<TestArenaMap> _parser = new pb::MessageParser<TestArenaMap>(() => new TestArenaMap());
872 public static pb::MessageParser<TestArenaMap> Parser { get { return _parser; } }
873
Jon Skeet76940942015-07-14 10:25:40 +0100874 public static pbr::MessageDescriptor Descriptor {
Jon Skeet462d5692015-07-01 14:47:36 +0100875 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[4]; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100876 }
877
Jon Skeet96cffaa2015-07-20 19:25:07 +0100878 pbr::MessageDescriptor pb::IMessage.Descriptor {
879 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +0100880 }
881
Jon Skeet53508222015-07-01 17:16:55 +0100882 public TestArenaMap() {
883 OnConstruction();
884 }
Jon Skeete6fc9772015-06-26 10:32:50 +0100885
Jon Skeet53508222015-07-01 17:16:55 +0100886 partial void OnConstruction();
887
888 public TestArenaMap(TestArenaMap other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +0100889 mapInt32Int32_ = other.mapInt32Int32_.Clone();
890 mapInt64Int64_ = other.mapInt64Int64_.Clone();
891 mapUint32Uint32_ = other.mapUint32Uint32_.Clone();
892 mapUint64Uint64_ = other.mapUint64Uint64_.Clone();
893 mapSint32Sint32_ = other.mapSint32Sint32_.Clone();
894 mapSint64Sint64_ = other.mapSint64Sint64_.Clone();
895 mapFixed32Fixed32_ = other.mapFixed32Fixed32_.Clone();
896 mapFixed64Fixed64_ = other.mapFixed64Fixed64_.Clone();
897 mapSfixed32Sfixed32_ = other.mapSfixed32Sfixed32_.Clone();
898 mapSfixed64Sfixed64_ = other.mapSfixed64Sfixed64_.Clone();
899 mapInt32Float_ = other.mapInt32Float_.Clone();
900 mapInt32Double_ = other.mapInt32Double_.Clone();
901 mapBoolBool_ = other.mapBoolBool_.Clone();
902 mapInt32Enum_ = other.mapInt32Enum_.Clone();
903 mapInt32ForeignMessage_ = other.mapInt32ForeignMessage_.Clone();
904 }
905
906 public TestArenaMap Clone() {
907 return new TestArenaMap(this);
908 }
909
Jon Skeete6fc9772015-06-26 10:32:50 +0100910 public const int MapInt32Int32FieldNumber = 1;
911 private static readonly pbc::MapField<int, int>.Codec _map_mapInt32Int32_codec
912 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 10);
913 private readonly pbc::MapField<int, int> mapInt32Int32_ = new pbc::MapField<int, int>();
914 public pbc::MapField<int, int> MapInt32Int32 {
915 get { return mapInt32Int32_; }
916 }
917
918 public const int MapInt64Int64FieldNumber = 2;
919 private static readonly pbc::MapField<long, long>.Codec _map_mapInt64Int64_codec
920 = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForInt64(8), pb::FieldCodec.ForInt64(16), 18);
921 private readonly pbc::MapField<long, long> mapInt64Int64_ = new pbc::MapField<long, long>();
922 public pbc::MapField<long, long> MapInt64Int64 {
923 get { return mapInt64Int64_; }
924 }
925
926 public const int MapUint32Uint32FieldNumber = 3;
927 private static readonly pbc::MapField<uint, uint>.Codec _map_mapUint32Uint32_codec
928 = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8), pb::FieldCodec.ForUInt32(16), 26);
929 private readonly pbc::MapField<uint, uint> mapUint32Uint32_ = new pbc::MapField<uint, uint>();
930 public pbc::MapField<uint, uint> MapUint32Uint32 {
931 get { return mapUint32Uint32_; }
932 }
933
934 public const int MapUint64Uint64FieldNumber = 4;
935 private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapUint64Uint64_codec
936 = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForUInt64(8), pb::FieldCodec.ForUInt64(16), 34);
937 private readonly pbc::MapField<ulong, ulong> mapUint64Uint64_ = new pbc::MapField<ulong, ulong>();
938 public pbc::MapField<ulong, ulong> MapUint64Uint64 {
939 get { return mapUint64Uint64_; }
940 }
941
942 public const int MapSint32Sint32FieldNumber = 5;
943 private static readonly pbc::MapField<int, int>.Codec _map_mapSint32Sint32_codec
944 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSInt32(8), pb::FieldCodec.ForSInt32(16), 42);
945 private readonly pbc::MapField<int, int> mapSint32Sint32_ = new pbc::MapField<int, int>();
946 public pbc::MapField<int, int> MapSint32Sint32 {
947 get { return mapSint32Sint32_; }
948 }
949
950 public const int MapSint64Sint64FieldNumber = 6;
951 private static readonly pbc::MapField<long, long>.Codec _map_mapSint64Sint64_codec
952 = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSInt64(8), pb::FieldCodec.ForSInt64(16), 50);
953 private readonly pbc::MapField<long, long> mapSint64Sint64_ = new pbc::MapField<long, long>();
954 public pbc::MapField<long, long> MapSint64Sint64 {
955 get { return mapSint64Sint64_; }
956 }
957
958 public const int MapFixed32Fixed32FieldNumber = 7;
959 private static readonly pbc::MapField<uint, uint>.Codec _map_mapFixed32Fixed32_codec
960 = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForFixed32(13), pb::FieldCodec.ForFixed32(21), 58);
961 private readonly pbc::MapField<uint, uint> mapFixed32Fixed32_ = new pbc::MapField<uint, uint>();
962 public pbc::MapField<uint, uint> MapFixed32Fixed32 {
963 get { return mapFixed32Fixed32_; }
964 }
965
966 public const int MapFixed64Fixed64FieldNumber = 8;
967 private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapFixed64Fixed64_codec
968 = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForFixed64(9), pb::FieldCodec.ForFixed64(17), 66);
969 private readonly pbc::MapField<ulong, ulong> mapFixed64Fixed64_ = new pbc::MapField<ulong, ulong>();
970 public pbc::MapField<ulong, ulong> MapFixed64Fixed64 {
971 get { return mapFixed64Fixed64_; }
972 }
973
974 public const int MapSfixed32Sfixed32FieldNumber = 9;
975 private static readonly pbc::MapField<int, int>.Codec _map_mapSfixed32Sfixed32_codec
976 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSFixed32(13), pb::FieldCodec.ForSFixed32(21), 74);
977 private readonly pbc::MapField<int, int> mapSfixed32Sfixed32_ = new pbc::MapField<int, int>();
978 public pbc::MapField<int, int> MapSfixed32Sfixed32 {
979 get { return mapSfixed32Sfixed32_; }
980 }
981
982 public const int MapSfixed64Sfixed64FieldNumber = 10;
983 private static readonly pbc::MapField<long, long>.Codec _map_mapSfixed64Sfixed64_codec
984 = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSFixed64(9), pb::FieldCodec.ForSFixed64(17), 82);
985 private readonly pbc::MapField<long, long> mapSfixed64Sfixed64_ = new pbc::MapField<long, long>();
986 public pbc::MapField<long, long> MapSfixed64Sfixed64 {
987 get { return mapSfixed64Sfixed64_; }
988 }
989
990 public const int MapInt32FloatFieldNumber = 11;
991 private static readonly pbc::MapField<int, float>.Codec _map_mapInt32Float_codec
992 = new pbc::MapField<int, float>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForFloat(21), 90);
993 private readonly pbc::MapField<int, float> mapInt32Float_ = new pbc::MapField<int, float>();
994 public pbc::MapField<int, float> MapInt32Float {
995 get { return mapInt32Float_; }
996 }
997
998 public const int MapInt32DoubleFieldNumber = 12;
999 private static readonly pbc::MapField<int, double>.Codec _map_mapInt32Double_codec
1000 = new pbc::MapField<int, double>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForDouble(17), 98);
1001 private readonly pbc::MapField<int, double> mapInt32Double_ = new pbc::MapField<int, double>();
1002 public pbc::MapField<int, double> MapInt32Double {
1003 get { return mapInt32Double_; }
1004 }
1005
1006 public const int MapBoolBoolFieldNumber = 13;
1007 private static readonly pbc::MapField<bool, bool>.Codec _map_mapBoolBool_codec
1008 = new pbc::MapField<bool, bool>.Codec(pb::FieldCodec.ForBool(8), pb::FieldCodec.ForBool(16), 106);
1009 private readonly pbc::MapField<bool, bool> mapBoolBool_ = new pbc::MapField<bool, bool>();
1010 public pbc::MapField<bool, bool> MapBoolBool {
1011 get { return mapBoolBool_; }
1012 }
1013
1014 public const int MapInt32EnumFieldNumber = 14;
1015 private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum>.Codec _map_mapInt32Enum_codec
1016 = 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);
1017 private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum> mapInt32Enum_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum>();
1018 public pbc::MapField<int, global::Google.Protobuf.TestProtos.MapEnum> MapInt32Enum {
1019 get { return mapInt32Enum_; }
1020 }
1021
1022 public const int MapInt32ForeignMessageFieldNumber = 15;
1023 private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage>.Codec _map_mapInt32ForeignMessage_codec
1024 = 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);
1025 private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage> mapInt32ForeignMessage_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage>();
1026 public pbc::MapField<int, global::Google.Protobuf.TestProtos.ForeignMessage> MapInt32ForeignMessage {
1027 get { return mapInt32ForeignMessage_; }
1028 }
1029
1030 public override bool Equals(object other) {
1031 return Equals(other as TestArenaMap);
1032 }
1033
1034 public bool Equals(TestArenaMap other) {
1035 if (ReferenceEquals(other, null)) {
1036 return false;
1037 }
1038 if (ReferenceEquals(other, this)) {
1039 return true;
1040 }
1041 if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false;
1042 if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false;
1043 if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false;
1044 if (!MapUint64Uint64.Equals(other.MapUint64Uint64)) return false;
1045 if (!MapSint32Sint32.Equals(other.MapSint32Sint32)) return false;
1046 if (!MapSint64Sint64.Equals(other.MapSint64Sint64)) return false;
1047 if (!MapFixed32Fixed32.Equals(other.MapFixed32Fixed32)) return false;
1048 if (!MapFixed64Fixed64.Equals(other.MapFixed64Fixed64)) return false;
1049 if (!MapSfixed32Sfixed32.Equals(other.MapSfixed32Sfixed32)) return false;
1050 if (!MapSfixed64Sfixed64.Equals(other.MapSfixed64Sfixed64)) return false;
1051 if (!MapInt32Float.Equals(other.MapInt32Float)) return false;
1052 if (!MapInt32Double.Equals(other.MapInt32Double)) return false;
1053 if (!MapBoolBool.Equals(other.MapBoolBool)) return false;
1054 if (!MapInt32Enum.Equals(other.MapInt32Enum)) return false;
1055 if (!MapInt32ForeignMessage.Equals(other.MapInt32ForeignMessage)) return false;
1056 return true;
1057 }
1058
1059 public override int GetHashCode() {
1060 int hash = 1;
1061 hash ^= MapInt32Int32.GetHashCode();
1062 hash ^= MapInt64Int64.GetHashCode();
1063 hash ^= MapUint32Uint32.GetHashCode();
1064 hash ^= MapUint64Uint64.GetHashCode();
1065 hash ^= MapSint32Sint32.GetHashCode();
1066 hash ^= MapSint64Sint64.GetHashCode();
1067 hash ^= MapFixed32Fixed32.GetHashCode();
1068 hash ^= MapFixed64Fixed64.GetHashCode();
1069 hash ^= MapSfixed32Sfixed32.GetHashCode();
1070 hash ^= MapSfixed64Sfixed64.GetHashCode();
1071 hash ^= MapInt32Float.GetHashCode();
1072 hash ^= MapInt32Double.GetHashCode();
1073 hash ^= MapBoolBool.GetHashCode();
1074 hash ^= MapInt32Enum.GetHashCode();
1075 hash ^= MapInt32ForeignMessage.GetHashCode();
1076 return hash;
1077 }
1078
Jon Skeet5b9288e2015-07-03 12:45:36 +01001079 public override string ToString() {
1080 return pb::JsonFormatter.Default.Format(this);
1081 }
1082
Jon Skeete6fc9772015-06-26 10:32:50 +01001083 public void WriteTo(pb::CodedOutputStream output) {
1084 mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec);
1085 mapInt64Int64_.WriteTo(output, _map_mapInt64Int64_codec);
1086 mapUint32Uint32_.WriteTo(output, _map_mapUint32Uint32_codec);
1087 mapUint64Uint64_.WriteTo(output, _map_mapUint64Uint64_codec);
1088 mapSint32Sint32_.WriteTo(output, _map_mapSint32Sint32_codec);
1089 mapSint64Sint64_.WriteTo(output, _map_mapSint64Sint64_codec);
1090 mapFixed32Fixed32_.WriteTo(output, _map_mapFixed32Fixed32_codec);
1091 mapFixed64Fixed64_.WriteTo(output, _map_mapFixed64Fixed64_codec);
1092 mapSfixed32Sfixed32_.WriteTo(output, _map_mapSfixed32Sfixed32_codec);
1093 mapSfixed64Sfixed64_.WriteTo(output, _map_mapSfixed64Sfixed64_codec);
1094 mapInt32Float_.WriteTo(output, _map_mapInt32Float_codec);
1095 mapInt32Double_.WriteTo(output, _map_mapInt32Double_codec);
1096 mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec);
1097 mapInt32Enum_.WriteTo(output, _map_mapInt32Enum_codec);
1098 mapInt32ForeignMessage_.WriteTo(output, _map_mapInt32ForeignMessage_codec);
1099 }
1100
1101 public int CalculateSize() {
1102 int size = 0;
1103 size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec);
1104 size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec);
1105 size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec);
1106 size += mapUint64Uint64_.CalculateSize(_map_mapUint64Uint64_codec);
1107 size += mapSint32Sint32_.CalculateSize(_map_mapSint32Sint32_codec);
1108 size += mapSint64Sint64_.CalculateSize(_map_mapSint64Sint64_codec);
1109 size += mapFixed32Fixed32_.CalculateSize(_map_mapFixed32Fixed32_codec);
1110 size += mapFixed64Fixed64_.CalculateSize(_map_mapFixed64Fixed64_codec);
1111 size += mapSfixed32Sfixed32_.CalculateSize(_map_mapSfixed32Sfixed32_codec);
1112 size += mapSfixed64Sfixed64_.CalculateSize(_map_mapSfixed64Sfixed64_codec);
1113 size += mapInt32Float_.CalculateSize(_map_mapInt32Float_codec);
1114 size += mapInt32Double_.CalculateSize(_map_mapInt32Double_codec);
1115 size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec);
1116 size += mapInt32Enum_.CalculateSize(_map_mapInt32Enum_codec);
1117 size += mapInt32ForeignMessage_.CalculateSize(_map_mapInt32ForeignMessage_codec);
1118 return size;
1119 }
1120
1121 public void MergeFrom(TestArenaMap other) {
1122 if (other == null) {
1123 return;
1124 }
1125 mapInt32Int32_.Add(other.mapInt32Int32_);
1126 mapInt64Int64_.Add(other.mapInt64Int64_);
1127 mapUint32Uint32_.Add(other.mapUint32Uint32_);
1128 mapUint64Uint64_.Add(other.mapUint64Uint64_);
1129 mapSint32Sint32_.Add(other.mapSint32Sint32_);
1130 mapSint64Sint64_.Add(other.mapSint64Sint64_);
1131 mapFixed32Fixed32_.Add(other.mapFixed32Fixed32_);
1132 mapFixed64Fixed64_.Add(other.mapFixed64Fixed64_);
1133 mapSfixed32Sfixed32_.Add(other.mapSfixed32Sfixed32_);
1134 mapSfixed64Sfixed64_.Add(other.mapSfixed64Sfixed64_);
1135 mapInt32Float_.Add(other.mapInt32Float_);
1136 mapInt32Double_.Add(other.mapInt32Double_);
1137 mapBoolBool_.Add(other.mapBoolBool_);
1138 mapInt32Enum_.Add(other.mapInt32Enum_);
1139 mapInt32ForeignMessage_.Add(other.mapInt32ForeignMessage_);
1140 }
1141
1142 public void MergeFrom(pb::CodedInputStream input) {
1143 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +01001144 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001145 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001146 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +01001147 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +01001148 break;
1149 case 10: {
1150 mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
1151 break;
1152 }
1153 case 18: {
1154 mapInt64Int64_.AddEntriesFrom(input, _map_mapInt64Int64_codec);
1155 break;
1156 }
1157 case 26: {
1158 mapUint32Uint32_.AddEntriesFrom(input, _map_mapUint32Uint32_codec);
1159 break;
1160 }
1161 case 34: {
1162 mapUint64Uint64_.AddEntriesFrom(input, _map_mapUint64Uint64_codec);
1163 break;
1164 }
1165 case 42: {
1166 mapSint32Sint32_.AddEntriesFrom(input, _map_mapSint32Sint32_codec);
1167 break;
1168 }
1169 case 50: {
1170 mapSint64Sint64_.AddEntriesFrom(input, _map_mapSint64Sint64_codec);
1171 break;
1172 }
1173 case 58: {
1174 mapFixed32Fixed32_.AddEntriesFrom(input, _map_mapFixed32Fixed32_codec);
1175 break;
1176 }
1177 case 66: {
1178 mapFixed64Fixed64_.AddEntriesFrom(input, _map_mapFixed64Fixed64_codec);
1179 break;
1180 }
1181 case 74: {
1182 mapSfixed32Sfixed32_.AddEntriesFrom(input, _map_mapSfixed32Sfixed32_codec);
1183 break;
1184 }
1185 case 82: {
1186 mapSfixed64Sfixed64_.AddEntriesFrom(input, _map_mapSfixed64Sfixed64_codec);
1187 break;
1188 }
1189 case 90: {
1190 mapInt32Float_.AddEntriesFrom(input, _map_mapInt32Float_codec);
1191 break;
1192 }
1193 case 98: {
1194 mapInt32Double_.AddEntriesFrom(input, _map_mapInt32Double_codec);
1195 break;
1196 }
1197 case 106: {
1198 mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec);
1199 break;
1200 }
1201 case 114: {
1202 mapInt32Enum_.AddEntriesFrom(input, _map_mapInt32Enum_codec);
1203 break;
1204 }
1205 case 122: {
1206 mapInt32ForeignMessage_.AddEntriesFrom(input, _map_mapInt32ForeignMessage_codec);
1207 break;
1208 }
1209 }
1210 }
1211 }
1212
Jon Skeete6fc9772015-06-26 10:32:50 +01001213 }
1214
1215 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1216 public sealed partial class MessageContainingEnumCalledType : pb::IMessage<MessageContainingEnumCalledType> {
1217 private static readonly pb::MessageParser<MessageContainingEnumCalledType> _parser = new pb::MessageParser<MessageContainingEnumCalledType>(() => new MessageContainingEnumCalledType());
1218 public static pb::MessageParser<MessageContainingEnumCalledType> Parser { get { return _parser; } }
1219
Jon Skeet76940942015-07-14 10:25:40 +01001220 public static pbr::MessageDescriptor Descriptor {
Jon Skeet462d5692015-07-01 14:47:36 +01001221 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[5]; }
Jon Skeete6fc9772015-06-26 10:32:50 +01001222 }
1223
Jon Skeet96cffaa2015-07-20 19:25:07 +01001224 pbr::MessageDescriptor pb::IMessage.Descriptor {
1225 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +01001226 }
1227
Jon Skeet53508222015-07-01 17:16:55 +01001228 public MessageContainingEnumCalledType() {
1229 OnConstruction();
1230 }
Jon Skeete6fc9772015-06-26 10:32:50 +01001231
Jon Skeet53508222015-07-01 17:16:55 +01001232 partial void OnConstruction();
1233
1234 public MessageContainingEnumCalledType(MessageContainingEnumCalledType other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +01001235 type_ = other.type_.Clone();
1236 }
1237
1238 public MessageContainingEnumCalledType Clone() {
1239 return new MessageContainingEnumCalledType(this);
1240 }
1241
Jon Skeete6fc9772015-06-26 10:32:50 +01001242 public const int TypeFieldNumber = 1;
1243 private static readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType>.Codec _map_type_codec
1244 = 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);
1245 private readonly pbc::MapField<int, global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType> type_ = new pbc::MapField<int, global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType>();
1246 public pbc::MapField<int, global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType> Type {
1247 get { return type_; }
1248 }
1249
1250 public override bool Equals(object other) {
1251 return Equals(other as MessageContainingEnumCalledType);
1252 }
1253
1254 public bool Equals(MessageContainingEnumCalledType other) {
1255 if (ReferenceEquals(other, null)) {
1256 return false;
1257 }
1258 if (ReferenceEquals(other, this)) {
1259 return true;
1260 }
1261 if (!Type.Equals(other.Type)) return false;
1262 return true;
1263 }
1264
1265 public override int GetHashCode() {
1266 int hash = 1;
1267 hash ^= Type.GetHashCode();
1268 return hash;
1269 }
1270
Jon Skeet5b9288e2015-07-03 12:45:36 +01001271 public override string ToString() {
1272 return pb::JsonFormatter.Default.Format(this);
1273 }
1274
Jon Skeete6fc9772015-06-26 10:32:50 +01001275 public void WriteTo(pb::CodedOutputStream output) {
1276 type_.WriteTo(output, _map_type_codec);
1277 }
1278
1279 public int CalculateSize() {
1280 int size = 0;
1281 size += type_.CalculateSize(_map_type_codec);
1282 return size;
1283 }
1284
1285 public void MergeFrom(MessageContainingEnumCalledType other) {
1286 if (other == null) {
1287 return;
1288 }
1289 type_.Add(other.type_);
1290 }
1291
1292 public void MergeFrom(pb::CodedInputStream input) {
1293 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +01001294 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001295 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001296 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +01001297 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +01001298 break;
1299 case 10: {
1300 type_.AddEntriesFrom(input, _map_type_codec);
1301 break;
1302 }
1303 }
1304 }
1305 }
1306
1307 #region Nested types
1308 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1309 public static partial class Types {
1310 public enum Type {
1311 TYPE_FOO = 0,
1312 }
1313
Jon Skeete6fc9772015-06-26 10:32:50 +01001314 }
1315 #endregion
1316
1317 }
1318
1319 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1320 public sealed partial class MessageContainingMapCalledEntry : pb::IMessage<MessageContainingMapCalledEntry> {
1321 private static readonly pb::MessageParser<MessageContainingMapCalledEntry> _parser = new pb::MessageParser<MessageContainingMapCalledEntry>(() => new MessageContainingMapCalledEntry());
1322 public static pb::MessageParser<MessageContainingMapCalledEntry> Parser { get { return _parser; } }
1323
Jon Skeet76940942015-07-14 10:25:40 +01001324 public static pbr::MessageDescriptor Descriptor {
Jon Skeet462d5692015-07-01 14:47:36 +01001325 get { return global::Google.Protobuf.TestProtos.MapUnittestProto3.Descriptor.MessageTypes[6]; }
Jon Skeete6fc9772015-06-26 10:32:50 +01001326 }
1327
Jon Skeet96cffaa2015-07-20 19:25:07 +01001328 pbr::MessageDescriptor pb::IMessage.Descriptor {
1329 get { return Descriptor; }
Jon Skeete6fc9772015-06-26 10:32:50 +01001330 }
1331
Jon Skeet53508222015-07-01 17:16:55 +01001332 public MessageContainingMapCalledEntry() {
1333 OnConstruction();
1334 }
Jon Skeete6fc9772015-06-26 10:32:50 +01001335
Jon Skeet53508222015-07-01 17:16:55 +01001336 partial void OnConstruction();
1337
1338 public MessageContainingMapCalledEntry(MessageContainingMapCalledEntry other) : this() {
Jon Skeete6fc9772015-06-26 10:32:50 +01001339 entry_ = other.entry_.Clone();
1340 }
1341
1342 public MessageContainingMapCalledEntry Clone() {
1343 return new MessageContainingMapCalledEntry(this);
1344 }
1345
Jon Skeete6fc9772015-06-26 10:32:50 +01001346 public const int EntryFieldNumber = 1;
1347 private static readonly pbc::MapField<int, int>.Codec _map_entry_codec
1348 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 10);
1349 private readonly pbc::MapField<int, int> entry_ = new pbc::MapField<int, int>();
1350 public pbc::MapField<int, int> Entry {
1351 get { return entry_; }
1352 }
1353
1354 public override bool Equals(object other) {
1355 return Equals(other as MessageContainingMapCalledEntry);
1356 }
1357
1358 public bool Equals(MessageContainingMapCalledEntry other) {
1359 if (ReferenceEquals(other, null)) {
1360 return false;
1361 }
1362 if (ReferenceEquals(other, this)) {
1363 return true;
1364 }
1365 if (!Entry.Equals(other.Entry)) return false;
1366 return true;
1367 }
1368
1369 public override int GetHashCode() {
1370 int hash = 1;
1371 hash ^= Entry.GetHashCode();
1372 return hash;
1373 }
1374
Jon Skeet5b9288e2015-07-03 12:45:36 +01001375 public override string ToString() {
1376 return pb::JsonFormatter.Default.Format(this);
1377 }
1378
Jon Skeete6fc9772015-06-26 10:32:50 +01001379 public void WriteTo(pb::CodedOutputStream output) {
1380 entry_.WriteTo(output, _map_entry_codec);
1381 }
1382
1383 public int CalculateSize() {
1384 int size = 0;
1385 size += entry_.CalculateSize(_map_entry_codec);
1386 return size;
1387 }
1388
1389 public void MergeFrom(MessageContainingMapCalledEntry other) {
1390 if (other == null) {
1391 return;
1392 }
1393 entry_.Add(other.entry_);
1394 }
1395
1396 public void MergeFrom(pb::CodedInputStream input) {
1397 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +01001398 while ((tag = input.ReadTag()) != 0) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001399 switch(tag) {
Jon Skeete6fc9772015-06-26 10:32:50 +01001400 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +01001401 input.SkipLastField();
Jon Skeete6fc9772015-06-26 10:32:50 +01001402 break;
1403 case 10: {
1404 entry_.AddEntriesFrom(input, _map_entry_codec);
1405 break;
1406 }
1407 }
1408 }
1409 }
1410
Jon Skeete6fc9772015-06-26 10:32:50 +01001411 }
1412
1413 #endregion
1414
1415}
1416
1417#endregion Designer generated code