UnittestProto3.cs 213 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/unittest_proto3.proto
  3. #pragma warning disable 1591, 0612, 3021
  4. #region Designer generated code
  5. using pb = global::Google.Protobuf;
  6. using pbc = global::Google.Protobuf.Collections;
  7. using pbr = global::Google.Protobuf.Reflection;
  8. using scg = global::System.Collections.Generic;
  9. namespace Google.Protobuf.TestProtos {
  10. /// <summary>Holder for reflection information generated from google/protobuf/unittest_proto3.proto</summary>
  11. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  12. public static partial class UnittestProto3Reflection {
  13. #region Descriptor
  14. /// <summary>File descriptor for google/protobuf/unittest_proto3.proto</summary>
  15. public static pbr::FileDescriptor Descriptor {
  16. get { return descriptor; }
  17. }
  18. private static pbr::FileDescriptor descriptor;
  19. static UnittestProto3Reflection() {
  20. byte[] descriptorData = global::System.Convert.FromBase64String(
  21. string.Concat(
  22. "CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfcHJvdG8zLnByb3RvEhFwcm90",
  23. "b2J1Zl91bml0dGVzdBosZ29vZ2xlL3Byb3RvYnVmL3VuaXR0ZXN0X2ltcG9y",
  24. "dF9wcm90bzMucHJvdG8i8A8KDFRlc3RBbGxUeXBlcxIUCgxzaW5nbGVfaW50",
  25. "MzIYASABKAUSFAoMc2luZ2xlX2ludDY0GAIgASgDEhUKDXNpbmdsZV91aW50",
  26. "MzIYAyABKA0SFQoNc2luZ2xlX3VpbnQ2NBgEIAEoBBIVCg1zaW5nbGVfc2lu",
  27. "dDMyGAUgASgREhUKDXNpbmdsZV9zaW50NjQYBiABKBISFgoOc2luZ2xlX2Zp",
  28. "eGVkMzIYByABKAcSFgoOc2luZ2xlX2ZpeGVkNjQYCCABKAYSFwoPc2luZ2xl",
  29. "X3NmaXhlZDMyGAkgASgPEhcKD3NpbmdsZV9zZml4ZWQ2NBgKIAEoEBIUCgxz",
  30. "aW5nbGVfZmxvYXQYCyABKAISFQoNc2luZ2xlX2RvdWJsZRgMIAEoARITCgtz",
  31. "aW5nbGVfYm9vbBgNIAEoCBIVCg1zaW5nbGVfc3RyaW5nGA4gASgJEhQKDHNp",
  32. "bmdsZV9ieXRlcxgPIAEoDBJMChVzaW5nbGVfbmVzdGVkX21lc3NhZ2UYEiAB",
  33. "KAsyLS5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkTWVz",
  34. "c2FnZRJBChZzaW5nbGVfZm9yZWlnbl9tZXNzYWdlGBMgASgLMiEucHJvdG9i",
  35. "dWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2USRgoVc2luZ2xlX2ltcG9ydF9t",
  36. "ZXNzYWdlGBQgASgLMicucHJvdG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9y",
  37. "dE1lc3NhZ2USRgoSc2luZ2xlX25lc3RlZF9lbnVtGBUgASgOMioucHJvdG9i",
  38. "dWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVzLk5lc3RlZEVudW0SOwoTc2luZ2xl",
  39. "X2ZvcmVpZ25fZW51bRgWIAEoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVp",
  40. "Z25FbnVtEkAKEnNpbmdsZV9pbXBvcnRfZW51bRgXIAEoDjIkLnByb3RvYnVm",
  41. "X3VuaXR0ZXN0X2ltcG9ydC5JbXBvcnRFbnVtElMKHHNpbmdsZV9wdWJsaWNf",
  42. "aW1wb3J0X21lc3NhZ2UYGiABKAsyLS5wcm90b2J1Zl91bml0dGVzdF9pbXBv",
  43. "cnQuUHVibGljSW1wb3J0TWVzc2FnZRIWCg5yZXBlYXRlZF9pbnQzMhgfIAMo",
  44. "BRIWCg5yZXBlYXRlZF9pbnQ2NBggIAMoAxIXCg9yZXBlYXRlZF91aW50MzIY",
  45. "ISADKA0SFwoPcmVwZWF0ZWRfdWludDY0GCIgAygEEhcKD3JlcGVhdGVkX3Np",
  46. "bnQzMhgjIAMoERIXCg9yZXBlYXRlZF9zaW50NjQYJCADKBISGAoQcmVwZWF0",
  47. "ZWRfZml4ZWQzMhglIAMoBxIYChByZXBlYXRlZF9maXhlZDY0GCYgAygGEhkK",
  48. "EXJlcGVhdGVkX3NmaXhlZDMyGCcgAygPEhkKEXJlcGVhdGVkX3NmaXhlZDY0",
  49. "GCggAygQEhYKDnJlcGVhdGVkX2Zsb2F0GCkgAygCEhcKD3JlcGVhdGVkX2Rv",
  50. "dWJsZRgqIAMoARIVCg1yZXBlYXRlZF9ib29sGCsgAygIEhcKD3JlcGVhdGVk",
  51. "X3N0cmluZxgsIAMoCRIWCg5yZXBlYXRlZF9ieXRlcxgtIAMoDBJOChdyZXBl",
  52. "YXRlZF9uZXN0ZWRfbWVzc2FnZRgwIAMoCzItLnByb3RvYnVmX3VuaXR0ZXN0",
  53. "LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlEkMKGHJlcGVhdGVkX2ZvcmVp",
  54. "Z25fbWVzc2FnZRgxIAMoCzIhLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25N",
  55. "ZXNzYWdlEkgKF3JlcGVhdGVkX2ltcG9ydF9tZXNzYWdlGDIgAygLMicucHJv",
  56. "dG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9ydE1lc3NhZ2USSAoUcmVwZWF0",
  57. "ZWRfbmVzdGVkX2VudW0YMyADKA4yKi5wcm90b2J1Zl91bml0dGVzdC5UZXN0",
  58. "QWxsVHlwZXMuTmVzdGVkRW51bRI9ChVyZXBlYXRlZF9mb3JlaWduX2VudW0Y",
  59. "NCADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bRJCChRyZXBl",
  60. "YXRlZF9pbXBvcnRfZW51bRg1IAMoDjIkLnByb3RvYnVmX3VuaXR0ZXN0X2lt",
  61. "cG9ydC5JbXBvcnRFbnVtElUKHnJlcGVhdGVkX3B1YmxpY19pbXBvcnRfbWVz",
  62. "c2FnZRg2IAMoCzItLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydC5QdWJsaWNJ",
  63. "bXBvcnRNZXNzYWdlEhYKDG9uZW9mX3VpbnQzMhhvIAEoDUgAEk0KFG9uZW9m",
  64. "X25lc3RlZF9tZXNzYWdlGHAgASgLMi0ucHJvdG9idWZfdW5pdHRlc3QuVGVz",
  65. "dEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2VIABIWCgxvbmVvZl9zdHJpbmcYcSAB",
  66. "KAlIABIVCgtvbmVvZl9ieXRlcxhyIAEoDEgAGhsKDU5lc3RlZE1lc3NhZ2US",
  67. "CgoCYmIYASABKAUiVgoKTmVzdGVkRW51bRIbChdORVNURURfRU5VTV9VTlNQ",
  68. "RUNJRklFRBAAEgcKA0ZPTxABEgcKA0JBUhACEgcKA0JBWhADEhAKA05FRxD/",
  69. "//////////8BQg0KC29uZW9mX2ZpZWxkIrsBChJOZXN0ZWRUZXN0QWxsVHlw",
  70. "ZXMSNAoFY2hpbGQYASABKAsyJS5wcm90b2J1Zl91bml0dGVzdC5OZXN0ZWRU",
  71. "ZXN0QWxsVHlwZXMSMAoHcGF5bG9hZBgCIAEoCzIfLnByb3RvYnVmX3VuaXR0",
  72. "ZXN0LlRlc3RBbGxUeXBlcxI9Cg5yZXBlYXRlZF9jaGlsZBgDIAMoCzIlLnBy",
  73. "b3RvYnVmX3VuaXR0ZXN0Lk5lc3RlZFRlc3RBbGxUeXBlcyI0ChRUZXN0RGVw",
  74. "cmVjYXRlZEZpZWxkcxIcChBkZXByZWNhdGVkX2ludDMyGAEgASgFQgIYASIb",
  75. "Cg5Gb3JlaWduTWVzc2FnZRIJCgFjGAEgASgFIjAKElRlc3RSZXNlcnZlZEZp",
  76. "ZWxkc0oECAIQA0oECA8QEEoECAkQDFIDYmFyUgNiYXoiWgoRVGVzdEZvcmVp",
  77. "Z25OZXN0ZWQSRQoOZm9yZWlnbl9uZXN0ZWQYASABKAsyLS5wcm90b2J1Zl91",
  78. "bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2FnZSI0ChhUZXN0UmVh",
  79. "bGx5TGFyZ2VUYWdOdW1iZXISCQoBYRgBIAEoBRINCgJiYhj///9/IAEoBSJV",
  80. "ChRUZXN0UmVjdXJzaXZlTWVzc2FnZRIyCgFhGAEgASgLMicucHJvdG9idWZf",
  81. "dW5pdHRlc3QuVGVzdFJlY3Vyc2l2ZU1lc3NhZ2USCQoBaRgCIAEoBSJLChRU",
  82. "ZXN0TXV0dWFsUmVjdXJzaW9uQRIzCgJiYhgBIAEoCzInLnByb3RvYnVmX3Vu",
  83. "aXR0ZXN0LlRlc3RNdXR1YWxSZWN1cnNpb25CImIKFFRlc3RNdXR1YWxSZWN1",
  84. "cnNpb25CEjIKAWEYASABKAsyJy5wcm90b2J1Zl91bml0dGVzdC5UZXN0TXV0",
  85. "dWFsUmVjdXJzaW9uQRIWCg5vcHRpb25hbF9pbnQzMhgCIAEoBSLrAgoXVGVz",
  86. "dENhbWVsQ2FzZUZpZWxkTmFtZXMSFgoOUHJpbWl0aXZlRmllbGQYASABKAUS",
  87. "EwoLU3RyaW5nRmllbGQYAiABKAkSMQoJRW51bUZpZWxkGAMgASgOMh4ucHJv",
  88. "dG9idWZfdW5pdHRlc3QuRm9yZWlnbkVudW0SNwoMTWVzc2FnZUZpZWxkGAQg",
  89. "ASgLMiEucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2USHgoWUmVw",
  90. "ZWF0ZWRQcmltaXRpdmVGaWVsZBgHIAMoBRIbChNSZXBlYXRlZFN0cmluZ0Zp",
  91. "ZWxkGAggAygJEjkKEVJlcGVhdGVkRW51bUZpZWxkGAkgAygOMh4ucHJvdG9i",
  92. "dWZfdW5pdHRlc3QuRm9yZWlnbkVudW0SPwoUUmVwZWF0ZWRNZXNzYWdlRmll",
  93. "bGQYCiADKAsyIS5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduTWVzc2FnZSLH",
  94. "AQoSVGVzdEZpZWxkT3JkZXJpbmdzEhEKCW15X3N0cmluZxgLIAEoCRIOCgZt",
  95. "eV9pbnQYASABKAMSEAoIbXlfZmxvYXQYZSABKAISUwoVc2luZ2xlX25lc3Rl",
  96. "ZF9tZXNzYWdlGMgBIAEoCzIzLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RGaWVs",
  97. "ZE9yZGVyaW5ncy5OZXN0ZWRNZXNzYWdlGicKDU5lc3RlZE1lc3NhZ2USCgoC",
  98. "b28YAiABKAMSCgoCYmIYASABKAUiSwoRU3BhcnNlRW51bU1lc3NhZ2USNgoL",
  99. "c3BhcnNlX2VudW0YASABKA4yIS5wcm90b2J1Zl91bml0dGVzdC5UZXN0U3Bh",
  100. "cnNlRW51bSIZCglPbmVTdHJpbmcSDAoEZGF0YRgBIAEoCSIaCgpNb3JlU3Ry",
  101. "aW5nEgwKBGRhdGEYASADKAkiGAoIT25lQnl0ZXMSDAoEZGF0YRgBIAEoDCIZ",
  102. "CglNb3JlQnl0ZXMSDAoEZGF0YRgBIAEoDCIcCgxJbnQzMk1lc3NhZ2USDAoE",
  103. "ZGF0YRgBIAEoBSIdCg1VaW50MzJNZXNzYWdlEgwKBGRhdGEYASABKA0iHAoM",
  104. "SW50NjRNZXNzYWdlEgwKBGRhdGEYASABKAMiHQoNVWludDY0TWVzc2FnZRIM",
  105. "CgRkYXRhGAEgASgEIhsKC0Jvb2xNZXNzYWdlEgwKBGRhdGEYASABKAgicwoJ",
  106. "VGVzdE9uZW9mEhEKB2Zvb19pbnQYASABKAVIABIUCgpmb29fc3RyaW5nGAIg",
  107. "ASgJSAASNgoLZm9vX21lc3NhZ2UYAyABKAsyHy5wcm90b2J1Zl91bml0dGVz",
  108. "dC5UZXN0QWxsVHlwZXNIAEIFCgNmb28iqgMKD1Rlc3RQYWNrZWRUeXBlcxIY",
  109. "CgxwYWNrZWRfaW50MzIYWiADKAVCAhABEhgKDHBhY2tlZF9pbnQ2NBhbIAMo",
  110. "A0ICEAESGQoNcGFja2VkX3VpbnQzMhhcIAMoDUICEAESGQoNcGFja2VkX3Vp",
  111. "bnQ2NBhdIAMoBEICEAESGQoNcGFja2VkX3NpbnQzMhheIAMoEUICEAESGQoN",
  112. "cGFja2VkX3NpbnQ2NBhfIAMoEkICEAESGgoOcGFja2VkX2ZpeGVkMzIYYCAD",
  113. "KAdCAhABEhoKDnBhY2tlZF9maXhlZDY0GGEgAygGQgIQARIbCg9wYWNrZWRf",
  114. "c2ZpeGVkMzIYYiADKA9CAhABEhsKD3BhY2tlZF9zZml4ZWQ2NBhjIAMoEEIC",
  115. "EAESGAoMcGFja2VkX2Zsb2F0GGQgAygCQgIQARIZCg1wYWNrZWRfZG91Ymxl",
  116. "GGUgAygBQgIQARIXCgtwYWNrZWRfYm9vbBhmIAMoCEICEAESNwoLcGFja2Vk",
  117. "X2VudW0YZyADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bUIC",
  118. "EAEiyAMKEVRlc3RVbnBhY2tlZFR5cGVzEhoKDnVucGFja2VkX2ludDMyGFog",
  119. "AygFQgIQABIaCg51bnBhY2tlZF9pbnQ2NBhbIAMoA0ICEAASGwoPdW5wYWNr",
  120. "ZWRfdWludDMyGFwgAygNQgIQABIbCg91bnBhY2tlZF91aW50NjQYXSADKARC",
  121. "AhAAEhsKD3VucGFja2VkX3NpbnQzMhheIAMoEUICEAASGwoPdW5wYWNrZWRf",
  122. "c2ludDY0GF8gAygSQgIQABIcChB1bnBhY2tlZF9maXhlZDMyGGAgAygHQgIQ",
  123. "ABIcChB1bnBhY2tlZF9maXhlZDY0GGEgAygGQgIQABIdChF1bnBhY2tlZF9z",
  124. "Zml4ZWQzMhhiIAMoD0ICEAASHQoRdW5wYWNrZWRfc2ZpeGVkNjQYYyADKBBC",
  125. "AhAAEhoKDnVucGFja2VkX2Zsb2F0GGQgAygCQgIQABIbCg91bnBhY2tlZF9k",
  126. "b3VibGUYZSADKAFCAhAAEhkKDXVucGFja2VkX2Jvb2wYZiADKAhCAhAAEjkK",
  127. "DXVucGFja2VkX2VudW0YZyADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3Jl",
  128. "aWduRW51bUICEAAiwAEKI1Rlc3RSZXBlYXRlZFNjYWxhckRpZmZlcmVudFRh",
  129. "Z1NpemVzEhgKEHJlcGVhdGVkX2ZpeGVkMzIYDCADKAcSFgoOcmVwZWF0ZWRf",
  130. "aW50MzIYDSADKAUSGQoQcmVwZWF0ZWRfZml4ZWQ2NBj+DyADKAYSFwoOcmVw",
  131. "ZWF0ZWRfaW50NjQY/w8gAygDEhgKDnJlcGVhdGVkX2Zsb2F0GP7/DyADKAIS",
  132. "GQoPcmVwZWF0ZWRfdWludDY0GP//DyADKAQiKAobVGVzdENvbW1lbnRJbmpl",
  133. "Y3Rpb25NZXNzYWdlEgkKAWEYASABKAkiDAoKRm9vUmVxdWVzdCINCgtGb29S",
  134. "ZXNwb25zZSISChBGb29DbGllbnRNZXNzYWdlIhIKEEZvb1NlcnZlck1lc3Nh",
  135. "Z2UiDAoKQmFyUmVxdWVzdCINCgtCYXJSZXNwb25zZSpZCgtGb3JlaWduRW51",
  136. "bRIXChNGT1JFSUdOX1VOU1BFQ0lGSUVEEAASDwoLRk9SRUlHTl9GT08QBBIP",
  137. "CgtGT1JFSUdOX0JBUhAFEg8KC0ZPUkVJR05fQkFaEAYqdQoUVGVzdEVudW1X",
  138. "aXRoRHVwVmFsdWUSKAokVEVTVF9FTlVNX1dJVEhfRFVQX1ZBTFVFX1VOU1BF",
  139. "Q0lGSUVEEAASCAoERk9PMRABEggKBEJBUjEQAhIHCgNCQVoQAxIICgRGT08y",
  140. "EAESCAoEQkFSMhACGgIQASqdAQoOVGVzdFNwYXJzZUVudW0SIAocVEVTVF9T",
  141. "UEFSU0VfRU5VTV9VTlNQRUNJRklFRBAAEgwKCFNQQVJTRV9BEHsSDgoIU1BB",
  142. "UlNFX0IQpucDEg8KCFNQQVJTRV9DELKxgAYSFQoIU1BBUlNFX0QQ8f//////",
  143. "////ARIVCghTUEFSU0VfRRC03vz///////8BEgwKCFNQQVJTRV9HEAIymQEK",
  144. "C1Rlc3RTZXJ2aWNlEkQKA0ZvbxIdLnByb3RvYnVmX3VuaXR0ZXN0LkZvb1Jl",
  145. "cXVlc3QaHi5wcm90b2J1Zl91bml0dGVzdC5Gb29SZXNwb25zZRJECgNCYXIS",
  146. "HS5wcm90b2J1Zl91bml0dGVzdC5CYXJSZXF1ZXN0Gh4ucHJvdG9idWZfdW5p",
  147. "dHRlc3QuQmFyUmVzcG9uc2VCOkINVW5pdHRlc3RQcm90b0gBgAEBiAEBkAEB",
  148. "+AEBqgIaR29vZ2xlLlByb3RvYnVmLlRlc3RQcm90b3NiBnByb3RvMw=="));
  149. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  150. new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.UnittestImportProto3Reflection.Descriptor, },
  151. new pbr::GeneratedCodeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.ForeignEnum), typeof(global::Google.Protobuf.TestProtos.TestEnumWithDupValue), typeof(global::Google.Protobuf.TestProtos.TestSparseEnum), }, new pbr::GeneratedCodeInfo[] {
  152. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestAllTypes), global::Google.Protobuf.TestProtos.TestAllTypes.Parser, new[]{ "SingleInt32", "SingleInt64", "SingleUint32", "SingleUint64", "SingleSint32", "SingleSint64", "SingleFixed32", "SingleFixed64", "SingleSfixed32", "SingleSfixed64", "SingleFloat", "SingleDouble", "SingleBool", "SingleString", "SingleBytes", "SingleNestedMessage", "SingleForeignMessage", "SingleImportMessage", "SingleNestedEnum", "SingleForeignEnum", "SingleImportEnum", "SinglePublicImportMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedImportMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedImportEnum", "RepeatedPublicImportMessage", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes" }, new[]{ "OneofField" }, new[]{ typeof(global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) }, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage), global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage.Parser, new[]{ "Bb" }, null, null, null)}),
  153. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.NestedTestAllTypes), global::Google.Protobuf.TestProtos.NestedTestAllTypes.Parser, new[]{ "Child", "Payload", "RepeatedChild" }, null, null, null),
  154. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestDeprecatedFields), global::Google.Protobuf.TestProtos.TestDeprecatedFields.Parser, new[]{ "DeprecatedInt32" }, null, null, null),
  155. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.ForeignMessage), global::Google.Protobuf.TestProtos.ForeignMessage.Parser, new[]{ "C" }, null, null, null),
  156. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestReservedFields), global::Google.Protobuf.TestProtos.TestReservedFields.Parser, null, null, null, null),
  157. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestForeignNested), global::Google.Protobuf.TestProtos.TestForeignNested.Parser, new[]{ "ForeignNested" }, null, null, null),
  158. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestReallyLargeTagNumber), global::Google.Protobuf.TestProtos.TestReallyLargeTagNumber.Parser, new[]{ "A", "Bb" }, null, null, null),
  159. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestRecursiveMessage), global::Google.Protobuf.TestProtos.TestRecursiveMessage.Parser, new[]{ "A", "I" }, null, null, null),
  160. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestMutualRecursionA), global::Google.Protobuf.TestProtos.TestMutualRecursionA.Parser, new[]{ "Bb" }, null, null, null),
  161. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestMutualRecursionB), global::Google.Protobuf.TestProtos.TestMutualRecursionB.Parser, new[]{ "A", "OptionalInt32" }, null, null, null),
  162. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestCamelCaseFieldNames), global::Google.Protobuf.TestProtos.TestCamelCaseFieldNames.Parser, new[]{ "PrimitiveField", "StringField", "EnumField", "MessageField", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedEnumField", "RepeatedMessageField" }, null, null, null),
  163. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestFieldOrderings), global::Google.Protobuf.TestProtos.TestFieldOrderings.Parser, new[]{ "MyString", "MyInt", "MyFloat", "SingleNestedMessage" }, null, null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage), global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage.Parser, new[]{ "Oo", "Bb" }, null, null, null)}),
  164. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.SparseEnumMessage), global::Google.Protobuf.TestProtos.SparseEnumMessage.Parser, new[]{ "SparseEnum" }, null, null, null),
  165. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.OneString), global::Google.Protobuf.TestProtos.OneString.Parser, new[]{ "Data" }, null, null, null),
  166. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.MoreString), global::Google.Protobuf.TestProtos.MoreString.Parser, new[]{ "Data" }, null, null, null),
  167. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.OneBytes), global::Google.Protobuf.TestProtos.OneBytes.Parser, new[]{ "Data" }, null, null, null),
  168. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.MoreBytes), global::Google.Protobuf.TestProtos.MoreBytes.Parser, new[]{ "Data" }, null, null, null),
  169. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.Int32Message), global::Google.Protobuf.TestProtos.Int32Message.Parser, new[]{ "Data" }, null, null, null),
  170. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.Uint32Message), global::Google.Protobuf.TestProtos.Uint32Message.Parser, new[]{ "Data" }, null, null, null),
  171. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.Int64Message), global::Google.Protobuf.TestProtos.Int64Message.Parser, new[]{ "Data" }, null, null, null),
  172. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.Uint64Message), global::Google.Protobuf.TestProtos.Uint64Message.Parser, new[]{ "Data" }, null, null, null),
  173. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.BoolMessage), global::Google.Protobuf.TestProtos.BoolMessage.Parser, new[]{ "Data" }, null, null, null),
  174. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestOneof), global::Google.Protobuf.TestProtos.TestOneof.Parser, new[]{ "FooInt", "FooString", "FooMessage" }, new[]{ "Foo" }, null, null),
  175. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestPackedTypes), global::Google.Protobuf.TestProtos.TestPackedTypes.Parser, new[]{ "PackedInt32", "PackedInt64", "PackedUint32", "PackedUint64", "PackedSint32", "PackedSint64", "PackedFixed32", "PackedFixed64", "PackedSfixed32", "PackedSfixed64", "PackedFloat", "PackedDouble", "PackedBool", "PackedEnum" }, null, null, null),
  176. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestUnpackedTypes), global::Google.Protobuf.TestProtos.TestUnpackedTypes.Parser, new[]{ "UnpackedInt32", "UnpackedInt64", "UnpackedUint32", "UnpackedUint64", "UnpackedSint32", "UnpackedSint64", "UnpackedFixed32", "UnpackedFixed64", "UnpackedSfixed32", "UnpackedSfixed64", "UnpackedFloat", "UnpackedDouble", "UnpackedBool", "UnpackedEnum" }, null, null, null),
  177. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestRepeatedScalarDifferentTagSizes), global::Google.Protobuf.TestProtos.TestRepeatedScalarDifferentTagSizes.Parser, new[]{ "RepeatedFixed32", "RepeatedInt32", "RepeatedFixed64", "RepeatedInt64", "RepeatedFloat", "RepeatedUint64" }, null, null, null),
  178. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestCommentInjectionMessage), global::Google.Protobuf.TestProtos.TestCommentInjectionMessage.Parser, new[]{ "A" }, null, null, null),
  179. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.FooRequest), global::Google.Protobuf.TestProtos.FooRequest.Parser, null, null, null, null),
  180. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.FooResponse), global::Google.Protobuf.TestProtos.FooResponse.Parser, null, null, null, null),
  181. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.FooClientMessage), global::Google.Protobuf.TestProtos.FooClientMessage.Parser, null, null, null, null),
  182. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.FooServerMessage), global::Google.Protobuf.TestProtos.FooServerMessage.Parser, null, null, null, null),
  183. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.BarRequest), global::Google.Protobuf.TestProtos.BarRequest.Parser, null, null, null, null),
  184. new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.BarResponse), global::Google.Protobuf.TestProtos.BarResponse.Parser, null, null, null, null)
  185. }));
  186. }
  187. #endregion
  188. }
  189. #region Enums
  190. public enum ForeignEnum {
  191. FOREIGN_UNSPECIFIED = 0,
  192. FOREIGN_FOO = 4,
  193. FOREIGN_BAR = 5,
  194. FOREIGN_BAZ = 6,
  195. }
  196. /// <summary>
  197. /// Test an enum that has multiple values with the same number.
  198. /// </summary>
  199. public enum TestEnumWithDupValue {
  200. TEST_ENUM_WITH_DUP_VALUE_UNSPECIFIED = 0,
  201. FOO1 = 1,
  202. BAR1 = 2,
  203. BAZ = 3,
  204. FOO2 = 1,
  205. BAR2 = 2,
  206. }
  207. /// <summary>
  208. /// Test an enum with large, unordered values.
  209. /// </summary>
  210. public enum TestSparseEnum {
  211. TEST_SPARSE_ENUM_UNSPECIFIED = 0,
  212. SPARSE_A = 123,
  213. SPARSE_B = 62374,
  214. SPARSE_C = 12589234,
  215. SPARSE_D = -15,
  216. SPARSE_E = -53452,
  217. /// <summary>
  218. /// In proto3, value 0 must be the first one specified
  219. /// SPARSE_F = 0;
  220. /// </summary>
  221. SPARSE_G = 2,
  222. }
  223. #endregion
  224. #region Messages
  225. /// <summary>
  226. /// This proto includes every type of field in both singular and repeated
  227. /// forms.
  228. /// </summary>
  229. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  230. public sealed partial class TestAllTypes : pb::IMessage<TestAllTypes> {
  231. private static readonly pb::MessageParser<TestAllTypes> _parser = new pb::MessageParser<TestAllTypes>(() => new TestAllTypes());
  232. public static pb::MessageParser<TestAllTypes> Parser { get { return _parser; } }
  233. public static pbr::MessageDescriptor Descriptor {
  234. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[0]; }
  235. }
  236. pbr::MessageDescriptor pb::IMessage.Descriptor {
  237. get { return Descriptor; }
  238. }
  239. public TestAllTypes() {
  240. OnConstruction();
  241. }
  242. partial void OnConstruction();
  243. public TestAllTypes(TestAllTypes other) : this() {
  244. singleInt32_ = other.singleInt32_;
  245. singleInt64_ = other.singleInt64_;
  246. singleUint32_ = other.singleUint32_;
  247. singleUint64_ = other.singleUint64_;
  248. singleSint32_ = other.singleSint32_;
  249. singleSint64_ = other.singleSint64_;
  250. singleFixed32_ = other.singleFixed32_;
  251. singleFixed64_ = other.singleFixed64_;
  252. singleSfixed32_ = other.singleSfixed32_;
  253. singleSfixed64_ = other.singleSfixed64_;
  254. singleFloat_ = other.singleFloat_;
  255. singleDouble_ = other.singleDouble_;
  256. singleBool_ = other.singleBool_;
  257. singleString_ = other.singleString_;
  258. singleBytes_ = other.singleBytes_;
  259. SingleNestedMessage = other.singleNestedMessage_ != null ? other.SingleNestedMessage.Clone() : null;
  260. SingleForeignMessage = other.singleForeignMessage_ != null ? other.SingleForeignMessage.Clone() : null;
  261. SingleImportMessage = other.singleImportMessage_ != null ? other.SingleImportMessage.Clone() : null;
  262. singleNestedEnum_ = other.singleNestedEnum_;
  263. singleForeignEnum_ = other.singleForeignEnum_;
  264. singleImportEnum_ = other.singleImportEnum_;
  265. SinglePublicImportMessage = other.singlePublicImportMessage_ != null ? other.SinglePublicImportMessage.Clone() : null;
  266. repeatedInt32_ = other.repeatedInt32_.Clone();
  267. repeatedInt64_ = other.repeatedInt64_.Clone();
  268. repeatedUint32_ = other.repeatedUint32_.Clone();
  269. repeatedUint64_ = other.repeatedUint64_.Clone();
  270. repeatedSint32_ = other.repeatedSint32_.Clone();
  271. repeatedSint64_ = other.repeatedSint64_.Clone();
  272. repeatedFixed32_ = other.repeatedFixed32_.Clone();
  273. repeatedFixed64_ = other.repeatedFixed64_.Clone();
  274. repeatedSfixed32_ = other.repeatedSfixed32_.Clone();
  275. repeatedSfixed64_ = other.repeatedSfixed64_.Clone();
  276. repeatedFloat_ = other.repeatedFloat_.Clone();
  277. repeatedDouble_ = other.repeatedDouble_.Clone();
  278. repeatedBool_ = other.repeatedBool_.Clone();
  279. repeatedString_ = other.repeatedString_.Clone();
  280. repeatedBytes_ = other.repeatedBytes_.Clone();
  281. repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone();
  282. repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone();
  283. repeatedImportMessage_ = other.repeatedImportMessage_.Clone();
  284. repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone();
  285. repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone();
  286. repeatedImportEnum_ = other.repeatedImportEnum_.Clone();
  287. repeatedPublicImportMessage_ = other.repeatedPublicImportMessage_.Clone();
  288. switch (other.OneofFieldCase) {
  289. case OneofFieldOneofCase.OneofUint32:
  290. OneofUint32 = other.OneofUint32;
  291. break;
  292. case OneofFieldOneofCase.OneofNestedMessage:
  293. OneofNestedMessage = other.OneofNestedMessage.Clone();
  294. break;
  295. case OneofFieldOneofCase.OneofString:
  296. OneofString = other.OneofString;
  297. break;
  298. case OneofFieldOneofCase.OneofBytes:
  299. OneofBytes = other.OneofBytes;
  300. break;
  301. }
  302. }
  303. public TestAllTypes Clone() {
  304. return new TestAllTypes(this);
  305. }
  306. /// <summary>Field number for the "single_int32" field.</summary>
  307. public const int SingleInt32FieldNumber = 1;
  308. private int singleInt32_;
  309. /// <summary>
  310. /// Singular
  311. /// </summary>
  312. public int SingleInt32 {
  313. get { return singleInt32_; }
  314. set {
  315. singleInt32_ = value;
  316. }
  317. }
  318. /// <summary>Field number for the "single_int64" field.</summary>
  319. public const int SingleInt64FieldNumber = 2;
  320. private long singleInt64_;
  321. public long SingleInt64 {
  322. get { return singleInt64_; }
  323. set {
  324. singleInt64_ = value;
  325. }
  326. }
  327. /// <summary>Field number for the "single_uint32" field.</summary>
  328. public const int SingleUint32FieldNumber = 3;
  329. private uint singleUint32_;
  330. public uint SingleUint32 {
  331. get { return singleUint32_; }
  332. set {
  333. singleUint32_ = value;
  334. }
  335. }
  336. /// <summary>Field number for the "single_uint64" field.</summary>
  337. public const int SingleUint64FieldNumber = 4;
  338. private ulong singleUint64_;
  339. public ulong SingleUint64 {
  340. get { return singleUint64_; }
  341. set {
  342. singleUint64_ = value;
  343. }
  344. }
  345. /// <summary>Field number for the "single_sint32" field.</summary>
  346. public const int SingleSint32FieldNumber = 5;
  347. private int singleSint32_;
  348. public int SingleSint32 {
  349. get { return singleSint32_; }
  350. set {
  351. singleSint32_ = value;
  352. }
  353. }
  354. /// <summary>Field number for the "single_sint64" field.</summary>
  355. public const int SingleSint64FieldNumber = 6;
  356. private long singleSint64_;
  357. public long SingleSint64 {
  358. get { return singleSint64_; }
  359. set {
  360. singleSint64_ = value;
  361. }
  362. }
  363. /// <summary>Field number for the "single_fixed32" field.</summary>
  364. public const int SingleFixed32FieldNumber = 7;
  365. private uint singleFixed32_;
  366. public uint SingleFixed32 {
  367. get { return singleFixed32_; }
  368. set {
  369. singleFixed32_ = value;
  370. }
  371. }
  372. /// <summary>Field number for the "single_fixed64" field.</summary>
  373. public const int SingleFixed64FieldNumber = 8;
  374. private ulong singleFixed64_;
  375. public ulong SingleFixed64 {
  376. get { return singleFixed64_; }
  377. set {
  378. singleFixed64_ = value;
  379. }
  380. }
  381. /// <summary>Field number for the "single_sfixed32" field.</summary>
  382. public const int SingleSfixed32FieldNumber = 9;
  383. private int singleSfixed32_;
  384. public int SingleSfixed32 {
  385. get { return singleSfixed32_; }
  386. set {
  387. singleSfixed32_ = value;
  388. }
  389. }
  390. /// <summary>Field number for the "single_sfixed64" field.</summary>
  391. public const int SingleSfixed64FieldNumber = 10;
  392. private long singleSfixed64_;
  393. public long SingleSfixed64 {
  394. get { return singleSfixed64_; }
  395. set {
  396. singleSfixed64_ = value;
  397. }
  398. }
  399. /// <summary>Field number for the "single_float" field.</summary>
  400. public const int SingleFloatFieldNumber = 11;
  401. private float singleFloat_;
  402. public float SingleFloat {
  403. get { return singleFloat_; }
  404. set {
  405. singleFloat_ = value;
  406. }
  407. }
  408. /// <summary>Field number for the "single_double" field.</summary>
  409. public const int SingleDoubleFieldNumber = 12;
  410. private double singleDouble_;
  411. public double SingleDouble {
  412. get { return singleDouble_; }
  413. set {
  414. singleDouble_ = value;
  415. }
  416. }
  417. /// <summary>Field number for the "single_bool" field.</summary>
  418. public const int SingleBoolFieldNumber = 13;
  419. private bool singleBool_;
  420. public bool SingleBool {
  421. get { return singleBool_; }
  422. set {
  423. singleBool_ = value;
  424. }
  425. }
  426. /// <summary>Field number for the "single_string" field.</summary>
  427. public const int SingleStringFieldNumber = 14;
  428. private string singleString_ = "";
  429. public string SingleString {
  430. get { return singleString_; }
  431. set {
  432. singleString_ = pb::Preconditions.CheckNotNull(value, "value");
  433. }
  434. }
  435. /// <summary>Field number for the "single_bytes" field.</summary>
  436. public const int SingleBytesFieldNumber = 15;
  437. private pb::ByteString singleBytes_ = pb::ByteString.Empty;
  438. public pb::ByteString SingleBytes {
  439. get { return singleBytes_; }
  440. set {
  441. singleBytes_ = pb::Preconditions.CheckNotNull(value, "value");
  442. }
  443. }
  444. /// <summary>Field number for the "single_nested_message" field.</summary>
  445. public const int SingleNestedMessageFieldNumber = 18;
  446. private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage singleNestedMessage_;
  447. public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage SingleNestedMessage {
  448. get { return singleNestedMessage_; }
  449. set {
  450. singleNestedMessage_ = value;
  451. }
  452. }
  453. /// <summary>Field number for the "single_foreign_message" field.</summary>
  454. public const int SingleForeignMessageFieldNumber = 19;
  455. private global::Google.Protobuf.TestProtos.ForeignMessage singleForeignMessage_;
  456. public global::Google.Protobuf.TestProtos.ForeignMessage SingleForeignMessage {
  457. get { return singleForeignMessage_; }
  458. set {
  459. singleForeignMessage_ = value;
  460. }
  461. }
  462. /// <summary>Field number for the "single_import_message" field.</summary>
  463. public const int SingleImportMessageFieldNumber = 20;
  464. private global::Google.Protobuf.TestProtos.ImportMessage singleImportMessage_;
  465. public global::Google.Protobuf.TestProtos.ImportMessage SingleImportMessage {
  466. get { return singleImportMessage_; }
  467. set {
  468. singleImportMessage_ = value;
  469. }
  470. }
  471. /// <summary>Field number for the "single_nested_enum" field.</summary>
  472. public const int SingleNestedEnumFieldNumber = 21;
  473. private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum singleNestedEnum_ = global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED;
  474. public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum SingleNestedEnum {
  475. get { return singleNestedEnum_; }
  476. set {
  477. singleNestedEnum_ = value;
  478. }
  479. }
  480. /// <summary>Field number for the "single_foreign_enum" field.</summary>
  481. public const int SingleForeignEnumFieldNumber = 22;
  482. private global::Google.Protobuf.TestProtos.ForeignEnum singleForeignEnum_ = global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED;
  483. public global::Google.Protobuf.TestProtos.ForeignEnum SingleForeignEnum {
  484. get { return singleForeignEnum_; }
  485. set {
  486. singleForeignEnum_ = value;
  487. }
  488. }
  489. /// <summary>Field number for the "single_import_enum" field.</summary>
  490. public const int SingleImportEnumFieldNumber = 23;
  491. private global::Google.Protobuf.TestProtos.ImportEnum singleImportEnum_ = global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED;
  492. public global::Google.Protobuf.TestProtos.ImportEnum SingleImportEnum {
  493. get { return singleImportEnum_; }
  494. set {
  495. singleImportEnum_ = value;
  496. }
  497. }
  498. /// <summary>Field number for the "single_public_import_message" field.</summary>
  499. public const int SinglePublicImportMessageFieldNumber = 26;
  500. private global::Google.Protobuf.TestProtos.PublicImportMessage singlePublicImportMessage_;
  501. /// <summary>
  502. /// Defined in unittest_import_public.proto
  503. /// </summary>
  504. public global::Google.Protobuf.TestProtos.PublicImportMessage SinglePublicImportMessage {
  505. get { return singlePublicImportMessage_; }
  506. set {
  507. singlePublicImportMessage_ = value;
  508. }
  509. }
  510. /// <summary>Field number for the "repeated_int32" field.</summary>
  511. public const int RepeatedInt32FieldNumber = 31;
  512. private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
  513. = pb::FieldCodec.ForInt32(250);
  514. private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
  515. /// <summary>
  516. /// Repeated
  517. /// </summary>
  518. public pbc::RepeatedField<int> RepeatedInt32 {
  519. get { return repeatedInt32_; }
  520. }
  521. /// <summary>Field number for the "repeated_int64" field.</summary>
  522. public const int RepeatedInt64FieldNumber = 32;
  523. private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
  524. = pb::FieldCodec.ForInt64(258);
  525. private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>();
  526. public pbc::RepeatedField<long> RepeatedInt64 {
  527. get { return repeatedInt64_; }
  528. }
  529. /// <summary>Field number for the "repeated_uint32" field.</summary>
  530. public const int RepeatedUint32FieldNumber = 33;
  531. private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
  532. = pb::FieldCodec.ForUInt32(266);
  533. private readonly pbc::RepeatedField<uint> repeatedUint32_ = new pbc::RepeatedField<uint>();
  534. public pbc::RepeatedField<uint> RepeatedUint32 {
  535. get { return repeatedUint32_; }
  536. }
  537. /// <summary>Field number for the "repeated_uint64" field.</summary>
  538. public const int RepeatedUint64FieldNumber = 34;
  539. private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
  540. = pb::FieldCodec.ForUInt64(274);
  541. private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>();
  542. public pbc::RepeatedField<ulong> RepeatedUint64 {
  543. get { return repeatedUint64_; }
  544. }
  545. /// <summary>Field number for the "repeated_sint32" field.</summary>
  546. public const int RepeatedSint32FieldNumber = 35;
  547. private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec
  548. = pb::FieldCodec.ForSInt32(282);
  549. private readonly pbc::RepeatedField<int> repeatedSint32_ = new pbc::RepeatedField<int>();
  550. public pbc::RepeatedField<int> RepeatedSint32 {
  551. get { return repeatedSint32_; }
  552. }
  553. /// <summary>Field number for the "repeated_sint64" field.</summary>
  554. public const int RepeatedSint64FieldNumber = 36;
  555. private static readonly pb::FieldCodec<long> _repeated_repeatedSint64_codec
  556. = pb::FieldCodec.ForSInt64(290);
  557. private readonly pbc::RepeatedField<long> repeatedSint64_ = new pbc::RepeatedField<long>();
  558. public pbc::RepeatedField<long> RepeatedSint64 {
  559. get { return repeatedSint64_; }
  560. }
  561. /// <summary>Field number for the "repeated_fixed32" field.</summary>
  562. public const int RepeatedFixed32FieldNumber = 37;
  563. private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec
  564. = pb::FieldCodec.ForFixed32(298);
  565. private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
  566. public pbc::RepeatedField<uint> RepeatedFixed32 {
  567. get { return repeatedFixed32_; }
  568. }
  569. /// <summary>Field number for the "repeated_fixed64" field.</summary>
  570. public const int RepeatedFixed64FieldNumber = 38;
  571. private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec
  572. = pb::FieldCodec.ForFixed64(306);
  573. private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
  574. public pbc::RepeatedField<ulong> RepeatedFixed64 {
  575. get { return repeatedFixed64_; }
  576. }
  577. /// <summary>Field number for the "repeated_sfixed32" field.</summary>
  578. public const int RepeatedSfixed32FieldNumber = 39;
  579. private static readonly pb::FieldCodec<int> _repeated_repeatedSfixed32_codec
  580. = pb::FieldCodec.ForSFixed32(314);
  581. private readonly pbc::RepeatedField<int> repeatedSfixed32_ = new pbc::RepeatedField<int>();
  582. public pbc::RepeatedField<int> RepeatedSfixed32 {
  583. get { return repeatedSfixed32_; }
  584. }
  585. /// <summary>Field number for the "repeated_sfixed64" field.</summary>
  586. public const int RepeatedSfixed64FieldNumber = 40;
  587. private static readonly pb::FieldCodec<long> _repeated_repeatedSfixed64_codec
  588. = pb::FieldCodec.ForSFixed64(322);
  589. private readonly pbc::RepeatedField<long> repeatedSfixed64_ = new pbc::RepeatedField<long>();
  590. public pbc::RepeatedField<long> RepeatedSfixed64 {
  591. get { return repeatedSfixed64_; }
  592. }
  593. /// <summary>Field number for the "repeated_float" field.</summary>
  594. public const int RepeatedFloatFieldNumber = 41;
  595. private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec
  596. = pb::FieldCodec.ForFloat(330);
  597. private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
  598. public pbc::RepeatedField<float> RepeatedFloat {
  599. get { return repeatedFloat_; }
  600. }
  601. /// <summary>Field number for the "repeated_double" field.</summary>
  602. public const int RepeatedDoubleFieldNumber = 42;
  603. private static readonly pb::FieldCodec<double> _repeated_repeatedDouble_codec
  604. = pb::FieldCodec.ForDouble(338);
  605. private readonly pbc::RepeatedField<double> repeatedDouble_ = new pbc::RepeatedField<double>();
  606. public pbc::RepeatedField<double> RepeatedDouble {
  607. get { return repeatedDouble_; }
  608. }
  609. /// <summary>Field number for the "repeated_bool" field.</summary>
  610. public const int RepeatedBoolFieldNumber = 43;
  611. private static readonly pb::FieldCodec<bool> _repeated_repeatedBool_codec
  612. = pb::FieldCodec.ForBool(346);
  613. private readonly pbc::RepeatedField<bool> repeatedBool_ = new pbc::RepeatedField<bool>();
  614. public pbc::RepeatedField<bool> RepeatedBool {
  615. get { return repeatedBool_; }
  616. }
  617. /// <summary>Field number for the "repeated_string" field.</summary>
  618. public const int RepeatedStringFieldNumber = 44;
  619. private static readonly pb::FieldCodec<string> _repeated_repeatedString_codec
  620. = pb::FieldCodec.ForString(354);
  621. private readonly pbc::RepeatedField<string> repeatedString_ = new pbc::RepeatedField<string>();
  622. public pbc::RepeatedField<string> RepeatedString {
  623. get { return repeatedString_; }
  624. }
  625. /// <summary>Field number for the "repeated_bytes" field.</summary>
  626. public const int RepeatedBytesFieldNumber = 45;
  627. private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytes_codec
  628. = pb::FieldCodec.ForBytes(362);
  629. private readonly pbc::RepeatedField<pb::ByteString> repeatedBytes_ = new pbc::RepeatedField<pb::ByteString>();
  630. public pbc::RepeatedField<pb::ByteString> RepeatedBytes {
  631. get { return repeatedBytes_; }
  632. }
  633. /// <summary>Field number for the "repeated_nested_message" field.</summary>
  634. public const int RepeatedNestedMessageFieldNumber = 48;
  635. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> _repeated_repeatedNestedMessage_codec
  636. = pb::FieldCodec.ForMessage(386, global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage.Parser);
  637. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage>();
  638. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage> RepeatedNestedMessage {
  639. get { return repeatedNestedMessage_; }
  640. }
  641. /// <summary>Field number for the "repeated_foreign_message" field.</summary>
  642. public const int RepeatedForeignMessageFieldNumber = 49;
  643. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignMessage> _repeated_repeatedForeignMessage_codec
  644. = pb::FieldCodec.ForMessage(394, global::Google.Protobuf.TestProtos.ForeignMessage.Parser);
  645. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> repeatedForeignMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage>();
  646. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> RepeatedForeignMessage {
  647. get { return repeatedForeignMessage_; }
  648. }
  649. /// <summary>Field number for the "repeated_import_message" field.</summary>
  650. public const int RepeatedImportMessageFieldNumber = 50;
  651. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ImportMessage> _repeated_repeatedImportMessage_codec
  652. = pb::FieldCodec.ForMessage(402, global::Google.Protobuf.TestProtos.ImportMessage.Parser);
  653. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage> repeatedImportMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage>();
  654. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage> RepeatedImportMessage {
  655. get { return repeatedImportMessage_; }
  656. }
  657. /// <summary>Field number for the "repeated_nested_enum" field.</summary>
  658. public const int RepeatedNestedEnumFieldNumber = 51;
  659. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> _repeated_repeatedNestedEnum_codec
  660. = pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) x);
  661. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum>();
  662. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum> RepeatedNestedEnum {
  663. get { return repeatedNestedEnum_; }
  664. }
  665. /// <summary>Field number for the "repeated_foreign_enum" field.</summary>
  666. public const int RepeatedForeignEnumFieldNumber = 52;
  667. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_repeatedForeignEnum_codec
  668. = pb::FieldCodec.ForEnum(418, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
  669. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> repeatedForeignEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
  670. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> RepeatedForeignEnum {
  671. get { return repeatedForeignEnum_; }
  672. }
  673. /// <summary>Field number for the "repeated_import_enum" field.</summary>
  674. public const int RepeatedImportEnumFieldNumber = 53;
  675. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ImportEnum> _repeated_repeatedImportEnum_codec
  676. = pb::FieldCodec.ForEnum(426, x => (int) x, x => (global::Google.Protobuf.TestProtos.ImportEnum) x);
  677. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum> repeatedImportEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum>();
  678. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum> RepeatedImportEnum {
  679. get { return repeatedImportEnum_; }
  680. }
  681. /// <summary>Field number for the "repeated_public_import_message" field.</summary>
  682. public const int RepeatedPublicImportMessageFieldNumber = 54;
  683. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.PublicImportMessage> _repeated_repeatedPublicImportMessage_codec
  684. = pb::FieldCodec.ForMessage(434, global::Google.Protobuf.TestProtos.PublicImportMessage.Parser);
  685. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage> repeatedPublicImportMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage>();
  686. /// <summary>
  687. /// Defined in unittest_import_public.proto
  688. /// </summary>
  689. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMessage> RepeatedPublicImportMessage {
  690. get { return repeatedPublicImportMessage_; }
  691. }
  692. /// <summary>Field number for the "oneof_uint32" field.</summary>
  693. public const int OneofUint32FieldNumber = 111;
  694. public uint OneofUint32 {
  695. get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32 ? (uint) oneofField_ : 0; }
  696. set {
  697. oneofField_ = value;
  698. oneofFieldCase_ = OneofFieldOneofCase.OneofUint32;
  699. }
  700. }
  701. /// <summary>Field number for the "oneof_nested_message" field.</summary>
  702. public const int OneofNestedMessageFieldNumber = 112;
  703. public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage OneofNestedMessage {
  704. get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage) oneofField_ : null; }
  705. set {
  706. oneofField_ = value;
  707. oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage;
  708. }
  709. }
  710. /// <summary>Field number for the "oneof_string" field.</summary>
  711. public const int OneofStringFieldNumber = 113;
  712. public string OneofString {
  713. get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString ? (string) oneofField_ : ""; }
  714. set {
  715. oneofField_ = pb::Preconditions.CheckNotNull(value, "value");
  716. oneofFieldCase_ = OneofFieldOneofCase.OneofString;
  717. }
  718. }
  719. /// <summary>Field number for the "oneof_bytes" field.</summary>
  720. public const int OneofBytesFieldNumber = 114;
  721. public pb::ByteString OneofBytes {
  722. get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; }
  723. set {
  724. oneofField_ = pb::Preconditions.CheckNotNull(value, "value");
  725. oneofFieldCase_ = OneofFieldOneofCase.OneofBytes;
  726. }
  727. }
  728. private object oneofField_;
  729. /// <summary>Enum of possible cases for the "oneof_field" oneof.</summary>
  730. public enum OneofFieldOneofCase {
  731. None = 0,
  732. OneofUint32 = 111,
  733. OneofNestedMessage = 112,
  734. OneofString = 113,
  735. OneofBytes = 114,
  736. }
  737. private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
  738. public OneofFieldOneofCase OneofFieldCase {
  739. get { return oneofFieldCase_; }
  740. }
  741. public void ClearOneofField() {
  742. oneofFieldCase_ = OneofFieldOneofCase.None;
  743. oneofField_ = null;
  744. }
  745. public override bool Equals(object other) {
  746. return Equals(other as TestAllTypes);
  747. }
  748. public bool Equals(TestAllTypes other) {
  749. if (ReferenceEquals(other, null)) {
  750. return false;
  751. }
  752. if (ReferenceEquals(other, this)) {
  753. return true;
  754. }
  755. if (SingleInt32 != other.SingleInt32) return false;
  756. if (SingleInt64 != other.SingleInt64) return false;
  757. if (SingleUint32 != other.SingleUint32) return false;
  758. if (SingleUint64 != other.SingleUint64) return false;
  759. if (SingleSint32 != other.SingleSint32) return false;
  760. if (SingleSint64 != other.SingleSint64) return false;
  761. if (SingleFixed32 != other.SingleFixed32) return false;
  762. if (SingleFixed64 != other.SingleFixed64) return false;
  763. if (SingleSfixed32 != other.SingleSfixed32) return false;
  764. if (SingleSfixed64 != other.SingleSfixed64) return false;
  765. if (SingleFloat != other.SingleFloat) return false;
  766. if (SingleDouble != other.SingleDouble) return false;
  767. if (SingleBool != other.SingleBool) return false;
  768. if (SingleString != other.SingleString) return false;
  769. if (SingleBytes != other.SingleBytes) return false;
  770. if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return false;
  771. if (!object.Equals(SingleForeignMessage, other.SingleForeignMessage)) return false;
  772. if (!object.Equals(SingleImportMessage, other.SingleImportMessage)) return false;
  773. if (SingleNestedEnum != other.SingleNestedEnum) return false;
  774. if (SingleForeignEnum != other.SingleForeignEnum) return false;
  775. if (SingleImportEnum != other.SingleImportEnum) return false;
  776. if (!object.Equals(SinglePublicImportMessage, other.SinglePublicImportMessage)) return false;
  777. if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
  778. if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
  779. if(!repeatedUint32_.Equals(other.repeatedUint32_)) return false;
  780. if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
  781. if(!repeatedSint32_.Equals(other.repeatedSint32_)) return false;
  782. if(!repeatedSint64_.Equals(other.repeatedSint64_)) return false;
  783. if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
  784. if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
  785. if(!repeatedSfixed32_.Equals(other.repeatedSfixed32_)) return false;
  786. if(!repeatedSfixed64_.Equals(other.repeatedSfixed64_)) return false;
  787. if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
  788. if(!repeatedDouble_.Equals(other.repeatedDouble_)) return false;
  789. if(!repeatedBool_.Equals(other.repeatedBool_)) return false;
  790. if(!repeatedString_.Equals(other.repeatedString_)) return false;
  791. if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false;
  792. if(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return false;
  793. if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false;
  794. if(!repeatedImportMessage_.Equals(other.repeatedImportMessage_)) return false;
  795. if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false;
  796. if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false;
  797. if(!repeatedImportEnum_.Equals(other.repeatedImportEnum_)) return false;
  798. if(!repeatedPublicImportMessage_.Equals(other.repeatedPublicImportMessage_)) return false;
  799. if (OneofUint32 != other.OneofUint32) return false;
  800. if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return false;
  801. if (OneofString != other.OneofString) return false;
  802. if (OneofBytes != other.OneofBytes) return false;
  803. if (OneofFieldCase != other.OneofFieldCase) return false;
  804. return true;
  805. }
  806. public override int GetHashCode() {
  807. int hash = 1;
  808. if (SingleInt32 != 0) hash ^= SingleInt32.GetHashCode();
  809. if (SingleInt64 != 0L) hash ^= SingleInt64.GetHashCode();
  810. if (SingleUint32 != 0) hash ^= SingleUint32.GetHashCode();
  811. if (SingleUint64 != 0UL) hash ^= SingleUint64.GetHashCode();
  812. if (SingleSint32 != 0) hash ^= SingleSint32.GetHashCode();
  813. if (SingleSint64 != 0L) hash ^= SingleSint64.GetHashCode();
  814. if (SingleFixed32 != 0) hash ^= SingleFixed32.GetHashCode();
  815. if (SingleFixed64 != 0UL) hash ^= SingleFixed64.GetHashCode();
  816. if (SingleSfixed32 != 0) hash ^= SingleSfixed32.GetHashCode();
  817. if (SingleSfixed64 != 0L) hash ^= SingleSfixed64.GetHashCode();
  818. if (SingleFloat != 0F) hash ^= SingleFloat.GetHashCode();
  819. if (SingleDouble != 0D) hash ^= SingleDouble.GetHashCode();
  820. if (SingleBool != false) hash ^= SingleBool.GetHashCode();
  821. if (SingleString.Length != 0) hash ^= SingleString.GetHashCode();
  822. if (SingleBytes.Length != 0) hash ^= SingleBytes.GetHashCode();
  823. if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode();
  824. if (singleForeignMessage_ != null) hash ^= SingleForeignMessage.GetHashCode();
  825. if (singleImportMessage_ != null) hash ^= SingleImportMessage.GetHashCode();
  826. if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) hash ^= SingleNestedEnum.GetHashCode();
  827. if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) hash ^= SingleForeignEnum.GetHashCode();
  828. if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) hash ^= SingleImportEnum.GetHashCode();
  829. if (singlePublicImportMessage_ != null) hash ^= SinglePublicImportMessage.GetHashCode();
  830. hash ^= repeatedInt32_.GetHashCode();
  831. hash ^= repeatedInt64_.GetHashCode();
  832. hash ^= repeatedUint32_.GetHashCode();
  833. hash ^= repeatedUint64_.GetHashCode();
  834. hash ^= repeatedSint32_.GetHashCode();
  835. hash ^= repeatedSint64_.GetHashCode();
  836. hash ^= repeatedFixed32_.GetHashCode();
  837. hash ^= repeatedFixed64_.GetHashCode();
  838. hash ^= repeatedSfixed32_.GetHashCode();
  839. hash ^= repeatedSfixed64_.GetHashCode();
  840. hash ^= repeatedFloat_.GetHashCode();
  841. hash ^= repeatedDouble_.GetHashCode();
  842. hash ^= repeatedBool_.GetHashCode();
  843. hash ^= repeatedString_.GetHashCode();
  844. hash ^= repeatedBytes_.GetHashCode();
  845. hash ^= repeatedNestedMessage_.GetHashCode();
  846. hash ^= repeatedForeignMessage_.GetHashCode();
  847. hash ^= repeatedImportMessage_.GetHashCode();
  848. hash ^= repeatedNestedEnum_.GetHashCode();
  849. hash ^= repeatedForeignEnum_.GetHashCode();
  850. hash ^= repeatedImportEnum_.GetHashCode();
  851. hash ^= repeatedPublicImportMessage_.GetHashCode();
  852. if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) hash ^= OneofUint32.GetHashCode();
  853. if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode();
  854. if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) hash ^= OneofString.GetHashCode();
  855. if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.GetHashCode();
  856. hash ^= (int) oneofFieldCase_;
  857. return hash;
  858. }
  859. public override string ToString() {
  860. return pb::JsonFormatter.ToDiagnosticString(this);
  861. }
  862. public void WriteTo(pb::CodedOutputStream output) {
  863. if (SingleInt32 != 0) {
  864. output.WriteRawTag(8);
  865. output.WriteInt32(SingleInt32);
  866. }
  867. if (SingleInt64 != 0L) {
  868. output.WriteRawTag(16);
  869. output.WriteInt64(SingleInt64);
  870. }
  871. if (SingleUint32 != 0) {
  872. output.WriteRawTag(24);
  873. output.WriteUInt32(SingleUint32);
  874. }
  875. if (SingleUint64 != 0UL) {
  876. output.WriteRawTag(32);
  877. output.WriteUInt64(SingleUint64);
  878. }
  879. if (SingleSint32 != 0) {
  880. output.WriteRawTag(40);
  881. output.WriteSInt32(SingleSint32);
  882. }
  883. if (SingleSint64 != 0L) {
  884. output.WriteRawTag(48);
  885. output.WriteSInt64(SingleSint64);
  886. }
  887. if (SingleFixed32 != 0) {
  888. output.WriteRawTag(61);
  889. output.WriteFixed32(SingleFixed32);
  890. }
  891. if (SingleFixed64 != 0UL) {
  892. output.WriteRawTag(65);
  893. output.WriteFixed64(SingleFixed64);
  894. }
  895. if (SingleSfixed32 != 0) {
  896. output.WriteRawTag(77);
  897. output.WriteSFixed32(SingleSfixed32);
  898. }
  899. if (SingleSfixed64 != 0L) {
  900. output.WriteRawTag(81);
  901. output.WriteSFixed64(SingleSfixed64);
  902. }
  903. if (SingleFloat != 0F) {
  904. output.WriteRawTag(93);
  905. output.WriteFloat(SingleFloat);
  906. }
  907. if (SingleDouble != 0D) {
  908. output.WriteRawTag(97);
  909. output.WriteDouble(SingleDouble);
  910. }
  911. if (SingleBool != false) {
  912. output.WriteRawTag(104);
  913. output.WriteBool(SingleBool);
  914. }
  915. if (SingleString.Length != 0) {
  916. output.WriteRawTag(114);
  917. output.WriteString(SingleString);
  918. }
  919. if (SingleBytes.Length != 0) {
  920. output.WriteRawTag(122);
  921. output.WriteBytes(SingleBytes);
  922. }
  923. if (singleNestedMessage_ != null) {
  924. output.WriteRawTag(146, 1);
  925. output.WriteMessage(SingleNestedMessage);
  926. }
  927. if (singleForeignMessage_ != null) {
  928. output.WriteRawTag(154, 1);
  929. output.WriteMessage(SingleForeignMessage);
  930. }
  931. if (singleImportMessage_ != null) {
  932. output.WriteRawTag(162, 1);
  933. output.WriteMessage(SingleImportMessage);
  934. }
  935. if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) {
  936. output.WriteRawTag(168, 1);
  937. output.WriteEnum((int) SingleNestedEnum);
  938. }
  939. if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
  940. output.WriteRawTag(176, 1);
  941. output.WriteEnum((int) SingleForeignEnum);
  942. }
  943. if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) {
  944. output.WriteRawTag(184, 1);
  945. output.WriteEnum((int) SingleImportEnum);
  946. }
  947. if (singlePublicImportMessage_ != null) {
  948. output.WriteRawTag(210, 1);
  949. output.WriteMessage(SinglePublicImportMessage);
  950. }
  951. repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
  952. repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
  953. repeatedUint32_.WriteTo(output, _repeated_repeatedUint32_codec);
  954. repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
  955. repeatedSint32_.WriteTo(output, _repeated_repeatedSint32_codec);
  956. repeatedSint64_.WriteTo(output, _repeated_repeatedSint64_codec);
  957. repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
  958. repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
  959. repeatedSfixed32_.WriteTo(output, _repeated_repeatedSfixed32_codec);
  960. repeatedSfixed64_.WriteTo(output, _repeated_repeatedSfixed64_codec);
  961. repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
  962. repeatedDouble_.WriteTo(output, _repeated_repeatedDouble_codec);
  963. repeatedBool_.WriteTo(output, _repeated_repeatedBool_codec);
  964. repeatedString_.WriteTo(output, _repeated_repeatedString_codec);
  965. repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec);
  966. repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_codec);
  967. repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec);
  968. repeatedImportMessage_.WriteTo(output, _repeated_repeatedImportMessage_codec);
  969. repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec);
  970. repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec);
  971. repeatedImportEnum_.WriteTo(output, _repeated_repeatedImportEnum_codec);
  972. repeatedPublicImportMessage_.WriteTo(output, _repeated_repeatedPublicImportMessage_codec);
  973. if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
  974. output.WriteRawTag(248, 6);
  975. output.WriteUInt32(OneofUint32);
  976. }
  977. if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
  978. output.WriteRawTag(130, 7);
  979. output.WriteMessage(OneofNestedMessage);
  980. }
  981. if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
  982. output.WriteRawTag(138, 7);
  983. output.WriteString(OneofString);
  984. }
  985. if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
  986. output.WriteRawTag(146, 7);
  987. output.WriteBytes(OneofBytes);
  988. }
  989. }
  990. public int CalculateSize() {
  991. int size = 0;
  992. if (SingleInt32 != 0) {
  993. size += 1 + pb::CodedOutputStream.ComputeInt32Size(SingleInt32);
  994. }
  995. if (SingleInt64 != 0L) {
  996. size += 1 + pb::CodedOutputStream.ComputeInt64Size(SingleInt64);
  997. }
  998. if (SingleUint32 != 0) {
  999. size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SingleUint32);
  1000. }
  1001. if (SingleUint64 != 0UL) {
  1002. size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SingleUint64);
  1003. }
  1004. if (SingleSint32 != 0) {
  1005. size += 1 + pb::CodedOutputStream.ComputeSInt32Size(SingleSint32);
  1006. }
  1007. if (SingleSint64 != 0L) {
  1008. size += 1 + pb::CodedOutputStream.ComputeSInt64Size(SingleSint64);
  1009. }
  1010. if (SingleFixed32 != 0) {
  1011. size += 1 + 4;
  1012. }
  1013. if (SingleFixed64 != 0UL) {
  1014. size += 1 + 8;
  1015. }
  1016. if (SingleSfixed32 != 0) {
  1017. size += 1 + 4;
  1018. }
  1019. if (SingleSfixed64 != 0L) {
  1020. size += 1 + 8;
  1021. }
  1022. if (SingleFloat != 0F) {
  1023. size += 1 + 4;
  1024. }
  1025. if (SingleDouble != 0D) {
  1026. size += 1 + 8;
  1027. }
  1028. if (SingleBool != false) {
  1029. size += 1 + 1;
  1030. }
  1031. if (SingleString.Length != 0) {
  1032. size += 1 + pb::CodedOutputStream.ComputeStringSize(SingleString);
  1033. }
  1034. if (SingleBytes.Length != 0) {
  1035. size += 1 + pb::CodedOutputStream.ComputeBytesSize(SingleBytes);
  1036. }
  1037. if (singleNestedMessage_ != null) {
  1038. size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage);
  1039. }
  1040. if (singleForeignMessage_ != null) {
  1041. size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleForeignMessage);
  1042. }
  1043. if (singleImportMessage_ != null) {
  1044. size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleImportMessage);
  1045. }
  1046. if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) {
  1047. size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleNestedEnum);
  1048. }
  1049. if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
  1050. size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleForeignEnum);
  1051. }
  1052. if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) {
  1053. size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleImportEnum);
  1054. }
  1055. if (singlePublicImportMessage_ != null) {
  1056. size += 2 + pb::CodedOutputStream.ComputeMessageSize(SinglePublicImportMessage);
  1057. }
  1058. size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
  1059. size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
  1060. size += repeatedUint32_.CalculateSize(_repeated_repeatedUint32_codec);
  1061. size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
  1062. size += repeatedSint32_.CalculateSize(_repeated_repeatedSint32_codec);
  1063. size += repeatedSint64_.CalculateSize(_repeated_repeatedSint64_codec);
  1064. size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
  1065. size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
  1066. size += repeatedSfixed32_.CalculateSize(_repeated_repeatedSfixed32_codec);
  1067. size += repeatedSfixed64_.CalculateSize(_repeated_repeatedSfixed64_codec);
  1068. size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
  1069. size += repeatedDouble_.CalculateSize(_repeated_repeatedDouble_codec);
  1070. size += repeatedBool_.CalculateSize(_repeated_repeatedBool_codec);
  1071. size += repeatedString_.CalculateSize(_repeated_repeatedString_codec);
  1072. size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec);
  1073. size += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessage_codec);
  1074. size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec);
  1075. size += repeatedImportMessage_.CalculateSize(_repeated_repeatedImportMessage_codec);
  1076. size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_codec);
  1077. size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec);
  1078. size += repeatedImportEnum_.CalculateSize(_repeated_repeatedImportEnum_codec);
  1079. size += repeatedPublicImportMessage_.CalculateSize(_repeated_repeatedPublicImportMessage_codec);
  1080. if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
  1081. size += 2 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32);
  1082. }
  1083. if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
  1084. size += 2 + pb::CodedOutputStream.ComputeMessageSize(OneofNestedMessage);
  1085. }
  1086. if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
  1087. size += 2 + pb::CodedOutputStream.ComputeStringSize(OneofString);
  1088. }
  1089. if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
  1090. size += 2 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes);
  1091. }
  1092. return size;
  1093. }
  1094. public void MergeFrom(TestAllTypes other) {
  1095. if (other == null) {
  1096. return;
  1097. }
  1098. if (other.SingleInt32 != 0) {
  1099. SingleInt32 = other.SingleInt32;
  1100. }
  1101. if (other.SingleInt64 != 0L) {
  1102. SingleInt64 = other.SingleInt64;
  1103. }
  1104. if (other.SingleUint32 != 0) {
  1105. SingleUint32 = other.SingleUint32;
  1106. }
  1107. if (other.SingleUint64 != 0UL) {
  1108. SingleUint64 = other.SingleUint64;
  1109. }
  1110. if (other.SingleSint32 != 0) {
  1111. SingleSint32 = other.SingleSint32;
  1112. }
  1113. if (other.SingleSint64 != 0L) {
  1114. SingleSint64 = other.SingleSint64;
  1115. }
  1116. if (other.SingleFixed32 != 0) {
  1117. SingleFixed32 = other.SingleFixed32;
  1118. }
  1119. if (other.SingleFixed64 != 0UL) {
  1120. SingleFixed64 = other.SingleFixed64;
  1121. }
  1122. if (other.SingleSfixed32 != 0) {
  1123. SingleSfixed32 = other.SingleSfixed32;
  1124. }
  1125. if (other.SingleSfixed64 != 0L) {
  1126. SingleSfixed64 = other.SingleSfixed64;
  1127. }
  1128. if (other.SingleFloat != 0F) {
  1129. SingleFloat = other.SingleFloat;
  1130. }
  1131. if (other.SingleDouble != 0D) {
  1132. SingleDouble = other.SingleDouble;
  1133. }
  1134. if (other.SingleBool != false) {
  1135. SingleBool = other.SingleBool;
  1136. }
  1137. if (other.SingleString.Length != 0) {
  1138. SingleString = other.SingleString;
  1139. }
  1140. if (other.SingleBytes.Length != 0) {
  1141. SingleBytes = other.SingleBytes;
  1142. }
  1143. if (other.singleNestedMessage_ != null) {
  1144. if (singleNestedMessage_ == null) {
  1145. singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
  1146. }
  1147. SingleNestedMessage.MergeFrom(other.SingleNestedMessage);
  1148. }
  1149. if (other.singleForeignMessage_ != null) {
  1150. if (singleForeignMessage_ == null) {
  1151. singleForeignMessage_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
  1152. }
  1153. SingleForeignMessage.MergeFrom(other.SingleForeignMessage);
  1154. }
  1155. if (other.singleImportMessage_ != null) {
  1156. if (singleImportMessage_ == null) {
  1157. singleImportMessage_ = new global::Google.Protobuf.TestProtos.ImportMessage();
  1158. }
  1159. SingleImportMessage.MergeFrom(other.SingleImportMessage);
  1160. }
  1161. if (other.SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) {
  1162. SingleNestedEnum = other.SingleNestedEnum;
  1163. }
  1164. if (other.SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
  1165. SingleForeignEnum = other.SingleForeignEnum;
  1166. }
  1167. if (other.SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) {
  1168. SingleImportEnum = other.SingleImportEnum;
  1169. }
  1170. if (other.singlePublicImportMessage_ != null) {
  1171. if (singlePublicImportMessage_ == null) {
  1172. singlePublicImportMessage_ = new global::Google.Protobuf.TestProtos.PublicImportMessage();
  1173. }
  1174. SinglePublicImportMessage.MergeFrom(other.SinglePublicImportMessage);
  1175. }
  1176. repeatedInt32_.Add(other.repeatedInt32_);
  1177. repeatedInt64_.Add(other.repeatedInt64_);
  1178. repeatedUint32_.Add(other.repeatedUint32_);
  1179. repeatedUint64_.Add(other.repeatedUint64_);
  1180. repeatedSint32_.Add(other.repeatedSint32_);
  1181. repeatedSint64_.Add(other.repeatedSint64_);
  1182. repeatedFixed32_.Add(other.repeatedFixed32_);
  1183. repeatedFixed64_.Add(other.repeatedFixed64_);
  1184. repeatedSfixed32_.Add(other.repeatedSfixed32_);
  1185. repeatedSfixed64_.Add(other.repeatedSfixed64_);
  1186. repeatedFloat_.Add(other.repeatedFloat_);
  1187. repeatedDouble_.Add(other.repeatedDouble_);
  1188. repeatedBool_.Add(other.repeatedBool_);
  1189. repeatedString_.Add(other.repeatedString_);
  1190. repeatedBytes_.Add(other.repeatedBytes_);
  1191. repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
  1192. repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
  1193. repeatedImportMessage_.Add(other.repeatedImportMessage_);
  1194. repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
  1195. repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
  1196. repeatedImportEnum_.Add(other.repeatedImportEnum_);
  1197. repeatedPublicImportMessage_.Add(other.repeatedPublicImportMessage_);
  1198. switch (other.OneofFieldCase) {
  1199. case OneofFieldOneofCase.OneofUint32:
  1200. OneofUint32 = other.OneofUint32;
  1201. break;
  1202. case OneofFieldOneofCase.OneofNestedMessage:
  1203. OneofNestedMessage = other.OneofNestedMessage;
  1204. break;
  1205. case OneofFieldOneofCase.OneofString:
  1206. OneofString = other.OneofString;
  1207. break;
  1208. case OneofFieldOneofCase.OneofBytes:
  1209. OneofBytes = other.OneofBytes;
  1210. break;
  1211. }
  1212. }
  1213. public void MergeFrom(pb::CodedInputStream input) {
  1214. uint tag;
  1215. while ((tag = input.ReadTag()) != 0) {
  1216. switch(tag) {
  1217. default:
  1218. input.SkipLastField();
  1219. break;
  1220. case 8: {
  1221. SingleInt32 = input.ReadInt32();
  1222. break;
  1223. }
  1224. case 16: {
  1225. SingleInt64 = input.ReadInt64();
  1226. break;
  1227. }
  1228. case 24: {
  1229. SingleUint32 = input.ReadUInt32();
  1230. break;
  1231. }
  1232. case 32: {
  1233. SingleUint64 = input.ReadUInt64();
  1234. break;
  1235. }
  1236. case 40: {
  1237. SingleSint32 = input.ReadSInt32();
  1238. break;
  1239. }
  1240. case 48: {
  1241. SingleSint64 = input.ReadSInt64();
  1242. break;
  1243. }
  1244. case 61: {
  1245. SingleFixed32 = input.ReadFixed32();
  1246. break;
  1247. }
  1248. case 65: {
  1249. SingleFixed64 = input.ReadFixed64();
  1250. break;
  1251. }
  1252. case 77: {
  1253. SingleSfixed32 = input.ReadSFixed32();
  1254. break;
  1255. }
  1256. case 81: {
  1257. SingleSfixed64 = input.ReadSFixed64();
  1258. break;
  1259. }
  1260. case 93: {
  1261. SingleFloat = input.ReadFloat();
  1262. break;
  1263. }
  1264. case 97: {
  1265. SingleDouble = input.ReadDouble();
  1266. break;
  1267. }
  1268. case 104: {
  1269. SingleBool = input.ReadBool();
  1270. break;
  1271. }
  1272. case 114: {
  1273. SingleString = input.ReadString();
  1274. break;
  1275. }
  1276. case 122: {
  1277. SingleBytes = input.ReadBytes();
  1278. break;
  1279. }
  1280. case 146: {
  1281. if (singleNestedMessage_ == null) {
  1282. singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
  1283. }
  1284. input.ReadMessage(singleNestedMessage_);
  1285. break;
  1286. }
  1287. case 154: {
  1288. if (singleForeignMessage_ == null) {
  1289. singleForeignMessage_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
  1290. }
  1291. input.ReadMessage(singleForeignMessage_);
  1292. break;
  1293. }
  1294. case 162: {
  1295. if (singleImportMessage_ == null) {
  1296. singleImportMessage_ = new global::Google.Protobuf.TestProtos.ImportMessage();
  1297. }
  1298. input.ReadMessage(singleImportMessage_);
  1299. break;
  1300. }
  1301. case 168: {
  1302. singleNestedEnum_ = (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) input.ReadEnum();
  1303. break;
  1304. }
  1305. case 176: {
  1306. singleForeignEnum_ = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum();
  1307. break;
  1308. }
  1309. case 184: {
  1310. singleImportEnum_ = (global::Google.Protobuf.TestProtos.ImportEnum) input.ReadEnum();
  1311. break;
  1312. }
  1313. case 210: {
  1314. if (singlePublicImportMessage_ == null) {
  1315. singlePublicImportMessage_ = new global::Google.Protobuf.TestProtos.PublicImportMessage();
  1316. }
  1317. input.ReadMessage(singlePublicImportMessage_);
  1318. break;
  1319. }
  1320. case 250:
  1321. case 248: {
  1322. repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
  1323. break;
  1324. }
  1325. case 258:
  1326. case 256: {
  1327. repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
  1328. break;
  1329. }
  1330. case 266:
  1331. case 264: {
  1332. repeatedUint32_.AddEntriesFrom(input, _repeated_repeatedUint32_codec);
  1333. break;
  1334. }
  1335. case 274:
  1336. case 272: {
  1337. repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
  1338. break;
  1339. }
  1340. case 282:
  1341. case 280: {
  1342. repeatedSint32_.AddEntriesFrom(input, _repeated_repeatedSint32_codec);
  1343. break;
  1344. }
  1345. case 290:
  1346. case 288: {
  1347. repeatedSint64_.AddEntriesFrom(input, _repeated_repeatedSint64_codec);
  1348. break;
  1349. }
  1350. case 298:
  1351. case 301: {
  1352. repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
  1353. break;
  1354. }
  1355. case 306:
  1356. case 305: {
  1357. repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
  1358. break;
  1359. }
  1360. case 314:
  1361. case 317: {
  1362. repeatedSfixed32_.AddEntriesFrom(input, _repeated_repeatedSfixed32_codec);
  1363. break;
  1364. }
  1365. case 322:
  1366. case 321: {
  1367. repeatedSfixed64_.AddEntriesFrom(input, _repeated_repeatedSfixed64_codec);
  1368. break;
  1369. }
  1370. case 330:
  1371. case 333: {
  1372. repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
  1373. break;
  1374. }
  1375. case 338:
  1376. case 337: {
  1377. repeatedDouble_.AddEntriesFrom(input, _repeated_repeatedDouble_codec);
  1378. break;
  1379. }
  1380. case 346:
  1381. case 344: {
  1382. repeatedBool_.AddEntriesFrom(input, _repeated_repeatedBool_codec);
  1383. break;
  1384. }
  1385. case 354: {
  1386. repeatedString_.AddEntriesFrom(input, _repeated_repeatedString_codec);
  1387. break;
  1388. }
  1389. case 362: {
  1390. repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec);
  1391. break;
  1392. }
  1393. case 386: {
  1394. repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNestedMessage_codec);
  1395. break;
  1396. }
  1397. case 394: {
  1398. repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_codec);
  1399. break;
  1400. }
  1401. case 402: {
  1402. repeatedImportMessage_.AddEntriesFrom(input, _repeated_repeatedImportMessage_codec);
  1403. break;
  1404. }
  1405. case 410:
  1406. case 408: {
  1407. repeatedNestedEnum_.AddEntriesFrom(input, _repeated_repeatedNestedEnum_codec);
  1408. break;
  1409. }
  1410. case 418:
  1411. case 416: {
  1412. repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeignEnum_codec);
  1413. break;
  1414. }
  1415. case 426:
  1416. case 424: {
  1417. repeatedImportEnum_.AddEntriesFrom(input, _repeated_repeatedImportEnum_codec);
  1418. break;
  1419. }
  1420. case 434: {
  1421. repeatedPublicImportMessage_.AddEntriesFrom(input, _repeated_repeatedPublicImportMessage_codec);
  1422. break;
  1423. }
  1424. case 888: {
  1425. OneofUint32 = input.ReadUInt32();
  1426. break;
  1427. }
  1428. case 898: {
  1429. global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
  1430. if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
  1431. subBuilder.MergeFrom(OneofNestedMessage);
  1432. }
  1433. input.ReadMessage(subBuilder);
  1434. OneofNestedMessage = subBuilder;
  1435. break;
  1436. }
  1437. case 906: {
  1438. OneofString = input.ReadString();
  1439. break;
  1440. }
  1441. case 914: {
  1442. OneofBytes = input.ReadBytes();
  1443. break;
  1444. }
  1445. }
  1446. }
  1447. }
  1448. #region Nested types
  1449. /// <summary>Container for nested types declared in the TestAllTypes message type.</summary>
  1450. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1451. public static partial class Types {
  1452. public enum NestedEnum {
  1453. NESTED_ENUM_UNSPECIFIED = 0,
  1454. FOO = 1,
  1455. BAR = 2,
  1456. BAZ = 3,
  1457. /// <summary>
  1458. /// Intentionally negative.
  1459. /// </summary>
  1460. NEG = -1,
  1461. }
  1462. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1463. public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
  1464. private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
  1465. public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
  1466. public static pbr::MessageDescriptor Descriptor {
  1467. get { return global::Google.Protobuf.TestProtos.TestAllTypes.Descriptor.NestedTypes[0]; }
  1468. }
  1469. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1470. get { return Descriptor; }
  1471. }
  1472. public NestedMessage() {
  1473. OnConstruction();
  1474. }
  1475. partial void OnConstruction();
  1476. public NestedMessage(NestedMessage other) : this() {
  1477. bb_ = other.bb_;
  1478. }
  1479. public NestedMessage Clone() {
  1480. return new NestedMessage(this);
  1481. }
  1482. /// <summary>Field number for the "bb" field.</summary>
  1483. public const int BbFieldNumber = 1;
  1484. private int bb_;
  1485. /// <summary>
  1486. /// The field name "b" fails to compile in proto1 because it conflicts with
  1487. /// a local variable named "b" in one of the generated methods. Doh.
  1488. /// This file needs to compile in proto1 to test backwards-compatibility.
  1489. /// </summary>
  1490. public int Bb {
  1491. get { return bb_; }
  1492. set {
  1493. bb_ = value;
  1494. }
  1495. }
  1496. public override bool Equals(object other) {
  1497. return Equals(other as NestedMessage);
  1498. }
  1499. public bool Equals(NestedMessage other) {
  1500. if (ReferenceEquals(other, null)) {
  1501. return false;
  1502. }
  1503. if (ReferenceEquals(other, this)) {
  1504. return true;
  1505. }
  1506. if (Bb != other.Bb) return false;
  1507. return true;
  1508. }
  1509. public override int GetHashCode() {
  1510. int hash = 1;
  1511. if (Bb != 0) hash ^= Bb.GetHashCode();
  1512. return hash;
  1513. }
  1514. public override string ToString() {
  1515. return pb::JsonFormatter.ToDiagnosticString(this);
  1516. }
  1517. public void WriteTo(pb::CodedOutputStream output) {
  1518. if (Bb != 0) {
  1519. output.WriteRawTag(8);
  1520. output.WriteInt32(Bb);
  1521. }
  1522. }
  1523. public int CalculateSize() {
  1524. int size = 0;
  1525. if (Bb != 0) {
  1526. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb);
  1527. }
  1528. return size;
  1529. }
  1530. public void MergeFrom(NestedMessage other) {
  1531. if (other == null) {
  1532. return;
  1533. }
  1534. if (other.Bb != 0) {
  1535. Bb = other.Bb;
  1536. }
  1537. }
  1538. public void MergeFrom(pb::CodedInputStream input) {
  1539. uint tag;
  1540. while ((tag = input.ReadTag()) != 0) {
  1541. switch(tag) {
  1542. default:
  1543. input.SkipLastField();
  1544. break;
  1545. case 8: {
  1546. Bb = input.ReadInt32();
  1547. break;
  1548. }
  1549. }
  1550. }
  1551. }
  1552. }
  1553. }
  1554. #endregion
  1555. }
  1556. /// <summary>
  1557. /// This proto includes a recusively nested message.
  1558. /// </summary>
  1559. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1560. public sealed partial class NestedTestAllTypes : pb::IMessage<NestedTestAllTypes> {
  1561. private static readonly pb::MessageParser<NestedTestAllTypes> _parser = new pb::MessageParser<NestedTestAllTypes>(() => new NestedTestAllTypes());
  1562. public static pb::MessageParser<NestedTestAllTypes> Parser { get { return _parser; } }
  1563. public static pbr::MessageDescriptor Descriptor {
  1564. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[1]; }
  1565. }
  1566. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1567. get { return Descriptor; }
  1568. }
  1569. public NestedTestAllTypes() {
  1570. OnConstruction();
  1571. }
  1572. partial void OnConstruction();
  1573. public NestedTestAllTypes(NestedTestAllTypes other) : this() {
  1574. Child = other.child_ != null ? other.Child.Clone() : null;
  1575. Payload = other.payload_ != null ? other.Payload.Clone() : null;
  1576. repeatedChild_ = other.repeatedChild_.Clone();
  1577. }
  1578. public NestedTestAllTypes Clone() {
  1579. return new NestedTestAllTypes(this);
  1580. }
  1581. /// <summary>Field number for the "child" field.</summary>
  1582. public const int ChildFieldNumber = 1;
  1583. private global::Google.Protobuf.TestProtos.NestedTestAllTypes child_;
  1584. public global::Google.Protobuf.TestProtos.NestedTestAllTypes Child {
  1585. get { return child_; }
  1586. set {
  1587. child_ = value;
  1588. }
  1589. }
  1590. /// <summary>Field number for the "payload" field.</summary>
  1591. public const int PayloadFieldNumber = 2;
  1592. private global::Google.Protobuf.TestProtos.TestAllTypes payload_;
  1593. public global::Google.Protobuf.TestProtos.TestAllTypes Payload {
  1594. get { return payload_; }
  1595. set {
  1596. payload_ = value;
  1597. }
  1598. }
  1599. /// <summary>Field number for the "repeated_child" field.</summary>
  1600. public const int RepeatedChildFieldNumber = 3;
  1601. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.NestedTestAllTypes> _repeated_repeatedChild_codec
  1602. = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.NestedTestAllTypes.Parser);
  1603. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes> repeatedChild_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes>();
  1604. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTypes> RepeatedChild {
  1605. get { return repeatedChild_; }
  1606. }
  1607. public override bool Equals(object other) {
  1608. return Equals(other as NestedTestAllTypes);
  1609. }
  1610. public bool Equals(NestedTestAllTypes other) {
  1611. if (ReferenceEquals(other, null)) {
  1612. return false;
  1613. }
  1614. if (ReferenceEquals(other, this)) {
  1615. return true;
  1616. }
  1617. if (!object.Equals(Child, other.Child)) return false;
  1618. if (!object.Equals(Payload, other.Payload)) return false;
  1619. if(!repeatedChild_.Equals(other.repeatedChild_)) return false;
  1620. return true;
  1621. }
  1622. public override int GetHashCode() {
  1623. int hash = 1;
  1624. if (child_ != null) hash ^= Child.GetHashCode();
  1625. if (payload_ != null) hash ^= Payload.GetHashCode();
  1626. hash ^= repeatedChild_.GetHashCode();
  1627. return hash;
  1628. }
  1629. public override string ToString() {
  1630. return pb::JsonFormatter.ToDiagnosticString(this);
  1631. }
  1632. public void WriteTo(pb::CodedOutputStream output) {
  1633. if (child_ != null) {
  1634. output.WriteRawTag(10);
  1635. output.WriteMessage(Child);
  1636. }
  1637. if (payload_ != null) {
  1638. output.WriteRawTag(18);
  1639. output.WriteMessage(Payload);
  1640. }
  1641. repeatedChild_.WriteTo(output, _repeated_repeatedChild_codec);
  1642. }
  1643. public int CalculateSize() {
  1644. int size = 0;
  1645. if (child_ != null) {
  1646. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Child);
  1647. }
  1648. if (payload_ != null) {
  1649. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload);
  1650. }
  1651. size += repeatedChild_.CalculateSize(_repeated_repeatedChild_codec);
  1652. return size;
  1653. }
  1654. public void MergeFrom(NestedTestAllTypes other) {
  1655. if (other == null) {
  1656. return;
  1657. }
  1658. if (other.child_ != null) {
  1659. if (child_ == null) {
  1660. child_ = new global::Google.Protobuf.TestProtos.NestedTestAllTypes();
  1661. }
  1662. Child.MergeFrom(other.Child);
  1663. }
  1664. if (other.payload_ != null) {
  1665. if (payload_ == null) {
  1666. payload_ = new global::Google.Protobuf.TestProtos.TestAllTypes();
  1667. }
  1668. Payload.MergeFrom(other.Payload);
  1669. }
  1670. repeatedChild_.Add(other.repeatedChild_);
  1671. }
  1672. public void MergeFrom(pb::CodedInputStream input) {
  1673. uint tag;
  1674. while ((tag = input.ReadTag()) != 0) {
  1675. switch(tag) {
  1676. default:
  1677. input.SkipLastField();
  1678. break;
  1679. case 10: {
  1680. if (child_ == null) {
  1681. child_ = new global::Google.Protobuf.TestProtos.NestedTestAllTypes();
  1682. }
  1683. input.ReadMessage(child_);
  1684. break;
  1685. }
  1686. case 18: {
  1687. if (payload_ == null) {
  1688. payload_ = new global::Google.Protobuf.TestProtos.TestAllTypes();
  1689. }
  1690. input.ReadMessage(payload_);
  1691. break;
  1692. }
  1693. case 26: {
  1694. repeatedChild_.AddEntriesFrom(input, _repeated_repeatedChild_codec);
  1695. break;
  1696. }
  1697. }
  1698. }
  1699. }
  1700. }
  1701. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1702. public sealed partial class TestDeprecatedFields : pb::IMessage<TestDeprecatedFields> {
  1703. private static readonly pb::MessageParser<TestDeprecatedFields> _parser = new pb::MessageParser<TestDeprecatedFields>(() => new TestDeprecatedFields());
  1704. public static pb::MessageParser<TestDeprecatedFields> Parser { get { return _parser; } }
  1705. public static pbr::MessageDescriptor Descriptor {
  1706. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[2]; }
  1707. }
  1708. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1709. get { return Descriptor; }
  1710. }
  1711. public TestDeprecatedFields() {
  1712. OnConstruction();
  1713. }
  1714. partial void OnConstruction();
  1715. public TestDeprecatedFields(TestDeprecatedFields other) : this() {
  1716. deprecatedInt32_ = other.deprecatedInt32_;
  1717. }
  1718. public TestDeprecatedFields Clone() {
  1719. return new TestDeprecatedFields(this);
  1720. }
  1721. /// <summary>Field number for the "deprecated_int32" field.</summary>
  1722. public const int DeprecatedInt32FieldNumber = 1;
  1723. private int deprecatedInt32_;
  1724. [global::System.ObsoleteAttribute()]
  1725. public int DeprecatedInt32 {
  1726. get { return deprecatedInt32_; }
  1727. set {
  1728. deprecatedInt32_ = value;
  1729. }
  1730. }
  1731. public override bool Equals(object other) {
  1732. return Equals(other as TestDeprecatedFields);
  1733. }
  1734. public bool Equals(TestDeprecatedFields other) {
  1735. if (ReferenceEquals(other, null)) {
  1736. return false;
  1737. }
  1738. if (ReferenceEquals(other, this)) {
  1739. return true;
  1740. }
  1741. if (DeprecatedInt32 != other.DeprecatedInt32) return false;
  1742. return true;
  1743. }
  1744. public override int GetHashCode() {
  1745. int hash = 1;
  1746. if (DeprecatedInt32 != 0) hash ^= DeprecatedInt32.GetHashCode();
  1747. return hash;
  1748. }
  1749. public override string ToString() {
  1750. return pb::JsonFormatter.ToDiagnosticString(this);
  1751. }
  1752. public void WriteTo(pb::CodedOutputStream output) {
  1753. if (DeprecatedInt32 != 0) {
  1754. output.WriteRawTag(8);
  1755. output.WriteInt32(DeprecatedInt32);
  1756. }
  1757. }
  1758. public int CalculateSize() {
  1759. int size = 0;
  1760. if (DeprecatedInt32 != 0) {
  1761. size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeprecatedInt32);
  1762. }
  1763. return size;
  1764. }
  1765. public void MergeFrom(TestDeprecatedFields other) {
  1766. if (other == null) {
  1767. return;
  1768. }
  1769. if (other.DeprecatedInt32 != 0) {
  1770. DeprecatedInt32 = other.DeprecatedInt32;
  1771. }
  1772. }
  1773. public void MergeFrom(pb::CodedInputStream input) {
  1774. uint tag;
  1775. while ((tag = input.ReadTag()) != 0) {
  1776. switch(tag) {
  1777. default:
  1778. input.SkipLastField();
  1779. break;
  1780. case 8: {
  1781. DeprecatedInt32 = input.ReadInt32();
  1782. break;
  1783. }
  1784. }
  1785. }
  1786. }
  1787. }
  1788. /// <summary>
  1789. /// Define these after TestAllTypes to make sure the compiler can handle
  1790. /// that.
  1791. /// </summary>
  1792. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1793. public sealed partial class ForeignMessage : pb::IMessage<ForeignMessage> {
  1794. private static readonly pb::MessageParser<ForeignMessage> _parser = new pb::MessageParser<ForeignMessage>(() => new ForeignMessage());
  1795. public static pb::MessageParser<ForeignMessage> Parser { get { return _parser; } }
  1796. public static pbr::MessageDescriptor Descriptor {
  1797. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[3]; }
  1798. }
  1799. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1800. get { return Descriptor; }
  1801. }
  1802. public ForeignMessage() {
  1803. OnConstruction();
  1804. }
  1805. partial void OnConstruction();
  1806. public ForeignMessage(ForeignMessage other) : this() {
  1807. c_ = other.c_;
  1808. }
  1809. public ForeignMessage Clone() {
  1810. return new ForeignMessage(this);
  1811. }
  1812. /// <summary>Field number for the "c" field.</summary>
  1813. public const int CFieldNumber = 1;
  1814. private int c_;
  1815. public int C {
  1816. get { return c_; }
  1817. set {
  1818. c_ = value;
  1819. }
  1820. }
  1821. public override bool Equals(object other) {
  1822. return Equals(other as ForeignMessage);
  1823. }
  1824. public bool Equals(ForeignMessage other) {
  1825. if (ReferenceEquals(other, null)) {
  1826. return false;
  1827. }
  1828. if (ReferenceEquals(other, this)) {
  1829. return true;
  1830. }
  1831. if (C != other.C) return false;
  1832. return true;
  1833. }
  1834. public override int GetHashCode() {
  1835. int hash = 1;
  1836. if (C != 0) hash ^= C.GetHashCode();
  1837. return hash;
  1838. }
  1839. public override string ToString() {
  1840. return pb::JsonFormatter.ToDiagnosticString(this);
  1841. }
  1842. public void WriteTo(pb::CodedOutputStream output) {
  1843. if (C != 0) {
  1844. output.WriteRawTag(8);
  1845. output.WriteInt32(C);
  1846. }
  1847. }
  1848. public int CalculateSize() {
  1849. int size = 0;
  1850. if (C != 0) {
  1851. size += 1 + pb::CodedOutputStream.ComputeInt32Size(C);
  1852. }
  1853. return size;
  1854. }
  1855. public void MergeFrom(ForeignMessage other) {
  1856. if (other == null) {
  1857. return;
  1858. }
  1859. if (other.C != 0) {
  1860. C = other.C;
  1861. }
  1862. }
  1863. public void MergeFrom(pb::CodedInputStream input) {
  1864. uint tag;
  1865. while ((tag = input.ReadTag()) != 0) {
  1866. switch(tag) {
  1867. default:
  1868. input.SkipLastField();
  1869. break;
  1870. case 8: {
  1871. C = input.ReadInt32();
  1872. break;
  1873. }
  1874. }
  1875. }
  1876. }
  1877. }
  1878. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1879. public sealed partial class TestReservedFields : pb::IMessage<TestReservedFields> {
  1880. private static readonly pb::MessageParser<TestReservedFields> _parser = new pb::MessageParser<TestReservedFields>(() => new TestReservedFields());
  1881. public static pb::MessageParser<TestReservedFields> Parser { get { return _parser; } }
  1882. public static pbr::MessageDescriptor Descriptor {
  1883. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[4]; }
  1884. }
  1885. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1886. get { return Descriptor; }
  1887. }
  1888. public TestReservedFields() {
  1889. OnConstruction();
  1890. }
  1891. partial void OnConstruction();
  1892. public TestReservedFields(TestReservedFields other) : this() {
  1893. }
  1894. public TestReservedFields Clone() {
  1895. return new TestReservedFields(this);
  1896. }
  1897. public override bool Equals(object other) {
  1898. return Equals(other as TestReservedFields);
  1899. }
  1900. public bool Equals(TestReservedFields other) {
  1901. if (ReferenceEquals(other, null)) {
  1902. return false;
  1903. }
  1904. if (ReferenceEquals(other, this)) {
  1905. return true;
  1906. }
  1907. return true;
  1908. }
  1909. public override int GetHashCode() {
  1910. int hash = 1;
  1911. return hash;
  1912. }
  1913. public override string ToString() {
  1914. return pb::JsonFormatter.ToDiagnosticString(this);
  1915. }
  1916. public void WriteTo(pb::CodedOutputStream output) {
  1917. }
  1918. public int CalculateSize() {
  1919. int size = 0;
  1920. return size;
  1921. }
  1922. public void MergeFrom(TestReservedFields other) {
  1923. if (other == null) {
  1924. return;
  1925. }
  1926. }
  1927. public void MergeFrom(pb::CodedInputStream input) {
  1928. uint tag;
  1929. while ((tag = input.ReadTag()) != 0) {
  1930. switch(tag) {
  1931. default:
  1932. input.SkipLastField();
  1933. break;
  1934. }
  1935. }
  1936. }
  1937. }
  1938. /// <summary>
  1939. /// Test that we can use NestedMessage from outside TestAllTypes.
  1940. /// </summary>
  1941. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1942. public sealed partial class TestForeignNested : pb::IMessage<TestForeignNested> {
  1943. private static readonly pb::MessageParser<TestForeignNested> _parser = new pb::MessageParser<TestForeignNested>(() => new TestForeignNested());
  1944. public static pb::MessageParser<TestForeignNested> Parser { get { return _parser; } }
  1945. public static pbr::MessageDescriptor Descriptor {
  1946. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[5]; }
  1947. }
  1948. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1949. get { return Descriptor; }
  1950. }
  1951. public TestForeignNested() {
  1952. OnConstruction();
  1953. }
  1954. partial void OnConstruction();
  1955. public TestForeignNested(TestForeignNested other) : this() {
  1956. ForeignNested = other.foreignNested_ != null ? other.ForeignNested.Clone() : null;
  1957. }
  1958. public TestForeignNested Clone() {
  1959. return new TestForeignNested(this);
  1960. }
  1961. /// <summary>Field number for the "foreign_nested" field.</summary>
  1962. public const int ForeignNestedFieldNumber = 1;
  1963. private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage foreignNested_;
  1964. public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage ForeignNested {
  1965. get { return foreignNested_; }
  1966. set {
  1967. foreignNested_ = value;
  1968. }
  1969. }
  1970. public override bool Equals(object other) {
  1971. return Equals(other as TestForeignNested);
  1972. }
  1973. public bool Equals(TestForeignNested other) {
  1974. if (ReferenceEquals(other, null)) {
  1975. return false;
  1976. }
  1977. if (ReferenceEquals(other, this)) {
  1978. return true;
  1979. }
  1980. if (!object.Equals(ForeignNested, other.ForeignNested)) return false;
  1981. return true;
  1982. }
  1983. public override int GetHashCode() {
  1984. int hash = 1;
  1985. if (foreignNested_ != null) hash ^= ForeignNested.GetHashCode();
  1986. return hash;
  1987. }
  1988. public override string ToString() {
  1989. return pb::JsonFormatter.ToDiagnosticString(this);
  1990. }
  1991. public void WriteTo(pb::CodedOutputStream output) {
  1992. if (foreignNested_ != null) {
  1993. output.WriteRawTag(10);
  1994. output.WriteMessage(ForeignNested);
  1995. }
  1996. }
  1997. public int CalculateSize() {
  1998. int size = 0;
  1999. if (foreignNested_ != null) {
  2000. size += 1 + pb::CodedOutputStream.ComputeMessageSize(ForeignNested);
  2001. }
  2002. return size;
  2003. }
  2004. public void MergeFrom(TestForeignNested other) {
  2005. if (other == null) {
  2006. return;
  2007. }
  2008. if (other.foreignNested_ != null) {
  2009. if (foreignNested_ == null) {
  2010. foreignNested_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
  2011. }
  2012. ForeignNested.MergeFrom(other.ForeignNested);
  2013. }
  2014. }
  2015. public void MergeFrom(pb::CodedInputStream input) {
  2016. uint tag;
  2017. while ((tag = input.ReadTag()) != 0) {
  2018. switch(tag) {
  2019. default:
  2020. input.SkipLastField();
  2021. break;
  2022. case 10: {
  2023. if (foreignNested_ == null) {
  2024. foreignNested_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
  2025. }
  2026. input.ReadMessage(foreignNested_);
  2027. break;
  2028. }
  2029. }
  2030. }
  2031. }
  2032. }
  2033. /// <summary>
  2034. /// Test that really large tag numbers don't break anything.
  2035. /// </summary>
  2036. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2037. public sealed partial class TestReallyLargeTagNumber : pb::IMessage<TestReallyLargeTagNumber> {
  2038. private static readonly pb::MessageParser<TestReallyLargeTagNumber> _parser = new pb::MessageParser<TestReallyLargeTagNumber>(() => new TestReallyLargeTagNumber());
  2039. public static pb::MessageParser<TestReallyLargeTagNumber> Parser { get { return _parser; } }
  2040. public static pbr::MessageDescriptor Descriptor {
  2041. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[6]; }
  2042. }
  2043. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2044. get { return Descriptor; }
  2045. }
  2046. public TestReallyLargeTagNumber() {
  2047. OnConstruction();
  2048. }
  2049. partial void OnConstruction();
  2050. public TestReallyLargeTagNumber(TestReallyLargeTagNumber other) : this() {
  2051. a_ = other.a_;
  2052. bb_ = other.bb_;
  2053. }
  2054. public TestReallyLargeTagNumber Clone() {
  2055. return new TestReallyLargeTagNumber(this);
  2056. }
  2057. /// <summary>Field number for the "a" field.</summary>
  2058. public const int AFieldNumber = 1;
  2059. private int a_;
  2060. /// <summary>
  2061. /// The largest possible tag number is 2^28 - 1, since the wire format uses
  2062. /// three bits to communicate wire type.
  2063. /// </summary>
  2064. public int A {
  2065. get { return a_; }
  2066. set {
  2067. a_ = value;
  2068. }
  2069. }
  2070. /// <summary>Field number for the "bb" field.</summary>
  2071. public const int BbFieldNumber = 268435455;
  2072. private int bb_;
  2073. public int Bb {
  2074. get { return bb_; }
  2075. set {
  2076. bb_ = value;
  2077. }
  2078. }
  2079. public override bool Equals(object other) {
  2080. return Equals(other as TestReallyLargeTagNumber);
  2081. }
  2082. public bool Equals(TestReallyLargeTagNumber other) {
  2083. if (ReferenceEquals(other, null)) {
  2084. return false;
  2085. }
  2086. if (ReferenceEquals(other, this)) {
  2087. return true;
  2088. }
  2089. if (A != other.A) return false;
  2090. if (Bb != other.Bb) return false;
  2091. return true;
  2092. }
  2093. public override int GetHashCode() {
  2094. int hash = 1;
  2095. if (A != 0) hash ^= A.GetHashCode();
  2096. if (Bb != 0) hash ^= Bb.GetHashCode();
  2097. return hash;
  2098. }
  2099. public override string ToString() {
  2100. return pb::JsonFormatter.ToDiagnosticString(this);
  2101. }
  2102. public void WriteTo(pb::CodedOutputStream output) {
  2103. if (A != 0) {
  2104. output.WriteRawTag(8);
  2105. output.WriteInt32(A);
  2106. }
  2107. if (Bb != 0) {
  2108. output.WriteRawTag(248, 255, 255, 255, 7);
  2109. output.WriteInt32(Bb);
  2110. }
  2111. }
  2112. public int CalculateSize() {
  2113. int size = 0;
  2114. if (A != 0) {
  2115. size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
  2116. }
  2117. if (Bb != 0) {
  2118. size += 5 + pb::CodedOutputStream.ComputeInt32Size(Bb);
  2119. }
  2120. return size;
  2121. }
  2122. public void MergeFrom(TestReallyLargeTagNumber other) {
  2123. if (other == null) {
  2124. return;
  2125. }
  2126. if (other.A != 0) {
  2127. A = other.A;
  2128. }
  2129. if (other.Bb != 0) {
  2130. Bb = other.Bb;
  2131. }
  2132. }
  2133. public void MergeFrom(pb::CodedInputStream input) {
  2134. uint tag;
  2135. while ((tag = input.ReadTag()) != 0) {
  2136. switch(tag) {
  2137. default:
  2138. input.SkipLastField();
  2139. break;
  2140. case 8: {
  2141. A = input.ReadInt32();
  2142. break;
  2143. }
  2144. case 2147483640: {
  2145. Bb = input.ReadInt32();
  2146. break;
  2147. }
  2148. }
  2149. }
  2150. }
  2151. }
  2152. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2153. public sealed partial class TestRecursiveMessage : pb::IMessage<TestRecursiveMessage> {
  2154. private static readonly pb::MessageParser<TestRecursiveMessage> _parser = new pb::MessageParser<TestRecursiveMessage>(() => new TestRecursiveMessage());
  2155. public static pb::MessageParser<TestRecursiveMessage> Parser { get { return _parser; } }
  2156. public static pbr::MessageDescriptor Descriptor {
  2157. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[7]; }
  2158. }
  2159. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2160. get { return Descriptor; }
  2161. }
  2162. public TestRecursiveMessage() {
  2163. OnConstruction();
  2164. }
  2165. partial void OnConstruction();
  2166. public TestRecursiveMessage(TestRecursiveMessage other) : this() {
  2167. A = other.a_ != null ? other.A.Clone() : null;
  2168. i_ = other.i_;
  2169. }
  2170. public TestRecursiveMessage Clone() {
  2171. return new TestRecursiveMessage(this);
  2172. }
  2173. /// <summary>Field number for the "a" field.</summary>
  2174. public const int AFieldNumber = 1;
  2175. private global::Google.Protobuf.TestProtos.TestRecursiveMessage a_;
  2176. public global::Google.Protobuf.TestProtos.TestRecursiveMessage A {
  2177. get { return a_; }
  2178. set {
  2179. a_ = value;
  2180. }
  2181. }
  2182. /// <summary>Field number for the "i" field.</summary>
  2183. public const int IFieldNumber = 2;
  2184. private int i_;
  2185. public int I {
  2186. get { return i_; }
  2187. set {
  2188. i_ = value;
  2189. }
  2190. }
  2191. public override bool Equals(object other) {
  2192. return Equals(other as TestRecursiveMessage);
  2193. }
  2194. public bool Equals(TestRecursiveMessage other) {
  2195. if (ReferenceEquals(other, null)) {
  2196. return false;
  2197. }
  2198. if (ReferenceEquals(other, this)) {
  2199. return true;
  2200. }
  2201. if (!object.Equals(A, other.A)) return false;
  2202. if (I != other.I) return false;
  2203. return true;
  2204. }
  2205. public override int GetHashCode() {
  2206. int hash = 1;
  2207. if (a_ != null) hash ^= A.GetHashCode();
  2208. if (I != 0) hash ^= I.GetHashCode();
  2209. return hash;
  2210. }
  2211. public override string ToString() {
  2212. return pb::JsonFormatter.ToDiagnosticString(this);
  2213. }
  2214. public void WriteTo(pb::CodedOutputStream output) {
  2215. if (a_ != null) {
  2216. output.WriteRawTag(10);
  2217. output.WriteMessage(A);
  2218. }
  2219. if (I != 0) {
  2220. output.WriteRawTag(16);
  2221. output.WriteInt32(I);
  2222. }
  2223. }
  2224. public int CalculateSize() {
  2225. int size = 0;
  2226. if (a_ != null) {
  2227. size += 1 + pb::CodedOutputStream.ComputeMessageSize(A);
  2228. }
  2229. if (I != 0) {
  2230. size += 1 + pb::CodedOutputStream.ComputeInt32Size(I);
  2231. }
  2232. return size;
  2233. }
  2234. public void MergeFrom(TestRecursiveMessage other) {
  2235. if (other == null) {
  2236. return;
  2237. }
  2238. if (other.a_ != null) {
  2239. if (a_ == null) {
  2240. a_ = new global::Google.Protobuf.TestProtos.TestRecursiveMessage();
  2241. }
  2242. A.MergeFrom(other.A);
  2243. }
  2244. if (other.I != 0) {
  2245. I = other.I;
  2246. }
  2247. }
  2248. public void MergeFrom(pb::CodedInputStream input) {
  2249. uint tag;
  2250. while ((tag = input.ReadTag()) != 0) {
  2251. switch(tag) {
  2252. default:
  2253. input.SkipLastField();
  2254. break;
  2255. case 10: {
  2256. if (a_ == null) {
  2257. a_ = new global::Google.Protobuf.TestProtos.TestRecursiveMessage();
  2258. }
  2259. input.ReadMessage(a_);
  2260. break;
  2261. }
  2262. case 16: {
  2263. I = input.ReadInt32();
  2264. break;
  2265. }
  2266. }
  2267. }
  2268. }
  2269. }
  2270. /// <summary>
  2271. /// Test that mutual recursion works.
  2272. /// </summary>
  2273. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2274. public sealed partial class TestMutualRecursionA : pb::IMessage<TestMutualRecursionA> {
  2275. private static readonly pb::MessageParser<TestMutualRecursionA> _parser = new pb::MessageParser<TestMutualRecursionA>(() => new TestMutualRecursionA());
  2276. public static pb::MessageParser<TestMutualRecursionA> Parser { get { return _parser; } }
  2277. public static pbr::MessageDescriptor Descriptor {
  2278. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[8]; }
  2279. }
  2280. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2281. get { return Descriptor; }
  2282. }
  2283. public TestMutualRecursionA() {
  2284. OnConstruction();
  2285. }
  2286. partial void OnConstruction();
  2287. public TestMutualRecursionA(TestMutualRecursionA other) : this() {
  2288. Bb = other.bb_ != null ? other.Bb.Clone() : null;
  2289. }
  2290. public TestMutualRecursionA Clone() {
  2291. return new TestMutualRecursionA(this);
  2292. }
  2293. /// <summary>Field number for the "bb" field.</summary>
  2294. public const int BbFieldNumber = 1;
  2295. private global::Google.Protobuf.TestProtos.TestMutualRecursionB bb_;
  2296. public global::Google.Protobuf.TestProtos.TestMutualRecursionB Bb {
  2297. get { return bb_; }
  2298. set {
  2299. bb_ = value;
  2300. }
  2301. }
  2302. public override bool Equals(object other) {
  2303. return Equals(other as TestMutualRecursionA);
  2304. }
  2305. public bool Equals(TestMutualRecursionA other) {
  2306. if (ReferenceEquals(other, null)) {
  2307. return false;
  2308. }
  2309. if (ReferenceEquals(other, this)) {
  2310. return true;
  2311. }
  2312. if (!object.Equals(Bb, other.Bb)) return false;
  2313. return true;
  2314. }
  2315. public override int GetHashCode() {
  2316. int hash = 1;
  2317. if (bb_ != null) hash ^= Bb.GetHashCode();
  2318. return hash;
  2319. }
  2320. public override string ToString() {
  2321. return pb::JsonFormatter.ToDiagnosticString(this);
  2322. }
  2323. public void WriteTo(pb::CodedOutputStream output) {
  2324. if (bb_ != null) {
  2325. output.WriteRawTag(10);
  2326. output.WriteMessage(Bb);
  2327. }
  2328. }
  2329. public int CalculateSize() {
  2330. int size = 0;
  2331. if (bb_ != null) {
  2332. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bb);
  2333. }
  2334. return size;
  2335. }
  2336. public void MergeFrom(TestMutualRecursionA other) {
  2337. if (other == null) {
  2338. return;
  2339. }
  2340. if (other.bb_ != null) {
  2341. if (bb_ == null) {
  2342. bb_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionB();
  2343. }
  2344. Bb.MergeFrom(other.Bb);
  2345. }
  2346. }
  2347. public void MergeFrom(pb::CodedInputStream input) {
  2348. uint tag;
  2349. while ((tag = input.ReadTag()) != 0) {
  2350. switch(tag) {
  2351. default:
  2352. input.SkipLastField();
  2353. break;
  2354. case 10: {
  2355. if (bb_ == null) {
  2356. bb_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionB();
  2357. }
  2358. input.ReadMessage(bb_);
  2359. break;
  2360. }
  2361. }
  2362. }
  2363. }
  2364. }
  2365. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2366. public sealed partial class TestMutualRecursionB : pb::IMessage<TestMutualRecursionB> {
  2367. private static readonly pb::MessageParser<TestMutualRecursionB> _parser = new pb::MessageParser<TestMutualRecursionB>(() => new TestMutualRecursionB());
  2368. public static pb::MessageParser<TestMutualRecursionB> Parser { get { return _parser; } }
  2369. public static pbr::MessageDescriptor Descriptor {
  2370. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[9]; }
  2371. }
  2372. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2373. get { return Descriptor; }
  2374. }
  2375. public TestMutualRecursionB() {
  2376. OnConstruction();
  2377. }
  2378. partial void OnConstruction();
  2379. public TestMutualRecursionB(TestMutualRecursionB other) : this() {
  2380. A = other.a_ != null ? other.A.Clone() : null;
  2381. optionalInt32_ = other.optionalInt32_;
  2382. }
  2383. public TestMutualRecursionB Clone() {
  2384. return new TestMutualRecursionB(this);
  2385. }
  2386. /// <summary>Field number for the "a" field.</summary>
  2387. public const int AFieldNumber = 1;
  2388. private global::Google.Protobuf.TestProtos.TestMutualRecursionA a_;
  2389. public global::Google.Protobuf.TestProtos.TestMutualRecursionA A {
  2390. get { return a_; }
  2391. set {
  2392. a_ = value;
  2393. }
  2394. }
  2395. /// <summary>Field number for the "optional_int32" field.</summary>
  2396. public const int OptionalInt32FieldNumber = 2;
  2397. private int optionalInt32_;
  2398. public int OptionalInt32 {
  2399. get { return optionalInt32_; }
  2400. set {
  2401. optionalInt32_ = value;
  2402. }
  2403. }
  2404. public override bool Equals(object other) {
  2405. return Equals(other as TestMutualRecursionB);
  2406. }
  2407. public bool Equals(TestMutualRecursionB other) {
  2408. if (ReferenceEquals(other, null)) {
  2409. return false;
  2410. }
  2411. if (ReferenceEquals(other, this)) {
  2412. return true;
  2413. }
  2414. if (!object.Equals(A, other.A)) return false;
  2415. if (OptionalInt32 != other.OptionalInt32) return false;
  2416. return true;
  2417. }
  2418. public override int GetHashCode() {
  2419. int hash = 1;
  2420. if (a_ != null) hash ^= A.GetHashCode();
  2421. if (OptionalInt32 != 0) hash ^= OptionalInt32.GetHashCode();
  2422. return hash;
  2423. }
  2424. public override string ToString() {
  2425. return pb::JsonFormatter.ToDiagnosticString(this);
  2426. }
  2427. public void WriteTo(pb::CodedOutputStream output) {
  2428. if (a_ != null) {
  2429. output.WriteRawTag(10);
  2430. output.WriteMessage(A);
  2431. }
  2432. if (OptionalInt32 != 0) {
  2433. output.WriteRawTag(16);
  2434. output.WriteInt32(OptionalInt32);
  2435. }
  2436. }
  2437. public int CalculateSize() {
  2438. int size = 0;
  2439. if (a_ != null) {
  2440. size += 1 + pb::CodedOutputStream.ComputeMessageSize(A);
  2441. }
  2442. if (OptionalInt32 != 0) {
  2443. size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32);
  2444. }
  2445. return size;
  2446. }
  2447. public void MergeFrom(TestMutualRecursionB other) {
  2448. if (other == null) {
  2449. return;
  2450. }
  2451. if (other.a_ != null) {
  2452. if (a_ == null) {
  2453. a_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionA();
  2454. }
  2455. A.MergeFrom(other.A);
  2456. }
  2457. if (other.OptionalInt32 != 0) {
  2458. OptionalInt32 = other.OptionalInt32;
  2459. }
  2460. }
  2461. public void MergeFrom(pb::CodedInputStream input) {
  2462. uint tag;
  2463. while ((tag = input.ReadTag()) != 0) {
  2464. switch(tag) {
  2465. default:
  2466. input.SkipLastField();
  2467. break;
  2468. case 10: {
  2469. if (a_ == null) {
  2470. a_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionA();
  2471. }
  2472. input.ReadMessage(a_);
  2473. break;
  2474. }
  2475. case 16: {
  2476. OptionalInt32 = input.ReadInt32();
  2477. break;
  2478. }
  2479. }
  2480. }
  2481. }
  2482. }
  2483. /// <summary>
  2484. /// Test message with CamelCase field names. This violates Protocol Buffer
  2485. /// standard style.
  2486. /// </summary>
  2487. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2488. public sealed partial class TestCamelCaseFieldNames : pb::IMessage<TestCamelCaseFieldNames> {
  2489. private static readonly pb::MessageParser<TestCamelCaseFieldNames> _parser = new pb::MessageParser<TestCamelCaseFieldNames>(() => new TestCamelCaseFieldNames());
  2490. public static pb::MessageParser<TestCamelCaseFieldNames> Parser { get { return _parser; } }
  2491. public static pbr::MessageDescriptor Descriptor {
  2492. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[10]; }
  2493. }
  2494. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2495. get { return Descriptor; }
  2496. }
  2497. public TestCamelCaseFieldNames() {
  2498. OnConstruction();
  2499. }
  2500. partial void OnConstruction();
  2501. public TestCamelCaseFieldNames(TestCamelCaseFieldNames other) : this() {
  2502. primitiveField_ = other.primitiveField_;
  2503. stringField_ = other.stringField_;
  2504. enumField_ = other.enumField_;
  2505. MessageField = other.messageField_ != null ? other.MessageField.Clone() : null;
  2506. repeatedPrimitiveField_ = other.repeatedPrimitiveField_.Clone();
  2507. repeatedStringField_ = other.repeatedStringField_.Clone();
  2508. repeatedEnumField_ = other.repeatedEnumField_.Clone();
  2509. repeatedMessageField_ = other.repeatedMessageField_.Clone();
  2510. }
  2511. public TestCamelCaseFieldNames Clone() {
  2512. return new TestCamelCaseFieldNames(this);
  2513. }
  2514. /// <summary>Field number for the "PrimitiveField" field.</summary>
  2515. public const int PrimitiveFieldFieldNumber = 1;
  2516. private int primitiveField_;
  2517. public int PrimitiveField {
  2518. get { return primitiveField_; }
  2519. set {
  2520. primitiveField_ = value;
  2521. }
  2522. }
  2523. /// <summary>Field number for the "StringField" field.</summary>
  2524. public const int StringFieldFieldNumber = 2;
  2525. private string stringField_ = "";
  2526. public string StringField {
  2527. get { return stringField_; }
  2528. set {
  2529. stringField_ = pb::Preconditions.CheckNotNull(value, "value");
  2530. }
  2531. }
  2532. /// <summary>Field number for the "EnumField" field.</summary>
  2533. public const int EnumFieldFieldNumber = 3;
  2534. private global::Google.Protobuf.TestProtos.ForeignEnum enumField_ = global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED;
  2535. public global::Google.Protobuf.TestProtos.ForeignEnum EnumField {
  2536. get { return enumField_; }
  2537. set {
  2538. enumField_ = value;
  2539. }
  2540. }
  2541. /// <summary>Field number for the "MessageField" field.</summary>
  2542. public const int MessageFieldFieldNumber = 4;
  2543. private global::Google.Protobuf.TestProtos.ForeignMessage messageField_;
  2544. public global::Google.Protobuf.TestProtos.ForeignMessage MessageField {
  2545. get { return messageField_; }
  2546. set {
  2547. messageField_ = value;
  2548. }
  2549. }
  2550. /// <summary>Field number for the "RepeatedPrimitiveField" field.</summary>
  2551. public const int RepeatedPrimitiveFieldFieldNumber = 7;
  2552. private static readonly pb::FieldCodec<int> _repeated_repeatedPrimitiveField_codec
  2553. = pb::FieldCodec.ForInt32(58);
  2554. private readonly pbc::RepeatedField<int> repeatedPrimitiveField_ = new pbc::RepeatedField<int>();
  2555. public pbc::RepeatedField<int> RepeatedPrimitiveField {
  2556. get { return repeatedPrimitiveField_; }
  2557. }
  2558. /// <summary>Field number for the "RepeatedStringField" field.</summary>
  2559. public const int RepeatedStringFieldFieldNumber = 8;
  2560. private static readonly pb::FieldCodec<string> _repeated_repeatedStringField_codec
  2561. = pb::FieldCodec.ForString(66);
  2562. private readonly pbc::RepeatedField<string> repeatedStringField_ = new pbc::RepeatedField<string>();
  2563. public pbc::RepeatedField<string> RepeatedStringField {
  2564. get { return repeatedStringField_; }
  2565. }
  2566. /// <summary>Field number for the "RepeatedEnumField" field.</summary>
  2567. public const int RepeatedEnumFieldFieldNumber = 9;
  2568. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_repeatedEnumField_codec
  2569. = pb::FieldCodec.ForEnum(74, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
  2570. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> repeatedEnumField_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
  2571. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> RepeatedEnumField {
  2572. get { return repeatedEnumField_; }
  2573. }
  2574. /// <summary>Field number for the "RepeatedMessageField" field.</summary>
  2575. public const int RepeatedMessageFieldFieldNumber = 10;
  2576. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignMessage> _repeated_repeatedMessageField_codec
  2577. = pb::FieldCodec.ForMessage(82, global::Google.Protobuf.TestProtos.ForeignMessage.Parser);
  2578. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> repeatedMessageField_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage>();
  2579. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage> RepeatedMessageField {
  2580. get { return repeatedMessageField_; }
  2581. }
  2582. public override bool Equals(object other) {
  2583. return Equals(other as TestCamelCaseFieldNames);
  2584. }
  2585. public bool Equals(TestCamelCaseFieldNames other) {
  2586. if (ReferenceEquals(other, null)) {
  2587. return false;
  2588. }
  2589. if (ReferenceEquals(other, this)) {
  2590. return true;
  2591. }
  2592. if (PrimitiveField != other.PrimitiveField) return false;
  2593. if (StringField != other.StringField) return false;
  2594. if (EnumField != other.EnumField) return false;
  2595. if (!object.Equals(MessageField, other.MessageField)) return false;
  2596. if(!repeatedPrimitiveField_.Equals(other.repeatedPrimitiveField_)) return false;
  2597. if(!repeatedStringField_.Equals(other.repeatedStringField_)) return false;
  2598. if(!repeatedEnumField_.Equals(other.repeatedEnumField_)) return false;
  2599. if(!repeatedMessageField_.Equals(other.repeatedMessageField_)) return false;
  2600. return true;
  2601. }
  2602. public override int GetHashCode() {
  2603. int hash = 1;
  2604. if (PrimitiveField != 0) hash ^= PrimitiveField.GetHashCode();
  2605. if (StringField.Length != 0) hash ^= StringField.GetHashCode();
  2606. if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) hash ^= EnumField.GetHashCode();
  2607. if (messageField_ != null) hash ^= MessageField.GetHashCode();
  2608. hash ^= repeatedPrimitiveField_.GetHashCode();
  2609. hash ^= repeatedStringField_.GetHashCode();
  2610. hash ^= repeatedEnumField_.GetHashCode();
  2611. hash ^= repeatedMessageField_.GetHashCode();
  2612. return hash;
  2613. }
  2614. public override string ToString() {
  2615. return pb::JsonFormatter.ToDiagnosticString(this);
  2616. }
  2617. public void WriteTo(pb::CodedOutputStream output) {
  2618. if (PrimitiveField != 0) {
  2619. output.WriteRawTag(8);
  2620. output.WriteInt32(PrimitiveField);
  2621. }
  2622. if (StringField.Length != 0) {
  2623. output.WriteRawTag(18);
  2624. output.WriteString(StringField);
  2625. }
  2626. if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
  2627. output.WriteRawTag(24);
  2628. output.WriteEnum((int) EnumField);
  2629. }
  2630. if (messageField_ != null) {
  2631. output.WriteRawTag(34);
  2632. output.WriteMessage(MessageField);
  2633. }
  2634. repeatedPrimitiveField_.WriteTo(output, _repeated_repeatedPrimitiveField_codec);
  2635. repeatedStringField_.WriteTo(output, _repeated_repeatedStringField_codec);
  2636. repeatedEnumField_.WriteTo(output, _repeated_repeatedEnumField_codec);
  2637. repeatedMessageField_.WriteTo(output, _repeated_repeatedMessageField_codec);
  2638. }
  2639. public int CalculateSize() {
  2640. int size = 0;
  2641. if (PrimitiveField != 0) {
  2642. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveField);
  2643. }
  2644. if (StringField.Length != 0) {
  2645. size += 1 + pb::CodedOutputStream.ComputeStringSize(StringField);
  2646. }
  2647. if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
  2648. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumField);
  2649. }
  2650. if (messageField_ != null) {
  2651. size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageField);
  2652. }
  2653. size += repeatedPrimitiveField_.CalculateSize(_repeated_repeatedPrimitiveField_codec);
  2654. size += repeatedStringField_.CalculateSize(_repeated_repeatedStringField_codec);
  2655. size += repeatedEnumField_.CalculateSize(_repeated_repeatedEnumField_codec);
  2656. size += repeatedMessageField_.CalculateSize(_repeated_repeatedMessageField_codec);
  2657. return size;
  2658. }
  2659. public void MergeFrom(TestCamelCaseFieldNames other) {
  2660. if (other == null) {
  2661. return;
  2662. }
  2663. if (other.PrimitiveField != 0) {
  2664. PrimitiveField = other.PrimitiveField;
  2665. }
  2666. if (other.StringField.Length != 0) {
  2667. StringField = other.StringField;
  2668. }
  2669. if (other.EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
  2670. EnumField = other.EnumField;
  2671. }
  2672. if (other.messageField_ != null) {
  2673. if (messageField_ == null) {
  2674. messageField_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
  2675. }
  2676. MessageField.MergeFrom(other.MessageField);
  2677. }
  2678. repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_);
  2679. repeatedStringField_.Add(other.repeatedStringField_);
  2680. repeatedEnumField_.Add(other.repeatedEnumField_);
  2681. repeatedMessageField_.Add(other.repeatedMessageField_);
  2682. }
  2683. public void MergeFrom(pb::CodedInputStream input) {
  2684. uint tag;
  2685. while ((tag = input.ReadTag()) != 0) {
  2686. switch(tag) {
  2687. default:
  2688. input.SkipLastField();
  2689. break;
  2690. case 8: {
  2691. PrimitiveField = input.ReadInt32();
  2692. break;
  2693. }
  2694. case 18: {
  2695. StringField = input.ReadString();
  2696. break;
  2697. }
  2698. case 24: {
  2699. enumField_ = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum();
  2700. break;
  2701. }
  2702. case 34: {
  2703. if (messageField_ == null) {
  2704. messageField_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
  2705. }
  2706. input.ReadMessage(messageField_);
  2707. break;
  2708. }
  2709. case 58:
  2710. case 56: {
  2711. repeatedPrimitiveField_.AddEntriesFrom(input, _repeated_repeatedPrimitiveField_codec);
  2712. break;
  2713. }
  2714. case 66: {
  2715. repeatedStringField_.AddEntriesFrom(input, _repeated_repeatedStringField_codec);
  2716. break;
  2717. }
  2718. case 74:
  2719. case 72: {
  2720. repeatedEnumField_.AddEntriesFrom(input, _repeated_repeatedEnumField_codec);
  2721. break;
  2722. }
  2723. case 82: {
  2724. repeatedMessageField_.AddEntriesFrom(input, _repeated_repeatedMessageField_codec);
  2725. break;
  2726. }
  2727. }
  2728. }
  2729. }
  2730. }
  2731. /// <summary>
  2732. /// We list fields out of order, to ensure that we're using field number and not
  2733. /// field index to determine serialization order.
  2734. /// </summary>
  2735. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2736. public sealed partial class TestFieldOrderings : pb::IMessage<TestFieldOrderings> {
  2737. private static readonly pb::MessageParser<TestFieldOrderings> _parser = new pb::MessageParser<TestFieldOrderings>(() => new TestFieldOrderings());
  2738. public static pb::MessageParser<TestFieldOrderings> Parser { get { return _parser; } }
  2739. public static pbr::MessageDescriptor Descriptor {
  2740. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[11]; }
  2741. }
  2742. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2743. get { return Descriptor; }
  2744. }
  2745. public TestFieldOrderings() {
  2746. OnConstruction();
  2747. }
  2748. partial void OnConstruction();
  2749. public TestFieldOrderings(TestFieldOrderings other) : this() {
  2750. myString_ = other.myString_;
  2751. myInt_ = other.myInt_;
  2752. myFloat_ = other.myFloat_;
  2753. SingleNestedMessage = other.singleNestedMessage_ != null ? other.SingleNestedMessage.Clone() : null;
  2754. }
  2755. public TestFieldOrderings Clone() {
  2756. return new TestFieldOrderings(this);
  2757. }
  2758. /// <summary>Field number for the "my_string" field.</summary>
  2759. public const int MyStringFieldNumber = 11;
  2760. private string myString_ = "";
  2761. public string MyString {
  2762. get { return myString_; }
  2763. set {
  2764. myString_ = pb::Preconditions.CheckNotNull(value, "value");
  2765. }
  2766. }
  2767. /// <summary>Field number for the "my_int" field.</summary>
  2768. public const int MyIntFieldNumber = 1;
  2769. private long myInt_;
  2770. public long MyInt {
  2771. get { return myInt_; }
  2772. set {
  2773. myInt_ = value;
  2774. }
  2775. }
  2776. /// <summary>Field number for the "my_float" field.</summary>
  2777. public const int MyFloatFieldNumber = 101;
  2778. private float myFloat_;
  2779. public float MyFloat {
  2780. get { return myFloat_; }
  2781. set {
  2782. myFloat_ = value;
  2783. }
  2784. }
  2785. /// <summary>Field number for the "single_nested_message" field.</summary>
  2786. public const int SingleNestedMessageFieldNumber = 200;
  2787. private global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage singleNestedMessage_;
  2788. public global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage SingleNestedMessage {
  2789. get { return singleNestedMessage_; }
  2790. set {
  2791. singleNestedMessage_ = value;
  2792. }
  2793. }
  2794. public override bool Equals(object other) {
  2795. return Equals(other as TestFieldOrderings);
  2796. }
  2797. public bool Equals(TestFieldOrderings other) {
  2798. if (ReferenceEquals(other, null)) {
  2799. return false;
  2800. }
  2801. if (ReferenceEquals(other, this)) {
  2802. return true;
  2803. }
  2804. if (MyString != other.MyString) return false;
  2805. if (MyInt != other.MyInt) return false;
  2806. if (MyFloat != other.MyFloat) return false;
  2807. if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return false;
  2808. return true;
  2809. }
  2810. public override int GetHashCode() {
  2811. int hash = 1;
  2812. if (MyString.Length != 0) hash ^= MyString.GetHashCode();
  2813. if (MyInt != 0L) hash ^= MyInt.GetHashCode();
  2814. if (MyFloat != 0F) hash ^= MyFloat.GetHashCode();
  2815. if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode();
  2816. return hash;
  2817. }
  2818. public override string ToString() {
  2819. return pb::JsonFormatter.ToDiagnosticString(this);
  2820. }
  2821. public void WriteTo(pb::CodedOutputStream output) {
  2822. if (MyInt != 0L) {
  2823. output.WriteRawTag(8);
  2824. output.WriteInt64(MyInt);
  2825. }
  2826. if (MyString.Length != 0) {
  2827. output.WriteRawTag(90);
  2828. output.WriteString(MyString);
  2829. }
  2830. if (MyFloat != 0F) {
  2831. output.WriteRawTag(173, 6);
  2832. output.WriteFloat(MyFloat);
  2833. }
  2834. if (singleNestedMessage_ != null) {
  2835. output.WriteRawTag(194, 12);
  2836. output.WriteMessage(SingleNestedMessage);
  2837. }
  2838. }
  2839. public int CalculateSize() {
  2840. int size = 0;
  2841. if (MyString.Length != 0) {
  2842. size += 1 + pb::CodedOutputStream.ComputeStringSize(MyString);
  2843. }
  2844. if (MyInt != 0L) {
  2845. size += 1 + pb::CodedOutputStream.ComputeInt64Size(MyInt);
  2846. }
  2847. if (MyFloat != 0F) {
  2848. size += 2 + 4;
  2849. }
  2850. if (singleNestedMessage_ != null) {
  2851. size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage);
  2852. }
  2853. return size;
  2854. }
  2855. public void MergeFrom(TestFieldOrderings other) {
  2856. if (other == null) {
  2857. return;
  2858. }
  2859. if (other.MyString.Length != 0) {
  2860. MyString = other.MyString;
  2861. }
  2862. if (other.MyInt != 0L) {
  2863. MyInt = other.MyInt;
  2864. }
  2865. if (other.MyFloat != 0F) {
  2866. MyFloat = other.MyFloat;
  2867. }
  2868. if (other.singleNestedMessage_ != null) {
  2869. if (singleNestedMessage_ == null) {
  2870. singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage();
  2871. }
  2872. SingleNestedMessage.MergeFrom(other.SingleNestedMessage);
  2873. }
  2874. }
  2875. public void MergeFrom(pb::CodedInputStream input) {
  2876. uint tag;
  2877. while ((tag = input.ReadTag()) != 0) {
  2878. switch(tag) {
  2879. default:
  2880. input.SkipLastField();
  2881. break;
  2882. case 8: {
  2883. MyInt = input.ReadInt64();
  2884. break;
  2885. }
  2886. case 90: {
  2887. MyString = input.ReadString();
  2888. break;
  2889. }
  2890. case 813: {
  2891. MyFloat = input.ReadFloat();
  2892. break;
  2893. }
  2894. case 1602: {
  2895. if (singleNestedMessage_ == null) {
  2896. singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage();
  2897. }
  2898. input.ReadMessage(singleNestedMessage_);
  2899. break;
  2900. }
  2901. }
  2902. }
  2903. }
  2904. #region Nested types
  2905. /// <summary>Container for nested types declared in the TestFieldOrderings message type.</summary>
  2906. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2907. public static partial class Types {
  2908. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2909. public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
  2910. private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
  2911. public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
  2912. public static pbr::MessageDescriptor Descriptor {
  2913. get { return global::Google.Protobuf.TestProtos.TestFieldOrderings.Descriptor.NestedTypes[0]; }
  2914. }
  2915. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2916. get { return Descriptor; }
  2917. }
  2918. public NestedMessage() {
  2919. OnConstruction();
  2920. }
  2921. partial void OnConstruction();
  2922. public NestedMessage(NestedMessage other) : this() {
  2923. oo_ = other.oo_;
  2924. bb_ = other.bb_;
  2925. }
  2926. public NestedMessage Clone() {
  2927. return new NestedMessage(this);
  2928. }
  2929. /// <summary>Field number for the "oo" field.</summary>
  2930. public const int OoFieldNumber = 2;
  2931. private long oo_;
  2932. public long Oo {
  2933. get { return oo_; }
  2934. set {
  2935. oo_ = value;
  2936. }
  2937. }
  2938. /// <summary>Field number for the "bb" field.</summary>
  2939. public const int BbFieldNumber = 1;
  2940. private int bb_;
  2941. /// <summary>
  2942. /// The field name "b" fails to compile in proto1 because it conflicts with
  2943. /// a local variable named "b" in one of the generated methods. Doh.
  2944. /// This file needs to compile in proto1 to test backwards-compatibility.
  2945. /// </summary>
  2946. public int Bb {
  2947. get { return bb_; }
  2948. set {
  2949. bb_ = value;
  2950. }
  2951. }
  2952. public override bool Equals(object other) {
  2953. return Equals(other as NestedMessage);
  2954. }
  2955. public bool Equals(NestedMessage other) {
  2956. if (ReferenceEquals(other, null)) {
  2957. return false;
  2958. }
  2959. if (ReferenceEquals(other, this)) {
  2960. return true;
  2961. }
  2962. if (Oo != other.Oo) return false;
  2963. if (Bb != other.Bb) return false;
  2964. return true;
  2965. }
  2966. public override int GetHashCode() {
  2967. int hash = 1;
  2968. if (Oo != 0L) hash ^= Oo.GetHashCode();
  2969. if (Bb != 0) hash ^= Bb.GetHashCode();
  2970. return hash;
  2971. }
  2972. public override string ToString() {
  2973. return pb::JsonFormatter.ToDiagnosticString(this);
  2974. }
  2975. public void WriteTo(pb::CodedOutputStream output) {
  2976. if (Bb != 0) {
  2977. output.WriteRawTag(8);
  2978. output.WriteInt32(Bb);
  2979. }
  2980. if (Oo != 0L) {
  2981. output.WriteRawTag(16);
  2982. output.WriteInt64(Oo);
  2983. }
  2984. }
  2985. public int CalculateSize() {
  2986. int size = 0;
  2987. if (Oo != 0L) {
  2988. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Oo);
  2989. }
  2990. if (Bb != 0) {
  2991. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb);
  2992. }
  2993. return size;
  2994. }
  2995. public void MergeFrom(NestedMessage other) {
  2996. if (other == null) {
  2997. return;
  2998. }
  2999. if (other.Oo != 0L) {
  3000. Oo = other.Oo;
  3001. }
  3002. if (other.Bb != 0) {
  3003. Bb = other.Bb;
  3004. }
  3005. }
  3006. public void MergeFrom(pb::CodedInputStream input) {
  3007. uint tag;
  3008. while ((tag = input.ReadTag()) != 0) {
  3009. switch(tag) {
  3010. default:
  3011. input.SkipLastField();
  3012. break;
  3013. case 8: {
  3014. Bb = input.ReadInt32();
  3015. break;
  3016. }
  3017. case 16: {
  3018. Oo = input.ReadInt64();
  3019. break;
  3020. }
  3021. }
  3022. }
  3023. }
  3024. }
  3025. }
  3026. #endregion
  3027. }
  3028. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3029. public sealed partial class SparseEnumMessage : pb::IMessage<SparseEnumMessage> {
  3030. private static readonly pb::MessageParser<SparseEnumMessage> _parser = new pb::MessageParser<SparseEnumMessage>(() => new SparseEnumMessage());
  3031. public static pb::MessageParser<SparseEnumMessage> Parser { get { return _parser; } }
  3032. public static pbr::MessageDescriptor Descriptor {
  3033. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[12]; }
  3034. }
  3035. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3036. get { return Descriptor; }
  3037. }
  3038. public SparseEnumMessage() {
  3039. OnConstruction();
  3040. }
  3041. partial void OnConstruction();
  3042. public SparseEnumMessage(SparseEnumMessage other) : this() {
  3043. sparseEnum_ = other.sparseEnum_;
  3044. }
  3045. public SparseEnumMessage Clone() {
  3046. return new SparseEnumMessage(this);
  3047. }
  3048. /// <summary>Field number for the "sparse_enum" field.</summary>
  3049. public const int SparseEnumFieldNumber = 1;
  3050. private global::Google.Protobuf.TestProtos.TestSparseEnum sparseEnum_ = global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED;
  3051. public global::Google.Protobuf.TestProtos.TestSparseEnum SparseEnum {
  3052. get { return sparseEnum_; }
  3053. set {
  3054. sparseEnum_ = value;
  3055. }
  3056. }
  3057. public override bool Equals(object other) {
  3058. return Equals(other as SparseEnumMessage);
  3059. }
  3060. public bool Equals(SparseEnumMessage other) {
  3061. if (ReferenceEquals(other, null)) {
  3062. return false;
  3063. }
  3064. if (ReferenceEquals(other, this)) {
  3065. return true;
  3066. }
  3067. if (SparseEnum != other.SparseEnum) return false;
  3068. return true;
  3069. }
  3070. public override int GetHashCode() {
  3071. int hash = 1;
  3072. if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) hash ^= SparseEnum.GetHashCode();
  3073. return hash;
  3074. }
  3075. public override string ToString() {
  3076. return pb::JsonFormatter.ToDiagnosticString(this);
  3077. }
  3078. public void WriteTo(pb::CodedOutputStream output) {
  3079. if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) {
  3080. output.WriteRawTag(8);
  3081. output.WriteEnum((int) SparseEnum);
  3082. }
  3083. }
  3084. public int CalculateSize() {
  3085. int size = 0;
  3086. if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) {
  3087. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SparseEnum);
  3088. }
  3089. return size;
  3090. }
  3091. public void MergeFrom(SparseEnumMessage other) {
  3092. if (other == null) {
  3093. return;
  3094. }
  3095. if (other.SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) {
  3096. SparseEnum = other.SparseEnum;
  3097. }
  3098. }
  3099. public void MergeFrom(pb::CodedInputStream input) {
  3100. uint tag;
  3101. while ((tag = input.ReadTag()) != 0) {
  3102. switch(tag) {
  3103. default:
  3104. input.SkipLastField();
  3105. break;
  3106. case 8: {
  3107. sparseEnum_ = (global::Google.Protobuf.TestProtos.TestSparseEnum) input.ReadEnum();
  3108. break;
  3109. }
  3110. }
  3111. }
  3112. }
  3113. }
  3114. /// <summary>
  3115. /// Test String and Bytes: string is for valid UTF-8 strings
  3116. /// </summary>
  3117. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3118. public sealed partial class OneString : pb::IMessage<OneString> {
  3119. private static readonly pb::MessageParser<OneString> _parser = new pb::MessageParser<OneString>(() => new OneString());
  3120. public static pb::MessageParser<OneString> Parser { get { return _parser; } }
  3121. public static pbr::MessageDescriptor Descriptor {
  3122. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[13]; }
  3123. }
  3124. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3125. get { return Descriptor; }
  3126. }
  3127. public OneString() {
  3128. OnConstruction();
  3129. }
  3130. partial void OnConstruction();
  3131. public OneString(OneString other) : this() {
  3132. data_ = other.data_;
  3133. }
  3134. public OneString Clone() {
  3135. return new OneString(this);
  3136. }
  3137. /// <summary>Field number for the "data" field.</summary>
  3138. public const int DataFieldNumber = 1;
  3139. private string data_ = "";
  3140. public string Data {
  3141. get { return data_; }
  3142. set {
  3143. data_ = pb::Preconditions.CheckNotNull(value, "value");
  3144. }
  3145. }
  3146. public override bool Equals(object other) {
  3147. return Equals(other as OneString);
  3148. }
  3149. public bool Equals(OneString other) {
  3150. if (ReferenceEquals(other, null)) {
  3151. return false;
  3152. }
  3153. if (ReferenceEquals(other, this)) {
  3154. return true;
  3155. }
  3156. if (Data != other.Data) return false;
  3157. return true;
  3158. }
  3159. public override int GetHashCode() {
  3160. int hash = 1;
  3161. if (Data.Length != 0) hash ^= Data.GetHashCode();
  3162. return hash;
  3163. }
  3164. public override string ToString() {
  3165. return pb::JsonFormatter.ToDiagnosticString(this);
  3166. }
  3167. public void WriteTo(pb::CodedOutputStream output) {
  3168. if (Data.Length != 0) {
  3169. output.WriteRawTag(10);
  3170. output.WriteString(Data);
  3171. }
  3172. }
  3173. public int CalculateSize() {
  3174. int size = 0;
  3175. if (Data.Length != 0) {
  3176. size += 1 + pb::CodedOutputStream.ComputeStringSize(Data);
  3177. }
  3178. return size;
  3179. }
  3180. public void MergeFrom(OneString other) {
  3181. if (other == null) {
  3182. return;
  3183. }
  3184. if (other.Data.Length != 0) {
  3185. Data = other.Data;
  3186. }
  3187. }
  3188. public void MergeFrom(pb::CodedInputStream input) {
  3189. uint tag;
  3190. while ((tag = input.ReadTag()) != 0) {
  3191. switch(tag) {
  3192. default:
  3193. input.SkipLastField();
  3194. break;
  3195. case 10: {
  3196. Data = input.ReadString();
  3197. break;
  3198. }
  3199. }
  3200. }
  3201. }
  3202. }
  3203. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3204. public sealed partial class MoreString : pb::IMessage<MoreString> {
  3205. private static readonly pb::MessageParser<MoreString> _parser = new pb::MessageParser<MoreString>(() => new MoreString());
  3206. public static pb::MessageParser<MoreString> Parser { get { return _parser; } }
  3207. public static pbr::MessageDescriptor Descriptor {
  3208. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[14]; }
  3209. }
  3210. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3211. get { return Descriptor; }
  3212. }
  3213. public MoreString() {
  3214. OnConstruction();
  3215. }
  3216. partial void OnConstruction();
  3217. public MoreString(MoreString other) : this() {
  3218. data_ = other.data_.Clone();
  3219. }
  3220. public MoreString Clone() {
  3221. return new MoreString(this);
  3222. }
  3223. /// <summary>Field number for the "data" field.</summary>
  3224. public const int DataFieldNumber = 1;
  3225. private static readonly pb::FieldCodec<string> _repeated_data_codec
  3226. = pb::FieldCodec.ForString(10);
  3227. private readonly pbc::RepeatedField<string> data_ = new pbc::RepeatedField<string>();
  3228. public pbc::RepeatedField<string> Data {
  3229. get { return data_; }
  3230. }
  3231. public override bool Equals(object other) {
  3232. return Equals(other as MoreString);
  3233. }
  3234. public bool Equals(MoreString other) {
  3235. if (ReferenceEquals(other, null)) {
  3236. return false;
  3237. }
  3238. if (ReferenceEquals(other, this)) {
  3239. return true;
  3240. }
  3241. if(!data_.Equals(other.data_)) return false;
  3242. return true;
  3243. }
  3244. public override int GetHashCode() {
  3245. int hash = 1;
  3246. hash ^= data_.GetHashCode();
  3247. return hash;
  3248. }
  3249. public override string ToString() {
  3250. return pb::JsonFormatter.ToDiagnosticString(this);
  3251. }
  3252. public void WriteTo(pb::CodedOutputStream output) {
  3253. data_.WriteTo(output, _repeated_data_codec);
  3254. }
  3255. public int CalculateSize() {
  3256. int size = 0;
  3257. size += data_.CalculateSize(_repeated_data_codec);
  3258. return size;
  3259. }
  3260. public void MergeFrom(MoreString other) {
  3261. if (other == null) {
  3262. return;
  3263. }
  3264. data_.Add(other.data_);
  3265. }
  3266. public void MergeFrom(pb::CodedInputStream input) {
  3267. uint tag;
  3268. while ((tag = input.ReadTag()) != 0) {
  3269. switch(tag) {
  3270. default:
  3271. input.SkipLastField();
  3272. break;
  3273. case 10: {
  3274. data_.AddEntriesFrom(input, _repeated_data_codec);
  3275. break;
  3276. }
  3277. }
  3278. }
  3279. }
  3280. }
  3281. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3282. public sealed partial class OneBytes : pb::IMessage<OneBytes> {
  3283. private static readonly pb::MessageParser<OneBytes> _parser = new pb::MessageParser<OneBytes>(() => new OneBytes());
  3284. public static pb::MessageParser<OneBytes> Parser { get { return _parser; } }
  3285. public static pbr::MessageDescriptor Descriptor {
  3286. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[15]; }
  3287. }
  3288. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3289. get { return Descriptor; }
  3290. }
  3291. public OneBytes() {
  3292. OnConstruction();
  3293. }
  3294. partial void OnConstruction();
  3295. public OneBytes(OneBytes other) : this() {
  3296. data_ = other.data_;
  3297. }
  3298. public OneBytes Clone() {
  3299. return new OneBytes(this);
  3300. }
  3301. /// <summary>Field number for the "data" field.</summary>
  3302. public const int DataFieldNumber = 1;
  3303. private pb::ByteString data_ = pb::ByteString.Empty;
  3304. public pb::ByteString Data {
  3305. get { return data_; }
  3306. set {
  3307. data_ = pb::Preconditions.CheckNotNull(value, "value");
  3308. }
  3309. }
  3310. public override bool Equals(object other) {
  3311. return Equals(other as OneBytes);
  3312. }
  3313. public bool Equals(OneBytes other) {
  3314. if (ReferenceEquals(other, null)) {
  3315. return false;
  3316. }
  3317. if (ReferenceEquals(other, this)) {
  3318. return true;
  3319. }
  3320. if (Data != other.Data) return false;
  3321. return true;
  3322. }
  3323. public override int GetHashCode() {
  3324. int hash = 1;
  3325. if (Data.Length != 0) hash ^= Data.GetHashCode();
  3326. return hash;
  3327. }
  3328. public override string ToString() {
  3329. return pb::JsonFormatter.ToDiagnosticString(this);
  3330. }
  3331. public void WriteTo(pb::CodedOutputStream output) {
  3332. if (Data.Length != 0) {
  3333. output.WriteRawTag(10);
  3334. output.WriteBytes(Data);
  3335. }
  3336. }
  3337. public int CalculateSize() {
  3338. int size = 0;
  3339. if (Data.Length != 0) {
  3340. size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
  3341. }
  3342. return size;
  3343. }
  3344. public void MergeFrom(OneBytes other) {
  3345. if (other == null) {
  3346. return;
  3347. }
  3348. if (other.Data.Length != 0) {
  3349. Data = other.Data;
  3350. }
  3351. }
  3352. public void MergeFrom(pb::CodedInputStream input) {
  3353. uint tag;
  3354. while ((tag = input.ReadTag()) != 0) {
  3355. switch(tag) {
  3356. default:
  3357. input.SkipLastField();
  3358. break;
  3359. case 10: {
  3360. Data = input.ReadBytes();
  3361. break;
  3362. }
  3363. }
  3364. }
  3365. }
  3366. }
  3367. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3368. public sealed partial class MoreBytes : pb::IMessage<MoreBytes> {
  3369. private static readonly pb::MessageParser<MoreBytes> _parser = new pb::MessageParser<MoreBytes>(() => new MoreBytes());
  3370. public static pb::MessageParser<MoreBytes> Parser { get { return _parser; } }
  3371. public static pbr::MessageDescriptor Descriptor {
  3372. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[16]; }
  3373. }
  3374. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3375. get { return Descriptor; }
  3376. }
  3377. public MoreBytes() {
  3378. OnConstruction();
  3379. }
  3380. partial void OnConstruction();
  3381. public MoreBytes(MoreBytes other) : this() {
  3382. data_ = other.data_;
  3383. }
  3384. public MoreBytes Clone() {
  3385. return new MoreBytes(this);
  3386. }
  3387. /// <summary>Field number for the "data" field.</summary>
  3388. public const int DataFieldNumber = 1;
  3389. private pb::ByteString data_ = pb::ByteString.Empty;
  3390. public pb::ByteString Data {
  3391. get { return data_; }
  3392. set {
  3393. data_ = pb::Preconditions.CheckNotNull(value, "value");
  3394. }
  3395. }
  3396. public override bool Equals(object other) {
  3397. return Equals(other as MoreBytes);
  3398. }
  3399. public bool Equals(MoreBytes other) {
  3400. if (ReferenceEquals(other, null)) {
  3401. return false;
  3402. }
  3403. if (ReferenceEquals(other, this)) {
  3404. return true;
  3405. }
  3406. if (Data != other.Data) return false;
  3407. return true;
  3408. }
  3409. public override int GetHashCode() {
  3410. int hash = 1;
  3411. if (Data.Length != 0) hash ^= Data.GetHashCode();
  3412. return hash;
  3413. }
  3414. public override string ToString() {
  3415. return pb::JsonFormatter.ToDiagnosticString(this);
  3416. }
  3417. public void WriteTo(pb::CodedOutputStream output) {
  3418. if (Data.Length != 0) {
  3419. output.WriteRawTag(10);
  3420. output.WriteBytes(Data);
  3421. }
  3422. }
  3423. public int CalculateSize() {
  3424. int size = 0;
  3425. if (Data.Length != 0) {
  3426. size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
  3427. }
  3428. return size;
  3429. }
  3430. public void MergeFrom(MoreBytes other) {
  3431. if (other == null) {
  3432. return;
  3433. }
  3434. if (other.Data.Length != 0) {
  3435. Data = other.Data;
  3436. }
  3437. }
  3438. public void MergeFrom(pb::CodedInputStream input) {
  3439. uint tag;
  3440. while ((tag = input.ReadTag()) != 0) {
  3441. switch(tag) {
  3442. default:
  3443. input.SkipLastField();
  3444. break;
  3445. case 10: {
  3446. Data = input.ReadBytes();
  3447. break;
  3448. }
  3449. }
  3450. }
  3451. }
  3452. }
  3453. /// <summary>
  3454. /// Test int32, uint32, int64, uint64, and bool are all compatible
  3455. /// </summary>
  3456. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3457. public sealed partial class Int32Message : pb::IMessage<Int32Message> {
  3458. private static readonly pb::MessageParser<Int32Message> _parser = new pb::MessageParser<Int32Message>(() => new Int32Message());
  3459. public static pb::MessageParser<Int32Message> Parser { get { return _parser; } }
  3460. public static pbr::MessageDescriptor Descriptor {
  3461. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[17]; }
  3462. }
  3463. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3464. get { return Descriptor; }
  3465. }
  3466. public Int32Message() {
  3467. OnConstruction();
  3468. }
  3469. partial void OnConstruction();
  3470. public Int32Message(Int32Message other) : this() {
  3471. data_ = other.data_;
  3472. }
  3473. public Int32Message Clone() {
  3474. return new Int32Message(this);
  3475. }
  3476. /// <summary>Field number for the "data" field.</summary>
  3477. public const int DataFieldNumber = 1;
  3478. private int data_;
  3479. public int Data {
  3480. get { return data_; }
  3481. set {
  3482. data_ = value;
  3483. }
  3484. }
  3485. public override bool Equals(object other) {
  3486. return Equals(other as Int32Message);
  3487. }
  3488. public bool Equals(Int32Message other) {
  3489. if (ReferenceEquals(other, null)) {
  3490. return false;
  3491. }
  3492. if (ReferenceEquals(other, this)) {
  3493. return true;
  3494. }
  3495. if (Data != other.Data) return false;
  3496. return true;
  3497. }
  3498. public override int GetHashCode() {
  3499. int hash = 1;
  3500. if (Data != 0) hash ^= Data.GetHashCode();
  3501. return hash;
  3502. }
  3503. public override string ToString() {
  3504. return pb::JsonFormatter.ToDiagnosticString(this);
  3505. }
  3506. public void WriteTo(pb::CodedOutputStream output) {
  3507. if (Data != 0) {
  3508. output.WriteRawTag(8);
  3509. output.WriteInt32(Data);
  3510. }
  3511. }
  3512. public int CalculateSize() {
  3513. int size = 0;
  3514. if (Data != 0) {
  3515. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Data);
  3516. }
  3517. return size;
  3518. }
  3519. public void MergeFrom(Int32Message other) {
  3520. if (other == null) {
  3521. return;
  3522. }
  3523. if (other.Data != 0) {
  3524. Data = other.Data;
  3525. }
  3526. }
  3527. public void MergeFrom(pb::CodedInputStream input) {
  3528. uint tag;
  3529. while ((tag = input.ReadTag()) != 0) {
  3530. switch(tag) {
  3531. default:
  3532. input.SkipLastField();
  3533. break;
  3534. case 8: {
  3535. Data = input.ReadInt32();
  3536. break;
  3537. }
  3538. }
  3539. }
  3540. }
  3541. }
  3542. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3543. public sealed partial class Uint32Message : pb::IMessage<Uint32Message> {
  3544. private static readonly pb::MessageParser<Uint32Message> _parser = new pb::MessageParser<Uint32Message>(() => new Uint32Message());
  3545. public static pb::MessageParser<Uint32Message> Parser { get { return _parser; } }
  3546. public static pbr::MessageDescriptor Descriptor {
  3547. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[18]; }
  3548. }
  3549. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3550. get { return Descriptor; }
  3551. }
  3552. public Uint32Message() {
  3553. OnConstruction();
  3554. }
  3555. partial void OnConstruction();
  3556. public Uint32Message(Uint32Message other) : this() {
  3557. data_ = other.data_;
  3558. }
  3559. public Uint32Message Clone() {
  3560. return new Uint32Message(this);
  3561. }
  3562. /// <summary>Field number for the "data" field.</summary>
  3563. public const int DataFieldNumber = 1;
  3564. private uint data_;
  3565. public uint Data {
  3566. get { return data_; }
  3567. set {
  3568. data_ = value;
  3569. }
  3570. }
  3571. public override bool Equals(object other) {
  3572. return Equals(other as Uint32Message);
  3573. }
  3574. public bool Equals(Uint32Message other) {
  3575. if (ReferenceEquals(other, null)) {
  3576. return false;
  3577. }
  3578. if (ReferenceEquals(other, this)) {
  3579. return true;
  3580. }
  3581. if (Data != other.Data) return false;
  3582. return true;
  3583. }
  3584. public override int GetHashCode() {
  3585. int hash = 1;
  3586. if (Data != 0) hash ^= Data.GetHashCode();
  3587. return hash;
  3588. }
  3589. public override string ToString() {
  3590. return pb::JsonFormatter.ToDiagnosticString(this);
  3591. }
  3592. public void WriteTo(pb::CodedOutputStream output) {
  3593. if (Data != 0) {
  3594. output.WriteRawTag(8);
  3595. output.WriteUInt32(Data);
  3596. }
  3597. }
  3598. public int CalculateSize() {
  3599. int size = 0;
  3600. if (Data != 0) {
  3601. size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Data);
  3602. }
  3603. return size;
  3604. }
  3605. public void MergeFrom(Uint32Message other) {
  3606. if (other == null) {
  3607. return;
  3608. }
  3609. if (other.Data != 0) {
  3610. Data = other.Data;
  3611. }
  3612. }
  3613. public void MergeFrom(pb::CodedInputStream input) {
  3614. uint tag;
  3615. while ((tag = input.ReadTag()) != 0) {
  3616. switch(tag) {
  3617. default:
  3618. input.SkipLastField();
  3619. break;
  3620. case 8: {
  3621. Data = input.ReadUInt32();
  3622. break;
  3623. }
  3624. }
  3625. }
  3626. }
  3627. }
  3628. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3629. public sealed partial class Int64Message : pb::IMessage<Int64Message> {
  3630. private static readonly pb::MessageParser<Int64Message> _parser = new pb::MessageParser<Int64Message>(() => new Int64Message());
  3631. public static pb::MessageParser<Int64Message> Parser { get { return _parser; } }
  3632. public static pbr::MessageDescriptor Descriptor {
  3633. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[19]; }
  3634. }
  3635. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3636. get { return Descriptor; }
  3637. }
  3638. public Int64Message() {
  3639. OnConstruction();
  3640. }
  3641. partial void OnConstruction();
  3642. public Int64Message(Int64Message other) : this() {
  3643. data_ = other.data_;
  3644. }
  3645. public Int64Message Clone() {
  3646. return new Int64Message(this);
  3647. }
  3648. /// <summary>Field number for the "data" field.</summary>
  3649. public const int DataFieldNumber = 1;
  3650. private long data_;
  3651. public long Data {
  3652. get { return data_; }
  3653. set {
  3654. data_ = value;
  3655. }
  3656. }
  3657. public override bool Equals(object other) {
  3658. return Equals(other as Int64Message);
  3659. }
  3660. public bool Equals(Int64Message other) {
  3661. if (ReferenceEquals(other, null)) {
  3662. return false;
  3663. }
  3664. if (ReferenceEquals(other, this)) {
  3665. return true;
  3666. }
  3667. if (Data != other.Data) return false;
  3668. return true;
  3669. }
  3670. public override int GetHashCode() {
  3671. int hash = 1;
  3672. if (Data != 0L) hash ^= Data.GetHashCode();
  3673. return hash;
  3674. }
  3675. public override string ToString() {
  3676. return pb::JsonFormatter.ToDiagnosticString(this);
  3677. }
  3678. public void WriteTo(pb::CodedOutputStream output) {
  3679. if (Data != 0L) {
  3680. output.WriteRawTag(8);
  3681. output.WriteInt64(Data);
  3682. }
  3683. }
  3684. public int CalculateSize() {
  3685. int size = 0;
  3686. if (Data != 0L) {
  3687. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Data);
  3688. }
  3689. return size;
  3690. }
  3691. public void MergeFrom(Int64Message other) {
  3692. if (other == null) {
  3693. return;
  3694. }
  3695. if (other.Data != 0L) {
  3696. Data = other.Data;
  3697. }
  3698. }
  3699. public void MergeFrom(pb::CodedInputStream input) {
  3700. uint tag;
  3701. while ((tag = input.ReadTag()) != 0) {
  3702. switch(tag) {
  3703. default:
  3704. input.SkipLastField();
  3705. break;
  3706. case 8: {
  3707. Data = input.ReadInt64();
  3708. break;
  3709. }
  3710. }
  3711. }
  3712. }
  3713. }
  3714. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3715. public sealed partial class Uint64Message : pb::IMessage<Uint64Message> {
  3716. private static readonly pb::MessageParser<Uint64Message> _parser = new pb::MessageParser<Uint64Message>(() => new Uint64Message());
  3717. public static pb::MessageParser<Uint64Message> Parser { get { return _parser; } }
  3718. public static pbr::MessageDescriptor Descriptor {
  3719. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[20]; }
  3720. }
  3721. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3722. get { return Descriptor; }
  3723. }
  3724. public Uint64Message() {
  3725. OnConstruction();
  3726. }
  3727. partial void OnConstruction();
  3728. public Uint64Message(Uint64Message other) : this() {
  3729. data_ = other.data_;
  3730. }
  3731. public Uint64Message Clone() {
  3732. return new Uint64Message(this);
  3733. }
  3734. /// <summary>Field number for the "data" field.</summary>
  3735. public const int DataFieldNumber = 1;
  3736. private ulong data_;
  3737. public ulong Data {
  3738. get { return data_; }
  3739. set {
  3740. data_ = value;
  3741. }
  3742. }
  3743. public override bool Equals(object other) {
  3744. return Equals(other as Uint64Message);
  3745. }
  3746. public bool Equals(Uint64Message other) {
  3747. if (ReferenceEquals(other, null)) {
  3748. return false;
  3749. }
  3750. if (ReferenceEquals(other, this)) {
  3751. return true;
  3752. }
  3753. if (Data != other.Data) return false;
  3754. return true;
  3755. }
  3756. public override int GetHashCode() {
  3757. int hash = 1;
  3758. if (Data != 0UL) hash ^= Data.GetHashCode();
  3759. return hash;
  3760. }
  3761. public override string ToString() {
  3762. return pb::JsonFormatter.ToDiagnosticString(this);
  3763. }
  3764. public void WriteTo(pb::CodedOutputStream output) {
  3765. if (Data != 0UL) {
  3766. output.WriteRawTag(8);
  3767. output.WriteUInt64(Data);
  3768. }
  3769. }
  3770. public int CalculateSize() {
  3771. int size = 0;
  3772. if (Data != 0UL) {
  3773. size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Data);
  3774. }
  3775. return size;
  3776. }
  3777. public void MergeFrom(Uint64Message other) {
  3778. if (other == null) {
  3779. return;
  3780. }
  3781. if (other.Data != 0UL) {
  3782. Data = other.Data;
  3783. }
  3784. }
  3785. public void MergeFrom(pb::CodedInputStream input) {
  3786. uint tag;
  3787. while ((tag = input.ReadTag()) != 0) {
  3788. switch(tag) {
  3789. default:
  3790. input.SkipLastField();
  3791. break;
  3792. case 8: {
  3793. Data = input.ReadUInt64();
  3794. break;
  3795. }
  3796. }
  3797. }
  3798. }
  3799. }
  3800. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3801. public sealed partial class BoolMessage : pb::IMessage<BoolMessage> {
  3802. private static readonly pb::MessageParser<BoolMessage> _parser = new pb::MessageParser<BoolMessage>(() => new BoolMessage());
  3803. public static pb::MessageParser<BoolMessage> Parser { get { return _parser; } }
  3804. public static pbr::MessageDescriptor Descriptor {
  3805. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[21]; }
  3806. }
  3807. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3808. get { return Descriptor; }
  3809. }
  3810. public BoolMessage() {
  3811. OnConstruction();
  3812. }
  3813. partial void OnConstruction();
  3814. public BoolMessage(BoolMessage other) : this() {
  3815. data_ = other.data_;
  3816. }
  3817. public BoolMessage Clone() {
  3818. return new BoolMessage(this);
  3819. }
  3820. /// <summary>Field number for the "data" field.</summary>
  3821. public const int DataFieldNumber = 1;
  3822. private bool data_;
  3823. public bool Data {
  3824. get { return data_; }
  3825. set {
  3826. data_ = value;
  3827. }
  3828. }
  3829. public override bool Equals(object other) {
  3830. return Equals(other as BoolMessage);
  3831. }
  3832. public bool Equals(BoolMessage other) {
  3833. if (ReferenceEquals(other, null)) {
  3834. return false;
  3835. }
  3836. if (ReferenceEquals(other, this)) {
  3837. return true;
  3838. }
  3839. if (Data != other.Data) return false;
  3840. return true;
  3841. }
  3842. public override int GetHashCode() {
  3843. int hash = 1;
  3844. if (Data != false) hash ^= Data.GetHashCode();
  3845. return hash;
  3846. }
  3847. public override string ToString() {
  3848. return pb::JsonFormatter.ToDiagnosticString(this);
  3849. }
  3850. public void WriteTo(pb::CodedOutputStream output) {
  3851. if (Data != false) {
  3852. output.WriteRawTag(8);
  3853. output.WriteBool(Data);
  3854. }
  3855. }
  3856. public int CalculateSize() {
  3857. int size = 0;
  3858. if (Data != false) {
  3859. size += 1 + 1;
  3860. }
  3861. return size;
  3862. }
  3863. public void MergeFrom(BoolMessage other) {
  3864. if (other == null) {
  3865. return;
  3866. }
  3867. if (other.Data != false) {
  3868. Data = other.Data;
  3869. }
  3870. }
  3871. public void MergeFrom(pb::CodedInputStream input) {
  3872. uint tag;
  3873. while ((tag = input.ReadTag()) != 0) {
  3874. switch(tag) {
  3875. default:
  3876. input.SkipLastField();
  3877. break;
  3878. case 8: {
  3879. Data = input.ReadBool();
  3880. break;
  3881. }
  3882. }
  3883. }
  3884. }
  3885. }
  3886. /// <summary>
  3887. /// Test oneofs.
  3888. /// </summary>
  3889. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3890. public sealed partial class TestOneof : pb::IMessage<TestOneof> {
  3891. private static readonly pb::MessageParser<TestOneof> _parser = new pb::MessageParser<TestOneof>(() => new TestOneof());
  3892. public static pb::MessageParser<TestOneof> Parser { get { return _parser; } }
  3893. public static pbr::MessageDescriptor Descriptor {
  3894. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[22]; }
  3895. }
  3896. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3897. get { return Descriptor; }
  3898. }
  3899. public TestOneof() {
  3900. OnConstruction();
  3901. }
  3902. partial void OnConstruction();
  3903. public TestOneof(TestOneof other) : this() {
  3904. switch (other.FooCase) {
  3905. case FooOneofCase.FooInt:
  3906. FooInt = other.FooInt;
  3907. break;
  3908. case FooOneofCase.FooString:
  3909. FooString = other.FooString;
  3910. break;
  3911. case FooOneofCase.FooMessage:
  3912. FooMessage = other.FooMessage.Clone();
  3913. break;
  3914. }
  3915. }
  3916. public TestOneof Clone() {
  3917. return new TestOneof(this);
  3918. }
  3919. /// <summary>Field number for the "foo_int" field.</summary>
  3920. public const int FooIntFieldNumber = 1;
  3921. public int FooInt {
  3922. get { return fooCase_ == FooOneofCase.FooInt ? (int) foo_ : 0; }
  3923. set {
  3924. foo_ = value;
  3925. fooCase_ = FooOneofCase.FooInt;
  3926. }
  3927. }
  3928. /// <summary>Field number for the "foo_string" field.</summary>
  3929. public const int FooStringFieldNumber = 2;
  3930. public string FooString {
  3931. get { return fooCase_ == FooOneofCase.FooString ? (string) foo_ : ""; }
  3932. set {
  3933. foo_ = pb::Preconditions.CheckNotNull(value, "value");
  3934. fooCase_ = FooOneofCase.FooString;
  3935. }
  3936. }
  3937. /// <summary>Field number for the "foo_message" field.</summary>
  3938. public const int FooMessageFieldNumber = 3;
  3939. public global::Google.Protobuf.TestProtos.TestAllTypes FooMessage {
  3940. get { return fooCase_ == FooOneofCase.FooMessage ? (global::Google.Protobuf.TestProtos.TestAllTypes) foo_ : null; }
  3941. set {
  3942. foo_ = value;
  3943. fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooMessage;
  3944. }
  3945. }
  3946. private object foo_;
  3947. /// <summary>Enum of possible cases for the "foo" oneof.</summary>
  3948. public enum FooOneofCase {
  3949. None = 0,
  3950. FooInt = 1,
  3951. FooString = 2,
  3952. FooMessage = 3,
  3953. }
  3954. private FooOneofCase fooCase_ = FooOneofCase.None;
  3955. public FooOneofCase FooCase {
  3956. get { return fooCase_; }
  3957. }
  3958. public void ClearFoo() {
  3959. fooCase_ = FooOneofCase.None;
  3960. foo_ = null;
  3961. }
  3962. public override bool Equals(object other) {
  3963. return Equals(other as TestOneof);
  3964. }
  3965. public bool Equals(TestOneof other) {
  3966. if (ReferenceEquals(other, null)) {
  3967. return false;
  3968. }
  3969. if (ReferenceEquals(other, this)) {
  3970. return true;
  3971. }
  3972. if (FooInt != other.FooInt) return false;
  3973. if (FooString != other.FooString) return false;
  3974. if (!object.Equals(FooMessage, other.FooMessage)) return false;
  3975. if (FooCase != other.FooCase) return false;
  3976. return true;
  3977. }
  3978. public override int GetHashCode() {
  3979. int hash = 1;
  3980. if (fooCase_ == FooOneofCase.FooInt) hash ^= FooInt.GetHashCode();
  3981. if (fooCase_ == FooOneofCase.FooString) hash ^= FooString.GetHashCode();
  3982. if (fooCase_ == FooOneofCase.FooMessage) hash ^= FooMessage.GetHashCode();
  3983. hash ^= (int) fooCase_;
  3984. return hash;
  3985. }
  3986. public override string ToString() {
  3987. return pb::JsonFormatter.ToDiagnosticString(this);
  3988. }
  3989. public void WriteTo(pb::CodedOutputStream output) {
  3990. if (fooCase_ == FooOneofCase.FooInt) {
  3991. output.WriteRawTag(8);
  3992. output.WriteInt32(FooInt);
  3993. }
  3994. if (fooCase_ == FooOneofCase.FooString) {
  3995. output.WriteRawTag(18);
  3996. output.WriteString(FooString);
  3997. }
  3998. if (fooCase_ == FooOneofCase.FooMessage) {
  3999. output.WriteRawTag(26);
  4000. output.WriteMessage(FooMessage);
  4001. }
  4002. }
  4003. public int CalculateSize() {
  4004. int size = 0;
  4005. if (fooCase_ == FooOneofCase.FooInt) {
  4006. size += 1 + pb::CodedOutputStream.ComputeInt32Size(FooInt);
  4007. }
  4008. if (fooCase_ == FooOneofCase.FooString) {
  4009. size += 1 + pb::CodedOutputStream.ComputeStringSize(FooString);
  4010. }
  4011. if (fooCase_ == FooOneofCase.FooMessage) {
  4012. size += 1 + pb::CodedOutputStream.ComputeMessageSize(FooMessage);
  4013. }
  4014. return size;
  4015. }
  4016. public void MergeFrom(TestOneof other) {
  4017. if (other == null) {
  4018. return;
  4019. }
  4020. switch (other.FooCase) {
  4021. case FooOneofCase.FooInt:
  4022. FooInt = other.FooInt;
  4023. break;
  4024. case FooOneofCase.FooString:
  4025. FooString = other.FooString;
  4026. break;
  4027. case FooOneofCase.FooMessage:
  4028. FooMessage = other.FooMessage;
  4029. break;
  4030. }
  4031. }
  4032. public void MergeFrom(pb::CodedInputStream input) {
  4033. uint tag;
  4034. while ((tag = input.ReadTag()) != 0) {
  4035. switch(tag) {
  4036. default:
  4037. input.SkipLastField();
  4038. break;
  4039. case 8: {
  4040. FooInt = input.ReadInt32();
  4041. break;
  4042. }
  4043. case 18: {
  4044. FooString = input.ReadString();
  4045. break;
  4046. }
  4047. case 26: {
  4048. global::Google.Protobuf.TestProtos.TestAllTypes subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes();
  4049. if (fooCase_ == FooOneofCase.FooMessage) {
  4050. subBuilder.MergeFrom(FooMessage);
  4051. }
  4052. input.ReadMessage(subBuilder);
  4053. FooMessage = subBuilder;
  4054. break;
  4055. }
  4056. }
  4057. }
  4058. }
  4059. }
  4060. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4061. public sealed partial class TestPackedTypes : pb::IMessage<TestPackedTypes> {
  4062. private static readonly pb::MessageParser<TestPackedTypes> _parser = new pb::MessageParser<TestPackedTypes>(() => new TestPackedTypes());
  4063. public static pb::MessageParser<TestPackedTypes> Parser { get { return _parser; } }
  4064. public static pbr::MessageDescriptor Descriptor {
  4065. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[23]; }
  4066. }
  4067. pbr::MessageDescriptor pb::IMessage.Descriptor {
  4068. get { return Descriptor; }
  4069. }
  4070. public TestPackedTypes() {
  4071. OnConstruction();
  4072. }
  4073. partial void OnConstruction();
  4074. public TestPackedTypes(TestPackedTypes other) : this() {
  4075. packedInt32_ = other.packedInt32_.Clone();
  4076. packedInt64_ = other.packedInt64_.Clone();
  4077. packedUint32_ = other.packedUint32_.Clone();
  4078. packedUint64_ = other.packedUint64_.Clone();
  4079. packedSint32_ = other.packedSint32_.Clone();
  4080. packedSint64_ = other.packedSint64_.Clone();
  4081. packedFixed32_ = other.packedFixed32_.Clone();
  4082. packedFixed64_ = other.packedFixed64_.Clone();
  4083. packedSfixed32_ = other.packedSfixed32_.Clone();
  4084. packedSfixed64_ = other.packedSfixed64_.Clone();
  4085. packedFloat_ = other.packedFloat_.Clone();
  4086. packedDouble_ = other.packedDouble_.Clone();
  4087. packedBool_ = other.packedBool_.Clone();
  4088. packedEnum_ = other.packedEnum_.Clone();
  4089. }
  4090. public TestPackedTypes Clone() {
  4091. return new TestPackedTypes(this);
  4092. }
  4093. /// <summary>Field number for the "packed_int32" field.</summary>
  4094. public const int PackedInt32FieldNumber = 90;
  4095. private static readonly pb::FieldCodec<int> _repeated_packedInt32_codec
  4096. = pb::FieldCodec.ForInt32(722);
  4097. private readonly pbc::RepeatedField<int> packedInt32_ = new pbc::RepeatedField<int>();
  4098. public pbc::RepeatedField<int> PackedInt32 {
  4099. get { return packedInt32_; }
  4100. }
  4101. /// <summary>Field number for the "packed_int64" field.</summary>
  4102. public const int PackedInt64FieldNumber = 91;
  4103. private static readonly pb::FieldCodec<long> _repeated_packedInt64_codec
  4104. = pb::FieldCodec.ForInt64(730);
  4105. private readonly pbc::RepeatedField<long> packedInt64_ = new pbc::RepeatedField<long>();
  4106. public pbc::RepeatedField<long> PackedInt64 {
  4107. get { return packedInt64_; }
  4108. }
  4109. /// <summary>Field number for the "packed_uint32" field.</summary>
  4110. public const int PackedUint32FieldNumber = 92;
  4111. private static readonly pb::FieldCodec<uint> _repeated_packedUint32_codec
  4112. = pb::FieldCodec.ForUInt32(738);
  4113. private readonly pbc::RepeatedField<uint> packedUint32_ = new pbc::RepeatedField<uint>();
  4114. public pbc::RepeatedField<uint> PackedUint32 {
  4115. get { return packedUint32_; }
  4116. }
  4117. /// <summary>Field number for the "packed_uint64" field.</summary>
  4118. public const int PackedUint64FieldNumber = 93;
  4119. private static readonly pb::FieldCodec<ulong> _repeated_packedUint64_codec
  4120. = pb::FieldCodec.ForUInt64(746);
  4121. private readonly pbc::RepeatedField<ulong> packedUint64_ = new pbc::RepeatedField<ulong>();
  4122. public pbc::RepeatedField<ulong> PackedUint64 {
  4123. get { return packedUint64_; }
  4124. }
  4125. /// <summary>Field number for the "packed_sint32" field.</summary>
  4126. public const int PackedSint32FieldNumber = 94;
  4127. private static readonly pb::FieldCodec<int> _repeated_packedSint32_codec
  4128. = pb::FieldCodec.ForSInt32(754);
  4129. private readonly pbc::RepeatedField<int> packedSint32_ = new pbc::RepeatedField<int>();
  4130. public pbc::RepeatedField<int> PackedSint32 {
  4131. get { return packedSint32_; }
  4132. }
  4133. /// <summary>Field number for the "packed_sint64" field.</summary>
  4134. public const int PackedSint64FieldNumber = 95;
  4135. private static readonly pb::FieldCodec<long> _repeated_packedSint64_codec
  4136. = pb::FieldCodec.ForSInt64(762);
  4137. private readonly pbc::RepeatedField<long> packedSint64_ = new pbc::RepeatedField<long>();
  4138. public pbc::RepeatedField<long> PackedSint64 {
  4139. get { return packedSint64_; }
  4140. }
  4141. /// <summary>Field number for the "packed_fixed32" field.</summary>
  4142. public const int PackedFixed32FieldNumber = 96;
  4143. private static readonly pb::FieldCodec<uint> _repeated_packedFixed32_codec
  4144. = pb::FieldCodec.ForFixed32(770);
  4145. private readonly pbc::RepeatedField<uint> packedFixed32_ = new pbc::RepeatedField<uint>();
  4146. public pbc::RepeatedField<uint> PackedFixed32 {
  4147. get { return packedFixed32_; }
  4148. }
  4149. /// <summary>Field number for the "packed_fixed64" field.</summary>
  4150. public const int PackedFixed64FieldNumber = 97;
  4151. private static readonly pb::FieldCodec<ulong> _repeated_packedFixed64_codec
  4152. = pb::FieldCodec.ForFixed64(778);
  4153. private readonly pbc::RepeatedField<ulong> packedFixed64_ = new pbc::RepeatedField<ulong>();
  4154. public pbc::RepeatedField<ulong> PackedFixed64 {
  4155. get { return packedFixed64_; }
  4156. }
  4157. /// <summary>Field number for the "packed_sfixed32" field.</summary>
  4158. public const int PackedSfixed32FieldNumber = 98;
  4159. private static readonly pb::FieldCodec<int> _repeated_packedSfixed32_codec
  4160. = pb::FieldCodec.ForSFixed32(786);
  4161. private readonly pbc::RepeatedField<int> packedSfixed32_ = new pbc::RepeatedField<int>();
  4162. public pbc::RepeatedField<int> PackedSfixed32 {
  4163. get { return packedSfixed32_; }
  4164. }
  4165. /// <summary>Field number for the "packed_sfixed64" field.</summary>
  4166. public const int PackedSfixed64FieldNumber = 99;
  4167. private static readonly pb::FieldCodec<long> _repeated_packedSfixed64_codec
  4168. = pb::FieldCodec.ForSFixed64(794);
  4169. private readonly pbc::RepeatedField<long> packedSfixed64_ = new pbc::RepeatedField<long>();
  4170. public pbc::RepeatedField<long> PackedSfixed64 {
  4171. get { return packedSfixed64_; }
  4172. }
  4173. /// <summary>Field number for the "packed_float" field.</summary>
  4174. public const int PackedFloatFieldNumber = 100;
  4175. private static readonly pb::FieldCodec<float> _repeated_packedFloat_codec
  4176. = pb::FieldCodec.ForFloat(802);
  4177. private readonly pbc::RepeatedField<float> packedFloat_ = new pbc::RepeatedField<float>();
  4178. public pbc::RepeatedField<float> PackedFloat {
  4179. get { return packedFloat_; }
  4180. }
  4181. /// <summary>Field number for the "packed_double" field.</summary>
  4182. public const int PackedDoubleFieldNumber = 101;
  4183. private static readonly pb::FieldCodec<double> _repeated_packedDouble_codec
  4184. = pb::FieldCodec.ForDouble(810);
  4185. private readonly pbc::RepeatedField<double> packedDouble_ = new pbc::RepeatedField<double>();
  4186. public pbc::RepeatedField<double> PackedDouble {
  4187. get { return packedDouble_; }
  4188. }
  4189. /// <summary>Field number for the "packed_bool" field.</summary>
  4190. public const int PackedBoolFieldNumber = 102;
  4191. private static readonly pb::FieldCodec<bool> _repeated_packedBool_codec
  4192. = pb::FieldCodec.ForBool(818);
  4193. private readonly pbc::RepeatedField<bool> packedBool_ = new pbc::RepeatedField<bool>();
  4194. public pbc::RepeatedField<bool> PackedBool {
  4195. get { return packedBool_; }
  4196. }
  4197. /// <summary>Field number for the "packed_enum" field.</summary>
  4198. public const int PackedEnumFieldNumber = 103;
  4199. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_packedEnum_codec
  4200. = pb::FieldCodec.ForEnum(826, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
  4201. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> packedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
  4202. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> PackedEnum {
  4203. get { return packedEnum_; }
  4204. }
  4205. public override bool Equals(object other) {
  4206. return Equals(other as TestPackedTypes);
  4207. }
  4208. public bool Equals(TestPackedTypes other) {
  4209. if (ReferenceEquals(other, null)) {
  4210. return false;
  4211. }
  4212. if (ReferenceEquals(other, this)) {
  4213. return true;
  4214. }
  4215. if(!packedInt32_.Equals(other.packedInt32_)) return false;
  4216. if(!packedInt64_.Equals(other.packedInt64_)) return false;
  4217. if(!packedUint32_.Equals(other.packedUint32_)) return false;
  4218. if(!packedUint64_.Equals(other.packedUint64_)) return false;
  4219. if(!packedSint32_.Equals(other.packedSint32_)) return false;
  4220. if(!packedSint64_.Equals(other.packedSint64_)) return false;
  4221. if(!packedFixed32_.Equals(other.packedFixed32_)) return false;
  4222. if(!packedFixed64_.Equals(other.packedFixed64_)) return false;
  4223. if(!packedSfixed32_.Equals(other.packedSfixed32_)) return false;
  4224. if(!packedSfixed64_.Equals(other.packedSfixed64_)) return false;
  4225. if(!packedFloat_.Equals(other.packedFloat_)) return false;
  4226. if(!packedDouble_.Equals(other.packedDouble_)) return false;
  4227. if(!packedBool_.Equals(other.packedBool_)) return false;
  4228. if(!packedEnum_.Equals(other.packedEnum_)) return false;
  4229. return true;
  4230. }
  4231. public override int GetHashCode() {
  4232. int hash = 1;
  4233. hash ^= packedInt32_.GetHashCode();
  4234. hash ^= packedInt64_.GetHashCode();
  4235. hash ^= packedUint32_.GetHashCode();
  4236. hash ^= packedUint64_.GetHashCode();
  4237. hash ^= packedSint32_.GetHashCode();
  4238. hash ^= packedSint64_.GetHashCode();
  4239. hash ^= packedFixed32_.GetHashCode();
  4240. hash ^= packedFixed64_.GetHashCode();
  4241. hash ^= packedSfixed32_.GetHashCode();
  4242. hash ^= packedSfixed64_.GetHashCode();
  4243. hash ^= packedFloat_.GetHashCode();
  4244. hash ^= packedDouble_.GetHashCode();
  4245. hash ^= packedBool_.GetHashCode();
  4246. hash ^= packedEnum_.GetHashCode();
  4247. return hash;
  4248. }
  4249. public override string ToString() {
  4250. return pb::JsonFormatter.ToDiagnosticString(this);
  4251. }
  4252. public void WriteTo(pb::CodedOutputStream output) {
  4253. packedInt32_.WriteTo(output, _repeated_packedInt32_codec);
  4254. packedInt64_.WriteTo(output, _repeated_packedInt64_codec);
  4255. packedUint32_.WriteTo(output, _repeated_packedUint32_codec);
  4256. packedUint64_.WriteTo(output, _repeated_packedUint64_codec);
  4257. packedSint32_.WriteTo(output, _repeated_packedSint32_codec);
  4258. packedSint64_.WriteTo(output, _repeated_packedSint64_codec);
  4259. packedFixed32_.WriteTo(output, _repeated_packedFixed32_codec);
  4260. packedFixed64_.WriteTo(output, _repeated_packedFixed64_codec);
  4261. packedSfixed32_.WriteTo(output, _repeated_packedSfixed32_codec);
  4262. packedSfixed64_.WriteTo(output, _repeated_packedSfixed64_codec);
  4263. packedFloat_.WriteTo(output, _repeated_packedFloat_codec);
  4264. packedDouble_.WriteTo(output, _repeated_packedDouble_codec);
  4265. packedBool_.WriteTo(output, _repeated_packedBool_codec);
  4266. packedEnum_.WriteTo(output, _repeated_packedEnum_codec);
  4267. }
  4268. public int CalculateSize() {
  4269. int size = 0;
  4270. size += packedInt32_.CalculateSize(_repeated_packedInt32_codec);
  4271. size += packedInt64_.CalculateSize(_repeated_packedInt64_codec);
  4272. size += packedUint32_.CalculateSize(_repeated_packedUint32_codec);
  4273. size += packedUint64_.CalculateSize(_repeated_packedUint64_codec);
  4274. size += packedSint32_.CalculateSize(_repeated_packedSint32_codec);
  4275. size += packedSint64_.CalculateSize(_repeated_packedSint64_codec);
  4276. size += packedFixed32_.CalculateSize(_repeated_packedFixed32_codec);
  4277. size += packedFixed64_.CalculateSize(_repeated_packedFixed64_codec);
  4278. size += packedSfixed32_.CalculateSize(_repeated_packedSfixed32_codec);
  4279. size += packedSfixed64_.CalculateSize(_repeated_packedSfixed64_codec);
  4280. size += packedFloat_.CalculateSize(_repeated_packedFloat_codec);
  4281. size += packedDouble_.CalculateSize(_repeated_packedDouble_codec);
  4282. size += packedBool_.CalculateSize(_repeated_packedBool_codec);
  4283. size += packedEnum_.CalculateSize(_repeated_packedEnum_codec);
  4284. return size;
  4285. }
  4286. public void MergeFrom(TestPackedTypes other) {
  4287. if (other == null) {
  4288. return;
  4289. }
  4290. packedInt32_.Add(other.packedInt32_);
  4291. packedInt64_.Add(other.packedInt64_);
  4292. packedUint32_.Add(other.packedUint32_);
  4293. packedUint64_.Add(other.packedUint64_);
  4294. packedSint32_.Add(other.packedSint32_);
  4295. packedSint64_.Add(other.packedSint64_);
  4296. packedFixed32_.Add(other.packedFixed32_);
  4297. packedFixed64_.Add(other.packedFixed64_);
  4298. packedSfixed32_.Add(other.packedSfixed32_);
  4299. packedSfixed64_.Add(other.packedSfixed64_);
  4300. packedFloat_.Add(other.packedFloat_);
  4301. packedDouble_.Add(other.packedDouble_);
  4302. packedBool_.Add(other.packedBool_);
  4303. packedEnum_.Add(other.packedEnum_);
  4304. }
  4305. public void MergeFrom(pb::CodedInputStream input) {
  4306. uint tag;
  4307. while ((tag = input.ReadTag()) != 0) {
  4308. switch(tag) {
  4309. default:
  4310. input.SkipLastField();
  4311. break;
  4312. case 722:
  4313. case 720: {
  4314. packedInt32_.AddEntriesFrom(input, _repeated_packedInt32_codec);
  4315. break;
  4316. }
  4317. case 730:
  4318. case 728: {
  4319. packedInt64_.AddEntriesFrom(input, _repeated_packedInt64_codec);
  4320. break;
  4321. }
  4322. case 738:
  4323. case 736: {
  4324. packedUint32_.AddEntriesFrom(input, _repeated_packedUint32_codec);
  4325. break;
  4326. }
  4327. case 746:
  4328. case 744: {
  4329. packedUint64_.AddEntriesFrom(input, _repeated_packedUint64_codec);
  4330. break;
  4331. }
  4332. case 754:
  4333. case 752: {
  4334. packedSint32_.AddEntriesFrom(input, _repeated_packedSint32_codec);
  4335. break;
  4336. }
  4337. case 762:
  4338. case 760: {
  4339. packedSint64_.AddEntriesFrom(input, _repeated_packedSint64_codec);
  4340. break;
  4341. }
  4342. case 770:
  4343. case 773: {
  4344. packedFixed32_.AddEntriesFrom(input, _repeated_packedFixed32_codec);
  4345. break;
  4346. }
  4347. case 778:
  4348. case 777: {
  4349. packedFixed64_.AddEntriesFrom(input, _repeated_packedFixed64_codec);
  4350. break;
  4351. }
  4352. case 786:
  4353. case 789: {
  4354. packedSfixed32_.AddEntriesFrom(input, _repeated_packedSfixed32_codec);
  4355. break;
  4356. }
  4357. case 794:
  4358. case 793: {
  4359. packedSfixed64_.AddEntriesFrom(input, _repeated_packedSfixed64_codec);
  4360. break;
  4361. }
  4362. case 802:
  4363. case 805: {
  4364. packedFloat_.AddEntriesFrom(input, _repeated_packedFloat_codec);
  4365. break;
  4366. }
  4367. case 810:
  4368. case 809: {
  4369. packedDouble_.AddEntriesFrom(input, _repeated_packedDouble_codec);
  4370. break;
  4371. }
  4372. case 818:
  4373. case 816: {
  4374. packedBool_.AddEntriesFrom(input, _repeated_packedBool_codec);
  4375. break;
  4376. }
  4377. case 826:
  4378. case 824: {
  4379. packedEnum_.AddEntriesFrom(input, _repeated_packedEnum_codec);
  4380. break;
  4381. }
  4382. }
  4383. }
  4384. }
  4385. }
  4386. /// <summary>
  4387. /// A message with the same fields as TestPackedTypes, but without packing. Used
  4388. /// to test packed &lt;-> unpacked wire compatibility.
  4389. /// </summary>
  4390. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4391. public sealed partial class TestUnpackedTypes : pb::IMessage<TestUnpackedTypes> {
  4392. private static readonly pb::MessageParser<TestUnpackedTypes> _parser = new pb::MessageParser<TestUnpackedTypes>(() => new TestUnpackedTypes());
  4393. public static pb::MessageParser<TestUnpackedTypes> Parser { get { return _parser; } }
  4394. public static pbr::MessageDescriptor Descriptor {
  4395. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[24]; }
  4396. }
  4397. pbr::MessageDescriptor pb::IMessage.Descriptor {
  4398. get { return Descriptor; }
  4399. }
  4400. public TestUnpackedTypes() {
  4401. OnConstruction();
  4402. }
  4403. partial void OnConstruction();
  4404. public TestUnpackedTypes(TestUnpackedTypes other) : this() {
  4405. unpackedInt32_ = other.unpackedInt32_.Clone();
  4406. unpackedInt64_ = other.unpackedInt64_.Clone();
  4407. unpackedUint32_ = other.unpackedUint32_.Clone();
  4408. unpackedUint64_ = other.unpackedUint64_.Clone();
  4409. unpackedSint32_ = other.unpackedSint32_.Clone();
  4410. unpackedSint64_ = other.unpackedSint64_.Clone();
  4411. unpackedFixed32_ = other.unpackedFixed32_.Clone();
  4412. unpackedFixed64_ = other.unpackedFixed64_.Clone();
  4413. unpackedSfixed32_ = other.unpackedSfixed32_.Clone();
  4414. unpackedSfixed64_ = other.unpackedSfixed64_.Clone();
  4415. unpackedFloat_ = other.unpackedFloat_.Clone();
  4416. unpackedDouble_ = other.unpackedDouble_.Clone();
  4417. unpackedBool_ = other.unpackedBool_.Clone();
  4418. unpackedEnum_ = other.unpackedEnum_.Clone();
  4419. }
  4420. public TestUnpackedTypes Clone() {
  4421. return new TestUnpackedTypes(this);
  4422. }
  4423. /// <summary>Field number for the "unpacked_int32" field.</summary>
  4424. public const int UnpackedInt32FieldNumber = 90;
  4425. private static readonly pb::FieldCodec<int> _repeated_unpackedInt32_codec
  4426. = pb::FieldCodec.ForInt32(720);
  4427. private readonly pbc::RepeatedField<int> unpackedInt32_ = new pbc::RepeatedField<int>();
  4428. public pbc::RepeatedField<int> UnpackedInt32 {
  4429. get { return unpackedInt32_; }
  4430. }
  4431. /// <summary>Field number for the "unpacked_int64" field.</summary>
  4432. public const int UnpackedInt64FieldNumber = 91;
  4433. private static readonly pb::FieldCodec<long> _repeated_unpackedInt64_codec
  4434. = pb::FieldCodec.ForInt64(728);
  4435. private readonly pbc::RepeatedField<long> unpackedInt64_ = new pbc::RepeatedField<long>();
  4436. public pbc::RepeatedField<long> UnpackedInt64 {
  4437. get { return unpackedInt64_; }
  4438. }
  4439. /// <summary>Field number for the "unpacked_uint32" field.</summary>
  4440. public const int UnpackedUint32FieldNumber = 92;
  4441. private static readonly pb::FieldCodec<uint> _repeated_unpackedUint32_codec
  4442. = pb::FieldCodec.ForUInt32(736);
  4443. private readonly pbc::RepeatedField<uint> unpackedUint32_ = new pbc::RepeatedField<uint>();
  4444. public pbc::RepeatedField<uint> UnpackedUint32 {
  4445. get { return unpackedUint32_; }
  4446. }
  4447. /// <summary>Field number for the "unpacked_uint64" field.</summary>
  4448. public const int UnpackedUint64FieldNumber = 93;
  4449. private static readonly pb::FieldCodec<ulong> _repeated_unpackedUint64_codec
  4450. = pb::FieldCodec.ForUInt64(744);
  4451. private readonly pbc::RepeatedField<ulong> unpackedUint64_ = new pbc::RepeatedField<ulong>();
  4452. public pbc::RepeatedField<ulong> UnpackedUint64 {
  4453. get { return unpackedUint64_; }
  4454. }
  4455. /// <summary>Field number for the "unpacked_sint32" field.</summary>
  4456. public const int UnpackedSint32FieldNumber = 94;
  4457. private static readonly pb::FieldCodec<int> _repeated_unpackedSint32_codec
  4458. = pb::FieldCodec.ForSInt32(752);
  4459. private readonly pbc::RepeatedField<int> unpackedSint32_ = new pbc::RepeatedField<int>();
  4460. public pbc::RepeatedField<int> UnpackedSint32 {
  4461. get { return unpackedSint32_; }
  4462. }
  4463. /// <summary>Field number for the "unpacked_sint64" field.</summary>
  4464. public const int UnpackedSint64FieldNumber = 95;
  4465. private static readonly pb::FieldCodec<long> _repeated_unpackedSint64_codec
  4466. = pb::FieldCodec.ForSInt64(760);
  4467. private readonly pbc::RepeatedField<long> unpackedSint64_ = new pbc::RepeatedField<long>();
  4468. public pbc::RepeatedField<long> UnpackedSint64 {
  4469. get { return unpackedSint64_; }
  4470. }
  4471. /// <summary>Field number for the "unpacked_fixed32" field.</summary>
  4472. public const int UnpackedFixed32FieldNumber = 96;
  4473. private static readonly pb::FieldCodec<uint> _repeated_unpackedFixed32_codec
  4474. = pb::FieldCodec.ForFixed32(773);
  4475. private readonly pbc::RepeatedField<uint> unpackedFixed32_ = new pbc::RepeatedField<uint>();
  4476. public pbc::RepeatedField<uint> UnpackedFixed32 {
  4477. get { return unpackedFixed32_; }
  4478. }
  4479. /// <summary>Field number for the "unpacked_fixed64" field.</summary>
  4480. public const int UnpackedFixed64FieldNumber = 97;
  4481. private static readonly pb::FieldCodec<ulong> _repeated_unpackedFixed64_codec
  4482. = pb::FieldCodec.ForFixed64(777);
  4483. private readonly pbc::RepeatedField<ulong> unpackedFixed64_ = new pbc::RepeatedField<ulong>();
  4484. public pbc::RepeatedField<ulong> UnpackedFixed64 {
  4485. get { return unpackedFixed64_; }
  4486. }
  4487. /// <summary>Field number for the "unpacked_sfixed32" field.</summary>
  4488. public const int UnpackedSfixed32FieldNumber = 98;
  4489. private static readonly pb::FieldCodec<int> _repeated_unpackedSfixed32_codec
  4490. = pb::FieldCodec.ForSFixed32(789);
  4491. private readonly pbc::RepeatedField<int> unpackedSfixed32_ = new pbc::RepeatedField<int>();
  4492. public pbc::RepeatedField<int> UnpackedSfixed32 {
  4493. get { return unpackedSfixed32_; }
  4494. }
  4495. /// <summary>Field number for the "unpacked_sfixed64" field.</summary>
  4496. public const int UnpackedSfixed64FieldNumber = 99;
  4497. private static readonly pb::FieldCodec<long> _repeated_unpackedSfixed64_codec
  4498. = pb::FieldCodec.ForSFixed64(793);
  4499. private readonly pbc::RepeatedField<long> unpackedSfixed64_ = new pbc::RepeatedField<long>();
  4500. public pbc::RepeatedField<long> UnpackedSfixed64 {
  4501. get { return unpackedSfixed64_; }
  4502. }
  4503. /// <summary>Field number for the "unpacked_float" field.</summary>
  4504. public const int UnpackedFloatFieldNumber = 100;
  4505. private static readonly pb::FieldCodec<float> _repeated_unpackedFloat_codec
  4506. = pb::FieldCodec.ForFloat(805);
  4507. private readonly pbc::RepeatedField<float> unpackedFloat_ = new pbc::RepeatedField<float>();
  4508. public pbc::RepeatedField<float> UnpackedFloat {
  4509. get { return unpackedFloat_; }
  4510. }
  4511. /// <summary>Field number for the "unpacked_double" field.</summary>
  4512. public const int UnpackedDoubleFieldNumber = 101;
  4513. private static readonly pb::FieldCodec<double> _repeated_unpackedDouble_codec
  4514. = pb::FieldCodec.ForDouble(809);
  4515. private readonly pbc::RepeatedField<double> unpackedDouble_ = new pbc::RepeatedField<double>();
  4516. public pbc::RepeatedField<double> UnpackedDouble {
  4517. get { return unpackedDouble_; }
  4518. }
  4519. /// <summary>Field number for the "unpacked_bool" field.</summary>
  4520. public const int UnpackedBoolFieldNumber = 102;
  4521. private static readonly pb::FieldCodec<bool> _repeated_unpackedBool_codec
  4522. = pb::FieldCodec.ForBool(816);
  4523. private readonly pbc::RepeatedField<bool> unpackedBool_ = new pbc::RepeatedField<bool>();
  4524. public pbc::RepeatedField<bool> UnpackedBool {
  4525. get { return unpackedBool_; }
  4526. }
  4527. /// <summary>Field number for the "unpacked_enum" field.</summary>
  4528. public const int UnpackedEnumFieldNumber = 103;
  4529. private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.ForeignEnum> _repeated_unpackedEnum_codec
  4530. = pb::FieldCodec.ForEnum(824, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
  4531. private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> unpackedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum>();
  4532. public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> UnpackedEnum {
  4533. get { return unpackedEnum_; }
  4534. }
  4535. public override bool Equals(object other) {
  4536. return Equals(other as TestUnpackedTypes);
  4537. }
  4538. public bool Equals(TestUnpackedTypes other) {
  4539. if (ReferenceEquals(other, null)) {
  4540. return false;
  4541. }
  4542. if (ReferenceEquals(other, this)) {
  4543. return true;
  4544. }
  4545. if(!unpackedInt32_.Equals(other.unpackedInt32_)) return false;
  4546. if(!unpackedInt64_.Equals(other.unpackedInt64_)) return false;
  4547. if(!unpackedUint32_.Equals(other.unpackedUint32_)) return false;
  4548. if(!unpackedUint64_.Equals(other.unpackedUint64_)) return false;
  4549. if(!unpackedSint32_.Equals(other.unpackedSint32_)) return false;
  4550. if(!unpackedSint64_.Equals(other.unpackedSint64_)) return false;
  4551. if(!unpackedFixed32_.Equals(other.unpackedFixed32_)) return false;
  4552. if(!unpackedFixed64_.Equals(other.unpackedFixed64_)) return false;
  4553. if(!unpackedSfixed32_.Equals(other.unpackedSfixed32_)) return false;
  4554. if(!unpackedSfixed64_.Equals(other.unpackedSfixed64_)) return false;
  4555. if(!unpackedFloat_.Equals(other.unpackedFloat_)) return false;
  4556. if(!unpackedDouble_.Equals(other.unpackedDouble_)) return false;
  4557. if(!unpackedBool_.Equals(other.unpackedBool_)) return false;
  4558. if(!unpackedEnum_.Equals(other.unpackedEnum_)) return false;
  4559. return true;
  4560. }
  4561. public override int GetHashCode() {
  4562. int hash = 1;
  4563. hash ^= unpackedInt32_.GetHashCode();
  4564. hash ^= unpackedInt64_.GetHashCode();
  4565. hash ^= unpackedUint32_.GetHashCode();
  4566. hash ^= unpackedUint64_.GetHashCode();
  4567. hash ^= unpackedSint32_.GetHashCode();
  4568. hash ^= unpackedSint64_.GetHashCode();
  4569. hash ^= unpackedFixed32_.GetHashCode();
  4570. hash ^= unpackedFixed64_.GetHashCode();
  4571. hash ^= unpackedSfixed32_.GetHashCode();
  4572. hash ^= unpackedSfixed64_.GetHashCode();
  4573. hash ^= unpackedFloat_.GetHashCode();
  4574. hash ^= unpackedDouble_.GetHashCode();
  4575. hash ^= unpackedBool_.GetHashCode();
  4576. hash ^= unpackedEnum_.GetHashCode();
  4577. return hash;
  4578. }
  4579. public override string ToString() {
  4580. return pb::JsonFormatter.ToDiagnosticString(this);
  4581. }
  4582. public void WriteTo(pb::CodedOutputStream output) {
  4583. unpackedInt32_.WriteTo(output, _repeated_unpackedInt32_codec);
  4584. unpackedInt64_.WriteTo(output, _repeated_unpackedInt64_codec);
  4585. unpackedUint32_.WriteTo(output, _repeated_unpackedUint32_codec);
  4586. unpackedUint64_.WriteTo(output, _repeated_unpackedUint64_codec);
  4587. unpackedSint32_.WriteTo(output, _repeated_unpackedSint32_codec);
  4588. unpackedSint64_.WriteTo(output, _repeated_unpackedSint64_codec);
  4589. unpackedFixed32_.WriteTo(output, _repeated_unpackedFixed32_codec);
  4590. unpackedFixed64_.WriteTo(output, _repeated_unpackedFixed64_codec);
  4591. unpackedSfixed32_.WriteTo(output, _repeated_unpackedSfixed32_codec);
  4592. unpackedSfixed64_.WriteTo(output, _repeated_unpackedSfixed64_codec);
  4593. unpackedFloat_.WriteTo(output, _repeated_unpackedFloat_codec);
  4594. unpackedDouble_.WriteTo(output, _repeated_unpackedDouble_codec);
  4595. unpackedBool_.WriteTo(output, _repeated_unpackedBool_codec);
  4596. unpackedEnum_.WriteTo(output, _repeated_unpackedEnum_codec);
  4597. }
  4598. public int CalculateSize() {
  4599. int size = 0;
  4600. size += unpackedInt32_.CalculateSize(_repeated_unpackedInt32_codec);
  4601. size += unpackedInt64_.CalculateSize(_repeated_unpackedInt64_codec);
  4602. size += unpackedUint32_.CalculateSize(_repeated_unpackedUint32_codec);
  4603. size += unpackedUint64_.CalculateSize(_repeated_unpackedUint64_codec);
  4604. size += unpackedSint32_.CalculateSize(_repeated_unpackedSint32_codec);
  4605. size += unpackedSint64_.CalculateSize(_repeated_unpackedSint64_codec);
  4606. size += unpackedFixed32_.CalculateSize(_repeated_unpackedFixed32_codec);
  4607. size += unpackedFixed64_.CalculateSize(_repeated_unpackedFixed64_codec);
  4608. size += unpackedSfixed32_.CalculateSize(_repeated_unpackedSfixed32_codec);
  4609. size += unpackedSfixed64_.CalculateSize(_repeated_unpackedSfixed64_codec);
  4610. size += unpackedFloat_.CalculateSize(_repeated_unpackedFloat_codec);
  4611. size += unpackedDouble_.CalculateSize(_repeated_unpackedDouble_codec);
  4612. size += unpackedBool_.CalculateSize(_repeated_unpackedBool_codec);
  4613. size += unpackedEnum_.CalculateSize(_repeated_unpackedEnum_codec);
  4614. return size;
  4615. }
  4616. public void MergeFrom(TestUnpackedTypes other) {
  4617. if (other == null) {
  4618. return;
  4619. }
  4620. unpackedInt32_.Add(other.unpackedInt32_);
  4621. unpackedInt64_.Add(other.unpackedInt64_);
  4622. unpackedUint32_.Add(other.unpackedUint32_);
  4623. unpackedUint64_.Add(other.unpackedUint64_);
  4624. unpackedSint32_.Add(other.unpackedSint32_);
  4625. unpackedSint64_.Add(other.unpackedSint64_);
  4626. unpackedFixed32_.Add(other.unpackedFixed32_);
  4627. unpackedFixed64_.Add(other.unpackedFixed64_);
  4628. unpackedSfixed32_.Add(other.unpackedSfixed32_);
  4629. unpackedSfixed64_.Add(other.unpackedSfixed64_);
  4630. unpackedFloat_.Add(other.unpackedFloat_);
  4631. unpackedDouble_.Add(other.unpackedDouble_);
  4632. unpackedBool_.Add(other.unpackedBool_);
  4633. unpackedEnum_.Add(other.unpackedEnum_);
  4634. }
  4635. public void MergeFrom(pb::CodedInputStream input) {
  4636. uint tag;
  4637. while ((tag = input.ReadTag()) != 0) {
  4638. switch(tag) {
  4639. default:
  4640. input.SkipLastField();
  4641. break;
  4642. case 722:
  4643. case 720: {
  4644. unpackedInt32_.AddEntriesFrom(input, _repeated_unpackedInt32_codec);
  4645. break;
  4646. }
  4647. case 730:
  4648. case 728: {
  4649. unpackedInt64_.AddEntriesFrom(input, _repeated_unpackedInt64_codec);
  4650. break;
  4651. }
  4652. case 738:
  4653. case 736: {
  4654. unpackedUint32_.AddEntriesFrom(input, _repeated_unpackedUint32_codec);
  4655. break;
  4656. }
  4657. case 746:
  4658. case 744: {
  4659. unpackedUint64_.AddEntriesFrom(input, _repeated_unpackedUint64_codec);
  4660. break;
  4661. }
  4662. case 754:
  4663. case 752: {
  4664. unpackedSint32_.AddEntriesFrom(input, _repeated_unpackedSint32_codec);
  4665. break;
  4666. }
  4667. case 762:
  4668. case 760: {
  4669. unpackedSint64_.AddEntriesFrom(input, _repeated_unpackedSint64_codec);
  4670. break;
  4671. }
  4672. case 770:
  4673. case 773: {
  4674. unpackedFixed32_.AddEntriesFrom(input, _repeated_unpackedFixed32_codec);
  4675. break;
  4676. }
  4677. case 778:
  4678. case 777: {
  4679. unpackedFixed64_.AddEntriesFrom(input, _repeated_unpackedFixed64_codec);
  4680. break;
  4681. }
  4682. case 786:
  4683. case 789: {
  4684. unpackedSfixed32_.AddEntriesFrom(input, _repeated_unpackedSfixed32_codec);
  4685. break;
  4686. }
  4687. case 794:
  4688. case 793: {
  4689. unpackedSfixed64_.AddEntriesFrom(input, _repeated_unpackedSfixed64_codec);
  4690. break;
  4691. }
  4692. case 802:
  4693. case 805: {
  4694. unpackedFloat_.AddEntriesFrom(input, _repeated_unpackedFloat_codec);
  4695. break;
  4696. }
  4697. case 810:
  4698. case 809: {
  4699. unpackedDouble_.AddEntriesFrom(input, _repeated_unpackedDouble_codec);
  4700. break;
  4701. }
  4702. case 818:
  4703. case 816: {
  4704. unpackedBool_.AddEntriesFrom(input, _repeated_unpackedBool_codec);
  4705. break;
  4706. }
  4707. case 826:
  4708. case 824: {
  4709. unpackedEnum_.AddEntriesFrom(input, _repeated_unpackedEnum_codec);
  4710. break;
  4711. }
  4712. }
  4713. }
  4714. }
  4715. }
  4716. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4717. public sealed partial class TestRepeatedScalarDifferentTagSizes : pb::IMessage<TestRepeatedScalarDifferentTagSizes> {
  4718. private static readonly pb::MessageParser<TestRepeatedScalarDifferentTagSizes> _parser = new pb::MessageParser<TestRepeatedScalarDifferentTagSizes>(() => new TestRepeatedScalarDifferentTagSizes());
  4719. public static pb::MessageParser<TestRepeatedScalarDifferentTagSizes> Parser { get { return _parser; } }
  4720. public static pbr::MessageDescriptor Descriptor {
  4721. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[25]; }
  4722. }
  4723. pbr::MessageDescriptor pb::IMessage.Descriptor {
  4724. get { return Descriptor; }
  4725. }
  4726. public TestRepeatedScalarDifferentTagSizes() {
  4727. OnConstruction();
  4728. }
  4729. partial void OnConstruction();
  4730. public TestRepeatedScalarDifferentTagSizes(TestRepeatedScalarDifferentTagSizes other) : this() {
  4731. repeatedFixed32_ = other.repeatedFixed32_.Clone();
  4732. repeatedInt32_ = other.repeatedInt32_.Clone();
  4733. repeatedFixed64_ = other.repeatedFixed64_.Clone();
  4734. repeatedInt64_ = other.repeatedInt64_.Clone();
  4735. repeatedFloat_ = other.repeatedFloat_.Clone();
  4736. repeatedUint64_ = other.repeatedUint64_.Clone();
  4737. }
  4738. public TestRepeatedScalarDifferentTagSizes Clone() {
  4739. return new TestRepeatedScalarDifferentTagSizes(this);
  4740. }
  4741. /// <summary>Field number for the "repeated_fixed32" field.</summary>
  4742. public const int RepeatedFixed32FieldNumber = 12;
  4743. private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec
  4744. = pb::FieldCodec.ForFixed32(98);
  4745. private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
  4746. /// <summary>
  4747. /// Parsing repeated fixed size values used to fail. This message needs to be
  4748. /// used in order to get a tag of the right size; all of the repeated fields
  4749. /// in TestAllTypes didn't trigger the check.
  4750. /// </summary>
  4751. public pbc::RepeatedField<uint> RepeatedFixed32 {
  4752. get { return repeatedFixed32_; }
  4753. }
  4754. /// <summary>Field number for the "repeated_int32" field.</summary>
  4755. public const int RepeatedInt32FieldNumber = 13;
  4756. private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
  4757. = pb::FieldCodec.ForInt32(106);
  4758. private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
  4759. /// <summary>
  4760. /// Check for a varint type, just for good measure.
  4761. /// </summary>
  4762. public pbc::RepeatedField<int> RepeatedInt32 {
  4763. get { return repeatedInt32_; }
  4764. }
  4765. /// <summary>Field number for the "repeated_fixed64" field.</summary>
  4766. public const int RepeatedFixed64FieldNumber = 2046;
  4767. private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec
  4768. = pb::FieldCodec.ForFixed64(16370);
  4769. private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
  4770. /// <summary>
  4771. /// These have two-byte tags.
  4772. /// </summary>
  4773. public pbc::RepeatedField<ulong> RepeatedFixed64 {
  4774. get { return repeatedFixed64_; }
  4775. }
  4776. /// <summary>Field number for the "repeated_int64" field.</summary>
  4777. public const int RepeatedInt64FieldNumber = 2047;
  4778. private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
  4779. = pb::FieldCodec.ForInt64(16378);
  4780. private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>();
  4781. public pbc::RepeatedField<long> RepeatedInt64 {
  4782. get { return repeatedInt64_; }
  4783. }
  4784. /// <summary>Field number for the "repeated_float" field.</summary>
  4785. public const int RepeatedFloatFieldNumber = 262142;
  4786. private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec
  4787. = pb::FieldCodec.ForFloat(2097138);
  4788. private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
  4789. /// <summary>
  4790. /// Three byte tags.
  4791. /// </summary>
  4792. public pbc::RepeatedField<float> RepeatedFloat {
  4793. get { return repeatedFloat_; }
  4794. }
  4795. /// <summary>Field number for the "repeated_uint64" field.</summary>
  4796. public const int RepeatedUint64FieldNumber = 262143;
  4797. private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
  4798. = pb::FieldCodec.ForUInt64(2097146);
  4799. private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>();
  4800. public pbc::RepeatedField<ulong> RepeatedUint64 {
  4801. get { return repeatedUint64_; }
  4802. }
  4803. public override bool Equals(object other) {
  4804. return Equals(other as TestRepeatedScalarDifferentTagSizes);
  4805. }
  4806. public bool Equals(TestRepeatedScalarDifferentTagSizes other) {
  4807. if (ReferenceEquals(other, null)) {
  4808. return false;
  4809. }
  4810. if (ReferenceEquals(other, this)) {
  4811. return true;
  4812. }
  4813. if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
  4814. if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
  4815. if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
  4816. if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
  4817. if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
  4818. if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
  4819. return true;
  4820. }
  4821. public override int GetHashCode() {
  4822. int hash = 1;
  4823. hash ^= repeatedFixed32_.GetHashCode();
  4824. hash ^= repeatedInt32_.GetHashCode();
  4825. hash ^= repeatedFixed64_.GetHashCode();
  4826. hash ^= repeatedInt64_.GetHashCode();
  4827. hash ^= repeatedFloat_.GetHashCode();
  4828. hash ^= repeatedUint64_.GetHashCode();
  4829. return hash;
  4830. }
  4831. public override string ToString() {
  4832. return pb::JsonFormatter.ToDiagnosticString(this);
  4833. }
  4834. public void WriteTo(pb::CodedOutputStream output) {
  4835. repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
  4836. repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
  4837. repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
  4838. repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
  4839. repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
  4840. repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
  4841. }
  4842. public int CalculateSize() {
  4843. int size = 0;
  4844. size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
  4845. size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
  4846. size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
  4847. size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
  4848. size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
  4849. size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
  4850. return size;
  4851. }
  4852. public void MergeFrom(TestRepeatedScalarDifferentTagSizes other) {
  4853. if (other == null) {
  4854. return;
  4855. }
  4856. repeatedFixed32_.Add(other.repeatedFixed32_);
  4857. repeatedInt32_.Add(other.repeatedInt32_);
  4858. repeatedFixed64_.Add(other.repeatedFixed64_);
  4859. repeatedInt64_.Add(other.repeatedInt64_);
  4860. repeatedFloat_.Add(other.repeatedFloat_);
  4861. repeatedUint64_.Add(other.repeatedUint64_);
  4862. }
  4863. public void MergeFrom(pb::CodedInputStream input) {
  4864. uint tag;
  4865. while ((tag = input.ReadTag()) != 0) {
  4866. switch(tag) {
  4867. default:
  4868. input.SkipLastField();
  4869. break;
  4870. case 98:
  4871. case 101: {
  4872. repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
  4873. break;
  4874. }
  4875. case 106:
  4876. case 104: {
  4877. repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
  4878. break;
  4879. }
  4880. case 16370:
  4881. case 16369: {
  4882. repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
  4883. break;
  4884. }
  4885. case 16378:
  4886. case 16376: {
  4887. repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
  4888. break;
  4889. }
  4890. case 2097138:
  4891. case 2097141: {
  4892. repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
  4893. break;
  4894. }
  4895. case 2097146:
  4896. case 2097144: {
  4897. repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
  4898. break;
  4899. }
  4900. }
  4901. }
  4902. }
  4903. }
  4904. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4905. public sealed partial class TestCommentInjectionMessage : pb::IMessage<TestCommentInjectionMessage> {
  4906. private static readonly pb::MessageParser<TestCommentInjectionMessage> _parser = new pb::MessageParser<TestCommentInjectionMessage>(() => new TestCommentInjectionMessage());
  4907. public static pb::MessageParser<TestCommentInjectionMessage> Parser { get { return _parser; } }
  4908. public static pbr::MessageDescriptor Descriptor {
  4909. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[26]; }
  4910. }
  4911. pbr::MessageDescriptor pb::IMessage.Descriptor {
  4912. get { return Descriptor; }
  4913. }
  4914. public TestCommentInjectionMessage() {
  4915. OnConstruction();
  4916. }
  4917. partial void OnConstruction();
  4918. public TestCommentInjectionMessage(TestCommentInjectionMessage other) : this() {
  4919. a_ = other.a_;
  4920. }
  4921. public TestCommentInjectionMessage Clone() {
  4922. return new TestCommentInjectionMessage(this);
  4923. }
  4924. /// <summary>Field number for the "a" field.</summary>
  4925. public const int AFieldNumber = 1;
  4926. private string a_ = "";
  4927. /// <summary>
  4928. /// */ &lt;- This should not close the generated doc comment
  4929. /// </summary>
  4930. public string A {
  4931. get { return a_; }
  4932. set {
  4933. a_ = pb::Preconditions.CheckNotNull(value, "value");
  4934. }
  4935. }
  4936. public override bool Equals(object other) {
  4937. return Equals(other as TestCommentInjectionMessage);
  4938. }
  4939. public bool Equals(TestCommentInjectionMessage other) {
  4940. if (ReferenceEquals(other, null)) {
  4941. return false;
  4942. }
  4943. if (ReferenceEquals(other, this)) {
  4944. return true;
  4945. }
  4946. if (A != other.A) return false;
  4947. return true;
  4948. }
  4949. public override int GetHashCode() {
  4950. int hash = 1;
  4951. if (A.Length != 0) hash ^= A.GetHashCode();
  4952. return hash;
  4953. }
  4954. public override string ToString() {
  4955. return pb::JsonFormatter.ToDiagnosticString(this);
  4956. }
  4957. public void WriteTo(pb::CodedOutputStream output) {
  4958. if (A.Length != 0) {
  4959. output.WriteRawTag(10);
  4960. output.WriteString(A);
  4961. }
  4962. }
  4963. public int CalculateSize() {
  4964. int size = 0;
  4965. if (A.Length != 0) {
  4966. size += 1 + pb::CodedOutputStream.ComputeStringSize(A);
  4967. }
  4968. return size;
  4969. }
  4970. public void MergeFrom(TestCommentInjectionMessage other) {
  4971. if (other == null) {
  4972. return;
  4973. }
  4974. if (other.A.Length != 0) {
  4975. A = other.A;
  4976. }
  4977. }
  4978. public void MergeFrom(pb::CodedInputStream input) {
  4979. uint tag;
  4980. while ((tag = input.ReadTag()) != 0) {
  4981. switch(tag) {
  4982. default:
  4983. input.SkipLastField();
  4984. break;
  4985. case 10: {
  4986. A = input.ReadString();
  4987. break;
  4988. }
  4989. }
  4990. }
  4991. }
  4992. }
  4993. /// <summary>
  4994. /// Test that RPC services work.
  4995. /// </summary>
  4996. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4997. public sealed partial class FooRequest : pb::IMessage<FooRequest> {
  4998. private static readonly pb::MessageParser<FooRequest> _parser = new pb::MessageParser<FooRequest>(() => new FooRequest());
  4999. public static pb::MessageParser<FooRequest> Parser { get { return _parser; } }
  5000. public static pbr::MessageDescriptor Descriptor {
  5001. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[27]; }
  5002. }
  5003. pbr::MessageDescriptor pb::IMessage.Descriptor {
  5004. get { return Descriptor; }
  5005. }
  5006. public FooRequest() {
  5007. OnConstruction();
  5008. }
  5009. partial void OnConstruction();
  5010. public FooRequest(FooRequest other) : this() {
  5011. }
  5012. public FooRequest Clone() {
  5013. return new FooRequest(this);
  5014. }
  5015. public override bool Equals(object other) {
  5016. return Equals(other as FooRequest);
  5017. }
  5018. public bool Equals(FooRequest other) {
  5019. if (ReferenceEquals(other, null)) {
  5020. return false;
  5021. }
  5022. if (ReferenceEquals(other, this)) {
  5023. return true;
  5024. }
  5025. return true;
  5026. }
  5027. public override int GetHashCode() {
  5028. int hash = 1;
  5029. return hash;
  5030. }
  5031. public override string ToString() {
  5032. return pb::JsonFormatter.ToDiagnosticString(this);
  5033. }
  5034. public void WriteTo(pb::CodedOutputStream output) {
  5035. }
  5036. public int CalculateSize() {
  5037. int size = 0;
  5038. return size;
  5039. }
  5040. public void MergeFrom(FooRequest other) {
  5041. if (other == null) {
  5042. return;
  5043. }
  5044. }
  5045. public void MergeFrom(pb::CodedInputStream input) {
  5046. uint tag;
  5047. while ((tag = input.ReadTag()) != 0) {
  5048. switch(tag) {
  5049. default:
  5050. input.SkipLastField();
  5051. break;
  5052. }
  5053. }
  5054. }
  5055. }
  5056. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5057. public sealed partial class FooResponse : pb::IMessage<FooResponse> {
  5058. private static readonly pb::MessageParser<FooResponse> _parser = new pb::MessageParser<FooResponse>(() => new FooResponse());
  5059. public static pb::MessageParser<FooResponse> Parser { get { return _parser; } }
  5060. public static pbr::MessageDescriptor Descriptor {
  5061. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[28]; }
  5062. }
  5063. pbr::MessageDescriptor pb::IMessage.Descriptor {
  5064. get { return Descriptor; }
  5065. }
  5066. public FooResponse() {
  5067. OnConstruction();
  5068. }
  5069. partial void OnConstruction();
  5070. public FooResponse(FooResponse other) : this() {
  5071. }
  5072. public FooResponse Clone() {
  5073. return new FooResponse(this);
  5074. }
  5075. public override bool Equals(object other) {
  5076. return Equals(other as FooResponse);
  5077. }
  5078. public bool Equals(FooResponse other) {
  5079. if (ReferenceEquals(other, null)) {
  5080. return false;
  5081. }
  5082. if (ReferenceEquals(other, this)) {
  5083. return true;
  5084. }
  5085. return true;
  5086. }
  5087. public override int GetHashCode() {
  5088. int hash = 1;
  5089. return hash;
  5090. }
  5091. public override string ToString() {
  5092. return pb::JsonFormatter.ToDiagnosticString(this);
  5093. }
  5094. public void WriteTo(pb::CodedOutputStream output) {
  5095. }
  5096. public int CalculateSize() {
  5097. int size = 0;
  5098. return size;
  5099. }
  5100. public void MergeFrom(FooResponse other) {
  5101. if (other == null) {
  5102. return;
  5103. }
  5104. }
  5105. public void MergeFrom(pb::CodedInputStream input) {
  5106. uint tag;
  5107. while ((tag = input.ReadTag()) != 0) {
  5108. switch(tag) {
  5109. default:
  5110. input.SkipLastField();
  5111. break;
  5112. }
  5113. }
  5114. }
  5115. }
  5116. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5117. public sealed partial class FooClientMessage : pb::IMessage<FooClientMessage> {
  5118. private static readonly pb::MessageParser<FooClientMessage> _parser = new pb::MessageParser<FooClientMessage>(() => new FooClientMessage());
  5119. public static pb::MessageParser<FooClientMessage> Parser { get { return _parser; } }
  5120. public static pbr::MessageDescriptor Descriptor {
  5121. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[29]; }
  5122. }
  5123. pbr::MessageDescriptor pb::IMessage.Descriptor {
  5124. get { return Descriptor; }
  5125. }
  5126. public FooClientMessage() {
  5127. OnConstruction();
  5128. }
  5129. partial void OnConstruction();
  5130. public FooClientMessage(FooClientMessage other) : this() {
  5131. }
  5132. public FooClientMessage Clone() {
  5133. return new FooClientMessage(this);
  5134. }
  5135. public override bool Equals(object other) {
  5136. return Equals(other as FooClientMessage);
  5137. }
  5138. public bool Equals(FooClientMessage other) {
  5139. if (ReferenceEquals(other, null)) {
  5140. return false;
  5141. }
  5142. if (ReferenceEquals(other, this)) {
  5143. return true;
  5144. }
  5145. return true;
  5146. }
  5147. public override int GetHashCode() {
  5148. int hash = 1;
  5149. return hash;
  5150. }
  5151. public override string ToString() {
  5152. return pb::JsonFormatter.ToDiagnosticString(this);
  5153. }
  5154. public void WriteTo(pb::CodedOutputStream output) {
  5155. }
  5156. public int CalculateSize() {
  5157. int size = 0;
  5158. return size;
  5159. }
  5160. public void MergeFrom(FooClientMessage other) {
  5161. if (other == null) {
  5162. return;
  5163. }
  5164. }
  5165. public void MergeFrom(pb::CodedInputStream input) {
  5166. uint tag;
  5167. while ((tag = input.ReadTag()) != 0) {
  5168. switch(tag) {
  5169. default:
  5170. input.SkipLastField();
  5171. break;
  5172. }
  5173. }
  5174. }
  5175. }
  5176. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5177. public sealed partial class FooServerMessage : pb::IMessage<FooServerMessage> {
  5178. private static readonly pb::MessageParser<FooServerMessage> _parser = new pb::MessageParser<FooServerMessage>(() => new FooServerMessage());
  5179. public static pb::MessageParser<FooServerMessage> Parser { get { return _parser; } }
  5180. public static pbr::MessageDescriptor Descriptor {
  5181. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[30]; }
  5182. }
  5183. pbr::MessageDescriptor pb::IMessage.Descriptor {
  5184. get { return Descriptor; }
  5185. }
  5186. public FooServerMessage() {
  5187. OnConstruction();
  5188. }
  5189. partial void OnConstruction();
  5190. public FooServerMessage(FooServerMessage other) : this() {
  5191. }
  5192. public FooServerMessage Clone() {
  5193. return new FooServerMessage(this);
  5194. }
  5195. public override bool Equals(object other) {
  5196. return Equals(other as FooServerMessage);
  5197. }
  5198. public bool Equals(FooServerMessage other) {
  5199. if (ReferenceEquals(other, null)) {
  5200. return false;
  5201. }
  5202. if (ReferenceEquals(other, this)) {
  5203. return true;
  5204. }
  5205. return true;
  5206. }
  5207. public override int GetHashCode() {
  5208. int hash = 1;
  5209. return hash;
  5210. }
  5211. public override string ToString() {
  5212. return pb::JsonFormatter.ToDiagnosticString(this);
  5213. }
  5214. public void WriteTo(pb::CodedOutputStream output) {
  5215. }
  5216. public int CalculateSize() {
  5217. int size = 0;
  5218. return size;
  5219. }
  5220. public void MergeFrom(FooServerMessage other) {
  5221. if (other == null) {
  5222. return;
  5223. }
  5224. }
  5225. public void MergeFrom(pb::CodedInputStream input) {
  5226. uint tag;
  5227. while ((tag = input.ReadTag()) != 0) {
  5228. switch(tag) {
  5229. default:
  5230. input.SkipLastField();
  5231. break;
  5232. }
  5233. }
  5234. }
  5235. }
  5236. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5237. public sealed partial class BarRequest : pb::IMessage<BarRequest> {
  5238. private static readonly pb::MessageParser<BarRequest> _parser = new pb::MessageParser<BarRequest>(() => new BarRequest());
  5239. public static pb::MessageParser<BarRequest> Parser { get { return _parser; } }
  5240. public static pbr::MessageDescriptor Descriptor {
  5241. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[31]; }
  5242. }
  5243. pbr::MessageDescriptor pb::IMessage.Descriptor {
  5244. get { return Descriptor; }
  5245. }
  5246. public BarRequest() {
  5247. OnConstruction();
  5248. }
  5249. partial void OnConstruction();
  5250. public BarRequest(BarRequest other) : this() {
  5251. }
  5252. public BarRequest Clone() {
  5253. return new BarRequest(this);
  5254. }
  5255. public override bool Equals(object other) {
  5256. return Equals(other as BarRequest);
  5257. }
  5258. public bool Equals(BarRequest other) {
  5259. if (ReferenceEquals(other, null)) {
  5260. return false;
  5261. }
  5262. if (ReferenceEquals(other, this)) {
  5263. return true;
  5264. }
  5265. return true;
  5266. }
  5267. public override int GetHashCode() {
  5268. int hash = 1;
  5269. return hash;
  5270. }
  5271. public override string ToString() {
  5272. return pb::JsonFormatter.ToDiagnosticString(this);
  5273. }
  5274. public void WriteTo(pb::CodedOutputStream output) {
  5275. }
  5276. public int CalculateSize() {
  5277. int size = 0;
  5278. return size;
  5279. }
  5280. public void MergeFrom(BarRequest other) {
  5281. if (other == null) {
  5282. return;
  5283. }
  5284. }
  5285. public void MergeFrom(pb::CodedInputStream input) {
  5286. uint tag;
  5287. while ((tag = input.ReadTag()) != 0) {
  5288. switch(tag) {
  5289. default:
  5290. input.SkipLastField();
  5291. break;
  5292. }
  5293. }
  5294. }
  5295. }
  5296. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5297. public sealed partial class BarResponse : pb::IMessage<BarResponse> {
  5298. private static readonly pb::MessageParser<BarResponse> _parser = new pb::MessageParser<BarResponse>(() => new BarResponse());
  5299. public static pb::MessageParser<BarResponse> Parser { get { return _parser; } }
  5300. public static pbr::MessageDescriptor Descriptor {
  5301. get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[32]; }
  5302. }
  5303. pbr::MessageDescriptor pb::IMessage.Descriptor {
  5304. get { return Descriptor; }
  5305. }
  5306. public BarResponse() {
  5307. OnConstruction();
  5308. }
  5309. partial void OnConstruction();
  5310. public BarResponse(BarResponse other) : this() {
  5311. }
  5312. public BarResponse Clone() {
  5313. return new BarResponse(this);
  5314. }
  5315. public override bool Equals(object other) {
  5316. return Equals(other as BarResponse);
  5317. }
  5318. public bool Equals(BarResponse other) {
  5319. if (ReferenceEquals(other, null)) {
  5320. return false;
  5321. }
  5322. if (ReferenceEquals(other, this)) {
  5323. return true;
  5324. }
  5325. return true;
  5326. }
  5327. public override int GetHashCode() {
  5328. int hash = 1;
  5329. return hash;
  5330. }
  5331. public override string ToString() {
  5332. return pb::JsonFormatter.ToDiagnosticString(this);
  5333. }
  5334. public void WriteTo(pb::CodedOutputStream output) {
  5335. }
  5336. public int CalculateSize() {
  5337. int size = 0;
  5338. return size;
  5339. }
  5340. public void MergeFrom(BarResponse other) {
  5341. if (other == null) {
  5342. return;
  5343. }
  5344. }
  5345. public void MergeFrom(pb::CodedInputStream input) {
  5346. uint tag;
  5347. while ((tag = input.ReadTag()) != 0) {
  5348. switch(tag) {
  5349. default:
  5350. input.SkipLastField();
  5351. break;
  5352. }
  5353. }
  5354. }
  5355. }
  5356. #endregion
  5357. }
  5358. #endregion Designer generated code