UnittestIssues.cs 79 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: unittest_issues.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021
  6. #region Designer generated code
  7. using pb = global::Google.Protobuf;
  8. using pbc = global::Google.Protobuf.Collections;
  9. using pbr = global::Google.Protobuf.Reflection;
  10. using scg = global::System.Collections.Generic;
  11. namespace UnitTest.Issues.TestProtos {
  12. /// <summary>Holder for reflection information generated from unittest_issues.proto</summary>
  13. public static partial class UnittestIssuesReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for unittest_issues.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static UnittestIssuesReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "ChV1bml0dGVzdF9pc3N1ZXMucHJvdG8SD3VuaXR0ZXN0X2lzc3VlcyInCghJ",
  24. "c3N1ZTMwNxobCgpOZXN0ZWRPbmNlGg0KC05lc3RlZFR3aWNlIrABChNOZWdh",
  25. "dGl2ZUVudW1NZXNzYWdlEiwKBXZhbHVlGAEgASgOMh0udW5pdHRlc3RfaXNz",
  26. "dWVzLk5lZ2F0aXZlRW51bRIxCgZ2YWx1ZXMYAiADKA4yHS51bml0dGVzdF9p",
  27. "c3N1ZXMuTmVnYXRpdmVFbnVtQgIQABI4Cg1wYWNrZWRfdmFsdWVzGAMgAygO",
  28. "Mh0udW5pdHRlc3RfaXNzdWVzLk5lZ2F0aXZlRW51bUICEAEiEQoPRGVwcmVj",
  29. "YXRlZENoaWxkIrkCChdEZXByZWNhdGVkRmllbGRzTWVzc2FnZRIaCg5Qcmlt",
  30. "aXRpdmVWYWx1ZRgBIAEoBUICGAESGgoOUHJpbWl0aXZlQXJyYXkYAiADKAVC",
  31. "AhgBEjoKDE1lc3NhZ2VWYWx1ZRgDIAEoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5E",
  32. "ZXByZWNhdGVkQ2hpbGRCAhgBEjoKDE1lc3NhZ2VBcnJheRgEIAMoCzIgLnVu",
  33. "aXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkQ2hpbGRCAhgBEjYKCUVudW1WYWx1",
  34. "ZRgFIAEoDjIfLnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkRW51bUICGAES",
  35. "NgoJRW51bUFycmF5GAYgAygOMh8udW5pdHRlc3RfaXNzdWVzLkRlcHJlY2F0",
  36. "ZWRFbnVtQgIYASIZCglJdGVtRmllbGQSDAoEaXRlbRgBIAEoBSJECg1SZXNl",
  37. "cnZlZE5hbWVzEg0KBXR5cGVzGAEgASgFEhIKCmRlc2NyaXB0b3IYAiABKAUa",
  38. "EAoOU29tZU5lc3RlZFR5cGUioAEKFVRlc3RKc29uRmllbGRPcmRlcmluZxIT",
  39. "CgtwbGFpbl9pbnQzMhgEIAEoBRITCglvMV9zdHJpbmcYAiABKAlIABISCghv",
  40. "MV9pbnQzMhgFIAEoBUgAEhQKDHBsYWluX3N0cmluZxgBIAEoCRISCghvMl9p",
  41. "bnQzMhgGIAEoBUgBEhMKCW8yX3N0cmluZxgDIAEoCUgBQgQKAm8xQgQKAm8y",
  42. "IksKDFRlc3RKc29uTmFtZRIMCgRuYW1lGAEgASgJEhkKC2Rlc2NyaXB0aW9u",
  43. "GAIgASgJUgRkZXNjEhIKBGd1aWQYAyABKAlSBGV4aWQifwoMT25lb2ZNZXJn",
  44. "aW5nEg4KBHRleHQYASABKAlIABI2CgZuZXN0ZWQYAiABKAsyJC51bml0dGVz",
  45. "dF9pc3N1ZXMuT25lb2ZNZXJnaW5nLk5lc3RlZEgAGh4KBk5lc3RlZBIJCgF4",
  46. "GAEgASgFEgkKAXkYAiABKAVCBwoFdmFsdWUqVQoMTmVnYXRpdmVFbnVtEhYK",
  47. "Ek5FR0FUSVZFX0VOVU1fWkVSTxAAEhYKCUZpdmVCZWxvdxD7//////////8B",
  48. "EhUKCE1pbnVzT25lEP///////////wEqLgoORGVwcmVjYXRlZEVudW0SEwoP",
  49. "REVQUkVDQVRFRF9aRVJPEAASBwoDb25lEAFCHaoCGlVuaXRUZXN0Lklzc3Vl",
  50. "cy5UZXN0UHJvdG9zYgZwcm90bzM="));
  51. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  52. new pbr::FileDescriptor[] { },
  53. new pbr::GeneratedClrTypeInfo(new[] {typeof(global::UnitTest.Issues.TestProtos.NegativeEnum), typeof(global::UnitTest.Issues.TestProtos.DeprecatedEnum), }, new pbr::GeneratedClrTypeInfo[] {
  54. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307), global::UnitTest.Issues.TestProtos.Issue307.Parser, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce), global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Parser, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice), global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice.Parser, null, null, null, null)})}),
  55. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NegativeEnumMessage), global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Parser, new[]{ "Value", "Values", "PackedValues" }, null, null, null),
  56. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.DeprecatedChild), global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser, null, null, null, null),
  57. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage), global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.Parser, new[]{ "PrimitiveValue", "PrimitiveArray", "MessageValue", "MessageArray", "EnumValue", "EnumArray" }, null, null, null),
  58. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ItemField), global::UnitTest.Issues.TestProtos.ItemField.Parser, new[]{ "Item" }, null, null, null),
  59. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames), global::UnitTest.Issues.TestProtos.ReservedNames.Parser, new[]{ "Types_", "Descriptor_" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames.Types.SomeNestedType), global::UnitTest.Issues.TestProtos.ReservedNames.Types.SomeNestedType.Parser, null, null, null, null)}),
  60. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonFieldOrdering), global::UnitTest.Issues.TestProtos.TestJsonFieldOrdering.Parser, new[]{ "PlainInt32", "O1String", "O1Int32", "PlainString", "O2Int32", "O2String" }, new[]{ "O1", "O2" }, null, null),
  61. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonName), global::UnitTest.Issues.TestProtos.TestJsonName.Parser, new[]{ "Name", "Description", "Guid" }, null, null, null),
  62. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofMerging), global::UnitTest.Issues.TestProtos.OneofMerging.Parser, new[]{ "Text", "Nested" }, new[]{ "Value" }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested), global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested.Parser, new[]{ "X", "Y" }, null, null, null)})
  63. }));
  64. }
  65. #endregion
  66. }
  67. #region Enums
  68. public enum NegativeEnum {
  69. [pbr::OriginalName("NEGATIVE_ENUM_ZERO")] Zero = 0,
  70. [pbr::OriginalName("FiveBelow")] FiveBelow = -5,
  71. [pbr::OriginalName("MinusOne")] MinusOne = -1,
  72. }
  73. public enum DeprecatedEnum {
  74. [pbr::OriginalName("DEPRECATED_ZERO")] DeprecatedZero = 0,
  75. [pbr::OriginalName("one")] One = 1,
  76. }
  77. #endregion
  78. #region Messages
  79. /// <summary>
  80. /// Issue 307: when generating doubly-nested types, any references
  81. /// should be of the form A.Types.B.Types.C.
  82. /// </summary>
  83. public sealed partial class Issue307 : pb::IMessage<Issue307> {
  84. private static readonly pb::MessageParser<Issue307> _parser = new pb::MessageParser<Issue307>(() => new Issue307());
  85. private pb::UnknownFieldSet _unknownFields;
  86. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  87. public static pb::MessageParser<Issue307> Parser { get { return _parser; } }
  88. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  89. public static pbr::MessageDescriptor Descriptor {
  90. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[0]; }
  91. }
  92. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  93. pbr::MessageDescriptor pb::IMessage.Descriptor {
  94. get { return Descriptor; }
  95. }
  96. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  97. public Issue307() {
  98. OnConstruction();
  99. }
  100. partial void OnConstruction();
  101. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  102. public Issue307(Issue307 other) : this() {
  103. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  104. }
  105. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  106. public Issue307 Clone() {
  107. return new Issue307(this);
  108. }
  109. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  110. public override bool Equals(object other) {
  111. return Equals(other as Issue307);
  112. }
  113. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  114. public bool Equals(Issue307 other) {
  115. if (ReferenceEquals(other, null)) {
  116. return false;
  117. }
  118. if (ReferenceEquals(other, this)) {
  119. return true;
  120. }
  121. return Equals(_unknownFields, other._unknownFields);
  122. }
  123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  124. public override int GetHashCode() {
  125. int hash = 1;
  126. if (_unknownFields != null) {
  127. hash ^= _unknownFields.GetHashCode();
  128. }
  129. return hash;
  130. }
  131. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  132. public override string ToString() {
  133. return pb::JsonFormatter.ToDiagnosticString(this);
  134. }
  135. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  136. public void WriteTo(pb::CodedOutputStream output) {
  137. if (_unknownFields != null) {
  138. _unknownFields.WriteTo(output);
  139. }
  140. }
  141. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  142. public int CalculateSize() {
  143. int size = 0;
  144. if (_unknownFields != null) {
  145. size += _unknownFields.CalculateSize();
  146. }
  147. return size;
  148. }
  149. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  150. public void MergeFrom(Issue307 other) {
  151. if (other == null) {
  152. return;
  153. }
  154. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  155. }
  156. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  157. public void MergeFrom(pb::CodedInputStream input) {
  158. uint tag;
  159. while ((tag = input.ReadTag()) != 0) {
  160. switch(tag) {
  161. default:
  162. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  163. break;
  164. }
  165. }
  166. }
  167. #region Nested types
  168. /// <summary>Container for nested types declared in the Issue307 message type.</summary>
  169. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  170. public static partial class Types {
  171. public sealed partial class NestedOnce : pb::IMessage<NestedOnce> {
  172. private static readonly pb::MessageParser<NestedOnce> _parser = new pb::MessageParser<NestedOnce>(() => new NestedOnce());
  173. private pb::UnknownFieldSet _unknownFields;
  174. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  175. public static pb::MessageParser<NestedOnce> Parser { get { return _parser; } }
  176. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  177. public static pbr::MessageDescriptor Descriptor {
  178. get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.NestedTypes[0]; }
  179. }
  180. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  181. pbr::MessageDescriptor pb::IMessage.Descriptor {
  182. get { return Descriptor; }
  183. }
  184. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  185. public NestedOnce() {
  186. OnConstruction();
  187. }
  188. partial void OnConstruction();
  189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  190. public NestedOnce(NestedOnce other) : this() {
  191. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  192. }
  193. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  194. public NestedOnce Clone() {
  195. return new NestedOnce(this);
  196. }
  197. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  198. public override bool Equals(object other) {
  199. return Equals(other as NestedOnce);
  200. }
  201. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  202. public bool Equals(NestedOnce other) {
  203. if (ReferenceEquals(other, null)) {
  204. return false;
  205. }
  206. if (ReferenceEquals(other, this)) {
  207. return true;
  208. }
  209. return Equals(_unknownFields, other._unknownFields);
  210. }
  211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  212. public override int GetHashCode() {
  213. int hash = 1;
  214. if (_unknownFields != null) {
  215. hash ^= _unknownFields.GetHashCode();
  216. }
  217. return hash;
  218. }
  219. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  220. public override string ToString() {
  221. return pb::JsonFormatter.ToDiagnosticString(this);
  222. }
  223. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  224. public void WriteTo(pb::CodedOutputStream output) {
  225. if (_unknownFields != null) {
  226. _unknownFields.WriteTo(output);
  227. }
  228. }
  229. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  230. public int CalculateSize() {
  231. int size = 0;
  232. if (_unknownFields != null) {
  233. size += _unknownFields.CalculateSize();
  234. }
  235. return size;
  236. }
  237. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  238. public void MergeFrom(NestedOnce other) {
  239. if (other == null) {
  240. return;
  241. }
  242. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  243. }
  244. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  245. public void MergeFrom(pb::CodedInputStream input) {
  246. uint tag;
  247. while ((tag = input.ReadTag()) != 0) {
  248. switch(tag) {
  249. default:
  250. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  251. break;
  252. }
  253. }
  254. }
  255. #region Nested types
  256. /// <summary>Container for nested types declared in the NestedOnce message type.</summary>
  257. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  258. public static partial class Types {
  259. public sealed partial class NestedTwice : pb::IMessage<NestedTwice> {
  260. private static readonly pb::MessageParser<NestedTwice> _parser = new pb::MessageParser<NestedTwice>(() => new NestedTwice());
  261. private pb::UnknownFieldSet _unknownFields;
  262. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  263. public static pb::MessageParser<NestedTwice> Parser { get { return _parser; } }
  264. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  265. public static pbr::MessageDescriptor Descriptor {
  266. get { return global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Descriptor.NestedTypes[0]; }
  267. }
  268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  269. pbr::MessageDescriptor pb::IMessage.Descriptor {
  270. get { return Descriptor; }
  271. }
  272. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  273. public NestedTwice() {
  274. OnConstruction();
  275. }
  276. partial void OnConstruction();
  277. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  278. public NestedTwice(NestedTwice other) : this() {
  279. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  280. }
  281. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  282. public NestedTwice Clone() {
  283. return new NestedTwice(this);
  284. }
  285. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  286. public override bool Equals(object other) {
  287. return Equals(other as NestedTwice);
  288. }
  289. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  290. public bool Equals(NestedTwice other) {
  291. if (ReferenceEquals(other, null)) {
  292. return false;
  293. }
  294. if (ReferenceEquals(other, this)) {
  295. return true;
  296. }
  297. return Equals(_unknownFields, other._unknownFields);
  298. }
  299. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  300. public override int GetHashCode() {
  301. int hash = 1;
  302. if (_unknownFields != null) {
  303. hash ^= _unknownFields.GetHashCode();
  304. }
  305. return hash;
  306. }
  307. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  308. public override string ToString() {
  309. return pb::JsonFormatter.ToDiagnosticString(this);
  310. }
  311. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  312. public void WriteTo(pb::CodedOutputStream output) {
  313. if (_unknownFields != null) {
  314. _unknownFields.WriteTo(output);
  315. }
  316. }
  317. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  318. public int CalculateSize() {
  319. int size = 0;
  320. if (_unknownFields != null) {
  321. size += _unknownFields.CalculateSize();
  322. }
  323. return size;
  324. }
  325. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  326. public void MergeFrom(NestedTwice other) {
  327. if (other == null) {
  328. return;
  329. }
  330. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  331. }
  332. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  333. public void MergeFrom(pb::CodedInputStream input) {
  334. uint tag;
  335. while ((tag = input.ReadTag()) != 0) {
  336. switch(tag) {
  337. default:
  338. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  339. break;
  340. }
  341. }
  342. }
  343. }
  344. }
  345. #endregion
  346. }
  347. }
  348. #endregion
  349. }
  350. public sealed partial class NegativeEnumMessage : pb::IMessage<NegativeEnumMessage> {
  351. private static readonly pb::MessageParser<NegativeEnumMessage> _parser = new pb::MessageParser<NegativeEnumMessage>(() => new NegativeEnumMessage());
  352. private pb::UnknownFieldSet _unknownFields;
  353. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  354. public static pb::MessageParser<NegativeEnumMessage> Parser { get { return _parser; } }
  355. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  356. public static pbr::MessageDescriptor Descriptor {
  357. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[1]; }
  358. }
  359. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  360. pbr::MessageDescriptor pb::IMessage.Descriptor {
  361. get { return Descriptor; }
  362. }
  363. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  364. public NegativeEnumMessage() {
  365. OnConstruction();
  366. }
  367. partial void OnConstruction();
  368. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  369. public NegativeEnumMessage(NegativeEnumMessage other) : this() {
  370. value_ = other.value_;
  371. values_ = other.values_.Clone();
  372. packedValues_ = other.packedValues_.Clone();
  373. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  374. }
  375. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  376. public NegativeEnumMessage Clone() {
  377. return new NegativeEnumMessage(this);
  378. }
  379. /// <summary>Field number for the "value" field.</summary>
  380. public const int ValueFieldNumber = 1;
  381. private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = 0;
  382. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  383. public global::UnitTest.Issues.TestProtos.NegativeEnum Value {
  384. get { return value_; }
  385. set {
  386. value_ = value;
  387. }
  388. }
  389. /// <summary>Field number for the "values" field.</summary>
  390. public const int ValuesFieldNumber = 2;
  391. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_values_codec
  392. = pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);
  393. private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> values_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
  394. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  395. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> Values {
  396. get { return values_; }
  397. }
  398. /// <summary>Field number for the "packed_values" field.</summary>
  399. public const int PackedValuesFieldNumber = 3;
  400. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_packedValues_codec
  401. = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);
  402. private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> packedValues_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
  403. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  404. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> PackedValues {
  405. get { return packedValues_; }
  406. }
  407. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  408. public override bool Equals(object other) {
  409. return Equals(other as NegativeEnumMessage);
  410. }
  411. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  412. public bool Equals(NegativeEnumMessage other) {
  413. if (ReferenceEquals(other, null)) {
  414. return false;
  415. }
  416. if (ReferenceEquals(other, this)) {
  417. return true;
  418. }
  419. if (Value != other.Value) return false;
  420. if(!values_.Equals(other.values_)) return false;
  421. if(!packedValues_.Equals(other.packedValues_)) return false;
  422. return Equals(_unknownFields, other._unknownFields);
  423. }
  424. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  425. public override int GetHashCode() {
  426. int hash = 1;
  427. if (Value != 0) hash ^= Value.GetHashCode();
  428. hash ^= values_.GetHashCode();
  429. hash ^= packedValues_.GetHashCode();
  430. if (_unknownFields != null) {
  431. hash ^= _unknownFields.GetHashCode();
  432. }
  433. return hash;
  434. }
  435. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  436. public override string ToString() {
  437. return pb::JsonFormatter.ToDiagnosticString(this);
  438. }
  439. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  440. public void WriteTo(pb::CodedOutputStream output) {
  441. if (Value != 0) {
  442. output.WriteRawTag(8);
  443. output.WriteEnum((int) Value);
  444. }
  445. values_.WriteTo(output, _repeated_values_codec);
  446. packedValues_.WriteTo(output, _repeated_packedValues_codec);
  447. if (_unknownFields != null) {
  448. _unknownFields.WriteTo(output);
  449. }
  450. }
  451. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  452. public int CalculateSize() {
  453. int size = 0;
  454. if (Value != 0) {
  455. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value);
  456. }
  457. size += values_.CalculateSize(_repeated_values_codec);
  458. size += packedValues_.CalculateSize(_repeated_packedValues_codec);
  459. if (_unknownFields != null) {
  460. size += _unknownFields.CalculateSize();
  461. }
  462. return size;
  463. }
  464. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  465. public void MergeFrom(NegativeEnumMessage other) {
  466. if (other == null) {
  467. return;
  468. }
  469. if (other.Value != 0) {
  470. Value = other.Value;
  471. }
  472. values_.Add(other.values_);
  473. packedValues_.Add(other.packedValues_);
  474. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  475. }
  476. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  477. public void MergeFrom(pb::CodedInputStream input) {
  478. uint tag;
  479. while ((tag = input.ReadTag()) != 0) {
  480. switch(tag) {
  481. default:
  482. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  483. break;
  484. case 8: {
  485. value_ = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum();
  486. break;
  487. }
  488. case 18:
  489. case 16: {
  490. values_.AddEntriesFrom(input, _repeated_values_codec);
  491. break;
  492. }
  493. case 26:
  494. case 24: {
  495. packedValues_.AddEntriesFrom(input, _repeated_packedValues_codec);
  496. break;
  497. }
  498. }
  499. }
  500. }
  501. }
  502. public sealed partial class DeprecatedChild : pb::IMessage<DeprecatedChild> {
  503. private static readonly pb::MessageParser<DeprecatedChild> _parser = new pb::MessageParser<DeprecatedChild>(() => new DeprecatedChild());
  504. private pb::UnknownFieldSet _unknownFields;
  505. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  506. public static pb::MessageParser<DeprecatedChild> Parser { get { return _parser; } }
  507. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  508. public static pbr::MessageDescriptor Descriptor {
  509. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[2]; }
  510. }
  511. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  512. pbr::MessageDescriptor pb::IMessage.Descriptor {
  513. get { return Descriptor; }
  514. }
  515. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  516. public DeprecatedChild() {
  517. OnConstruction();
  518. }
  519. partial void OnConstruction();
  520. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  521. public DeprecatedChild(DeprecatedChild other) : this() {
  522. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  523. }
  524. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  525. public DeprecatedChild Clone() {
  526. return new DeprecatedChild(this);
  527. }
  528. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  529. public override bool Equals(object other) {
  530. return Equals(other as DeprecatedChild);
  531. }
  532. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  533. public bool Equals(DeprecatedChild other) {
  534. if (ReferenceEquals(other, null)) {
  535. return false;
  536. }
  537. if (ReferenceEquals(other, this)) {
  538. return true;
  539. }
  540. return Equals(_unknownFields, other._unknownFields);
  541. }
  542. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  543. public override int GetHashCode() {
  544. int hash = 1;
  545. if (_unknownFields != null) {
  546. hash ^= _unknownFields.GetHashCode();
  547. }
  548. return hash;
  549. }
  550. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  551. public override string ToString() {
  552. return pb::JsonFormatter.ToDiagnosticString(this);
  553. }
  554. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  555. public void WriteTo(pb::CodedOutputStream output) {
  556. if (_unknownFields != null) {
  557. _unknownFields.WriteTo(output);
  558. }
  559. }
  560. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  561. public int CalculateSize() {
  562. int size = 0;
  563. if (_unknownFields != null) {
  564. size += _unknownFields.CalculateSize();
  565. }
  566. return size;
  567. }
  568. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  569. public void MergeFrom(DeprecatedChild other) {
  570. if (other == null) {
  571. return;
  572. }
  573. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  574. }
  575. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  576. public void MergeFrom(pb::CodedInputStream input) {
  577. uint tag;
  578. while ((tag = input.ReadTag()) != 0) {
  579. switch(tag) {
  580. default:
  581. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  582. break;
  583. }
  584. }
  585. }
  586. }
  587. public sealed partial class DeprecatedFieldsMessage : pb::IMessage<DeprecatedFieldsMessage> {
  588. private static readonly pb::MessageParser<DeprecatedFieldsMessage> _parser = new pb::MessageParser<DeprecatedFieldsMessage>(() => new DeprecatedFieldsMessage());
  589. private pb::UnknownFieldSet _unknownFields;
  590. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  591. public static pb::MessageParser<DeprecatedFieldsMessage> Parser { get { return _parser; } }
  592. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  593. public static pbr::MessageDescriptor Descriptor {
  594. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[3]; }
  595. }
  596. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  597. pbr::MessageDescriptor pb::IMessage.Descriptor {
  598. get { return Descriptor; }
  599. }
  600. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  601. public DeprecatedFieldsMessage() {
  602. OnConstruction();
  603. }
  604. partial void OnConstruction();
  605. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  606. public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) : this() {
  607. primitiveValue_ = other.primitiveValue_;
  608. primitiveArray_ = other.primitiveArray_.Clone();
  609. MessageValue = other.messageValue_ != null ? other.MessageValue.Clone() : null;
  610. messageArray_ = other.messageArray_.Clone();
  611. enumValue_ = other.enumValue_;
  612. enumArray_ = other.enumArray_.Clone();
  613. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  614. }
  615. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  616. public DeprecatedFieldsMessage Clone() {
  617. return new DeprecatedFieldsMessage(this);
  618. }
  619. /// <summary>Field number for the "PrimitiveValue" field.</summary>
  620. public const int PrimitiveValueFieldNumber = 1;
  621. private int primitiveValue_;
  622. [global::System.ObsoleteAttribute]
  623. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  624. public int PrimitiveValue {
  625. get { return primitiveValue_; }
  626. set {
  627. primitiveValue_ = value;
  628. }
  629. }
  630. /// <summary>Field number for the "PrimitiveArray" field.</summary>
  631. public const int PrimitiveArrayFieldNumber = 2;
  632. private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec
  633. = pb::FieldCodec.ForInt32(18);
  634. private readonly pbc::RepeatedField<int> primitiveArray_ = new pbc::RepeatedField<int>();
  635. [global::System.ObsoleteAttribute]
  636. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  637. public pbc::RepeatedField<int> PrimitiveArray {
  638. get { return primitiveArray_; }
  639. }
  640. /// <summary>Field number for the "MessageValue" field.</summary>
  641. public const int MessageValueFieldNumber = 3;
  642. private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_;
  643. [global::System.ObsoleteAttribute]
  644. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  645. public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue {
  646. get { return messageValue_; }
  647. set {
  648. messageValue_ = value;
  649. }
  650. }
  651. /// <summary>Field number for the "MessageArray" field.</summary>
  652. public const int MessageArrayFieldNumber = 4;
  653. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedChild> _repeated_messageArray_codec
  654. = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser);
  655. private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> messageArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild>();
  656. [global::System.ObsoleteAttribute]
  657. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  658. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArray {
  659. get { return messageArray_; }
  660. }
  661. /// <summary>Field number for the "EnumValue" field.</summary>
  662. public const int EnumValueFieldNumber = 5;
  663. private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = 0;
  664. [global::System.ObsoleteAttribute]
  665. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  666. public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue {
  667. get { return enumValue_; }
  668. set {
  669. enumValue_ = value;
  670. }
  671. }
  672. /// <summary>Field number for the "EnumArray" field.</summary>
  673. public const int EnumArrayFieldNumber = 6;
  674. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedEnum> _repeated_enumArray_codec
  675. = pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues.TestProtos.DeprecatedEnum) x);
  676. private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> enumArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum>();
  677. [global::System.ObsoleteAttribute]
  678. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  679. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArray {
  680. get { return enumArray_; }
  681. }
  682. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  683. public override bool Equals(object other) {
  684. return Equals(other as DeprecatedFieldsMessage);
  685. }
  686. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  687. public bool Equals(DeprecatedFieldsMessage other) {
  688. if (ReferenceEquals(other, null)) {
  689. return false;
  690. }
  691. if (ReferenceEquals(other, this)) {
  692. return true;
  693. }
  694. if (PrimitiveValue != other.PrimitiveValue) return false;
  695. if(!primitiveArray_.Equals(other.primitiveArray_)) return false;
  696. if (!object.Equals(MessageValue, other.MessageValue)) return false;
  697. if(!messageArray_.Equals(other.messageArray_)) return false;
  698. if (EnumValue != other.EnumValue) return false;
  699. if(!enumArray_.Equals(other.enumArray_)) return false;
  700. return Equals(_unknownFields, other._unknownFields);
  701. }
  702. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  703. public override int GetHashCode() {
  704. int hash = 1;
  705. if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode();
  706. hash ^= primitiveArray_.GetHashCode();
  707. if (messageValue_ != null) hash ^= MessageValue.GetHashCode();
  708. hash ^= messageArray_.GetHashCode();
  709. if (EnumValue != 0) hash ^= EnumValue.GetHashCode();
  710. hash ^= enumArray_.GetHashCode();
  711. if (_unknownFields != null) {
  712. hash ^= _unknownFields.GetHashCode();
  713. }
  714. return hash;
  715. }
  716. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  717. public override string ToString() {
  718. return pb::JsonFormatter.ToDiagnosticString(this);
  719. }
  720. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  721. public void WriteTo(pb::CodedOutputStream output) {
  722. if (PrimitiveValue != 0) {
  723. output.WriteRawTag(8);
  724. output.WriteInt32(PrimitiveValue);
  725. }
  726. primitiveArray_.WriteTo(output, _repeated_primitiveArray_codec);
  727. if (messageValue_ != null) {
  728. output.WriteRawTag(26);
  729. output.WriteMessage(MessageValue);
  730. }
  731. messageArray_.WriteTo(output, _repeated_messageArray_codec);
  732. if (EnumValue != 0) {
  733. output.WriteRawTag(40);
  734. output.WriteEnum((int) EnumValue);
  735. }
  736. enumArray_.WriteTo(output, _repeated_enumArray_codec);
  737. if (_unknownFields != null) {
  738. _unknownFields.WriteTo(output);
  739. }
  740. }
  741. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  742. public int CalculateSize() {
  743. int size = 0;
  744. if (PrimitiveValue != 0) {
  745. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveValue);
  746. }
  747. size += primitiveArray_.CalculateSize(_repeated_primitiveArray_codec);
  748. if (messageValue_ != null) {
  749. size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageValue);
  750. }
  751. size += messageArray_.CalculateSize(_repeated_messageArray_codec);
  752. if (EnumValue != 0) {
  753. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumValue);
  754. }
  755. size += enumArray_.CalculateSize(_repeated_enumArray_codec);
  756. if (_unknownFields != null) {
  757. size += _unknownFields.CalculateSize();
  758. }
  759. return size;
  760. }
  761. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  762. public void MergeFrom(DeprecatedFieldsMessage other) {
  763. if (other == null) {
  764. return;
  765. }
  766. if (other.PrimitiveValue != 0) {
  767. PrimitiveValue = other.PrimitiveValue;
  768. }
  769. primitiveArray_.Add(other.primitiveArray_);
  770. if (other.messageValue_ != null) {
  771. if (messageValue_ == null) {
  772. messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
  773. }
  774. MessageValue.MergeFrom(other.MessageValue);
  775. }
  776. messageArray_.Add(other.messageArray_);
  777. if (other.EnumValue != 0) {
  778. EnumValue = other.EnumValue;
  779. }
  780. enumArray_.Add(other.enumArray_);
  781. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  782. }
  783. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  784. public void MergeFrom(pb::CodedInputStream input) {
  785. uint tag;
  786. while ((tag = input.ReadTag()) != 0) {
  787. switch(tag) {
  788. default:
  789. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  790. break;
  791. case 8: {
  792. PrimitiveValue = input.ReadInt32();
  793. break;
  794. }
  795. case 18:
  796. case 16: {
  797. primitiveArray_.AddEntriesFrom(input, _repeated_primitiveArray_codec);
  798. break;
  799. }
  800. case 26: {
  801. if (messageValue_ == null) {
  802. messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
  803. }
  804. input.ReadMessage(messageValue_);
  805. break;
  806. }
  807. case 34: {
  808. messageArray_.AddEntriesFrom(input, _repeated_messageArray_codec);
  809. break;
  810. }
  811. case 40: {
  812. enumValue_ = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) input.ReadEnum();
  813. break;
  814. }
  815. case 50:
  816. case 48: {
  817. enumArray_.AddEntriesFrom(input, _repeated_enumArray_codec);
  818. break;
  819. }
  820. }
  821. }
  822. }
  823. }
  824. /// <summary>
  825. /// Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=45
  826. /// </summary>
  827. public sealed partial class ItemField : pb::IMessage<ItemField> {
  828. private static readonly pb::MessageParser<ItemField> _parser = new pb::MessageParser<ItemField>(() => new ItemField());
  829. private pb::UnknownFieldSet _unknownFields;
  830. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  831. public static pb::MessageParser<ItemField> Parser { get { return _parser; } }
  832. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  833. public static pbr::MessageDescriptor Descriptor {
  834. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[4]; }
  835. }
  836. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  837. pbr::MessageDescriptor pb::IMessage.Descriptor {
  838. get { return Descriptor; }
  839. }
  840. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  841. public ItemField() {
  842. OnConstruction();
  843. }
  844. partial void OnConstruction();
  845. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  846. public ItemField(ItemField other) : this() {
  847. item_ = other.item_;
  848. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  849. }
  850. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  851. public ItemField Clone() {
  852. return new ItemField(this);
  853. }
  854. /// <summary>Field number for the "item" field.</summary>
  855. public const int ItemFieldNumber = 1;
  856. private int item_;
  857. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  858. public int Item {
  859. get { return item_; }
  860. set {
  861. item_ = value;
  862. }
  863. }
  864. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  865. public override bool Equals(object other) {
  866. return Equals(other as ItemField);
  867. }
  868. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  869. public bool Equals(ItemField other) {
  870. if (ReferenceEquals(other, null)) {
  871. return false;
  872. }
  873. if (ReferenceEquals(other, this)) {
  874. return true;
  875. }
  876. if (Item != other.Item) return false;
  877. return Equals(_unknownFields, other._unknownFields);
  878. }
  879. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  880. public override int GetHashCode() {
  881. int hash = 1;
  882. if (Item != 0) hash ^= Item.GetHashCode();
  883. if (_unknownFields != null) {
  884. hash ^= _unknownFields.GetHashCode();
  885. }
  886. return hash;
  887. }
  888. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  889. public override string ToString() {
  890. return pb::JsonFormatter.ToDiagnosticString(this);
  891. }
  892. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  893. public void WriteTo(pb::CodedOutputStream output) {
  894. if (Item != 0) {
  895. output.WriteRawTag(8);
  896. output.WriteInt32(Item);
  897. }
  898. if (_unknownFields != null) {
  899. _unknownFields.WriteTo(output);
  900. }
  901. }
  902. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  903. public int CalculateSize() {
  904. int size = 0;
  905. if (Item != 0) {
  906. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Item);
  907. }
  908. if (_unknownFields != null) {
  909. size += _unknownFields.CalculateSize();
  910. }
  911. return size;
  912. }
  913. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  914. public void MergeFrom(ItemField other) {
  915. if (other == null) {
  916. return;
  917. }
  918. if (other.Item != 0) {
  919. Item = other.Item;
  920. }
  921. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  922. }
  923. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  924. public void MergeFrom(pb::CodedInputStream input) {
  925. uint tag;
  926. while ((tag = input.ReadTag()) != 0) {
  927. switch(tag) {
  928. default:
  929. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  930. break;
  931. case 8: {
  932. Item = input.ReadInt32();
  933. break;
  934. }
  935. }
  936. }
  937. }
  938. }
  939. public sealed partial class ReservedNames : pb::IMessage<ReservedNames> {
  940. private static readonly pb::MessageParser<ReservedNames> _parser = new pb::MessageParser<ReservedNames>(() => new ReservedNames());
  941. private pb::UnknownFieldSet _unknownFields;
  942. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  943. public static pb::MessageParser<ReservedNames> Parser { get { return _parser; } }
  944. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  945. public static pbr::MessageDescriptor Descriptor {
  946. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[5]; }
  947. }
  948. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  949. pbr::MessageDescriptor pb::IMessage.Descriptor {
  950. get { return Descriptor; }
  951. }
  952. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  953. public ReservedNames() {
  954. OnConstruction();
  955. }
  956. partial void OnConstruction();
  957. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  958. public ReservedNames(ReservedNames other) : this() {
  959. types_ = other.types_;
  960. descriptor_ = other.descriptor_;
  961. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  962. }
  963. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  964. public ReservedNames Clone() {
  965. return new ReservedNames(this);
  966. }
  967. /// <summary>Field number for the "types" field.</summary>
  968. public const int Types_FieldNumber = 1;
  969. private int types_;
  970. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  971. public int Types_ {
  972. get { return types_; }
  973. set {
  974. types_ = value;
  975. }
  976. }
  977. /// <summary>Field number for the "descriptor" field.</summary>
  978. public const int Descriptor_FieldNumber = 2;
  979. private int descriptor_;
  980. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  981. public int Descriptor_ {
  982. get { return descriptor_; }
  983. set {
  984. descriptor_ = value;
  985. }
  986. }
  987. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  988. public override bool Equals(object other) {
  989. return Equals(other as ReservedNames);
  990. }
  991. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  992. public bool Equals(ReservedNames other) {
  993. if (ReferenceEquals(other, null)) {
  994. return false;
  995. }
  996. if (ReferenceEquals(other, this)) {
  997. return true;
  998. }
  999. if (Types_ != other.Types_) return false;
  1000. if (Descriptor_ != other.Descriptor_) return false;
  1001. return Equals(_unknownFields, other._unknownFields);
  1002. }
  1003. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1004. public override int GetHashCode() {
  1005. int hash = 1;
  1006. if (Types_ != 0) hash ^= Types_.GetHashCode();
  1007. if (Descriptor_ != 0) hash ^= Descriptor_.GetHashCode();
  1008. if (_unknownFields != null) {
  1009. hash ^= _unknownFields.GetHashCode();
  1010. }
  1011. return hash;
  1012. }
  1013. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1014. public override string ToString() {
  1015. return pb::JsonFormatter.ToDiagnosticString(this);
  1016. }
  1017. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1018. public void WriteTo(pb::CodedOutputStream output) {
  1019. if (Types_ != 0) {
  1020. output.WriteRawTag(8);
  1021. output.WriteInt32(Types_);
  1022. }
  1023. if (Descriptor_ != 0) {
  1024. output.WriteRawTag(16);
  1025. output.WriteInt32(Descriptor_);
  1026. }
  1027. if (_unknownFields != null) {
  1028. _unknownFields.WriteTo(output);
  1029. }
  1030. }
  1031. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1032. public int CalculateSize() {
  1033. int size = 0;
  1034. if (Types_ != 0) {
  1035. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Types_);
  1036. }
  1037. if (Descriptor_ != 0) {
  1038. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Descriptor_);
  1039. }
  1040. if (_unknownFields != null) {
  1041. size += _unknownFields.CalculateSize();
  1042. }
  1043. return size;
  1044. }
  1045. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1046. public void MergeFrom(ReservedNames other) {
  1047. if (other == null) {
  1048. return;
  1049. }
  1050. if (other.Types_ != 0) {
  1051. Types_ = other.Types_;
  1052. }
  1053. if (other.Descriptor_ != 0) {
  1054. Descriptor_ = other.Descriptor_;
  1055. }
  1056. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1057. }
  1058. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1059. public void MergeFrom(pb::CodedInputStream input) {
  1060. uint tag;
  1061. while ((tag = input.ReadTag()) != 0) {
  1062. switch(tag) {
  1063. default:
  1064. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1065. break;
  1066. case 8: {
  1067. Types_ = input.ReadInt32();
  1068. break;
  1069. }
  1070. case 16: {
  1071. Descriptor_ = input.ReadInt32();
  1072. break;
  1073. }
  1074. }
  1075. }
  1076. }
  1077. #region Nested types
  1078. /// <summary>Container for nested types declared in the ReservedNames message type.</summary>
  1079. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1080. public static partial class Types {
  1081. /// <summary>
  1082. /// Force a nested type called Types
  1083. /// </summary>
  1084. public sealed partial class SomeNestedType : pb::IMessage<SomeNestedType> {
  1085. private static readonly pb::MessageParser<SomeNestedType> _parser = new pb::MessageParser<SomeNestedType>(() => new SomeNestedType());
  1086. private pb::UnknownFieldSet _unknownFields;
  1087. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1088. public static pb::MessageParser<SomeNestedType> Parser { get { return _parser; } }
  1089. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1090. public static pbr::MessageDescriptor Descriptor {
  1091. get { return global::UnitTest.Issues.TestProtos.ReservedNames.Descriptor.NestedTypes[0]; }
  1092. }
  1093. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1094. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1095. get { return Descriptor; }
  1096. }
  1097. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1098. public SomeNestedType() {
  1099. OnConstruction();
  1100. }
  1101. partial void OnConstruction();
  1102. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1103. public SomeNestedType(SomeNestedType other) : this() {
  1104. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1105. }
  1106. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1107. public SomeNestedType Clone() {
  1108. return new SomeNestedType(this);
  1109. }
  1110. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1111. public override bool Equals(object other) {
  1112. return Equals(other as SomeNestedType);
  1113. }
  1114. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1115. public bool Equals(SomeNestedType other) {
  1116. if (ReferenceEquals(other, null)) {
  1117. return false;
  1118. }
  1119. if (ReferenceEquals(other, this)) {
  1120. return true;
  1121. }
  1122. return Equals(_unknownFields, other._unknownFields);
  1123. }
  1124. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1125. public override int GetHashCode() {
  1126. int hash = 1;
  1127. if (_unknownFields != null) {
  1128. hash ^= _unknownFields.GetHashCode();
  1129. }
  1130. return hash;
  1131. }
  1132. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1133. public override string ToString() {
  1134. return pb::JsonFormatter.ToDiagnosticString(this);
  1135. }
  1136. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1137. public void WriteTo(pb::CodedOutputStream output) {
  1138. if (_unknownFields != null) {
  1139. _unknownFields.WriteTo(output);
  1140. }
  1141. }
  1142. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1143. public int CalculateSize() {
  1144. int size = 0;
  1145. if (_unknownFields != null) {
  1146. size += _unknownFields.CalculateSize();
  1147. }
  1148. return size;
  1149. }
  1150. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1151. public void MergeFrom(SomeNestedType other) {
  1152. if (other == null) {
  1153. return;
  1154. }
  1155. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1156. }
  1157. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1158. public void MergeFrom(pb::CodedInputStream input) {
  1159. uint tag;
  1160. while ((tag = input.ReadTag()) != 0) {
  1161. switch(tag) {
  1162. default:
  1163. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1164. break;
  1165. }
  1166. }
  1167. }
  1168. }
  1169. }
  1170. #endregion
  1171. }
  1172. /// <summary>
  1173. /// These fields are deliberately not declared in numeric
  1174. /// order, and the oneof fields aren't contiguous either.
  1175. /// This allows for reasonably robust tests of JSON output
  1176. /// ordering.
  1177. /// TestFieldOrderings in unittest_proto3.proto is similar,
  1178. /// but doesn't include oneofs.
  1179. /// TODO: Consider adding oneofs to TestFieldOrderings, although
  1180. /// that will require fixing other tests in multiple platforms.
  1181. /// Alternatively, consider just adding this to
  1182. /// unittest_proto3.proto if multiple platforms want it.
  1183. /// </summary>
  1184. public sealed partial class TestJsonFieldOrdering : pb::IMessage<TestJsonFieldOrdering> {
  1185. private static readonly pb::MessageParser<TestJsonFieldOrdering> _parser = new pb::MessageParser<TestJsonFieldOrdering>(() => new TestJsonFieldOrdering());
  1186. private pb::UnknownFieldSet _unknownFields;
  1187. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1188. public static pb::MessageParser<TestJsonFieldOrdering> Parser { get { return _parser; } }
  1189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1190. public static pbr::MessageDescriptor Descriptor {
  1191. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[6]; }
  1192. }
  1193. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1194. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1195. get { return Descriptor; }
  1196. }
  1197. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1198. public TestJsonFieldOrdering() {
  1199. OnConstruction();
  1200. }
  1201. partial void OnConstruction();
  1202. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1203. public TestJsonFieldOrdering(TestJsonFieldOrdering other) : this() {
  1204. plainInt32_ = other.plainInt32_;
  1205. plainString_ = other.plainString_;
  1206. switch (other.O1Case) {
  1207. case O1OneofCase.O1String:
  1208. O1String = other.O1String;
  1209. break;
  1210. case O1OneofCase.O1Int32:
  1211. O1Int32 = other.O1Int32;
  1212. break;
  1213. }
  1214. switch (other.O2Case) {
  1215. case O2OneofCase.O2Int32:
  1216. O2Int32 = other.O2Int32;
  1217. break;
  1218. case O2OneofCase.O2String:
  1219. O2String = other.O2String;
  1220. break;
  1221. }
  1222. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1223. }
  1224. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1225. public TestJsonFieldOrdering Clone() {
  1226. return new TestJsonFieldOrdering(this);
  1227. }
  1228. /// <summary>Field number for the "plain_int32" field.</summary>
  1229. public const int PlainInt32FieldNumber = 4;
  1230. private int plainInt32_;
  1231. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1232. public int PlainInt32 {
  1233. get { return plainInt32_; }
  1234. set {
  1235. plainInt32_ = value;
  1236. }
  1237. }
  1238. /// <summary>Field number for the "o1_string" field.</summary>
  1239. public const int O1StringFieldNumber = 2;
  1240. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1241. public string O1String {
  1242. get { return o1Case_ == O1OneofCase.O1String ? (string) o1_ : ""; }
  1243. set {
  1244. o1_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1245. o1Case_ = O1OneofCase.O1String;
  1246. }
  1247. }
  1248. /// <summary>Field number for the "o1_int32" field.</summary>
  1249. public const int O1Int32FieldNumber = 5;
  1250. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1251. public int O1Int32 {
  1252. get { return o1Case_ == O1OneofCase.O1Int32 ? (int) o1_ : 0; }
  1253. set {
  1254. o1_ = value;
  1255. o1Case_ = O1OneofCase.O1Int32;
  1256. }
  1257. }
  1258. /// <summary>Field number for the "plain_string" field.</summary>
  1259. public const int PlainStringFieldNumber = 1;
  1260. private string plainString_ = "";
  1261. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1262. public string PlainString {
  1263. get { return plainString_; }
  1264. set {
  1265. plainString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1266. }
  1267. }
  1268. /// <summary>Field number for the "o2_int32" field.</summary>
  1269. public const int O2Int32FieldNumber = 6;
  1270. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1271. public int O2Int32 {
  1272. get { return o2Case_ == O2OneofCase.O2Int32 ? (int) o2_ : 0; }
  1273. set {
  1274. o2_ = value;
  1275. o2Case_ = O2OneofCase.O2Int32;
  1276. }
  1277. }
  1278. /// <summary>Field number for the "o2_string" field.</summary>
  1279. public const int O2StringFieldNumber = 3;
  1280. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1281. public string O2String {
  1282. get { return o2Case_ == O2OneofCase.O2String ? (string) o2_ : ""; }
  1283. set {
  1284. o2_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1285. o2Case_ = O2OneofCase.O2String;
  1286. }
  1287. }
  1288. private object o1_;
  1289. /// <summary>Enum of possible cases for the "o1" oneof.</summary>
  1290. public enum O1OneofCase {
  1291. None = 0,
  1292. O1String = 2,
  1293. O1Int32 = 5,
  1294. }
  1295. private O1OneofCase o1Case_ = O1OneofCase.None;
  1296. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1297. public O1OneofCase O1Case {
  1298. get { return o1Case_; }
  1299. }
  1300. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1301. public void ClearO1() {
  1302. o1Case_ = O1OneofCase.None;
  1303. o1_ = null;
  1304. }
  1305. private object o2_;
  1306. /// <summary>Enum of possible cases for the "o2" oneof.</summary>
  1307. public enum O2OneofCase {
  1308. None = 0,
  1309. O2Int32 = 6,
  1310. O2String = 3,
  1311. }
  1312. private O2OneofCase o2Case_ = O2OneofCase.None;
  1313. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1314. public O2OneofCase O2Case {
  1315. get { return o2Case_; }
  1316. }
  1317. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1318. public void ClearO2() {
  1319. o2Case_ = O2OneofCase.None;
  1320. o2_ = null;
  1321. }
  1322. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1323. public override bool Equals(object other) {
  1324. return Equals(other as TestJsonFieldOrdering);
  1325. }
  1326. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1327. public bool Equals(TestJsonFieldOrdering other) {
  1328. if (ReferenceEquals(other, null)) {
  1329. return false;
  1330. }
  1331. if (ReferenceEquals(other, this)) {
  1332. return true;
  1333. }
  1334. if (PlainInt32 != other.PlainInt32) return false;
  1335. if (O1String != other.O1String) return false;
  1336. if (O1Int32 != other.O1Int32) return false;
  1337. if (PlainString != other.PlainString) return false;
  1338. if (O2Int32 != other.O2Int32) return false;
  1339. if (O2String != other.O2String) return false;
  1340. if (O1Case != other.O1Case) return false;
  1341. if (O2Case != other.O2Case) return false;
  1342. return Equals(_unknownFields, other._unknownFields);
  1343. }
  1344. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1345. public override int GetHashCode() {
  1346. int hash = 1;
  1347. if (PlainInt32 != 0) hash ^= PlainInt32.GetHashCode();
  1348. if (o1Case_ == O1OneofCase.O1String) hash ^= O1String.GetHashCode();
  1349. if (o1Case_ == O1OneofCase.O1Int32) hash ^= O1Int32.GetHashCode();
  1350. if (PlainString.Length != 0) hash ^= PlainString.GetHashCode();
  1351. if (o2Case_ == O2OneofCase.O2Int32) hash ^= O2Int32.GetHashCode();
  1352. if (o2Case_ == O2OneofCase.O2String) hash ^= O2String.GetHashCode();
  1353. hash ^= (int) o1Case_;
  1354. hash ^= (int) o2Case_;
  1355. if (_unknownFields != null) {
  1356. hash ^= _unknownFields.GetHashCode();
  1357. }
  1358. return hash;
  1359. }
  1360. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1361. public override string ToString() {
  1362. return pb::JsonFormatter.ToDiagnosticString(this);
  1363. }
  1364. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1365. public void WriteTo(pb::CodedOutputStream output) {
  1366. if (PlainString.Length != 0) {
  1367. output.WriteRawTag(10);
  1368. output.WriteString(PlainString);
  1369. }
  1370. if (o1Case_ == O1OneofCase.O1String) {
  1371. output.WriteRawTag(18);
  1372. output.WriteString(O1String);
  1373. }
  1374. if (o2Case_ == O2OneofCase.O2String) {
  1375. output.WriteRawTag(26);
  1376. output.WriteString(O2String);
  1377. }
  1378. if (PlainInt32 != 0) {
  1379. output.WriteRawTag(32);
  1380. output.WriteInt32(PlainInt32);
  1381. }
  1382. if (o1Case_ == O1OneofCase.O1Int32) {
  1383. output.WriteRawTag(40);
  1384. output.WriteInt32(O1Int32);
  1385. }
  1386. if (o2Case_ == O2OneofCase.O2Int32) {
  1387. output.WriteRawTag(48);
  1388. output.WriteInt32(O2Int32);
  1389. }
  1390. if (_unknownFields != null) {
  1391. _unknownFields.WriteTo(output);
  1392. }
  1393. }
  1394. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1395. public int CalculateSize() {
  1396. int size = 0;
  1397. if (PlainInt32 != 0) {
  1398. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlainInt32);
  1399. }
  1400. if (o1Case_ == O1OneofCase.O1String) {
  1401. size += 1 + pb::CodedOutputStream.ComputeStringSize(O1String);
  1402. }
  1403. if (o1Case_ == O1OneofCase.O1Int32) {
  1404. size += 1 + pb::CodedOutputStream.ComputeInt32Size(O1Int32);
  1405. }
  1406. if (PlainString.Length != 0) {
  1407. size += 1 + pb::CodedOutputStream.ComputeStringSize(PlainString);
  1408. }
  1409. if (o2Case_ == O2OneofCase.O2Int32) {
  1410. size += 1 + pb::CodedOutputStream.ComputeInt32Size(O2Int32);
  1411. }
  1412. if (o2Case_ == O2OneofCase.O2String) {
  1413. size += 1 + pb::CodedOutputStream.ComputeStringSize(O2String);
  1414. }
  1415. if (_unknownFields != null) {
  1416. size += _unknownFields.CalculateSize();
  1417. }
  1418. return size;
  1419. }
  1420. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1421. public void MergeFrom(TestJsonFieldOrdering other) {
  1422. if (other == null) {
  1423. return;
  1424. }
  1425. if (other.PlainInt32 != 0) {
  1426. PlainInt32 = other.PlainInt32;
  1427. }
  1428. if (other.PlainString.Length != 0) {
  1429. PlainString = other.PlainString;
  1430. }
  1431. switch (other.O1Case) {
  1432. case O1OneofCase.O1String:
  1433. O1String = other.O1String;
  1434. break;
  1435. case O1OneofCase.O1Int32:
  1436. O1Int32 = other.O1Int32;
  1437. break;
  1438. }
  1439. switch (other.O2Case) {
  1440. case O2OneofCase.O2Int32:
  1441. O2Int32 = other.O2Int32;
  1442. break;
  1443. case O2OneofCase.O2String:
  1444. O2String = other.O2String;
  1445. break;
  1446. }
  1447. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1448. }
  1449. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1450. public void MergeFrom(pb::CodedInputStream input) {
  1451. uint tag;
  1452. while ((tag = input.ReadTag()) != 0) {
  1453. switch(tag) {
  1454. default:
  1455. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1456. break;
  1457. case 10: {
  1458. PlainString = input.ReadString();
  1459. break;
  1460. }
  1461. case 18: {
  1462. O1String = input.ReadString();
  1463. break;
  1464. }
  1465. case 26: {
  1466. O2String = input.ReadString();
  1467. break;
  1468. }
  1469. case 32: {
  1470. PlainInt32 = input.ReadInt32();
  1471. break;
  1472. }
  1473. case 40: {
  1474. O1Int32 = input.ReadInt32();
  1475. break;
  1476. }
  1477. case 48: {
  1478. O2Int32 = input.ReadInt32();
  1479. break;
  1480. }
  1481. }
  1482. }
  1483. }
  1484. }
  1485. public sealed partial class TestJsonName : pb::IMessage<TestJsonName> {
  1486. private static readonly pb::MessageParser<TestJsonName> _parser = new pb::MessageParser<TestJsonName>(() => new TestJsonName());
  1487. private pb::UnknownFieldSet _unknownFields;
  1488. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1489. public static pb::MessageParser<TestJsonName> Parser { get { return _parser; } }
  1490. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1491. public static pbr::MessageDescriptor Descriptor {
  1492. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[7]; }
  1493. }
  1494. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1495. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1496. get { return Descriptor; }
  1497. }
  1498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1499. public TestJsonName() {
  1500. OnConstruction();
  1501. }
  1502. partial void OnConstruction();
  1503. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1504. public TestJsonName(TestJsonName other) : this() {
  1505. name_ = other.name_;
  1506. description_ = other.description_;
  1507. guid_ = other.guid_;
  1508. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1509. }
  1510. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1511. public TestJsonName Clone() {
  1512. return new TestJsonName(this);
  1513. }
  1514. /// <summary>Field number for the "name" field.</summary>
  1515. public const int NameFieldNumber = 1;
  1516. private string name_ = "";
  1517. /// <summary>
  1518. /// Message for testing the effects for of the json_name option
  1519. /// </summary>
  1520. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1521. public string Name {
  1522. get { return name_; }
  1523. set {
  1524. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1525. }
  1526. }
  1527. /// <summary>Field number for the "description" field.</summary>
  1528. public const int DescriptionFieldNumber = 2;
  1529. private string description_ = "";
  1530. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1531. public string Description {
  1532. get { return description_; }
  1533. set {
  1534. description_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1535. }
  1536. }
  1537. /// <summary>Field number for the "guid" field.</summary>
  1538. public const int GuidFieldNumber = 3;
  1539. private string guid_ = "";
  1540. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1541. public string Guid {
  1542. get { return guid_; }
  1543. set {
  1544. guid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1545. }
  1546. }
  1547. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1548. public override bool Equals(object other) {
  1549. return Equals(other as TestJsonName);
  1550. }
  1551. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1552. public bool Equals(TestJsonName other) {
  1553. if (ReferenceEquals(other, null)) {
  1554. return false;
  1555. }
  1556. if (ReferenceEquals(other, this)) {
  1557. return true;
  1558. }
  1559. if (Name != other.Name) return false;
  1560. if (Description != other.Description) return false;
  1561. if (Guid != other.Guid) return false;
  1562. return Equals(_unknownFields, other._unknownFields);
  1563. }
  1564. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1565. public override int GetHashCode() {
  1566. int hash = 1;
  1567. if (Name.Length != 0) hash ^= Name.GetHashCode();
  1568. if (Description.Length != 0) hash ^= Description.GetHashCode();
  1569. if (Guid.Length != 0) hash ^= Guid.GetHashCode();
  1570. if (_unknownFields != null) {
  1571. hash ^= _unknownFields.GetHashCode();
  1572. }
  1573. return hash;
  1574. }
  1575. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1576. public override string ToString() {
  1577. return pb::JsonFormatter.ToDiagnosticString(this);
  1578. }
  1579. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1580. public void WriteTo(pb::CodedOutputStream output) {
  1581. if (Name.Length != 0) {
  1582. output.WriteRawTag(10);
  1583. output.WriteString(Name);
  1584. }
  1585. if (Description.Length != 0) {
  1586. output.WriteRawTag(18);
  1587. output.WriteString(Description);
  1588. }
  1589. if (Guid.Length != 0) {
  1590. output.WriteRawTag(26);
  1591. output.WriteString(Guid);
  1592. }
  1593. if (_unknownFields != null) {
  1594. _unknownFields.WriteTo(output);
  1595. }
  1596. }
  1597. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1598. public int CalculateSize() {
  1599. int size = 0;
  1600. if (Name.Length != 0) {
  1601. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  1602. }
  1603. if (Description.Length != 0) {
  1604. size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
  1605. }
  1606. if (Guid.Length != 0) {
  1607. size += 1 + pb::CodedOutputStream.ComputeStringSize(Guid);
  1608. }
  1609. if (_unknownFields != null) {
  1610. size += _unknownFields.CalculateSize();
  1611. }
  1612. return size;
  1613. }
  1614. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1615. public void MergeFrom(TestJsonName other) {
  1616. if (other == null) {
  1617. return;
  1618. }
  1619. if (other.Name.Length != 0) {
  1620. Name = other.Name;
  1621. }
  1622. if (other.Description.Length != 0) {
  1623. Description = other.Description;
  1624. }
  1625. if (other.Guid.Length != 0) {
  1626. Guid = other.Guid;
  1627. }
  1628. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1629. }
  1630. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1631. public void MergeFrom(pb::CodedInputStream input) {
  1632. uint tag;
  1633. while ((tag = input.ReadTag()) != 0) {
  1634. switch(tag) {
  1635. default:
  1636. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1637. break;
  1638. case 10: {
  1639. Name = input.ReadString();
  1640. break;
  1641. }
  1642. case 18: {
  1643. Description = input.ReadString();
  1644. break;
  1645. }
  1646. case 26: {
  1647. Guid = input.ReadString();
  1648. break;
  1649. }
  1650. }
  1651. }
  1652. }
  1653. }
  1654. /// <summary>
  1655. /// Issue 3200: When merging two messages which use the same
  1656. /// oneof case, which is itself a message type, the submessages should
  1657. /// be merged.
  1658. /// </summary>
  1659. public sealed partial class OneofMerging : pb::IMessage<OneofMerging> {
  1660. private static readonly pb::MessageParser<OneofMerging> _parser = new pb::MessageParser<OneofMerging>(() => new OneofMerging());
  1661. private pb::UnknownFieldSet _unknownFields;
  1662. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1663. public static pb::MessageParser<OneofMerging> Parser { get { return _parser; } }
  1664. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1665. public static pbr::MessageDescriptor Descriptor {
  1666. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[8]; }
  1667. }
  1668. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1669. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1670. get { return Descriptor; }
  1671. }
  1672. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1673. public OneofMerging() {
  1674. OnConstruction();
  1675. }
  1676. partial void OnConstruction();
  1677. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1678. public OneofMerging(OneofMerging other) : this() {
  1679. switch (other.ValueCase) {
  1680. case ValueOneofCase.Text:
  1681. Text = other.Text;
  1682. break;
  1683. case ValueOneofCase.Nested:
  1684. Nested = other.Nested.Clone();
  1685. break;
  1686. }
  1687. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1688. }
  1689. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1690. public OneofMerging Clone() {
  1691. return new OneofMerging(this);
  1692. }
  1693. /// <summary>Field number for the "text" field.</summary>
  1694. public const int TextFieldNumber = 1;
  1695. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1696. public string Text {
  1697. get { return valueCase_ == ValueOneofCase.Text ? (string) value_ : ""; }
  1698. set {
  1699. value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1700. valueCase_ = ValueOneofCase.Text;
  1701. }
  1702. }
  1703. /// <summary>Field number for the "nested" field.</summary>
  1704. public const int NestedFieldNumber = 2;
  1705. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1706. public global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested Nested {
  1707. get { return valueCase_ == ValueOneofCase.Nested ? (global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested) value_ : null; }
  1708. set {
  1709. value_ = value;
  1710. valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.Nested;
  1711. }
  1712. }
  1713. private object value_;
  1714. /// <summary>Enum of possible cases for the "value" oneof.</summary>
  1715. public enum ValueOneofCase {
  1716. None = 0,
  1717. Text = 1,
  1718. Nested = 2,
  1719. }
  1720. private ValueOneofCase valueCase_ = ValueOneofCase.None;
  1721. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1722. public ValueOneofCase ValueCase {
  1723. get { return valueCase_; }
  1724. }
  1725. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1726. public void ClearValue() {
  1727. valueCase_ = ValueOneofCase.None;
  1728. value_ = null;
  1729. }
  1730. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1731. public override bool Equals(object other) {
  1732. return Equals(other as OneofMerging);
  1733. }
  1734. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1735. public bool Equals(OneofMerging other) {
  1736. if (ReferenceEquals(other, null)) {
  1737. return false;
  1738. }
  1739. if (ReferenceEquals(other, this)) {
  1740. return true;
  1741. }
  1742. if (Text != other.Text) return false;
  1743. if (!object.Equals(Nested, other.Nested)) return false;
  1744. if (ValueCase != other.ValueCase) return false;
  1745. return Equals(_unknownFields, other._unknownFields);
  1746. }
  1747. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1748. public override int GetHashCode() {
  1749. int hash = 1;
  1750. if (valueCase_ == ValueOneofCase.Text) hash ^= Text.GetHashCode();
  1751. if (valueCase_ == ValueOneofCase.Nested) hash ^= Nested.GetHashCode();
  1752. hash ^= (int) valueCase_;
  1753. if (_unknownFields != null) {
  1754. hash ^= _unknownFields.GetHashCode();
  1755. }
  1756. return hash;
  1757. }
  1758. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1759. public override string ToString() {
  1760. return pb::JsonFormatter.ToDiagnosticString(this);
  1761. }
  1762. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1763. public void WriteTo(pb::CodedOutputStream output) {
  1764. if (valueCase_ == ValueOneofCase.Text) {
  1765. output.WriteRawTag(10);
  1766. output.WriteString(Text);
  1767. }
  1768. if (valueCase_ == ValueOneofCase.Nested) {
  1769. output.WriteRawTag(18);
  1770. output.WriteMessage(Nested);
  1771. }
  1772. if (_unknownFields != null) {
  1773. _unknownFields.WriteTo(output);
  1774. }
  1775. }
  1776. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1777. public int CalculateSize() {
  1778. int size = 0;
  1779. if (valueCase_ == ValueOneofCase.Text) {
  1780. size += 1 + pb::CodedOutputStream.ComputeStringSize(Text);
  1781. }
  1782. if (valueCase_ == ValueOneofCase.Nested) {
  1783. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Nested);
  1784. }
  1785. if (_unknownFields != null) {
  1786. size += _unknownFields.CalculateSize();
  1787. }
  1788. return size;
  1789. }
  1790. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1791. public void MergeFrom(OneofMerging other) {
  1792. if (other == null) {
  1793. return;
  1794. }
  1795. switch (other.ValueCase) {
  1796. case ValueOneofCase.Text:
  1797. Text = other.Text;
  1798. break;
  1799. case ValueOneofCase.Nested:
  1800. if (Nested == null) {
  1801. Nested = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested();
  1802. }
  1803. Nested.MergeFrom(other.Nested);
  1804. break;
  1805. }
  1806. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1807. }
  1808. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1809. public void MergeFrom(pb::CodedInputStream input) {
  1810. uint tag;
  1811. while ((tag = input.ReadTag()) != 0) {
  1812. switch(tag) {
  1813. default:
  1814. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1815. break;
  1816. case 10: {
  1817. Text = input.ReadString();
  1818. break;
  1819. }
  1820. case 18: {
  1821. global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested subBuilder = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested();
  1822. if (valueCase_ == ValueOneofCase.Nested) {
  1823. subBuilder.MergeFrom(Nested);
  1824. }
  1825. input.ReadMessage(subBuilder);
  1826. Nested = subBuilder;
  1827. break;
  1828. }
  1829. }
  1830. }
  1831. }
  1832. #region Nested types
  1833. /// <summary>Container for nested types declared in the OneofMerging message type.</summary>
  1834. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1835. public static partial class Types {
  1836. public sealed partial class Nested : pb::IMessage<Nested> {
  1837. private static readonly pb::MessageParser<Nested> _parser = new pb::MessageParser<Nested>(() => new Nested());
  1838. private pb::UnknownFieldSet _unknownFields;
  1839. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1840. public static pb::MessageParser<Nested> Parser { get { return _parser; } }
  1841. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1842. public static pbr::MessageDescriptor Descriptor {
  1843. get { return global::UnitTest.Issues.TestProtos.OneofMerging.Descriptor.NestedTypes[0]; }
  1844. }
  1845. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1846. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1847. get { return Descriptor; }
  1848. }
  1849. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1850. public Nested() {
  1851. OnConstruction();
  1852. }
  1853. partial void OnConstruction();
  1854. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1855. public Nested(Nested other) : this() {
  1856. x_ = other.x_;
  1857. y_ = other.y_;
  1858. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1859. }
  1860. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1861. public Nested Clone() {
  1862. return new Nested(this);
  1863. }
  1864. /// <summary>Field number for the "x" field.</summary>
  1865. public const int XFieldNumber = 1;
  1866. private int x_;
  1867. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1868. public int X {
  1869. get { return x_; }
  1870. set {
  1871. x_ = value;
  1872. }
  1873. }
  1874. /// <summary>Field number for the "y" field.</summary>
  1875. public const int YFieldNumber = 2;
  1876. private int y_;
  1877. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1878. public int Y {
  1879. get { return y_; }
  1880. set {
  1881. y_ = value;
  1882. }
  1883. }
  1884. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1885. public override bool Equals(object other) {
  1886. return Equals(other as Nested);
  1887. }
  1888. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1889. public bool Equals(Nested other) {
  1890. if (ReferenceEquals(other, null)) {
  1891. return false;
  1892. }
  1893. if (ReferenceEquals(other, this)) {
  1894. return true;
  1895. }
  1896. if (X != other.X) return false;
  1897. if (Y != other.Y) return false;
  1898. return Equals(_unknownFields, other._unknownFields);
  1899. }
  1900. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1901. public override int GetHashCode() {
  1902. int hash = 1;
  1903. if (X != 0) hash ^= X.GetHashCode();
  1904. if (Y != 0) hash ^= Y.GetHashCode();
  1905. if (_unknownFields != null) {
  1906. hash ^= _unknownFields.GetHashCode();
  1907. }
  1908. return hash;
  1909. }
  1910. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1911. public override string ToString() {
  1912. return pb::JsonFormatter.ToDiagnosticString(this);
  1913. }
  1914. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1915. public void WriteTo(pb::CodedOutputStream output) {
  1916. if (X != 0) {
  1917. output.WriteRawTag(8);
  1918. output.WriteInt32(X);
  1919. }
  1920. if (Y != 0) {
  1921. output.WriteRawTag(16);
  1922. output.WriteInt32(Y);
  1923. }
  1924. if (_unknownFields != null) {
  1925. _unknownFields.WriteTo(output);
  1926. }
  1927. }
  1928. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1929. public int CalculateSize() {
  1930. int size = 0;
  1931. if (X != 0) {
  1932. size += 1 + pb::CodedOutputStream.ComputeInt32Size(X);
  1933. }
  1934. if (Y != 0) {
  1935. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Y);
  1936. }
  1937. if (_unknownFields != null) {
  1938. size += _unknownFields.CalculateSize();
  1939. }
  1940. return size;
  1941. }
  1942. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1943. public void MergeFrom(Nested other) {
  1944. if (other == null) {
  1945. return;
  1946. }
  1947. if (other.X != 0) {
  1948. X = other.X;
  1949. }
  1950. if (other.Y != 0) {
  1951. Y = other.Y;
  1952. }
  1953. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1954. }
  1955. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1956. public void MergeFrom(pb::CodedInputStream input) {
  1957. uint tag;
  1958. while ((tag = input.ReadTag()) != 0) {
  1959. switch(tag) {
  1960. default:
  1961. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1962. break;
  1963. case 8: {
  1964. X = input.ReadInt32();
  1965. break;
  1966. }
  1967. case 16: {
  1968. Y = input.ReadInt32();
  1969. break;
  1970. }
  1971. }
  1972. }
  1973. }
  1974. }
  1975. }
  1976. #endregion
  1977. }
  1978. #endregion
  1979. }
  1980. #endregion Designer generated code