UnittestIssues.cs 112 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273
  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. "ChV1bml0dGVzdF9pc3N1ZXMucHJvdG8SD3VuaXR0ZXN0X2lzc3VlcxocZ29v",
  24. "Z2xlL3Byb3RvYnVmL3N0cnVjdC5wcm90byInCghJc3N1ZTMwNxobCgpOZXN0",
  25. "ZWRPbmNlGg0KC05lc3RlZFR3aWNlIrABChNOZWdhdGl2ZUVudW1NZXNzYWdl",
  26. "EiwKBXZhbHVlGAEgASgOMh0udW5pdHRlc3RfaXNzdWVzLk5lZ2F0aXZlRW51",
  27. "bRIxCgZ2YWx1ZXMYAiADKA4yHS51bml0dGVzdF9pc3N1ZXMuTmVnYXRpdmVF",
  28. "bnVtQgIQABI4Cg1wYWNrZWRfdmFsdWVzGAMgAygOMh0udW5pdHRlc3RfaXNz",
  29. "dWVzLk5lZ2F0aXZlRW51bUICEAEiEQoPRGVwcmVjYXRlZENoaWxkIrkCChdE",
  30. "ZXByZWNhdGVkRmllbGRzTWVzc2FnZRIaCg5QcmltaXRpdmVWYWx1ZRgBIAEo",
  31. "BUICGAESGgoOUHJpbWl0aXZlQXJyYXkYAiADKAVCAhgBEjoKDE1lc3NhZ2VW",
  32. "YWx1ZRgDIAEoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkQ2hpbGRC",
  33. "AhgBEjoKDE1lc3NhZ2VBcnJheRgEIAMoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5E",
  34. "ZXByZWNhdGVkQ2hpbGRCAhgBEjYKCUVudW1WYWx1ZRgFIAEoDjIfLnVuaXR0",
  35. "ZXN0X2lzc3Vlcy5EZXByZWNhdGVkRW51bUICGAESNgoJRW51bUFycmF5GAYg",
  36. "AygOMh8udW5pdHRlc3RfaXNzdWVzLkRlcHJlY2F0ZWRFbnVtQgIYASIZCglJ",
  37. "dGVtRmllbGQSDAoEaXRlbRgBIAEoBSJECg1SZXNlcnZlZE5hbWVzEg0KBXR5",
  38. "cGVzGAEgASgFEhIKCmRlc2NyaXB0b3IYAiABKAUaEAoOU29tZU5lc3RlZFR5",
  39. "cGUioAEKFVRlc3RKc29uRmllbGRPcmRlcmluZxITCgtwbGFpbl9pbnQzMhgE",
  40. "IAEoBRITCglvMV9zdHJpbmcYAiABKAlIABISCghvMV9pbnQzMhgFIAEoBUgA",
  41. "EhQKDHBsYWluX3N0cmluZxgBIAEoCRISCghvMl9pbnQzMhgGIAEoBUgBEhMK",
  42. "CW8yX3N0cmluZxgDIAEoCUgBQgQKAm8xQgQKAm8yIksKDFRlc3RKc29uTmFt",
  43. "ZRIMCgRuYW1lGAEgASgJEhkKC2Rlc2NyaXB0aW9uGAIgASgJUgRkZXNjEhIK",
  44. "BGd1aWQYAyABKAlSBGV4aWQifwoMT25lb2ZNZXJnaW5nEg4KBHRleHQYASAB",
  45. "KAlIABI2CgZuZXN0ZWQYAiABKAsyJC51bml0dGVzdF9pc3N1ZXMuT25lb2ZN",
  46. "ZXJnaW5nLk5lc3RlZEgAGh4KBk5lc3RlZBIJCgF4GAEgASgFEgkKAXkYAiAB",
  47. "KAVCBwoFdmFsdWUiawoWTnVsbFZhbHVlT3V0c2lkZVN0cnVjdBIWCgxzdHJp",
  48. "bmdfdmFsdWUYASABKAlIABIwCgpudWxsX3ZhbHVlGAIgASgOMhouZ29vZ2xl",
  49. "LnByb3RvYnVmLk51bGxWYWx1ZUgAQgcKBXZhbHVlIkUKE051bGxWYWx1ZU5v",
  50. "dEluT25lb2YSLgoKbnVsbF92YWx1ZRgCIAEoDjIaLmdvb2dsZS5wcm90b2J1",
  51. "Zi5OdWxsVmFsdWUqVQoMTmVnYXRpdmVFbnVtEhYKEk5FR0FUSVZFX0VOVU1f",
  52. "WkVSTxAAEhYKCUZpdmVCZWxvdxD7//////////8BEhUKCE1pbnVzT25lEP//",
  53. "/////////wEqLgoORGVwcmVjYXRlZEVudW0SEwoPREVQUkVDQVRFRF9aRVJP",
  54. "EAASBwoDb25lEAFCHaoCGlVuaXRUZXN0Lklzc3Vlcy5UZXN0UHJvdG9zYgZw",
  55. "cm90bzM="));
  56. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  57. new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, },
  58. new pbr::GeneratedClrTypeInfo(new[] {typeof(global::UnitTest.Issues.TestProtos.NegativeEnum), typeof(global::UnitTest.Issues.TestProtos.DeprecatedEnum), }, null, new pbr::GeneratedClrTypeInfo[] {
  59. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307), global::UnitTest.Issues.TestProtos.Issue307.Parser, null, 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, 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, null)})}),
  60. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NegativeEnumMessage), global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Parser, new[]{ "Value", "Values", "PackedValues" }, null, null, null, null),
  61. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.DeprecatedChild), global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser, null, null, null, null, null),
  62. 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, null),
  63. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ItemField), global::UnitTest.Issues.TestProtos.ItemField.Parser, new[]{ "Item" }, null, null, null, null),
  64. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames), global::UnitTest.Issues.TestProtos.ReservedNames.Parser, new[]{ "Types_", "Descriptor_" }, null, 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, null)}),
  65. 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, null),
  66. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonName), global::UnitTest.Issues.TestProtos.TestJsonName.Parser, new[]{ "Name", "Description", "Guid" }, null, null, null, null),
  67. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofMerging), global::UnitTest.Issues.TestProtos.OneofMerging.Parser, new[]{ "Text", "Nested" }, new[]{ "Value" }, null, 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, null)}),
  68. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NullValueOutsideStruct), global::UnitTest.Issues.TestProtos.NullValueOutsideStruct.Parser, new[]{ "StringValue", "NullValue" }, new[]{ "Value" }, null, null, null),
  69. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NullValueNotInOneof), global::UnitTest.Issues.TestProtos.NullValueNotInOneof.Parser, new[]{ "NullValue" }, null, null, null, null)
  70. }));
  71. }
  72. #endregion
  73. }
  74. #region Enums
  75. public enum NegativeEnum {
  76. [pbr::OriginalName("NEGATIVE_ENUM_ZERO")] Zero = 0,
  77. [pbr::OriginalName("FiveBelow")] FiveBelow = -5,
  78. [pbr::OriginalName("MinusOne")] MinusOne = -1,
  79. }
  80. public enum DeprecatedEnum {
  81. [pbr::OriginalName("DEPRECATED_ZERO")] DeprecatedZero = 0,
  82. [pbr::OriginalName("one")] One = 1,
  83. }
  84. #endregion
  85. #region Messages
  86. /// <summary>
  87. /// Issue 307: when generating doubly-nested types, any references
  88. /// should be of the form A.Types.B.Types.C.
  89. /// </summary>
  90. public sealed partial class Issue307 : pb::IMessage<Issue307>
  91. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  92. , pb::IBufferMessage
  93. #endif
  94. {
  95. private static readonly pb::MessageParser<Issue307> _parser = new pb::MessageParser<Issue307>(() => new Issue307());
  96. private pb::UnknownFieldSet _unknownFields;
  97. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  98. public static pb::MessageParser<Issue307> Parser { get { return _parser; } }
  99. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  100. public static pbr::MessageDescriptor Descriptor {
  101. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[0]; }
  102. }
  103. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  104. pbr::MessageDescriptor pb::IMessage.Descriptor {
  105. get { return Descriptor; }
  106. }
  107. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  108. public Issue307() {
  109. OnConstruction();
  110. }
  111. partial void OnConstruction();
  112. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  113. public Issue307(Issue307 other) : this() {
  114. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  115. }
  116. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  117. public Issue307 Clone() {
  118. return new Issue307(this);
  119. }
  120. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  121. public override bool Equals(object other) {
  122. return Equals(other as Issue307);
  123. }
  124. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  125. public bool Equals(Issue307 other) {
  126. if (ReferenceEquals(other, null)) {
  127. return false;
  128. }
  129. if (ReferenceEquals(other, this)) {
  130. return true;
  131. }
  132. return Equals(_unknownFields, other._unknownFields);
  133. }
  134. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  135. public override int GetHashCode() {
  136. int hash = 1;
  137. if (_unknownFields != null) {
  138. hash ^= _unknownFields.GetHashCode();
  139. }
  140. return hash;
  141. }
  142. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  143. public override string ToString() {
  144. return pb::JsonFormatter.ToDiagnosticString(this);
  145. }
  146. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  147. public void WriteTo(pb::CodedOutputStream output) {
  148. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  149. output.WriteRawMessage(this);
  150. #else
  151. if (_unknownFields != null) {
  152. _unknownFields.WriteTo(output);
  153. }
  154. #endif
  155. }
  156. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  157. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  158. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  159. if (_unknownFields != null) {
  160. _unknownFields.WriteTo(ref output);
  161. }
  162. }
  163. #endif
  164. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  165. public int CalculateSize() {
  166. int size = 0;
  167. if (_unknownFields != null) {
  168. size += _unknownFields.CalculateSize();
  169. }
  170. return size;
  171. }
  172. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  173. public void MergeFrom(Issue307 other) {
  174. if (other == null) {
  175. return;
  176. }
  177. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  178. }
  179. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  180. public void MergeFrom(pb::CodedInputStream input) {
  181. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  182. input.ReadRawMessage(this);
  183. #else
  184. uint tag;
  185. while ((tag = input.ReadTag()) != 0) {
  186. switch(tag) {
  187. default:
  188. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  189. break;
  190. }
  191. }
  192. #endif
  193. }
  194. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  195. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  196. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  197. uint tag;
  198. while ((tag = input.ReadTag()) != 0) {
  199. switch(tag) {
  200. default:
  201. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  202. break;
  203. }
  204. }
  205. }
  206. #endif
  207. #region Nested types
  208. /// <summary>Container for nested types declared in the Issue307 message type.</summary>
  209. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  210. public static partial class Types {
  211. public sealed partial class NestedOnce : pb::IMessage<NestedOnce>
  212. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  213. , pb::IBufferMessage
  214. #endif
  215. {
  216. private static readonly pb::MessageParser<NestedOnce> _parser = new pb::MessageParser<NestedOnce>(() => new NestedOnce());
  217. private pb::UnknownFieldSet _unknownFields;
  218. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  219. public static pb::MessageParser<NestedOnce> Parser { get { return _parser; } }
  220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  221. public static pbr::MessageDescriptor Descriptor {
  222. get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.NestedTypes[0]; }
  223. }
  224. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  225. pbr::MessageDescriptor pb::IMessage.Descriptor {
  226. get { return Descriptor; }
  227. }
  228. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  229. public NestedOnce() {
  230. OnConstruction();
  231. }
  232. partial void OnConstruction();
  233. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  234. public NestedOnce(NestedOnce other) : this() {
  235. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  236. }
  237. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  238. public NestedOnce Clone() {
  239. return new NestedOnce(this);
  240. }
  241. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  242. public override bool Equals(object other) {
  243. return Equals(other as NestedOnce);
  244. }
  245. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  246. public bool Equals(NestedOnce other) {
  247. if (ReferenceEquals(other, null)) {
  248. return false;
  249. }
  250. if (ReferenceEquals(other, this)) {
  251. return true;
  252. }
  253. return Equals(_unknownFields, other._unknownFields);
  254. }
  255. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  256. public override int GetHashCode() {
  257. int hash = 1;
  258. if (_unknownFields != null) {
  259. hash ^= _unknownFields.GetHashCode();
  260. }
  261. return hash;
  262. }
  263. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  264. public override string ToString() {
  265. return pb::JsonFormatter.ToDiagnosticString(this);
  266. }
  267. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  268. public void WriteTo(pb::CodedOutputStream output) {
  269. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  270. output.WriteRawMessage(this);
  271. #else
  272. if (_unknownFields != null) {
  273. _unknownFields.WriteTo(output);
  274. }
  275. #endif
  276. }
  277. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  278. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  279. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  280. if (_unknownFields != null) {
  281. _unknownFields.WriteTo(ref output);
  282. }
  283. }
  284. #endif
  285. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  286. public int CalculateSize() {
  287. int size = 0;
  288. if (_unknownFields != null) {
  289. size += _unknownFields.CalculateSize();
  290. }
  291. return size;
  292. }
  293. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  294. public void MergeFrom(NestedOnce other) {
  295. if (other == null) {
  296. return;
  297. }
  298. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  299. }
  300. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  301. public void MergeFrom(pb::CodedInputStream input) {
  302. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  303. input.ReadRawMessage(this);
  304. #else
  305. uint tag;
  306. while ((tag = input.ReadTag()) != 0) {
  307. switch(tag) {
  308. default:
  309. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  310. break;
  311. }
  312. }
  313. #endif
  314. }
  315. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  316. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  317. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  318. uint tag;
  319. while ((tag = input.ReadTag()) != 0) {
  320. switch(tag) {
  321. default:
  322. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  323. break;
  324. }
  325. }
  326. }
  327. #endif
  328. #region Nested types
  329. /// <summary>Container for nested types declared in the NestedOnce message type.</summary>
  330. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  331. public static partial class Types {
  332. public sealed partial class NestedTwice : pb::IMessage<NestedTwice>
  333. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  334. , pb::IBufferMessage
  335. #endif
  336. {
  337. private static readonly pb::MessageParser<NestedTwice> _parser = new pb::MessageParser<NestedTwice>(() => new NestedTwice());
  338. private pb::UnknownFieldSet _unknownFields;
  339. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  340. public static pb::MessageParser<NestedTwice> Parser { get { return _parser; } }
  341. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  342. public static pbr::MessageDescriptor Descriptor {
  343. get { return global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Descriptor.NestedTypes[0]; }
  344. }
  345. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  346. pbr::MessageDescriptor pb::IMessage.Descriptor {
  347. get { return Descriptor; }
  348. }
  349. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  350. public NestedTwice() {
  351. OnConstruction();
  352. }
  353. partial void OnConstruction();
  354. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  355. public NestedTwice(NestedTwice other) : this() {
  356. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  357. }
  358. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  359. public NestedTwice Clone() {
  360. return new NestedTwice(this);
  361. }
  362. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  363. public override bool Equals(object other) {
  364. return Equals(other as NestedTwice);
  365. }
  366. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  367. public bool Equals(NestedTwice other) {
  368. if (ReferenceEquals(other, null)) {
  369. return false;
  370. }
  371. if (ReferenceEquals(other, this)) {
  372. return true;
  373. }
  374. return Equals(_unknownFields, other._unknownFields);
  375. }
  376. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  377. public override int GetHashCode() {
  378. int hash = 1;
  379. if (_unknownFields != null) {
  380. hash ^= _unknownFields.GetHashCode();
  381. }
  382. return hash;
  383. }
  384. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  385. public override string ToString() {
  386. return pb::JsonFormatter.ToDiagnosticString(this);
  387. }
  388. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  389. public void WriteTo(pb::CodedOutputStream output) {
  390. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  391. output.WriteRawMessage(this);
  392. #else
  393. if (_unknownFields != null) {
  394. _unknownFields.WriteTo(output);
  395. }
  396. #endif
  397. }
  398. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  399. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  400. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  401. if (_unknownFields != null) {
  402. _unknownFields.WriteTo(ref output);
  403. }
  404. }
  405. #endif
  406. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  407. public int CalculateSize() {
  408. int size = 0;
  409. if (_unknownFields != null) {
  410. size += _unknownFields.CalculateSize();
  411. }
  412. return size;
  413. }
  414. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  415. public void MergeFrom(NestedTwice other) {
  416. if (other == null) {
  417. return;
  418. }
  419. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  420. }
  421. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  422. public void MergeFrom(pb::CodedInputStream input) {
  423. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  424. input.ReadRawMessage(this);
  425. #else
  426. uint tag;
  427. while ((tag = input.ReadTag()) != 0) {
  428. switch(tag) {
  429. default:
  430. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  431. break;
  432. }
  433. }
  434. #endif
  435. }
  436. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  437. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  438. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  439. uint tag;
  440. while ((tag = input.ReadTag()) != 0) {
  441. switch(tag) {
  442. default:
  443. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  444. break;
  445. }
  446. }
  447. }
  448. #endif
  449. }
  450. }
  451. #endregion
  452. }
  453. }
  454. #endregion
  455. }
  456. public sealed partial class NegativeEnumMessage : pb::IMessage<NegativeEnumMessage>
  457. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  458. , pb::IBufferMessage
  459. #endif
  460. {
  461. private static readonly pb::MessageParser<NegativeEnumMessage> _parser = new pb::MessageParser<NegativeEnumMessage>(() => new NegativeEnumMessage());
  462. private pb::UnknownFieldSet _unknownFields;
  463. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  464. public static pb::MessageParser<NegativeEnumMessage> Parser { get { return _parser; } }
  465. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  466. public static pbr::MessageDescriptor Descriptor {
  467. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[1]; }
  468. }
  469. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  470. pbr::MessageDescriptor pb::IMessage.Descriptor {
  471. get { return Descriptor; }
  472. }
  473. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  474. public NegativeEnumMessage() {
  475. OnConstruction();
  476. }
  477. partial void OnConstruction();
  478. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  479. public NegativeEnumMessage(NegativeEnumMessage other) : this() {
  480. value_ = other.value_;
  481. values_ = other.values_.Clone();
  482. packedValues_ = other.packedValues_.Clone();
  483. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  484. }
  485. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  486. public NegativeEnumMessage Clone() {
  487. return new NegativeEnumMessage(this);
  488. }
  489. /// <summary>Field number for the "value" field.</summary>
  490. public const int ValueFieldNumber = 1;
  491. private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = global::UnitTest.Issues.TestProtos.NegativeEnum.Zero;
  492. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  493. public global::UnitTest.Issues.TestProtos.NegativeEnum Value {
  494. get { return value_; }
  495. set {
  496. value_ = value;
  497. }
  498. }
  499. /// <summary>Field number for the "values" field.</summary>
  500. public const int ValuesFieldNumber = 2;
  501. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_values_codec
  502. = pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);
  503. private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> values_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
  504. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  505. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> Values {
  506. get { return values_; }
  507. }
  508. /// <summary>Field number for the "packed_values" field.</summary>
  509. public const int PackedValuesFieldNumber = 3;
  510. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_packedValues_codec
  511. = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);
  512. private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> packedValues_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
  513. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  514. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> PackedValues {
  515. get { return packedValues_; }
  516. }
  517. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  518. public override bool Equals(object other) {
  519. return Equals(other as NegativeEnumMessage);
  520. }
  521. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  522. public bool Equals(NegativeEnumMessage other) {
  523. if (ReferenceEquals(other, null)) {
  524. return false;
  525. }
  526. if (ReferenceEquals(other, this)) {
  527. return true;
  528. }
  529. if (Value != other.Value) return false;
  530. if(!values_.Equals(other.values_)) return false;
  531. if(!packedValues_.Equals(other.packedValues_)) return false;
  532. return Equals(_unknownFields, other._unknownFields);
  533. }
  534. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  535. public override int GetHashCode() {
  536. int hash = 1;
  537. if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) hash ^= Value.GetHashCode();
  538. hash ^= values_.GetHashCode();
  539. hash ^= packedValues_.GetHashCode();
  540. if (_unknownFields != null) {
  541. hash ^= _unknownFields.GetHashCode();
  542. }
  543. return hash;
  544. }
  545. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  546. public override string ToString() {
  547. return pb::JsonFormatter.ToDiagnosticString(this);
  548. }
  549. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  550. public void WriteTo(pb::CodedOutputStream output) {
  551. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  552. output.WriteRawMessage(this);
  553. #else
  554. if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
  555. output.WriteRawTag(8);
  556. output.WriteEnum((int) Value);
  557. }
  558. values_.WriteTo(output, _repeated_values_codec);
  559. packedValues_.WriteTo(output, _repeated_packedValues_codec);
  560. if (_unknownFields != null) {
  561. _unknownFields.WriteTo(output);
  562. }
  563. #endif
  564. }
  565. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  566. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  567. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  568. if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
  569. output.WriteRawTag(8);
  570. output.WriteEnum((int) Value);
  571. }
  572. values_.WriteTo(ref output, _repeated_values_codec);
  573. packedValues_.WriteTo(ref output, _repeated_packedValues_codec);
  574. if (_unknownFields != null) {
  575. _unknownFields.WriteTo(ref output);
  576. }
  577. }
  578. #endif
  579. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  580. public int CalculateSize() {
  581. int size = 0;
  582. if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
  583. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value);
  584. }
  585. size += values_.CalculateSize(_repeated_values_codec);
  586. size += packedValues_.CalculateSize(_repeated_packedValues_codec);
  587. if (_unknownFields != null) {
  588. size += _unknownFields.CalculateSize();
  589. }
  590. return size;
  591. }
  592. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  593. public void MergeFrom(NegativeEnumMessage other) {
  594. if (other == null) {
  595. return;
  596. }
  597. if (other.Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
  598. Value = other.Value;
  599. }
  600. values_.Add(other.values_);
  601. packedValues_.Add(other.packedValues_);
  602. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  603. }
  604. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  605. public void MergeFrom(pb::CodedInputStream input) {
  606. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  607. input.ReadRawMessage(this);
  608. #else
  609. uint tag;
  610. while ((tag = input.ReadTag()) != 0) {
  611. switch(tag) {
  612. default:
  613. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  614. break;
  615. case 8: {
  616. Value = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum();
  617. break;
  618. }
  619. case 18:
  620. case 16: {
  621. values_.AddEntriesFrom(input, _repeated_values_codec);
  622. break;
  623. }
  624. case 26:
  625. case 24: {
  626. packedValues_.AddEntriesFrom(input, _repeated_packedValues_codec);
  627. break;
  628. }
  629. }
  630. }
  631. #endif
  632. }
  633. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  634. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  635. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  636. uint tag;
  637. while ((tag = input.ReadTag()) != 0) {
  638. switch(tag) {
  639. default:
  640. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  641. break;
  642. case 8: {
  643. Value = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum();
  644. break;
  645. }
  646. case 18:
  647. case 16: {
  648. values_.AddEntriesFrom(ref input, _repeated_values_codec);
  649. break;
  650. }
  651. case 26:
  652. case 24: {
  653. packedValues_.AddEntriesFrom(ref input, _repeated_packedValues_codec);
  654. break;
  655. }
  656. }
  657. }
  658. }
  659. #endif
  660. }
  661. public sealed partial class DeprecatedChild : pb::IMessage<DeprecatedChild>
  662. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  663. , pb::IBufferMessage
  664. #endif
  665. {
  666. private static readonly pb::MessageParser<DeprecatedChild> _parser = new pb::MessageParser<DeprecatedChild>(() => new DeprecatedChild());
  667. private pb::UnknownFieldSet _unknownFields;
  668. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  669. public static pb::MessageParser<DeprecatedChild> Parser { get { return _parser; } }
  670. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  671. public static pbr::MessageDescriptor Descriptor {
  672. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[2]; }
  673. }
  674. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  675. pbr::MessageDescriptor pb::IMessage.Descriptor {
  676. get { return Descriptor; }
  677. }
  678. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  679. public DeprecatedChild() {
  680. OnConstruction();
  681. }
  682. partial void OnConstruction();
  683. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  684. public DeprecatedChild(DeprecatedChild other) : this() {
  685. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  686. }
  687. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  688. public DeprecatedChild Clone() {
  689. return new DeprecatedChild(this);
  690. }
  691. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  692. public override bool Equals(object other) {
  693. return Equals(other as DeprecatedChild);
  694. }
  695. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  696. public bool Equals(DeprecatedChild other) {
  697. if (ReferenceEquals(other, null)) {
  698. return false;
  699. }
  700. if (ReferenceEquals(other, this)) {
  701. return true;
  702. }
  703. return Equals(_unknownFields, other._unknownFields);
  704. }
  705. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  706. public override int GetHashCode() {
  707. int hash = 1;
  708. if (_unknownFields != null) {
  709. hash ^= _unknownFields.GetHashCode();
  710. }
  711. return hash;
  712. }
  713. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  714. public override string ToString() {
  715. return pb::JsonFormatter.ToDiagnosticString(this);
  716. }
  717. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  718. public void WriteTo(pb::CodedOutputStream output) {
  719. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  720. output.WriteRawMessage(this);
  721. #else
  722. if (_unknownFields != null) {
  723. _unknownFields.WriteTo(output);
  724. }
  725. #endif
  726. }
  727. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  728. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  729. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  730. if (_unknownFields != null) {
  731. _unknownFields.WriteTo(ref output);
  732. }
  733. }
  734. #endif
  735. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  736. public int CalculateSize() {
  737. int size = 0;
  738. if (_unknownFields != null) {
  739. size += _unknownFields.CalculateSize();
  740. }
  741. return size;
  742. }
  743. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  744. public void MergeFrom(DeprecatedChild other) {
  745. if (other == null) {
  746. return;
  747. }
  748. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  749. }
  750. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  751. public void MergeFrom(pb::CodedInputStream input) {
  752. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  753. input.ReadRawMessage(this);
  754. #else
  755. uint tag;
  756. while ((tag = input.ReadTag()) != 0) {
  757. switch(tag) {
  758. default:
  759. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  760. break;
  761. }
  762. }
  763. #endif
  764. }
  765. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  766. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  767. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  768. uint tag;
  769. while ((tag = input.ReadTag()) != 0) {
  770. switch(tag) {
  771. default:
  772. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  773. break;
  774. }
  775. }
  776. }
  777. #endif
  778. }
  779. public sealed partial class DeprecatedFieldsMessage : pb::IMessage<DeprecatedFieldsMessage>
  780. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  781. , pb::IBufferMessage
  782. #endif
  783. {
  784. private static readonly pb::MessageParser<DeprecatedFieldsMessage> _parser = new pb::MessageParser<DeprecatedFieldsMessage>(() => new DeprecatedFieldsMessage());
  785. private pb::UnknownFieldSet _unknownFields;
  786. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  787. public static pb::MessageParser<DeprecatedFieldsMessage> Parser { get { return _parser; } }
  788. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  789. public static pbr::MessageDescriptor Descriptor {
  790. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[3]; }
  791. }
  792. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  793. pbr::MessageDescriptor pb::IMessage.Descriptor {
  794. get { return Descriptor; }
  795. }
  796. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  797. public DeprecatedFieldsMessage() {
  798. OnConstruction();
  799. }
  800. partial void OnConstruction();
  801. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  802. public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) : this() {
  803. primitiveValue_ = other.primitiveValue_;
  804. primitiveArray_ = other.primitiveArray_.Clone();
  805. messageValue_ = other.messageValue_ != null ? other.messageValue_.Clone() : null;
  806. messageArray_ = other.messageArray_.Clone();
  807. enumValue_ = other.enumValue_;
  808. enumArray_ = other.enumArray_.Clone();
  809. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  810. }
  811. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  812. public DeprecatedFieldsMessage Clone() {
  813. return new DeprecatedFieldsMessage(this);
  814. }
  815. /// <summary>Field number for the "PrimitiveValue" field.</summary>
  816. public const int PrimitiveValueFieldNumber = 1;
  817. private int primitiveValue_;
  818. [global::System.ObsoleteAttribute]
  819. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  820. public int PrimitiveValue {
  821. get { return primitiveValue_; }
  822. set {
  823. primitiveValue_ = value;
  824. }
  825. }
  826. /// <summary>Field number for the "PrimitiveArray" field.</summary>
  827. public const int PrimitiveArrayFieldNumber = 2;
  828. private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec
  829. = pb::FieldCodec.ForInt32(18);
  830. private readonly pbc::RepeatedField<int> primitiveArray_ = new pbc::RepeatedField<int>();
  831. [global::System.ObsoleteAttribute]
  832. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  833. public pbc::RepeatedField<int> PrimitiveArray {
  834. get { return primitiveArray_; }
  835. }
  836. /// <summary>Field number for the "MessageValue" field.</summary>
  837. public const int MessageValueFieldNumber = 3;
  838. private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_;
  839. [global::System.ObsoleteAttribute]
  840. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  841. public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue {
  842. get { return messageValue_; }
  843. set {
  844. messageValue_ = value;
  845. }
  846. }
  847. /// <summary>Field number for the "MessageArray" field.</summary>
  848. public const int MessageArrayFieldNumber = 4;
  849. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedChild> _repeated_messageArray_codec
  850. = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser);
  851. private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> messageArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild>();
  852. [global::System.ObsoleteAttribute]
  853. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  854. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArray {
  855. get { return messageArray_; }
  856. }
  857. /// <summary>Field number for the "EnumValue" field.</summary>
  858. public const int EnumValueFieldNumber = 5;
  859. private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero;
  860. [global::System.ObsoleteAttribute]
  861. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  862. public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue {
  863. get { return enumValue_; }
  864. set {
  865. enumValue_ = value;
  866. }
  867. }
  868. /// <summary>Field number for the "EnumArray" field.</summary>
  869. public const int EnumArrayFieldNumber = 6;
  870. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedEnum> _repeated_enumArray_codec
  871. = pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues.TestProtos.DeprecatedEnum) x);
  872. private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> enumArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum>();
  873. [global::System.ObsoleteAttribute]
  874. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  875. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArray {
  876. get { return enumArray_; }
  877. }
  878. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  879. public override bool Equals(object other) {
  880. return Equals(other as DeprecatedFieldsMessage);
  881. }
  882. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  883. public bool Equals(DeprecatedFieldsMessage other) {
  884. if (ReferenceEquals(other, null)) {
  885. return false;
  886. }
  887. if (ReferenceEquals(other, this)) {
  888. return true;
  889. }
  890. if (PrimitiveValue != other.PrimitiveValue) return false;
  891. if(!primitiveArray_.Equals(other.primitiveArray_)) return false;
  892. if (!object.Equals(MessageValue, other.MessageValue)) return false;
  893. if(!messageArray_.Equals(other.messageArray_)) return false;
  894. if (EnumValue != other.EnumValue) return false;
  895. if(!enumArray_.Equals(other.enumArray_)) return false;
  896. return Equals(_unknownFields, other._unknownFields);
  897. }
  898. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  899. public override int GetHashCode() {
  900. int hash = 1;
  901. if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode();
  902. hash ^= primitiveArray_.GetHashCode();
  903. if (messageValue_ != null) hash ^= MessageValue.GetHashCode();
  904. hash ^= messageArray_.GetHashCode();
  905. if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) hash ^= EnumValue.GetHashCode();
  906. hash ^= enumArray_.GetHashCode();
  907. if (_unknownFields != null) {
  908. hash ^= _unknownFields.GetHashCode();
  909. }
  910. return hash;
  911. }
  912. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  913. public override string ToString() {
  914. return pb::JsonFormatter.ToDiagnosticString(this);
  915. }
  916. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  917. public void WriteTo(pb::CodedOutputStream output) {
  918. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  919. output.WriteRawMessage(this);
  920. #else
  921. if (PrimitiveValue != 0) {
  922. output.WriteRawTag(8);
  923. output.WriteInt32(PrimitiveValue);
  924. }
  925. primitiveArray_.WriteTo(output, _repeated_primitiveArray_codec);
  926. if (messageValue_ != null) {
  927. output.WriteRawTag(26);
  928. output.WriteMessage(MessageValue);
  929. }
  930. messageArray_.WriteTo(output, _repeated_messageArray_codec);
  931. if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
  932. output.WriteRawTag(40);
  933. output.WriteEnum((int) EnumValue);
  934. }
  935. enumArray_.WriteTo(output, _repeated_enumArray_codec);
  936. if (_unknownFields != null) {
  937. _unknownFields.WriteTo(output);
  938. }
  939. #endif
  940. }
  941. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  942. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  943. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  944. if (PrimitiveValue != 0) {
  945. output.WriteRawTag(8);
  946. output.WriteInt32(PrimitiveValue);
  947. }
  948. primitiveArray_.WriteTo(ref output, _repeated_primitiveArray_codec);
  949. if (messageValue_ != null) {
  950. output.WriteRawTag(26);
  951. output.WriteMessage(MessageValue);
  952. }
  953. messageArray_.WriteTo(ref output, _repeated_messageArray_codec);
  954. if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
  955. output.WriteRawTag(40);
  956. output.WriteEnum((int) EnumValue);
  957. }
  958. enumArray_.WriteTo(ref output, _repeated_enumArray_codec);
  959. if (_unknownFields != null) {
  960. _unknownFields.WriteTo(ref output);
  961. }
  962. }
  963. #endif
  964. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  965. public int CalculateSize() {
  966. int size = 0;
  967. if (PrimitiveValue != 0) {
  968. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveValue);
  969. }
  970. size += primitiveArray_.CalculateSize(_repeated_primitiveArray_codec);
  971. if (messageValue_ != null) {
  972. size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageValue);
  973. }
  974. size += messageArray_.CalculateSize(_repeated_messageArray_codec);
  975. if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
  976. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumValue);
  977. }
  978. size += enumArray_.CalculateSize(_repeated_enumArray_codec);
  979. if (_unknownFields != null) {
  980. size += _unknownFields.CalculateSize();
  981. }
  982. return size;
  983. }
  984. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  985. public void MergeFrom(DeprecatedFieldsMessage other) {
  986. if (other == null) {
  987. return;
  988. }
  989. if (other.PrimitiveValue != 0) {
  990. PrimitiveValue = other.PrimitiveValue;
  991. }
  992. primitiveArray_.Add(other.primitiveArray_);
  993. if (other.messageValue_ != null) {
  994. if (messageValue_ == null) {
  995. MessageValue = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
  996. }
  997. MessageValue.MergeFrom(other.MessageValue);
  998. }
  999. messageArray_.Add(other.messageArray_);
  1000. if (other.EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
  1001. EnumValue = other.EnumValue;
  1002. }
  1003. enumArray_.Add(other.enumArray_);
  1004. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1005. }
  1006. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1007. public void MergeFrom(pb::CodedInputStream input) {
  1008. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1009. input.ReadRawMessage(this);
  1010. #else
  1011. uint tag;
  1012. while ((tag = input.ReadTag()) != 0) {
  1013. switch(tag) {
  1014. default:
  1015. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1016. break;
  1017. case 8: {
  1018. PrimitiveValue = input.ReadInt32();
  1019. break;
  1020. }
  1021. case 18:
  1022. case 16: {
  1023. primitiveArray_.AddEntriesFrom(input, _repeated_primitiveArray_codec);
  1024. break;
  1025. }
  1026. case 26: {
  1027. if (messageValue_ == null) {
  1028. MessageValue = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
  1029. }
  1030. input.ReadMessage(MessageValue);
  1031. break;
  1032. }
  1033. case 34: {
  1034. messageArray_.AddEntriesFrom(input, _repeated_messageArray_codec);
  1035. break;
  1036. }
  1037. case 40: {
  1038. EnumValue = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) input.ReadEnum();
  1039. break;
  1040. }
  1041. case 50:
  1042. case 48: {
  1043. enumArray_.AddEntriesFrom(input, _repeated_enumArray_codec);
  1044. break;
  1045. }
  1046. }
  1047. }
  1048. #endif
  1049. }
  1050. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1051. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1052. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1053. uint tag;
  1054. while ((tag = input.ReadTag()) != 0) {
  1055. switch(tag) {
  1056. default:
  1057. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1058. break;
  1059. case 8: {
  1060. PrimitiveValue = input.ReadInt32();
  1061. break;
  1062. }
  1063. case 18:
  1064. case 16: {
  1065. primitiveArray_.AddEntriesFrom(ref input, _repeated_primitiveArray_codec);
  1066. break;
  1067. }
  1068. case 26: {
  1069. if (messageValue_ == null) {
  1070. MessageValue = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
  1071. }
  1072. input.ReadMessage(MessageValue);
  1073. break;
  1074. }
  1075. case 34: {
  1076. messageArray_.AddEntriesFrom(ref input, _repeated_messageArray_codec);
  1077. break;
  1078. }
  1079. case 40: {
  1080. EnumValue = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) input.ReadEnum();
  1081. break;
  1082. }
  1083. case 50:
  1084. case 48: {
  1085. enumArray_.AddEntriesFrom(ref input, _repeated_enumArray_codec);
  1086. break;
  1087. }
  1088. }
  1089. }
  1090. }
  1091. #endif
  1092. }
  1093. /// <summary>
  1094. /// Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=45
  1095. /// </summary>
  1096. public sealed partial class ItemField : pb::IMessage<ItemField>
  1097. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1098. , pb::IBufferMessage
  1099. #endif
  1100. {
  1101. private static readonly pb::MessageParser<ItemField> _parser = new pb::MessageParser<ItemField>(() => new ItemField());
  1102. private pb::UnknownFieldSet _unknownFields;
  1103. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1104. public static pb::MessageParser<ItemField> Parser { get { return _parser; } }
  1105. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1106. public static pbr::MessageDescriptor Descriptor {
  1107. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[4]; }
  1108. }
  1109. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1110. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1111. get { return Descriptor; }
  1112. }
  1113. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1114. public ItemField() {
  1115. OnConstruction();
  1116. }
  1117. partial void OnConstruction();
  1118. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1119. public ItemField(ItemField other) : this() {
  1120. item_ = other.item_;
  1121. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1122. }
  1123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1124. public ItemField Clone() {
  1125. return new ItemField(this);
  1126. }
  1127. /// <summary>Field number for the "item" field.</summary>
  1128. public const int ItemFieldNumber = 1;
  1129. private int item_;
  1130. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1131. public int Item {
  1132. get { return item_; }
  1133. set {
  1134. item_ = value;
  1135. }
  1136. }
  1137. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1138. public override bool Equals(object other) {
  1139. return Equals(other as ItemField);
  1140. }
  1141. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1142. public bool Equals(ItemField other) {
  1143. if (ReferenceEquals(other, null)) {
  1144. return false;
  1145. }
  1146. if (ReferenceEquals(other, this)) {
  1147. return true;
  1148. }
  1149. if (Item != other.Item) return false;
  1150. return Equals(_unknownFields, other._unknownFields);
  1151. }
  1152. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1153. public override int GetHashCode() {
  1154. int hash = 1;
  1155. if (Item != 0) hash ^= Item.GetHashCode();
  1156. if (_unknownFields != null) {
  1157. hash ^= _unknownFields.GetHashCode();
  1158. }
  1159. return hash;
  1160. }
  1161. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1162. public override string ToString() {
  1163. return pb::JsonFormatter.ToDiagnosticString(this);
  1164. }
  1165. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1166. public void WriteTo(pb::CodedOutputStream output) {
  1167. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1168. output.WriteRawMessage(this);
  1169. #else
  1170. if (Item != 0) {
  1171. output.WriteRawTag(8);
  1172. output.WriteInt32(Item);
  1173. }
  1174. if (_unknownFields != null) {
  1175. _unknownFields.WriteTo(output);
  1176. }
  1177. #endif
  1178. }
  1179. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1180. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1181. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1182. if (Item != 0) {
  1183. output.WriteRawTag(8);
  1184. output.WriteInt32(Item);
  1185. }
  1186. if (_unknownFields != null) {
  1187. _unknownFields.WriteTo(ref output);
  1188. }
  1189. }
  1190. #endif
  1191. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1192. public int CalculateSize() {
  1193. int size = 0;
  1194. if (Item != 0) {
  1195. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Item);
  1196. }
  1197. if (_unknownFields != null) {
  1198. size += _unknownFields.CalculateSize();
  1199. }
  1200. return size;
  1201. }
  1202. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1203. public void MergeFrom(ItemField other) {
  1204. if (other == null) {
  1205. return;
  1206. }
  1207. if (other.Item != 0) {
  1208. Item = other.Item;
  1209. }
  1210. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1211. }
  1212. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1213. public void MergeFrom(pb::CodedInputStream input) {
  1214. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1215. input.ReadRawMessage(this);
  1216. #else
  1217. uint tag;
  1218. while ((tag = input.ReadTag()) != 0) {
  1219. switch(tag) {
  1220. default:
  1221. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1222. break;
  1223. case 8: {
  1224. Item = input.ReadInt32();
  1225. break;
  1226. }
  1227. }
  1228. }
  1229. #endif
  1230. }
  1231. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1232. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1233. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1234. uint tag;
  1235. while ((tag = input.ReadTag()) != 0) {
  1236. switch(tag) {
  1237. default:
  1238. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1239. break;
  1240. case 8: {
  1241. Item = input.ReadInt32();
  1242. break;
  1243. }
  1244. }
  1245. }
  1246. }
  1247. #endif
  1248. }
  1249. public sealed partial class ReservedNames : pb::IMessage<ReservedNames>
  1250. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1251. , pb::IBufferMessage
  1252. #endif
  1253. {
  1254. private static readonly pb::MessageParser<ReservedNames> _parser = new pb::MessageParser<ReservedNames>(() => new ReservedNames());
  1255. private pb::UnknownFieldSet _unknownFields;
  1256. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1257. public static pb::MessageParser<ReservedNames> Parser { get { return _parser; } }
  1258. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1259. public static pbr::MessageDescriptor Descriptor {
  1260. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[5]; }
  1261. }
  1262. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1263. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1264. get { return Descriptor; }
  1265. }
  1266. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1267. public ReservedNames() {
  1268. OnConstruction();
  1269. }
  1270. partial void OnConstruction();
  1271. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1272. public ReservedNames(ReservedNames other) : this() {
  1273. types_ = other.types_;
  1274. descriptor_ = other.descriptor_;
  1275. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1276. }
  1277. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1278. public ReservedNames Clone() {
  1279. return new ReservedNames(this);
  1280. }
  1281. /// <summary>Field number for the "types" field.</summary>
  1282. public const int Types_FieldNumber = 1;
  1283. private int types_;
  1284. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1285. public int Types_ {
  1286. get { return types_; }
  1287. set {
  1288. types_ = value;
  1289. }
  1290. }
  1291. /// <summary>Field number for the "descriptor" field.</summary>
  1292. public const int Descriptor_FieldNumber = 2;
  1293. private int descriptor_;
  1294. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1295. public int Descriptor_ {
  1296. get { return descriptor_; }
  1297. set {
  1298. descriptor_ = value;
  1299. }
  1300. }
  1301. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1302. public override bool Equals(object other) {
  1303. return Equals(other as ReservedNames);
  1304. }
  1305. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1306. public bool Equals(ReservedNames other) {
  1307. if (ReferenceEquals(other, null)) {
  1308. return false;
  1309. }
  1310. if (ReferenceEquals(other, this)) {
  1311. return true;
  1312. }
  1313. if (Types_ != other.Types_) return false;
  1314. if (Descriptor_ != other.Descriptor_) return false;
  1315. return Equals(_unknownFields, other._unknownFields);
  1316. }
  1317. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1318. public override int GetHashCode() {
  1319. int hash = 1;
  1320. if (Types_ != 0) hash ^= Types_.GetHashCode();
  1321. if (Descriptor_ != 0) hash ^= Descriptor_.GetHashCode();
  1322. if (_unknownFields != null) {
  1323. hash ^= _unknownFields.GetHashCode();
  1324. }
  1325. return hash;
  1326. }
  1327. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1328. public override string ToString() {
  1329. return pb::JsonFormatter.ToDiagnosticString(this);
  1330. }
  1331. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1332. public void WriteTo(pb::CodedOutputStream output) {
  1333. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1334. output.WriteRawMessage(this);
  1335. #else
  1336. if (Types_ != 0) {
  1337. output.WriteRawTag(8);
  1338. output.WriteInt32(Types_);
  1339. }
  1340. if (Descriptor_ != 0) {
  1341. output.WriteRawTag(16);
  1342. output.WriteInt32(Descriptor_);
  1343. }
  1344. if (_unknownFields != null) {
  1345. _unknownFields.WriteTo(output);
  1346. }
  1347. #endif
  1348. }
  1349. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1350. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1351. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1352. if (Types_ != 0) {
  1353. output.WriteRawTag(8);
  1354. output.WriteInt32(Types_);
  1355. }
  1356. if (Descriptor_ != 0) {
  1357. output.WriteRawTag(16);
  1358. output.WriteInt32(Descriptor_);
  1359. }
  1360. if (_unknownFields != null) {
  1361. _unknownFields.WriteTo(ref output);
  1362. }
  1363. }
  1364. #endif
  1365. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1366. public int CalculateSize() {
  1367. int size = 0;
  1368. if (Types_ != 0) {
  1369. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Types_);
  1370. }
  1371. if (Descriptor_ != 0) {
  1372. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Descriptor_);
  1373. }
  1374. if (_unknownFields != null) {
  1375. size += _unknownFields.CalculateSize();
  1376. }
  1377. return size;
  1378. }
  1379. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1380. public void MergeFrom(ReservedNames other) {
  1381. if (other == null) {
  1382. return;
  1383. }
  1384. if (other.Types_ != 0) {
  1385. Types_ = other.Types_;
  1386. }
  1387. if (other.Descriptor_ != 0) {
  1388. Descriptor_ = other.Descriptor_;
  1389. }
  1390. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1391. }
  1392. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1393. public void MergeFrom(pb::CodedInputStream input) {
  1394. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1395. input.ReadRawMessage(this);
  1396. #else
  1397. uint tag;
  1398. while ((tag = input.ReadTag()) != 0) {
  1399. switch(tag) {
  1400. default:
  1401. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1402. break;
  1403. case 8: {
  1404. Types_ = input.ReadInt32();
  1405. break;
  1406. }
  1407. case 16: {
  1408. Descriptor_ = input.ReadInt32();
  1409. break;
  1410. }
  1411. }
  1412. }
  1413. #endif
  1414. }
  1415. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1416. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1417. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1418. uint tag;
  1419. while ((tag = input.ReadTag()) != 0) {
  1420. switch(tag) {
  1421. default:
  1422. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1423. break;
  1424. case 8: {
  1425. Types_ = input.ReadInt32();
  1426. break;
  1427. }
  1428. case 16: {
  1429. Descriptor_ = input.ReadInt32();
  1430. break;
  1431. }
  1432. }
  1433. }
  1434. }
  1435. #endif
  1436. #region Nested types
  1437. /// <summary>Container for nested types declared in the ReservedNames message type.</summary>
  1438. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1439. public static partial class Types {
  1440. /// <summary>
  1441. /// Force a nested type called Types
  1442. /// </summary>
  1443. public sealed partial class SomeNestedType : pb::IMessage<SomeNestedType>
  1444. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1445. , pb::IBufferMessage
  1446. #endif
  1447. {
  1448. private static readonly pb::MessageParser<SomeNestedType> _parser = new pb::MessageParser<SomeNestedType>(() => new SomeNestedType());
  1449. private pb::UnknownFieldSet _unknownFields;
  1450. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1451. public static pb::MessageParser<SomeNestedType> Parser { get { return _parser; } }
  1452. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1453. public static pbr::MessageDescriptor Descriptor {
  1454. get { return global::UnitTest.Issues.TestProtos.ReservedNames.Descriptor.NestedTypes[0]; }
  1455. }
  1456. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1457. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1458. get { return Descriptor; }
  1459. }
  1460. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1461. public SomeNestedType() {
  1462. OnConstruction();
  1463. }
  1464. partial void OnConstruction();
  1465. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1466. public SomeNestedType(SomeNestedType other) : this() {
  1467. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1468. }
  1469. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1470. public SomeNestedType Clone() {
  1471. return new SomeNestedType(this);
  1472. }
  1473. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1474. public override bool Equals(object other) {
  1475. return Equals(other as SomeNestedType);
  1476. }
  1477. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1478. public bool Equals(SomeNestedType other) {
  1479. if (ReferenceEquals(other, null)) {
  1480. return false;
  1481. }
  1482. if (ReferenceEquals(other, this)) {
  1483. return true;
  1484. }
  1485. return Equals(_unknownFields, other._unknownFields);
  1486. }
  1487. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1488. public override int GetHashCode() {
  1489. int hash = 1;
  1490. if (_unknownFields != null) {
  1491. hash ^= _unknownFields.GetHashCode();
  1492. }
  1493. return hash;
  1494. }
  1495. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1496. public override string ToString() {
  1497. return pb::JsonFormatter.ToDiagnosticString(this);
  1498. }
  1499. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1500. public void WriteTo(pb::CodedOutputStream output) {
  1501. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1502. output.WriteRawMessage(this);
  1503. #else
  1504. if (_unknownFields != null) {
  1505. _unknownFields.WriteTo(output);
  1506. }
  1507. #endif
  1508. }
  1509. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1510. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1511. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1512. if (_unknownFields != null) {
  1513. _unknownFields.WriteTo(ref output);
  1514. }
  1515. }
  1516. #endif
  1517. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1518. public int CalculateSize() {
  1519. int size = 0;
  1520. if (_unknownFields != null) {
  1521. size += _unknownFields.CalculateSize();
  1522. }
  1523. return size;
  1524. }
  1525. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1526. public void MergeFrom(SomeNestedType other) {
  1527. if (other == null) {
  1528. return;
  1529. }
  1530. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1531. }
  1532. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1533. public void MergeFrom(pb::CodedInputStream input) {
  1534. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1535. input.ReadRawMessage(this);
  1536. #else
  1537. uint tag;
  1538. while ((tag = input.ReadTag()) != 0) {
  1539. switch(tag) {
  1540. default:
  1541. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1542. break;
  1543. }
  1544. }
  1545. #endif
  1546. }
  1547. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1548. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1549. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1550. uint tag;
  1551. while ((tag = input.ReadTag()) != 0) {
  1552. switch(tag) {
  1553. default:
  1554. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1555. break;
  1556. }
  1557. }
  1558. }
  1559. #endif
  1560. }
  1561. }
  1562. #endregion
  1563. }
  1564. /// <summary>
  1565. /// These fields are deliberately not declared in numeric
  1566. /// order, and the oneof fields aren't contiguous either.
  1567. /// This allows for reasonably robust tests of JSON output
  1568. /// ordering.
  1569. /// TestFieldOrderings in unittest_proto3.proto is similar,
  1570. /// but doesn't include oneofs.
  1571. /// TODO: Consider adding oneofs to TestFieldOrderings, although
  1572. /// that will require fixing other tests in multiple platforms.
  1573. /// Alternatively, consider just adding this to
  1574. /// unittest_proto3.proto if multiple platforms want it.
  1575. /// </summary>
  1576. public sealed partial class TestJsonFieldOrdering : pb::IMessage<TestJsonFieldOrdering>
  1577. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1578. , pb::IBufferMessage
  1579. #endif
  1580. {
  1581. private static readonly pb::MessageParser<TestJsonFieldOrdering> _parser = new pb::MessageParser<TestJsonFieldOrdering>(() => new TestJsonFieldOrdering());
  1582. private pb::UnknownFieldSet _unknownFields;
  1583. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1584. public static pb::MessageParser<TestJsonFieldOrdering> Parser { get { return _parser; } }
  1585. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1586. public static pbr::MessageDescriptor Descriptor {
  1587. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[6]; }
  1588. }
  1589. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1590. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1591. get { return Descriptor; }
  1592. }
  1593. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1594. public TestJsonFieldOrdering() {
  1595. OnConstruction();
  1596. }
  1597. partial void OnConstruction();
  1598. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1599. public TestJsonFieldOrdering(TestJsonFieldOrdering other) : this() {
  1600. plainInt32_ = other.plainInt32_;
  1601. plainString_ = other.plainString_;
  1602. switch (other.O1Case) {
  1603. case O1OneofCase.O1String:
  1604. O1String = other.O1String;
  1605. break;
  1606. case O1OneofCase.O1Int32:
  1607. O1Int32 = other.O1Int32;
  1608. break;
  1609. }
  1610. switch (other.O2Case) {
  1611. case O2OneofCase.O2Int32:
  1612. O2Int32 = other.O2Int32;
  1613. break;
  1614. case O2OneofCase.O2String:
  1615. O2String = other.O2String;
  1616. break;
  1617. }
  1618. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1619. }
  1620. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1621. public TestJsonFieldOrdering Clone() {
  1622. return new TestJsonFieldOrdering(this);
  1623. }
  1624. /// <summary>Field number for the "plain_int32" field.</summary>
  1625. public const int PlainInt32FieldNumber = 4;
  1626. private int plainInt32_;
  1627. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1628. public int PlainInt32 {
  1629. get { return plainInt32_; }
  1630. set {
  1631. plainInt32_ = value;
  1632. }
  1633. }
  1634. /// <summary>Field number for the "o1_string" field.</summary>
  1635. public const int O1StringFieldNumber = 2;
  1636. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1637. public string O1String {
  1638. get { return o1Case_ == O1OneofCase.O1String ? (string) o1_ : ""; }
  1639. set {
  1640. o1_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1641. o1Case_ = O1OneofCase.O1String;
  1642. }
  1643. }
  1644. /// <summary>Field number for the "o1_int32" field.</summary>
  1645. public const int O1Int32FieldNumber = 5;
  1646. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1647. public int O1Int32 {
  1648. get { return o1Case_ == O1OneofCase.O1Int32 ? (int) o1_ : 0; }
  1649. set {
  1650. o1_ = value;
  1651. o1Case_ = O1OneofCase.O1Int32;
  1652. }
  1653. }
  1654. /// <summary>Field number for the "plain_string" field.</summary>
  1655. public const int PlainStringFieldNumber = 1;
  1656. private string plainString_ = "";
  1657. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1658. public string PlainString {
  1659. get { return plainString_; }
  1660. set {
  1661. plainString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1662. }
  1663. }
  1664. /// <summary>Field number for the "o2_int32" field.</summary>
  1665. public const int O2Int32FieldNumber = 6;
  1666. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1667. public int O2Int32 {
  1668. get { return o2Case_ == O2OneofCase.O2Int32 ? (int) o2_ : 0; }
  1669. set {
  1670. o2_ = value;
  1671. o2Case_ = O2OneofCase.O2Int32;
  1672. }
  1673. }
  1674. /// <summary>Field number for the "o2_string" field.</summary>
  1675. public const int O2StringFieldNumber = 3;
  1676. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1677. public string O2String {
  1678. get { return o2Case_ == O2OneofCase.O2String ? (string) o2_ : ""; }
  1679. set {
  1680. o2_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1681. o2Case_ = O2OneofCase.O2String;
  1682. }
  1683. }
  1684. private object o1_;
  1685. /// <summary>Enum of possible cases for the "o1" oneof.</summary>
  1686. public enum O1OneofCase {
  1687. None = 0,
  1688. O1String = 2,
  1689. O1Int32 = 5,
  1690. }
  1691. private O1OneofCase o1Case_ = O1OneofCase.None;
  1692. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1693. public O1OneofCase O1Case {
  1694. get { return o1Case_; }
  1695. }
  1696. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1697. public void ClearO1() {
  1698. o1Case_ = O1OneofCase.None;
  1699. o1_ = null;
  1700. }
  1701. private object o2_;
  1702. /// <summary>Enum of possible cases for the "o2" oneof.</summary>
  1703. public enum O2OneofCase {
  1704. None = 0,
  1705. O2Int32 = 6,
  1706. O2String = 3,
  1707. }
  1708. private O2OneofCase o2Case_ = O2OneofCase.None;
  1709. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1710. public O2OneofCase O2Case {
  1711. get { return o2Case_; }
  1712. }
  1713. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1714. public void ClearO2() {
  1715. o2Case_ = O2OneofCase.None;
  1716. o2_ = null;
  1717. }
  1718. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1719. public override bool Equals(object other) {
  1720. return Equals(other as TestJsonFieldOrdering);
  1721. }
  1722. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1723. public bool Equals(TestJsonFieldOrdering other) {
  1724. if (ReferenceEquals(other, null)) {
  1725. return false;
  1726. }
  1727. if (ReferenceEquals(other, this)) {
  1728. return true;
  1729. }
  1730. if (PlainInt32 != other.PlainInt32) return false;
  1731. if (O1String != other.O1String) return false;
  1732. if (O1Int32 != other.O1Int32) return false;
  1733. if (PlainString != other.PlainString) return false;
  1734. if (O2Int32 != other.O2Int32) return false;
  1735. if (O2String != other.O2String) return false;
  1736. if (O1Case != other.O1Case) return false;
  1737. if (O2Case != other.O2Case) return false;
  1738. return Equals(_unknownFields, other._unknownFields);
  1739. }
  1740. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1741. public override int GetHashCode() {
  1742. int hash = 1;
  1743. if (PlainInt32 != 0) hash ^= PlainInt32.GetHashCode();
  1744. if (o1Case_ == O1OneofCase.O1String) hash ^= O1String.GetHashCode();
  1745. if (o1Case_ == O1OneofCase.O1Int32) hash ^= O1Int32.GetHashCode();
  1746. if (PlainString.Length != 0) hash ^= PlainString.GetHashCode();
  1747. if (o2Case_ == O2OneofCase.O2Int32) hash ^= O2Int32.GetHashCode();
  1748. if (o2Case_ == O2OneofCase.O2String) hash ^= O2String.GetHashCode();
  1749. hash ^= (int) o1Case_;
  1750. hash ^= (int) o2Case_;
  1751. if (_unknownFields != null) {
  1752. hash ^= _unknownFields.GetHashCode();
  1753. }
  1754. return hash;
  1755. }
  1756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1757. public override string ToString() {
  1758. return pb::JsonFormatter.ToDiagnosticString(this);
  1759. }
  1760. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1761. public void WriteTo(pb::CodedOutputStream output) {
  1762. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1763. output.WriteRawMessage(this);
  1764. #else
  1765. if (PlainString.Length != 0) {
  1766. output.WriteRawTag(10);
  1767. output.WriteString(PlainString);
  1768. }
  1769. if (o1Case_ == O1OneofCase.O1String) {
  1770. output.WriteRawTag(18);
  1771. output.WriteString(O1String);
  1772. }
  1773. if (o2Case_ == O2OneofCase.O2String) {
  1774. output.WriteRawTag(26);
  1775. output.WriteString(O2String);
  1776. }
  1777. if (PlainInt32 != 0) {
  1778. output.WriteRawTag(32);
  1779. output.WriteInt32(PlainInt32);
  1780. }
  1781. if (o1Case_ == O1OneofCase.O1Int32) {
  1782. output.WriteRawTag(40);
  1783. output.WriteInt32(O1Int32);
  1784. }
  1785. if (o2Case_ == O2OneofCase.O2Int32) {
  1786. output.WriteRawTag(48);
  1787. output.WriteInt32(O2Int32);
  1788. }
  1789. if (_unknownFields != null) {
  1790. _unknownFields.WriteTo(output);
  1791. }
  1792. #endif
  1793. }
  1794. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1795. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1796. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1797. if (PlainString.Length != 0) {
  1798. output.WriteRawTag(10);
  1799. output.WriteString(PlainString);
  1800. }
  1801. if (o1Case_ == O1OneofCase.O1String) {
  1802. output.WriteRawTag(18);
  1803. output.WriteString(O1String);
  1804. }
  1805. if (o2Case_ == O2OneofCase.O2String) {
  1806. output.WriteRawTag(26);
  1807. output.WriteString(O2String);
  1808. }
  1809. if (PlainInt32 != 0) {
  1810. output.WriteRawTag(32);
  1811. output.WriteInt32(PlainInt32);
  1812. }
  1813. if (o1Case_ == O1OneofCase.O1Int32) {
  1814. output.WriteRawTag(40);
  1815. output.WriteInt32(O1Int32);
  1816. }
  1817. if (o2Case_ == O2OneofCase.O2Int32) {
  1818. output.WriteRawTag(48);
  1819. output.WriteInt32(O2Int32);
  1820. }
  1821. if (_unknownFields != null) {
  1822. _unknownFields.WriteTo(ref output);
  1823. }
  1824. }
  1825. #endif
  1826. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1827. public int CalculateSize() {
  1828. int size = 0;
  1829. if (PlainInt32 != 0) {
  1830. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlainInt32);
  1831. }
  1832. if (o1Case_ == O1OneofCase.O1String) {
  1833. size += 1 + pb::CodedOutputStream.ComputeStringSize(O1String);
  1834. }
  1835. if (o1Case_ == O1OneofCase.O1Int32) {
  1836. size += 1 + pb::CodedOutputStream.ComputeInt32Size(O1Int32);
  1837. }
  1838. if (PlainString.Length != 0) {
  1839. size += 1 + pb::CodedOutputStream.ComputeStringSize(PlainString);
  1840. }
  1841. if (o2Case_ == O2OneofCase.O2Int32) {
  1842. size += 1 + pb::CodedOutputStream.ComputeInt32Size(O2Int32);
  1843. }
  1844. if (o2Case_ == O2OneofCase.O2String) {
  1845. size += 1 + pb::CodedOutputStream.ComputeStringSize(O2String);
  1846. }
  1847. if (_unknownFields != null) {
  1848. size += _unknownFields.CalculateSize();
  1849. }
  1850. return size;
  1851. }
  1852. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1853. public void MergeFrom(TestJsonFieldOrdering other) {
  1854. if (other == null) {
  1855. return;
  1856. }
  1857. if (other.PlainInt32 != 0) {
  1858. PlainInt32 = other.PlainInt32;
  1859. }
  1860. if (other.PlainString.Length != 0) {
  1861. PlainString = other.PlainString;
  1862. }
  1863. switch (other.O1Case) {
  1864. case O1OneofCase.O1String:
  1865. O1String = other.O1String;
  1866. break;
  1867. case O1OneofCase.O1Int32:
  1868. O1Int32 = other.O1Int32;
  1869. break;
  1870. }
  1871. switch (other.O2Case) {
  1872. case O2OneofCase.O2Int32:
  1873. O2Int32 = other.O2Int32;
  1874. break;
  1875. case O2OneofCase.O2String:
  1876. O2String = other.O2String;
  1877. break;
  1878. }
  1879. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1880. }
  1881. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1882. public void MergeFrom(pb::CodedInputStream input) {
  1883. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1884. input.ReadRawMessage(this);
  1885. #else
  1886. uint tag;
  1887. while ((tag = input.ReadTag()) != 0) {
  1888. switch(tag) {
  1889. default:
  1890. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1891. break;
  1892. case 10: {
  1893. PlainString = input.ReadString();
  1894. break;
  1895. }
  1896. case 18: {
  1897. O1String = input.ReadString();
  1898. break;
  1899. }
  1900. case 26: {
  1901. O2String = input.ReadString();
  1902. break;
  1903. }
  1904. case 32: {
  1905. PlainInt32 = input.ReadInt32();
  1906. break;
  1907. }
  1908. case 40: {
  1909. O1Int32 = input.ReadInt32();
  1910. break;
  1911. }
  1912. case 48: {
  1913. O2Int32 = input.ReadInt32();
  1914. break;
  1915. }
  1916. }
  1917. }
  1918. #endif
  1919. }
  1920. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1921. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1922. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1923. uint tag;
  1924. while ((tag = input.ReadTag()) != 0) {
  1925. switch(tag) {
  1926. default:
  1927. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1928. break;
  1929. case 10: {
  1930. PlainString = input.ReadString();
  1931. break;
  1932. }
  1933. case 18: {
  1934. O1String = input.ReadString();
  1935. break;
  1936. }
  1937. case 26: {
  1938. O2String = input.ReadString();
  1939. break;
  1940. }
  1941. case 32: {
  1942. PlainInt32 = input.ReadInt32();
  1943. break;
  1944. }
  1945. case 40: {
  1946. O1Int32 = input.ReadInt32();
  1947. break;
  1948. }
  1949. case 48: {
  1950. O2Int32 = input.ReadInt32();
  1951. break;
  1952. }
  1953. }
  1954. }
  1955. }
  1956. #endif
  1957. }
  1958. public sealed partial class TestJsonName : pb::IMessage<TestJsonName>
  1959. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1960. , pb::IBufferMessage
  1961. #endif
  1962. {
  1963. private static readonly pb::MessageParser<TestJsonName> _parser = new pb::MessageParser<TestJsonName>(() => new TestJsonName());
  1964. private pb::UnknownFieldSet _unknownFields;
  1965. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1966. public static pb::MessageParser<TestJsonName> Parser { get { return _parser; } }
  1967. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1968. public static pbr::MessageDescriptor Descriptor {
  1969. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[7]; }
  1970. }
  1971. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1972. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1973. get { return Descriptor; }
  1974. }
  1975. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1976. public TestJsonName() {
  1977. OnConstruction();
  1978. }
  1979. partial void OnConstruction();
  1980. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1981. public TestJsonName(TestJsonName other) : this() {
  1982. name_ = other.name_;
  1983. description_ = other.description_;
  1984. guid_ = other.guid_;
  1985. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1986. }
  1987. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1988. public TestJsonName Clone() {
  1989. return new TestJsonName(this);
  1990. }
  1991. /// <summary>Field number for the "name" field.</summary>
  1992. public const int NameFieldNumber = 1;
  1993. private string name_ = "";
  1994. /// <summary>
  1995. /// Message for testing the effects for of the json_name option
  1996. /// </summary>
  1997. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1998. public string Name {
  1999. get { return name_; }
  2000. set {
  2001. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2002. }
  2003. }
  2004. /// <summary>Field number for the "description" field.</summary>
  2005. public const int DescriptionFieldNumber = 2;
  2006. private string description_ = "";
  2007. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2008. public string Description {
  2009. get { return description_; }
  2010. set {
  2011. description_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2012. }
  2013. }
  2014. /// <summary>Field number for the "guid" field.</summary>
  2015. public const int GuidFieldNumber = 3;
  2016. private string guid_ = "";
  2017. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2018. public string Guid {
  2019. get { return guid_; }
  2020. set {
  2021. guid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2022. }
  2023. }
  2024. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2025. public override bool Equals(object other) {
  2026. return Equals(other as TestJsonName);
  2027. }
  2028. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2029. public bool Equals(TestJsonName other) {
  2030. if (ReferenceEquals(other, null)) {
  2031. return false;
  2032. }
  2033. if (ReferenceEquals(other, this)) {
  2034. return true;
  2035. }
  2036. if (Name != other.Name) return false;
  2037. if (Description != other.Description) return false;
  2038. if (Guid != other.Guid) return false;
  2039. return Equals(_unknownFields, other._unknownFields);
  2040. }
  2041. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2042. public override int GetHashCode() {
  2043. int hash = 1;
  2044. if (Name.Length != 0) hash ^= Name.GetHashCode();
  2045. if (Description.Length != 0) hash ^= Description.GetHashCode();
  2046. if (Guid.Length != 0) hash ^= Guid.GetHashCode();
  2047. if (_unknownFields != null) {
  2048. hash ^= _unknownFields.GetHashCode();
  2049. }
  2050. return hash;
  2051. }
  2052. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2053. public override string ToString() {
  2054. return pb::JsonFormatter.ToDiagnosticString(this);
  2055. }
  2056. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2057. public void WriteTo(pb::CodedOutputStream output) {
  2058. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2059. output.WriteRawMessage(this);
  2060. #else
  2061. if (Name.Length != 0) {
  2062. output.WriteRawTag(10);
  2063. output.WriteString(Name);
  2064. }
  2065. if (Description.Length != 0) {
  2066. output.WriteRawTag(18);
  2067. output.WriteString(Description);
  2068. }
  2069. if (Guid.Length != 0) {
  2070. output.WriteRawTag(26);
  2071. output.WriteString(Guid);
  2072. }
  2073. if (_unknownFields != null) {
  2074. _unknownFields.WriteTo(output);
  2075. }
  2076. #endif
  2077. }
  2078. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2079. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2080. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  2081. if (Name.Length != 0) {
  2082. output.WriteRawTag(10);
  2083. output.WriteString(Name);
  2084. }
  2085. if (Description.Length != 0) {
  2086. output.WriteRawTag(18);
  2087. output.WriteString(Description);
  2088. }
  2089. if (Guid.Length != 0) {
  2090. output.WriteRawTag(26);
  2091. output.WriteString(Guid);
  2092. }
  2093. if (_unknownFields != null) {
  2094. _unknownFields.WriteTo(ref output);
  2095. }
  2096. }
  2097. #endif
  2098. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2099. public int CalculateSize() {
  2100. int size = 0;
  2101. if (Name.Length != 0) {
  2102. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  2103. }
  2104. if (Description.Length != 0) {
  2105. size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
  2106. }
  2107. if (Guid.Length != 0) {
  2108. size += 1 + pb::CodedOutputStream.ComputeStringSize(Guid);
  2109. }
  2110. if (_unknownFields != null) {
  2111. size += _unknownFields.CalculateSize();
  2112. }
  2113. return size;
  2114. }
  2115. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2116. public void MergeFrom(TestJsonName other) {
  2117. if (other == null) {
  2118. return;
  2119. }
  2120. if (other.Name.Length != 0) {
  2121. Name = other.Name;
  2122. }
  2123. if (other.Description.Length != 0) {
  2124. Description = other.Description;
  2125. }
  2126. if (other.Guid.Length != 0) {
  2127. Guid = other.Guid;
  2128. }
  2129. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2130. }
  2131. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2132. public void MergeFrom(pb::CodedInputStream input) {
  2133. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2134. input.ReadRawMessage(this);
  2135. #else
  2136. uint tag;
  2137. while ((tag = input.ReadTag()) != 0) {
  2138. switch(tag) {
  2139. default:
  2140. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2141. break;
  2142. case 10: {
  2143. Name = input.ReadString();
  2144. break;
  2145. }
  2146. case 18: {
  2147. Description = input.ReadString();
  2148. break;
  2149. }
  2150. case 26: {
  2151. Guid = input.ReadString();
  2152. break;
  2153. }
  2154. }
  2155. }
  2156. #endif
  2157. }
  2158. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2159. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2160. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  2161. uint tag;
  2162. while ((tag = input.ReadTag()) != 0) {
  2163. switch(tag) {
  2164. default:
  2165. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  2166. break;
  2167. case 10: {
  2168. Name = input.ReadString();
  2169. break;
  2170. }
  2171. case 18: {
  2172. Description = input.ReadString();
  2173. break;
  2174. }
  2175. case 26: {
  2176. Guid = input.ReadString();
  2177. break;
  2178. }
  2179. }
  2180. }
  2181. }
  2182. #endif
  2183. }
  2184. /// <summary>
  2185. /// Issue 3200: When merging two messages which use the same
  2186. /// oneof case, which is itself a message type, the submessages should
  2187. /// be merged.
  2188. /// </summary>
  2189. public sealed partial class OneofMerging : pb::IMessage<OneofMerging>
  2190. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2191. , pb::IBufferMessage
  2192. #endif
  2193. {
  2194. private static readonly pb::MessageParser<OneofMerging> _parser = new pb::MessageParser<OneofMerging>(() => new OneofMerging());
  2195. private pb::UnknownFieldSet _unknownFields;
  2196. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2197. public static pb::MessageParser<OneofMerging> Parser { get { return _parser; } }
  2198. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2199. public static pbr::MessageDescriptor Descriptor {
  2200. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[8]; }
  2201. }
  2202. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2203. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2204. get { return Descriptor; }
  2205. }
  2206. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2207. public OneofMerging() {
  2208. OnConstruction();
  2209. }
  2210. partial void OnConstruction();
  2211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2212. public OneofMerging(OneofMerging other) : this() {
  2213. switch (other.ValueCase) {
  2214. case ValueOneofCase.Text:
  2215. Text = other.Text;
  2216. break;
  2217. case ValueOneofCase.Nested:
  2218. Nested = other.Nested.Clone();
  2219. break;
  2220. }
  2221. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2222. }
  2223. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2224. public OneofMerging Clone() {
  2225. return new OneofMerging(this);
  2226. }
  2227. /// <summary>Field number for the "text" field.</summary>
  2228. public const int TextFieldNumber = 1;
  2229. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2230. public string Text {
  2231. get { return valueCase_ == ValueOneofCase.Text ? (string) value_ : ""; }
  2232. set {
  2233. value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2234. valueCase_ = ValueOneofCase.Text;
  2235. }
  2236. }
  2237. /// <summary>Field number for the "nested" field.</summary>
  2238. public const int NestedFieldNumber = 2;
  2239. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2240. public global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested Nested {
  2241. get { return valueCase_ == ValueOneofCase.Nested ? (global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested) value_ : null; }
  2242. set {
  2243. value_ = value;
  2244. valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.Nested;
  2245. }
  2246. }
  2247. private object value_;
  2248. /// <summary>Enum of possible cases for the "value" oneof.</summary>
  2249. public enum ValueOneofCase {
  2250. None = 0,
  2251. Text = 1,
  2252. Nested = 2,
  2253. }
  2254. private ValueOneofCase valueCase_ = ValueOneofCase.None;
  2255. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2256. public ValueOneofCase ValueCase {
  2257. get { return valueCase_; }
  2258. }
  2259. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2260. public void ClearValue() {
  2261. valueCase_ = ValueOneofCase.None;
  2262. value_ = null;
  2263. }
  2264. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2265. public override bool Equals(object other) {
  2266. return Equals(other as OneofMerging);
  2267. }
  2268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2269. public bool Equals(OneofMerging other) {
  2270. if (ReferenceEquals(other, null)) {
  2271. return false;
  2272. }
  2273. if (ReferenceEquals(other, this)) {
  2274. return true;
  2275. }
  2276. if (Text != other.Text) return false;
  2277. if (!object.Equals(Nested, other.Nested)) return false;
  2278. if (ValueCase != other.ValueCase) return false;
  2279. return Equals(_unknownFields, other._unknownFields);
  2280. }
  2281. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2282. public override int GetHashCode() {
  2283. int hash = 1;
  2284. if (valueCase_ == ValueOneofCase.Text) hash ^= Text.GetHashCode();
  2285. if (valueCase_ == ValueOneofCase.Nested) hash ^= Nested.GetHashCode();
  2286. hash ^= (int) valueCase_;
  2287. if (_unknownFields != null) {
  2288. hash ^= _unknownFields.GetHashCode();
  2289. }
  2290. return hash;
  2291. }
  2292. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2293. public override string ToString() {
  2294. return pb::JsonFormatter.ToDiagnosticString(this);
  2295. }
  2296. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2297. public void WriteTo(pb::CodedOutputStream output) {
  2298. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2299. output.WriteRawMessage(this);
  2300. #else
  2301. if (valueCase_ == ValueOneofCase.Text) {
  2302. output.WriteRawTag(10);
  2303. output.WriteString(Text);
  2304. }
  2305. if (valueCase_ == ValueOneofCase.Nested) {
  2306. output.WriteRawTag(18);
  2307. output.WriteMessage(Nested);
  2308. }
  2309. if (_unknownFields != null) {
  2310. _unknownFields.WriteTo(output);
  2311. }
  2312. #endif
  2313. }
  2314. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2315. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2316. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  2317. if (valueCase_ == ValueOneofCase.Text) {
  2318. output.WriteRawTag(10);
  2319. output.WriteString(Text);
  2320. }
  2321. if (valueCase_ == ValueOneofCase.Nested) {
  2322. output.WriteRawTag(18);
  2323. output.WriteMessage(Nested);
  2324. }
  2325. if (_unknownFields != null) {
  2326. _unknownFields.WriteTo(ref output);
  2327. }
  2328. }
  2329. #endif
  2330. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2331. public int CalculateSize() {
  2332. int size = 0;
  2333. if (valueCase_ == ValueOneofCase.Text) {
  2334. size += 1 + pb::CodedOutputStream.ComputeStringSize(Text);
  2335. }
  2336. if (valueCase_ == ValueOneofCase.Nested) {
  2337. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Nested);
  2338. }
  2339. if (_unknownFields != null) {
  2340. size += _unknownFields.CalculateSize();
  2341. }
  2342. return size;
  2343. }
  2344. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2345. public void MergeFrom(OneofMerging other) {
  2346. if (other == null) {
  2347. return;
  2348. }
  2349. switch (other.ValueCase) {
  2350. case ValueOneofCase.Text:
  2351. Text = other.Text;
  2352. break;
  2353. case ValueOneofCase.Nested:
  2354. if (Nested == null) {
  2355. Nested = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested();
  2356. }
  2357. Nested.MergeFrom(other.Nested);
  2358. break;
  2359. }
  2360. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2361. }
  2362. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2363. public void MergeFrom(pb::CodedInputStream input) {
  2364. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2365. input.ReadRawMessage(this);
  2366. #else
  2367. uint tag;
  2368. while ((tag = input.ReadTag()) != 0) {
  2369. switch(tag) {
  2370. default:
  2371. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2372. break;
  2373. case 10: {
  2374. Text = input.ReadString();
  2375. break;
  2376. }
  2377. case 18: {
  2378. global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested subBuilder = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested();
  2379. if (valueCase_ == ValueOneofCase.Nested) {
  2380. subBuilder.MergeFrom(Nested);
  2381. }
  2382. input.ReadMessage(subBuilder);
  2383. Nested = subBuilder;
  2384. break;
  2385. }
  2386. }
  2387. }
  2388. #endif
  2389. }
  2390. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2391. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2392. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  2393. uint tag;
  2394. while ((tag = input.ReadTag()) != 0) {
  2395. switch(tag) {
  2396. default:
  2397. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  2398. break;
  2399. case 10: {
  2400. Text = input.ReadString();
  2401. break;
  2402. }
  2403. case 18: {
  2404. global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested subBuilder = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested();
  2405. if (valueCase_ == ValueOneofCase.Nested) {
  2406. subBuilder.MergeFrom(Nested);
  2407. }
  2408. input.ReadMessage(subBuilder);
  2409. Nested = subBuilder;
  2410. break;
  2411. }
  2412. }
  2413. }
  2414. }
  2415. #endif
  2416. #region Nested types
  2417. /// <summary>Container for nested types declared in the OneofMerging message type.</summary>
  2418. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2419. public static partial class Types {
  2420. public sealed partial class Nested : pb::IMessage<Nested>
  2421. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2422. , pb::IBufferMessage
  2423. #endif
  2424. {
  2425. private static readonly pb::MessageParser<Nested> _parser = new pb::MessageParser<Nested>(() => new Nested());
  2426. private pb::UnknownFieldSet _unknownFields;
  2427. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2428. public static pb::MessageParser<Nested> Parser { get { return _parser; } }
  2429. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2430. public static pbr::MessageDescriptor Descriptor {
  2431. get { return global::UnitTest.Issues.TestProtos.OneofMerging.Descriptor.NestedTypes[0]; }
  2432. }
  2433. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2434. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2435. get { return Descriptor; }
  2436. }
  2437. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2438. public Nested() {
  2439. OnConstruction();
  2440. }
  2441. partial void OnConstruction();
  2442. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2443. public Nested(Nested other) : this() {
  2444. x_ = other.x_;
  2445. y_ = other.y_;
  2446. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2447. }
  2448. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2449. public Nested Clone() {
  2450. return new Nested(this);
  2451. }
  2452. /// <summary>Field number for the "x" field.</summary>
  2453. public const int XFieldNumber = 1;
  2454. private int x_;
  2455. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2456. public int X {
  2457. get { return x_; }
  2458. set {
  2459. x_ = value;
  2460. }
  2461. }
  2462. /// <summary>Field number for the "y" field.</summary>
  2463. public const int YFieldNumber = 2;
  2464. private int y_;
  2465. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2466. public int Y {
  2467. get { return y_; }
  2468. set {
  2469. y_ = value;
  2470. }
  2471. }
  2472. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2473. public override bool Equals(object other) {
  2474. return Equals(other as Nested);
  2475. }
  2476. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2477. public bool Equals(Nested other) {
  2478. if (ReferenceEquals(other, null)) {
  2479. return false;
  2480. }
  2481. if (ReferenceEquals(other, this)) {
  2482. return true;
  2483. }
  2484. if (X != other.X) return false;
  2485. if (Y != other.Y) return false;
  2486. return Equals(_unknownFields, other._unknownFields);
  2487. }
  2488. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2489. public override int GetHashCode() {
  2490. int hash = 1;
  2491. if (X != 0) hash ^= X.GetHashCode();
  2492. if (Y != 0) hash ^= Y.GetHashCode();
  2493. if (_unknownFields != null) {
  2494. hash ^= _unknownFields.GetHashCode();
  2495. }
  2496. return hash;
  2497. }
  2498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2499. public override string ToString() {
  2500. return pb::JsonFormatter.ToDiagnosticString(this);
  2501. }
  2502. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2503. public void WriteTo(pb::CodedOutputStream output) {
  2504. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2505. output.WriteRawMessage(this);
  2506. #else
  2507. if (X != 0) {
  2508. output.WriteRawTag(8);
  2509. output.WriteInt32(X);
  2510. }
  2511. if (Y != 0) {
  2512. output.WriteRawTag(16);
  2513. output.WriteInt32(Y);
  2514. }
  2515. if (_unknownFields != null) {
  2516. _unknownFields.WriteTo(output);
  2517. }
  2518. #endif
  2519. }
  2520. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2521. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2522. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  2523. if (X != 0) {
  2524. output.WriteRawTag(8);
  2525. output.WriteInt32(X);
  2526. }
  2527. if (Y != 0) {
  2528. output.WriteRawTag(16);
  2529. output.WriteInt32(Y);
  2530. }
  2531. if (_unknownFields != null) {
  2532. _unknownFields.WriteTo(ref output);
  2533. }
  2534. }
  2535. #endif
  2536. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2537. public int CalculateSize() {
  2538. int size = 0;
  2539. if (X != 0) {
  2540. size += 1 + pb::CodedOutputStream.ComputeInt32Size(X);
  2541. }
  2542. if (Y != 0) {
  2543. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Y);
  2544. }
  2545. if (_unknownFields != null) {
  2546. size += _unknownFields.CalculateSize();
  2547. }
  2548. return size;
  2549. }
  2550. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2551. public void MergeFrom(Nested other) {
  2552. if (other == null) {
  2553. return;
  2554. }
  2555. if (other.X != 0) {
  2556. X = other.X;
  2557. }
  2558. if (other.Y != 0) {
  2559. Y = other.Y;
  2560. }
  2561. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2562. }
  2563. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2564. public void MergeFrom(pb::CodedInputStream input) {
  2565. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2566. input.ReadRawMessage(this);
  2567. #else
  2568. uint tag;
  2569. while ((tag = input.ReadTag()) != 0) {
  2570. switch(tag) {
  2571. default:
  2572. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2573. break;
  2574. case 8: {
  2575. X = input.ReadInt32();
  2576. break;
  2577. }
  2578. case 16: {
  2579. Y = input.ReadInt32();
  2580. break;
  2581. }
  2582. }
  2583. }
  2584. #endif
  2585. }
  2586. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2587. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2588. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  2589. uint tag;
  2590. while ((tag = input.ReadTag()) != 0) {
  2591. switch(tag) {
  2592. default:
  2593. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  2594. break;
  2595. case 8: {
  2596. X = input.ReadInt32();
  2597. break;
  2598. }
  2599. case 16: {
  2600. Y = input.ReadInt32();
  2601. break;
  2602. }
  2603. }
  2604. }
  2605. }
  2606. #endif
  2607. }
  2608. }
  2609. #endregion
  2610. }
  2611. public sealed partial class NullValueOutsideStruct : pb::IMessage<NullValueOutsideStruct>
  2612. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2613. , pb::IBufferMessage
  2614. #endif
  2615. {
  2616. private static readonly pb::MessageParser<NullValueOutsideStruct> _parser = new pb::MessageParser<NullValueOutsideStruct>(() => new NullValueOutsideStruct());
  2617. private pb::UnknownFieldSet _unknownFields;
  2618. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2619. public static pb::MessageParser<NullValueOutsideStruct> Parser { get { return _parser; } }
  2620. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2621. public static pbr::MessageDescriptor Descriptor {
  2622. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[9]; }
  2623. }
  2624. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2625. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2626. get { return Descriptor; }
  2627. }
  2628. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2629. public NullValueOutsideStruct() {
  2630. OnConstruction();
  2631. }
  2632. partial void OnConstruction();
  2633. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2634. public NullValueOutsideStruct(NullValueOutsideStruct other) : this() {
  2635. switch (other.ValueCase) {
  2636. case ValueOneofCase.StringValue:
  2637. StringValue = other.StringValue;
  2638. break;
  2639. case ValueOneofCase.NullValue:
  2640. NullValue = other.NullValue;
  2641. break;
  2642. }
  2643. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2644. }
  2645. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2646. public NullValueOutsideStruct Clone() {
  2647. return new NullValueOutsideStruct(this);
  2648. }
  2649. /// <summary>Field number for the "string_value" field.</summary>
  2650. public const int StringValueFieldNumber = 1;
  2651. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2652. public string StringValue {
  2653. get { return valueCase_ == ValueOneofCase.StringValue ? (string) value_ : ""; }
  2654. set {
  2655. value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2656. valueCase_ = ValueOneofCase.StringValue;
  2657. }
  2658. }
  2659. /// <summary>Field number for the "null_value" field.</summary>
  2660. public const int NullValueFieldNumber = 2;
  2661. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2662. public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
  2663. get { return valueCase_ == ValueOneofCase.NullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) value_ : global::Google.Protobuf.WellKnownTypes.NullValue.NullValue; }
  2664. set {
  2665. value_ = value;
  2666. valueCase_ = ValueOneofCase.NullValue;
  2667. }
  2668. }
  2669. private object value_;
  2670. /// <summary>Enum of possible cases for the "value" oneof.</summary>
  2671. public enum ValueOneofCase {
  2672. None = 0,
  2673. StringValue = 1,
  2674. NullValue = 2,
  2675. }
  2676. private ValueOneofCase valueCase_ = ValueOneofCase.None;
  2677. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2678. public ValueOneofCase ValueCase {
  2679. get { return valueCase_; }
  2680. }
  2681. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2682. public void ClearValue() {
  2683. valueCase_ = ValueOneofCase.None;
  2684. value_ = null;
  2685. }
  2686. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2687. public override bool Equals(object other) {
  2688. return Equals(other as NullValueOutsideStruct);
  2689. }
  2690. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2691. public bool Equals(NullValueOutsideStruct other) {
  2692. if (ReferenceEquals(other, null)) {
  2693. return false;
  2694. }
  2695. if (ReferenceEquals(other, this)) {
  2696. return true;
  2697. }
  2698. if (StringValue != other.StringValue) return false;
  2699. if (NullValue != other.NullValue) return false;
  2700. if (ValueCase != other.ValueCase) return false;
  2701. return Equals(_unknownFields, other._unknownFields);
  2702. }
  2703. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2704. public override int GetHashCode() {
  2705. int hash = 1;
  2706. if (valueCase_ == ValueOneofCase.StringValue) hash ^= StringValue.GetHashCode();
  2707. if (valueCase_ == ValueOneofCase.NullValue) hash ^= NullValue.GetHashCode();
  2708. hash ^= (int) valueCase_;
  2709. if (_unknownFields != null) {
  2710. hash ^= _unknownFields.GetHashCode();
  2711. }
  2712. return hash;
  2713. }
  2714. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2715. public override string ToString() {
  2716. return pb::JsonFormatter.ToDiagnosticString(this);
  2717. }
  2718. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2719. public void WriteTo(pb::CodedOutputStream output) {
  2720. if (valueCase_ == ValueOneofCase.StringValue) {
  2721. output.WriteRawTag(10);
  2722. output.WriteString(StringValue);
  2723. }
  2724. if (valueCase_ == ValueOneofCase.NullValue) {
  2725. output.WriteRawTag(16);
  2726. output.WriteEnum((int) NullValue);
  2727. }
  2728. if (_unknownFields != null) {
  2729. _unknownFields.WriteTo(output);
  2730. }
  2731. }
  2732. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2733. public int CalculateSize() {
  2734. int size = 0;
  2735. if (valueCase_ == ValueOneofCase.StringValue) {
  2736. size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
  2737. }
  2738. if (valueCase_ == ValueOneofCase.NullValue) {
  2739. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
  2740. }
  2741. if (_unknownFields != null) {
  2742. size += _unknownFields.CalculateSize();
  2743. }
  2744. return size;
  2745. }
  2746. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2747. public void MergeFrom(NullValueOutsideStruct other) {
  2748. if (other == null) {
  2749. return;
  2750. }
  2751. switch (other.ValueCase) {
  2752. case ValueOneofCase.StringValue:
  2753. StringValue = other.StringValue;
  2754. break;
  2755. case ValueOneofCase.NullValue:
  2756. NullValue = other.NullValue;
  2757. break;
  2758. }
  2759. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2760. }
  2761. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2762. public void MergeFrom(pb::CodedInputStream input) {
  2763. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2764. input.ReadRawMessage(this);
  2765. #else
  2766. uint tag;
  2767. while ((tag = input.ReadTag()) != 0) {
  2768. switch(tag) {
  2769. default:
  2770. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2771. break;
  2772. case 10: {
  2773. StringValue = input.ReadString();
  2774. break;
  2775. }
  2776. case 16: {
  2777. value_ = input.ReadEnum();
  2778. valueCase_ = ValueOneofCase.NullValue;
  2779. break;
  2780. }
  2781. }
  2782. }
  2783. #endif
  2784. }
  2785. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2786. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2787. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  2788. uint tag;
  2789. while ((tag = input.ReadTag()) != 0) {
  2790. switch(tag) {
  2791. default:
  2792. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  2793. break;
  2794. case 10: {
  2795. StringValue = input.ReadString();
  2796. break;
  2797. }
  2798. case 16: {
  2799. value_ = input.ReadEnum();
  2800. valueCase_ = ValueOneofCase.NullValue;
  2801. break;
  2802. }
  2803. }
  2804. }
  2805. }
  2806. #endif
  2807. }
  2808. public sealed partial class NullValueNotInOneof : pb::IMessage<NullValueNotInOneof>
  2809. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2810. , pb::IBufferMessage
  2811. #endif
  2812. {
  2813. private static readonly pb::MessageParser<NullValueNotInOneof> _parser = new pb::MessageParser<NullValueNotInOneof>(() => new NullValueNotInOneof());
  2814. private pb::UnknownFieldSet _unknownFields;
  2815. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2816. public static pb::MessageParser<NullValueNotInOneof> Parser { get { return _parser; } }
  2817. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2818. public static pbr::MessageDescriptor Descriptor {
  2819. get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[10]; }
  2820. }
  2821. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2822. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2823. get { return Descriptor; }
  2824. }
  2825. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2826. public NullValueNotInOneof() {
  2827. OnConstruction();
  2828. }
  2829. partial void OnConstruction();
  2830. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2831. public NullValueNotInOneof(NullValueNotInOneof other) : this() {
  2832. nullValue_ = other.nullValue_;
  2833. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2834. }
  2835. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2836. public NullValueNotInOneof Clone() {
  2837. return new NullValueNotInOneof(this);
  2838. }
  2839. /// <summary>Field number for the "null_value" field.</summary>
  2840. public const int NullValueFieldNumber = 2;
  2841. private global::Google.Protobuf.WellKnownTypes.NullValue nullValue_ = global::Google.Protobuf.WellKnownTypes.NullValue.NullValue;
  2842. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2843. public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
  2844. get { return nullValue_; }
  2845. set {
  2846. nullValue_ = value;
  2847. }
  2848. }
  2849. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2850. public override bool Equals(object other) {
  2851. return Equals(other as NullValueNotInOneof);
  2852. }
  2853. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2854. public bool Equals(NullValueNotInOneof other) {
  2855. if (ReferenceEquals(other, null)) {
  2856. return false;
  2857. }
  2858. if (ReferenceEquals(other, this)) {
  2859. return true;
  2860. }
  2861. if (NullValue != other.NullValue) return false;
  2862. return Equals(_unknownFields, other._unknownFields);
  2863. }
  2864. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2865. public override int GetHashCode() {
  2866. int hash = 1;
  2867. if (NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) hash ^= NullValue.GetHashCode();
  2868. if (_unknownFields != null) {
  2869. hash ^= _unknownFields.GetHashCode();
  2870. }
  2871. return hash;
  2872. }
  2873. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2874. public override string ToString() {
  2875. return pb::JsonFormatter.ToDiagnosticString(this);
  2876. }
  2877. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2878. public void WriteTo(pb::CodedOutputStream output) {
  2879. if (NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) {
  2880. output.WriteRawTag(16);
  2881. output.WriteEnum((int) NullValue);
  2882. }
  2883. if (_unknownFields != null) {
  2884. _unknownFields.WriteTo(output);
  2885. }
  2886. }
  2887. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2888. public int CalculateSize() {
  2889. int size = 0;
  2890. if (NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) {
  2891. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
  2892. }
  2893. if (_unknownFields != null) {
  2894. size += _unknownFields.CalculateSize();
  2895. }
  2896. return size;
  2897. }
  2898. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2899. public void MergeFrom(NullValueNotInOneof other) {
  2900. if (other == null) {
  2901. return;
  2902. }
  2903. if (other.NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) {
  2904. NullValue = other.NullValue;
  2905. }
  2906. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2907. }
  2908. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2909. public void MergeFrom(pb::CodedInputStream input) {
  2910. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2911. input.ReadRawMessage(this);
  2912. #else
  2913. uint tag;
  2914. while ((tag = input.ReadTag()) != 0) {
  2915. switch(tag) {
  2916. default:
  2917. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2918. break;
  2919. case 16: {
  2920. NullValue = (global::Google.Protobuf.WellKnownTypes.NullValue) input.ReadEnum();
  2921. break;
  2922. }
  2923. }
  2924. }
  2925. #endif
  2926. }
  2927. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2928. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2929. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  2930. uint tag;
  2931. while ((tag = input.ReadTag()) != 0) {
  2932. switch(tag) {
  2933. default:
  2934. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  2935. break;
  2936. case 16: {
  2937. NullValue = (global::Google.Protobuf.WellKnownTypes.NullValue) input.ReadEnum();
  2938. break;
  2939. }
  2940. }
  2941. }
  2942. }
  2943. #endif
  2944. }
  2945. #endregion
  2946. }
  2947. #endregion Designer generated code