UnittestProto3.cs 198 KB

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