UnittestProto3.cs 198 KB

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