MapUnittestProto3.cs 66 KB

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