UnittestProto3.cs 214 KB

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