default_value.pb.cc 353 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/util/internal/testdata/default_value.proto
  3. #include <google/protobuf/util/internal/testdata/default_value.pb.h>
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. namespace protobuf_google_2fprotobuf_2fany_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fany_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Any;
  20. } // namespace protobuf_google_2fprotobuf_2fany_2eproto
  21. namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
  22. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue;
  23. } // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
  24. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto {
  25. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_AnyData_MapDataEntry_DoNotUse;
  26. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_IntToStringMap_MapEntry_DoNotUse;
  27. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MessageMap_M;
  28. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MixedMap2_MapEntry_DoNotUse;
  29. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MixedMap_MapEntry_DoNotUse;
  30. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_StringtoIntMap_MapEntry_DoNotUse;
  31. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_DoubleMessage;
  32. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_DoubleValueMessage;
  33. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_IntToStringMap;
  34. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ListValueMessage;
  35. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MessageMap;
  36. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MessageMap_MapEntry_DoNotUse;
  37. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MixedMap2;
  38. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MixedMap;
  39. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_StringtoIntMap;
  40. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_StructMessage;
  41. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ValueMessage;
  42. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_AnyData;
  43. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_AnyMessage;
  44. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto
  45. namespace protobuf_google_2fprotobuf_2fwrappers_2eproto {
  46. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_DoubleValue;
  47. } // namespace protobuf_google_2fprotobuf_2fwrappers_2eproto
  48. namespace google {
  49. namespace protobuf {
  50. namespace testing {
  51. class DefaultValueTestCasesDefaultTypeInternal {
  52. public:
  53. ::google::protobuf::internal::ExplicitlyConstructed<DefaultValueTestCases>
  54. _instance;
  55. } _DefaultValueTestCases_default_instance_;
  56. class DoubleMessageDefaultTypeInternal {
  57. public:
  58. ::google::protobuf::internal::ExplicitlyConstructed<DoubleMessage>
  59. _instance;
  60. ::google::protobuf::internal::ArenaStringPtr str_value_;
  61. ::google::protobuf::int64 num_value_;
  62. } _DoubleMessage_default_instance_;
  63. class StructMessageDefaultTypeInternal {
  64. public:
  65. ::google::protobuf::internal::ExplicitlyConstructed<StructMessage>
  66. _instance;
  67. } _StructMessage_default_instance_;
  68. class ValueMessageDefaultTypeInternal {
  69. public:
  70. ::google::protobuf::internal::ExplicitlyConstructed<ValueMessage>
  71. _instance;
  72. } _ValueMessage_default_instance_;
  73. class ListValueMessageDefaultTypeInternal {
  74. public:
  75. ::google::protobuf::internal::ExplicitlyConstructed<ListValueMessage>
  76. _instance;
  77. } _ListValueMessage_default_instance_;
  78. class RequestMessageDefaultTypeInternal {
  79. public:
  80. ::google::protobuf::internal::ExplicitlyConstructed<RequestMessage>
  81. _instance;
  82. } _RequestMessage_default_instance_;
  83. class AnyMessageDefaultTypeInternal {
  84. public:
  85. ::google::protobuf::internal::ExplicitlyConstructed<AnyMessage>
  86. _instance;
  87. } _AnyMessage_default_instance_;
  88. class AnyData_MapDataEntry_DoNotUseDefaultTypeInternal {
  89. public:
  90. ::google::protobuf::internal::ExplicitlyConstructed<AnyData_MapDataEntry_DoNotUse>
  91. _instance;
  92. } _AnyData_MapDataEntry_DoNotUse_default_instance_;
  93. class AnyDataDefaultTypeInternal {
  94. public:
  95. ::google::protobuf::internal::ExplicitlyConstructed<AnyData>
  96. _instance;
  97. } _AnyData_default_instance_;
  98. class StringtoIntMap_MapEntry_DoNotUseDefaultTypeInternal {
  99. public:
  100. ::google::protobuf::internal::ExplicitlyConstructed<StringtoIntMap_MapEntry_DoNotUse>
  101. _instance;
  102. } _StringtoIntMap_MapEntry_DoNotUse_default_instance_;
  103. class StringtoIntMapDefaultTypeInternal {
  104. public:
  105. ::google::protobuf::internal::ExplicitlyConstructed<StringtoIntMap>
  106. _instance;
  107. } _StringtoIntMap_default_instance_;
  108. class IntToStringMap_MapEntry_DoNotUseDefaultTypeInternal {
  109. public:
  110. ::google::protobuf::internal::ExplicitlyConstructed<IntToStringMap_MapEntry_DoNotUse>
  111. _instance;
  112. } _IntToStringMap_MapEntry_DoNotUse_default_instance_;
  113. class IntToStringMapDefaultTypeInternal {
  114. public:
  115. ::google::protobuf::internal::ExplicitlyConstructed<IntToStringMap>
  116. _instance;
  117. } _IntToStringMap_default_instance_;
  118. class MixedMap_MapEntry_DoNotUseDefaultTypeInternal {
  119. public:
  120. ::google::protobuf::internal::ExplicitlyConstructed<MixedMap_MapEntry_DoNotUse>
  121. _instance;
  122. } _MixedMap_MapEntry_DoNotUse_default_instance_;
  123. class MixedMapDefaultTypeInternal {
  124. public:
  125. ::google::protobuf::internal::ExplicitlyConstructed<MixedMap>
  126. _instance;
  127. } _MixedMap_default_instance_;
  128. class MixedMap2_MapEntry_DoNotUseDefaultTypeInternal {
  129. public:
  130. ::google::protobuf::internal::ExplicitlyConstructed<MixedMap2_MapEntry_DoNotUse>
  131. _instance;
  132. } _MixedMap2_MapEntry_DoNotUse_default_instance_;
  133. class MixedMap2DefaultTypeInternal {
  134. public:
  135. ::google::protobuf::internal::ExplicitlyConstructed<MixedMap2>
  136. _instance;
  137. } _MixedMap2_default_instance_;
  138. class MessageMap_MDefaultTypeInternal {
  139. public:
  140. ::google::protobuf::internal::ExplicitlyConstructed<MessageMap_M>
  141. _instance;
  142. } _MessageMap_M_default_instance_;
  143. class MessageMap_MapEntry_DoNotUseDefaultTypeInternal {
  144. public:
  145. ::google::protobuf::internal::ExplicitlyConstructed<MessageMap_MapEntry_DoNotUse>
  146. _instance;
  147. } _MessageMap_MapEntry_DoNotUse_default_instance_;
  148. class MessageMapDefaultTypeInternal {
  149. public:
  150. ::google::protobuf::internal::ExplicitlyConstructed<MessageMap>
  151. _instance;
  152. } _MessageMap_default_instance_;
  153. class DoubleValueMessageDefaultTypeInternal {
  154. public:
  155. ::google::protobuf::internal::ExplicitlyConstructed<DoubleValueMessage>
  156. _instance;
  157. } _DoubleValueMessage_default_instance_;
  158. } // namespace testing
  159. } // namespace protobuf
  160. } // namespace google
  161. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto {
  162. static void InitDefaultsDefaultValueTestCases() {
  163. GOOGLE_PROTOBUF_VERIFY_VERSION;
  164. {
  165. void* ptr = &::google::protobuf::testing::_DefaultValueTestCases_default_instance_;
  166. new (ptr) ::google::protobuf::testing::DefaultValueTestCases();
  167. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  168. }
  169. ::google::protobuf::testing::DefaultValueTestCases::InitAsDefaultInstance();
  170. }
  171. ::google::protobuf::internal::SCCInfo<13> scc_info_DefaultValueTestCases =
  172. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 13, InitDefaultsDefaultValueTestCases}, {
  173. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_DoubleMessage.base,
  174. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_StructMessage.base,
  175. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,
  176. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_ValueMessage.base,
  177. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_ListValueMessage.base,
  178. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_AnyMessage.base,
  179. &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,
  180. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_StringtoIntMap.base,
  181. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_IntToStringMap.base,
  182. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MixedMap.base,
  183. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MixedMap2.base,
  184. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MessageMap.base,
  185. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_DoubleValueMessage.base,}};
  186. static void InitDefaultsDoubleMessage() {
  187. GOOGLE_PROTOBUF_VERIFY_VERSION;
  188. {
  189. void* ptr = &::google::protobuf::testing::_DoubleMessage_default_instance_;
  190. new (ptr) ::google::protobuf::testing::DoubleMessage();
  191. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  192. }
  193. ::google::protobuf::testing::DoubleMessage::InitAsDefaultInstance();
  194. }
  195. ::google::protobuf::internal::SCCInfo<1> scc_info_DoubleMessage =
  196. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsDoubleMessage}, {
  197. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_DoubleValue.base,}};
  198. static void InitDefaultsStructMessage() {
  199. GOOGLE_PROTOBUF_VERIFY_VERSION;
  200. {
  201. void* ptr = &::google::protobuf::testing::_StructMessage_default_instance_;
  202. new (ptr) ::google::protobuf::testing::StructMessage();
  203. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  204. }
  205. ::google::protobuf::testing::StructMessage::InitAsDefaultInstance();
  206. }
  207. ::google::protobuf::internal::SCCInfo<1> scc_info_StructMessage =
  208. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStructMessage}, {
  209. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  210. static void InitDefaultsValueMessage() {
  211. GOOGLE_PROTOBUF_VERIFY_VERSION;
  212. {
  213. void* ptr = &::google::protobuf::testing::_ValueMessage_default_instance_;
  214. new (ptr) ::google::protobuf::testing::ValueMessage();
  215. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  216. }
  217. ::google::protobuf::testing::ValueMessage::InitAsDefaultInstance();
  218. }
  219. ::google::protobuf::internal::SCCInfo<1> scc_info_ValueMessage =
  220. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsValueMessage}, {
  221. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  222. static void InitDefaultsListValueMessage() {
  223. GOOGLE_PROTOBUF_VERIFY_VERSION;
  224. {
  225. void* ptr = &::google::protobuf::testing::_ListValueMessage_default_instance_;
  226. new (ptr) ::google::protobuf::testing::ListValueMessage();
  227. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  228. }
  229. ::google::protobuf::testing::ListValueMessage::InitAsDefaultInstance();
  230. }
  231. ::google::protobuf::internal::SCCInfo<1> scc_info_ListValueMessage =
  232. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsListValueMessage}, {
  233. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  234. static void InitDefaultsRequestMessage() {
  235. GOOGLE_PROTOBUF_VERIFY_VERSION;
  236. {
  237. void* ptr = &::google::protobuf::testing::_RequestMessage_default_instance_;
  238. new (ptr) ::google::protobuf::testing::RequestMessage();
  239. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  240. }
  241. ::google::protobuf::testing::RequestMessage::InitAsDefaultInstance();
  242. }
  243. ::google::protobuf::internal::SCCInfo<0> scc_info_RequestMessage =
  244. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRequestMessage}, {}};
  245. static void InitDefaultsAnyMessage() {
  246. GOOGLE_PROTOBUF_VERIFY_VERSION;
  247. {
  248. void* ptr = &::google::protobuf::testing::_AnyMessage_default_instance_;
  249. new (ptr) ::google::protobuf::testing::AnyMessage();
  250. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  251. }
  252. ::google::protobuf::testing::AnyMessage::InitAsDefaultInstance();
  253. }
  254. ::google::protobuf::internal::SCCInfo<2> scc_info_AnyMessage =
  255. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsAnyMessage}, {
  256. &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,
  257. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_AnyData.base,}};
  258. static void InitDefaultsAnyData_MapDataEntry_DoNotUse() {
  259. GOOGLE_PROTOBUF_VERIFY_VERSION;
  260. {
  261. void* ptr = &::google::protobuf::testing::_AnyData_MapDataEntry_DoNotUse_default_instance_;
  262. new (ptr) ::google::protobuf::testing::AnyData_MapDataEntry_DoNotUse();
  263. }
  264. ::google::protobuf::testing::AnyData_MapDataEntry_DoNotUse::InitAsDefaultInstance();
  265. }
  266. ::google::protobuf::internal::SCCInfo<0> scc_info_AnyData_MapDataEntry_DoNotUse =
  267. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAnyData_MapDataEntry_DoNotUse}, {}};
  268. static void InitDefaultsAnyData() {
  269. GOOGLE_PROTOBUF_VERIFY_VERSION;
  270. {
  271. void* ptr = &::google::protobuf::testing::_AnyData_default_instance_;
  272. new (ptr) ::google::protobuf::testing::AnyData();
  273. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  274. }
  275. ::google::protobuf::testing::AnyData::InitAsDefaultInstance();
  276. }
  277. ::google::protobuf::internal::SCCInfo<2> scc_info_AnyData =
  278. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsAnyData}, {
  279. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_AnyData_MapDataEntry_DoNotUse.base,
  280. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  281. static void InitDefaultsStringtoIntMap_MapEntry_DoNotUse() {
  282. GOOGLE_PROTOBUF_VERIFY_VERSION;
  283. {
  284. void* ptr = &::google::protobuf::testing::_StringtoIntMap_MapEntry_DoNotUse_default_instance_;
  285. new (ptr) ::google::protobuf::testing::StringtoIntMap_MapEntry_DoNotUse();
  286. }
  287. ::google::protobuf::testing::StringtoIntMap_MapEntry_DoNotUse::InitAsDefaultInstance();
  288. }
  289. ::google::protobuf::internal::SCCInfo<0> scc_info_StringtoIntMap_MapEntry_DoNotUse =
  290. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsStringtoIntMap_MapEntry_DoNotUse}, {}};
  291. static void InitDefaultsStringtoIntMap() {
  292. GOOGLE_PROTOBUF_VERIFY_VERSION;
  293. {
  294. void* ptr = &::google::protobuf::testing::_StringtoIntMap_default_instance_;
  295. new (ptr) ::google::protobuf::testing::StringtoIntMap();
  296. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  297. }
  298. ::google::protobuf::testing::StringtoIntMap::InitAsDefaultInstance();
  299. }
  300. ::google::protobuf::internal::SCCInfo<1> scc_info_StringtoIntMap =
  301. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStringtoIntMap}, {
  302. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_StringtoIntMap_MapEntry_DoNotUse.base,}};
  303. static void InitDefaultsIntToStringMap_MapEntry_DoNotUse() {
  304. GOOGLE_PROTOBUF_VERIFY_VERSION;
  305. {
  306. void* ptr = &::google::protobuf::testing::_IntToStringMap_MapEntry_DoNotUse_default_instance_;
  307. new (ptr) ::google::protobuf::testing::IntToStringMap_MapEntry_DoNotUse();
  308. }
  309. ::google::protobuf::testing::IntToStringMap_MapEntry_DoNotUse::InitAsDefaultInstance();
  310. }
  311. ::google::protobuf::internal::SCCInfo<0> scc_info_IntToStringMap_MapEntry_DoNotUse =
  312. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsIntToStringMap_MapEntry_DoNotUse}, {}};
  313. static void InitDefaultsIntToStringMap() {
  314. GOOGLE_PROTOBUF_VERIFY_VERSION;
  315. {
  316. void* ptr = &::google::protobuf::testing::_IntToStringMap_default_instance_;
  317. new (ptr) ::google::protobuf::testing::IntToStringMap();
  318. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  319. }
  320. ::google::protobuf::testing::IntToStringMap::InitAsDefaultInstance();
  321. }
  322. ::google::protobuf::internal::SCCInfo<1> scc_info_IntToStringMap =
  323. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsIntToStringMap}, {
  324. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_IntToStringMap_MapEntry_DoNotUse.base,}};
  325. static void InitDefaultsMixedMap_MapEntry_DoNotUse() {
  326. GOOGLE_PROTOBUF_VERIFY_VERSION;
  327. {
  328. void* ptr = &::google::protobuf::testing::_MixedMap_MapEntry_DoNotUse_default_instance_;
  329. new (ptr) ::google::protobuf::testing::MixedMap_MapEntry_DoNotUse();
  330. }
  331. ::google::protobuf::testing::MixedMap_MapEntry_DoNotUse::InitAsDefaultInstance();
  332. }
  333. ::google::protobuf::internal::SCCInfo<0> scc_info_MixedMap_MapEntry_DoNotUse =
  334. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMixedMap_MapEntry_DoNotUse}, {}};
  335. static void InitDefaultsMixedMap() {
  336. GOOGLE_PROTOBUF_VERIFY_VERSION;
  337. {
  338. void* ptr = &::google::protobuf::testing::_MixedMap_default_instance_;
  339. new (ptr) ::google::protobuf::testing::MixedMap();
  340. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  341. }
  342. ::google::protobuf::testing::MixedMap::InitAsDefaultInstance();
  343. }
  344. ::google::protobuf::internal::SCCInfo<1> scc_info_MixedMap =
  345. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMixedMap}, {
  346. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MixedMap_MapEntry_DoNotUse.base,}};
  347. static void InitDefaultsMixedMap2_MapEntry_DoNotUse() {
  348. GOOGLE_PROTOBUF_VERIFY_VERSION;
  349. {
  350. void* ptr = &::google::protobuf::testing::_MixedMap2_MapEntry_DoNotUse_default_instance_;
  351. new (ptr) ::google::protobuf::testing::MixedMap2_MapEntry_DoNotUse();
  352. }
  353. ::google::protobuf::testing::MixedMap2_MapEntry_DoNotUse::InitAsDefaultInstance();
  354. }
  355. ::google::protobuf::internal::SCCInfo<0> scc_info_MixedMap2_MapEntry_DoNotUse =
  356. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMixedMap2_MapEntry_DoNotUse}, {}};
  357. static void InitDefaultsMixedMap2() {
  358. GOOGLE_PROTOBUF_VERIFY_VERSION;
  359. {
  360. void* ptr = &::google::protobuf::testing::_MixedMap2_default_instance_;
  361. new (ptr) ::google::protobuf::testing::MixedMap2();
  362. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  363. }
  364. ::google::protobuf::testing::MixedMap2::InitAsDefaultInstance();
  365. }
  366. ::google::protobuf::internal::SCCInfo<1> scc_info_MixedMap2 =
  367. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMixedMap2}, {
  368. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MixedMap2_MapEntry_DoNotUse.base,}};
  369. static void InitDefaultsMessageMap_M() {
  370. GOOGLE_PROTOBUF_VERIFY_VERSION;
  371. {
  372. void* ptr = &::google::protobuf::testing::_MessageMap_M_default_instance_;
  373. new (ptr) ::google::protobuf::testing::MessageMap_M();
  374. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  375. }
  376. ::google::protobuf::testing::MessageMap_M::InitAsDefaultInstance();
  377. }
  378. ::google::protobuf::internal::SCCInfo<0> scc_info_MessageMap_M =
  379. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMessageMap_M}, {}};
  380. static void InitDefaultsMessageMap_MapEntry_DoNotUse() {
  381. GOOGLE_PROTOBUF_VERIFY_VERSION;
  382. {
  383. void* ptr = &::google::protobuf::testing::_MessageMap_MapEntry_DoNotUse_default_instance_;
  384. new (ptr) ::google::protobuf::testing::MessageMap_MapEntry_DoNotUse();
  385. }
  386. ::google::protobuf::testing::MessageMap_MapEntry_DoNotUse::InitAsDefaultInstance();
  387. }
  388. ::google::protobuf::internal::SCCInfo<1> scc_info_MessageMap_MapEntry_DoNotUse =
  389. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMessageMap_MapEntry_DoNotUse}, {
  390. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MessageMap_M.base,}};
  391. static void InitDefaultsMessageMap() {
  392. GOOGLE_PROTOBUF_VERIFY_VERSION;
  393. {
  394. void* ptr = &::google::protobuf::testing::_MessageMap_default_instance_;
  395. new (ptr) ::google::protobuf::testing::MessageMap();
  396. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  397. }
  398. ::google::protobuf::testing::MessageMap::InitAsDefaultInstance();
  399. }
  400. ::google::protobuf::internal::SCCInfo<1> scc_info_MessageMap =
  401. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMessageMap}, {
  402. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MessageMap_MapEntry_DoNotUse.base,}};
  403. static void InitDefaultsDoubleValueMessage() {
  404. GOOGLE_PROTOBUF_VERIFY_VERSION;
  405. {
  406. void* ptr = &::google::protobuf::testing::_DoubleValueMessage_default_instance_;
  407. new (ptr) ::google::protobuf::testing::DoubleValueMessage();
  408. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  409. }
  410. ::google::protobuf::testing::DoubleValueMessage::InitAsDefaultInstance();
  411. }
  412. ::google::protobuf::internal::SCCInfo<1> scc_info_DoubleValueMessage =
  413. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsDoubleValueMessage}, {
  414. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_DoubleValue.base,}};
  415. void InitDefaults() {
  416. ::google::protobuf::internal::InitSCC(&scc_info_DefaultValueTestCases.base);
  417. ::google::protobuf::internal::InitSCC(&scc_info_DoubleMessage.base);
  418. ::google::protobuf::internal::InitSCC(&scc_info_StructMessage.base);
  419. ::google::protobuf::internal::InitSCC(&scc_info_ValueMessage.base);
  420. ::google::protobuf::internal::InitSCC(&scc_info_ListValueMessage.base);
  421. ::google::protobuf::internal::InitSCC(&scc_info_RequestMessage.base);
  422. ::google::protobuf::internal::InitSCC(&scc_info_AnyMessage.base);
  423. ::google::protobuf::internal::InitSCC(&scc_info_AnyData_MapDataEntry_DoNotUse.base);
  424. ::google::protobuf::internal::InitSCC(&scc_info_AnyData.base);
  425. ::google::protobuf::internal::InitSCC(&scc_info_StringtoIntMap_MapEntry_DoNotUse.base);
  426. ::google::protobuf::internal::InitSCC(&scc_info_StringtoIntMap.base);
  427. ::google::protobuf::internal::InitSCC(&scc_info_IntToStringMap_MapEntry_DoNotUse.base);
  428. ::google::protobuf::internal::InitSCC(&scc_info_IntToStringMap.base);
  429. ::google::protobuf::internal::InitSCC(&scc_info_MixedMap_MapEntry_DoNotUse.base);
  430. ::google::protobuf::internal::InitSCC(&scc_info_MixedMap.base);
  431. ::google::protobuf::internal::InitSCC(&scc_info_MixedMap2_MapEntry_DoNotUse.base);
  432. ::google::protobuf::internal::InitSCC(&scc_info_MixedMap2.base);
  433. ::google::protobuf::internal::InitSCC(&scc_info_MessageMap_M.base);
  434. ::google::protobuf::internal::InitSCC(&scc_info_MessageMap_MapEntry_DoNotUse.base);
  435. ::google::protobuf::internal::InitSCC(&scc_info_MessageMap.base);
  436. ::google::protobuf::internal::InitSCC(&scc_info_DoubleValueMessage.base);
  437. }
  438. ::google::protobuf::Metadata file_level_metadata[21];
  439. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
  440. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  441. ~0u, // no _has_bits_
  442. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, _internal_metadata_),
  443. ~0u, // no _extensions_
  444. ~0u, // no _oneof_case_
  445. ~0u, // no _weak_field_map_
  446. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, empty_double_),
  447. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, double_with_default_value_),
  448. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, double_with_nondefault_value_),
  449. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, repeated_double_),
  450. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, nested_message_),
  451. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, repeated_nested_message_),
  452. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, double_message_with_oneof_),
  453. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, empty_struct_),
  454. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, empty_struct2_),
  455. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, struct_with_null_value_),
  456. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, struct_with_values_),
  457. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, struct_with_nested_struct_),
  458. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, struct_with_nested_list_),
  459. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, struct_with_list_of_nulls_),
  460. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, struct_with_list_of_lists_),
  461. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, struct_with_list_of_structs_),
  462. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, top_level_struct_),
  463. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, value_wrapper_simple_),
  464. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, value_wrapper_with_struct_),
  465. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, value_wrapper_with_list_),
  466. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, list_value_wrapper_),
  467. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, top_level_value_simple_),
  468. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, top_level_value_with_struct_),
  469. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, top_level_value_with_list_),
  470. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, top_level_listvalue_),
  471. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, empty_any_),
  472. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, type_only_any_),
  473. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, recursive_any_),
  474. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, any_with_message_value_),
  475. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, any_with_nested_message_),
  476. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, any_with_message_containing_map_),
  477. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, any_with_message_containing_struct_),
  478. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, top_level_any_),
  479. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, empty_map_),
  480. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, string_to_int_),
  481. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, int_to_string_),
  482. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, mixed1_),
  483. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, mixed2_),
  484. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, empty_mixed2_),
  485. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, map_of_objects_),
  486. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, mixed_empty_),
  487. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, message_map_empty_),
  488. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, double_value_),
  489. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DefaultValueTestCases, double_value_default_),
  490. ~0u, // no _has_bits_
  491. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleMessage, _internal_metadata_),
  492. ~0u, // no _extensions_
  493. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleMessage, _oneof_case_[0]),
  494. ~0u, // no _weak_field_map_
  495. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleMessage, double_value_),
  496. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleMessage, repeated_double_),
  497. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleMessage, nested_message_),
  498. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleMessage, repeated_nested_message_),
  499. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleMessage, double_wrapper_),
  500. offsetof(::google::protobuf::testing::DoubleMessageDefaultTypeInternal, str_value_),
  501. offsetof(::google::protobuf::testing::DoubleMessageDefaultTypeInternal, num_value_),
  502. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleMessage, value_),
  503. ~0u, // no _has_bits_
  504. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructMessage, _internal_metadata_),
  505. ~0u, // no _extensions_
  506. ~0u, // no _oneof_case_
  507. ~0u, // no _weak_field_map_
  508. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructMessage, struct__),
  509. ~0u, // no _has_bits_
  510. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ValueMessage, _internal_metadata_),
  511. ~0u, // no _extensions_
  512. ~0u, // no _oneof_case_
  513. ~0u, // no _weak_field_map_
  514. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ValueMessage, value_),
  515. ~0u, // no _has_bits_
  516. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ListValueMessage, _internal_metadata_),
  517. ~0u, // no _extensions_
  518. ~0u, // no _oneof_case_
  519. ~0u, // no _weak_field_map_
  520. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ListValueMessage, shopping_list_),
  521. ~0u, // no _has_bits_
  522. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::RequestMessage, _internal_metadata_),
  523. ~0u, // no _extensions_
  524. ~0u, // no _oneof_case_
  525. ~0u, // no _weak_field_map_
  526. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::RequestMessage, content_),
  527. ~0u, // no _has_bits_
  528. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyMessage, _internal_metadata_),
  529. ~0u, // no _extensions_
  530. ~0u, // no _oneof_case_
  531. ~0u, // no _weak_field_map_
  532. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyMessage, any_),
  533. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyMessage, data_),
  534. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData_MapDataEntry_DoNotUse, _has_bits_),
  535. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData_MapDataEntry_DoNotUse, _internal_metadata_),
  536. ~0u, // no _extensions_
  537. ~0u, // no _oneof_case_
  538. ~0u, // no _weak_field_map_
  539. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData_MapDataEntry_DoNotUse, key_),
  540. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData_MapDataEntry_DoNotUse, value_),
  541. 0,
  542. 1,
  543. ~0u, // no _has_bits_
  544. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData, _internal_metadata_),
  545. ~0u, // no _extensions_
  546. ~0u, // no _oneof_case_
  547. ~0u, // no _weak_field_map_
  548. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData, attr_),
  549. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData, str_),
  550. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData, msgs_),
  551. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData, nested_data_),
  552. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData, map_data_),
  553. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData, struct_data_),
  554. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyData, repeated_data_),
  555. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoIntMap_MapEntry_DoNotUse, _has_bits_),
  556. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoIntMap_MapEntry_DoNotUse, _internal_metadata_),
  557. ~0u, // no _extensions_
  558. ~0u, // no _oneof_case_
  559. ~0u, // no _weak_field_map_
  560. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoIntMap_MapEntry_DoNotUse, key_),
  561. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoIntMap_MapEntry_DoNotUse, value_),
  562. 0,
  563. 1,
  564. ~0u, // no _has_bits_
  565. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoIntMap, _internal_metadata_),
  566. ~0u, // no _extensions_
  567. ~0u, // no _oneof_case_
  568. ~0u, // no _weak_field_map_
  569. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoIntMap, map_),
  570. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToStringMap_MapEntry_DoNotUse, _has_bits_),
  571. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToStringMap_MapEntry_DoNotUse, _internal_metadata_),
  572. ~0u, // no _extensions_
  573. ~0u, // no _oneof_case_
  574. ~0u, // no _weak_field_map_
  575. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToStringMap_MapEntry_DoNotUse, key_),
  576. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToStringMap_MapEntry_DoNotUse, value_),
  577. 0,
  578. 1,
  579. ~0u, // no _has_bits_
  580. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToStringMap, _internal_metadata_),
  581. ~0u, // no _extensions_
  582. ~0u, // no _oneof_case_
  583. ~0u, // no _weak_field_map_
  584. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToStringMap, map_),
  585. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap_MapEntry_DoNotUse, _has_bits_),
  586. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap_MapEntry_DoNotUse, _internal_metadata_),
  587. ~0u, // no _extensions_
  588. ~0u, // no _oneof_case_
  589. ~0u, // no _weak_field_map_
  590. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap_MapEntry_DoNotUse, key_),
  591. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap_MapEntry_DoNotUse, value_),
  592. 0,
  593. 1,
  594. ~0u, // no _has_bits_
  595. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap, _internal_metadata_),
  596. ~0u, // no _extensions_
  597. ~0u, // no _oneof_case_
  598. ~0u, // no _weak_field_map_
  599. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap, msg_),
  600. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap, map_),
  601. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap, int_value_),
  602. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap2_MapEntry_DoNotUse, _has_bits_),
  603. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap2_MapEntry_DoNotUse, _internal_metadata_),
  604. ~0u, // no _extensions_
  605. ~0u, // no _oneof_case_
  606. ~0u, // no _weak_field_map_
  607. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap2_MapEntry_DoNotUse, key_),
  608. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap2_MapEntry_DoNotUse, value_),
  609. 0,
  610. 1,
  611. ~0u, // no _has_bits_
  612. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap2, _internal_metadata_),
  613. ~0u, // no _extensions_
  614. ~0u, // no _oneof_case_
  615. ~0u, // no _weak_field_map_
  616. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap2, map_),
  617. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap2, ee_),
  618. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MixedMap2, msg_),
  619. ~0u, // no _has_bits_
  620. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MessageMap_M, _internal_metadata_),
  621. ~0u, // no _extensions_
  622. ~0u, // no _oneof_case_
  623. ~0u, // no _weak_field_map_
  624. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MessageMap_M, inner_int_),
  625. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MessageMap_M, inner_text_),
  626. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MessageMap_MapEntry_DoNotUse, _has_bits_),
  627. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MessageMap_MapEntry_DoNotUse, _internal_metadata_),
  628. ~0u, // no _extensions_
  629. ~0u, // no _oneof_case_
  630. ~0u, // no _weak_field_map_
  631. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MessageMap_MapEntry_DoNotUse, key_),
  632. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MessageMap_MapEntry_DoNotUse, value_),
  633. 0,
  634. 1,
  635. ~0u, // no _has_bits_
  636. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MessageMap, _internal_metadata_),
  637. ~0u, // no _extensions_
  638. ~0u, // no _oneof_case_
  639. ~0u, // no _weak_field_map_
  640. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MessageMap, map_),
  641. ~0u, // no _has_bits_
  642. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleValueMessage, _internal_metadata_),
  643. ~0u, // no _extensions_
  644. ~0u, // no _oneof_case_
  645. ~0u, // no _weak_field_map_
  646. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleValueMessage, double__),
  647. };
  648. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  649. { 0, -1, sizeof(::google::protobuf::testing::DefaultValueTestCases)},
  650. { 49, -1, sizeof(::google::protobuf::testing::DoubleMessage)},
  651. { 62, -1, sizeof(::google::protobuf::testing::StructMessage)},
  652. { 68, -1, sizeof(::google::protobuf::testing::ValueMessage)},
  653. { 74, -1, sizeof(::google::protobuf::testing::ListValueMessage)},
  654. { 80, -1, sizeof(::google::protobuf::testing::RequestMessage)},
  655. { 86, -1, sizeof(::google::protobuf::testing::AnyMessage)},
  656. { 93, 100, sizeof(::google::protobuf::testing::AnyData_MapDataEntry_DoNotUse)},
  657. { 102, -1, sizeof(::google::protobuf::testing::AnyData)},
  658. { 114, 121, sizeof(::google::protobuf::testing::StringtoIntMap_MapEntry_DoNotUse)},
  659. { 123, -1, sizeof(::google::protobuf::testing::StringtoIntMap)},
  660. { 129, 136, sizeof(::google::protobuf::testing::IntToStringMap_MapEntry_DoNotUse)},
  661. { 138, -1, sizeof(::google::protobuf::testing::IntToStringMap)},
  662. { 144, 151, sizeof(::google::protobuf::testing::MixedMap_MapEntry_DoNotUse)},
  663. { 153, -1, sizeof(::google::protobuf::testing::MixedMap)},
  664. { 161, 168, sizeof(::google::protobuf::testing::MixedMap2_MapEntry_DoNotUse)},
  665. { 170, -1, sizeof(::google::protobuf::testing::MixedMap2)},
  666. { 178, -1, sizeof(::google::protobuf::testing::MessageMap_M)},
  667. { 185, 192, sizeof(::google::protobuf::testing::MessageMap_MapEntry_DoNotUse)},
  668. { 194, -1, sizeof(::google::protobuf::testing::MessageMap)},
  669. { 200, -1, sizeof(::google::protobuf::testing::DoubleValueMessage)},
  670. };
  671. static ::google::protobuf::Message const * const file_default_instances[] = {
  672. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_DefaultValueTestCases_default_instance_),
  673. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_DoubleMessage_default_instance_),
  674. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StructMessage_default_instance_),
  675. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_ValueMessage_default_instance_),
  676. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_ListValueMessage_default_instance_),
  677. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_RequestMessage_default_instance_),
  678. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyMessage_default_instance_),
  679. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyData_MapDataEntry_DoNotUse_default_instance_),
  680. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyData_default_instance_),
  681. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StringtoIntMap_MapEntry_DoNotUse_default_instance_),
  682. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StringtoIntMap_default_instance_),
  683. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_IntToStringMap_MapEntry_DoNotUse_default_instance_),
  684. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_IntToStringMap_default_instance_),
  685. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MixedMap_MapEntry_DoNotUse_default_instance_),
  686. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MixedMap_default_instance_),
  687. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MixedMap2_MapEntry_DoNotUse_default_instance_),
  688. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MixedMap2_default_instance_),
  689. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MessageMap_M_default_instance_),
  690. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MessageMap_MapEntry_DoNotUse_default_instance_),
  691. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MessageMap_default_instance_),
  692. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_DoubleValueMessage_default_instance_),
  693. };
  694. void protobuf_AssignDescriptors() {
  695. AddDescriptors();
  696. AssignDescriptors(
  697. "google/protobuf/util/internal/testdata/default_value.proto", schemas, file_default_instances, TableStruct::offsets,
  698. file_level_metadata, file_level_enum_descriptors, NULL);
  699. }
  700. void protobuf_AssignDescriptorsOnce() {
  701. static ::google::protobuf::internal::once_flag once;
  702. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  703. }
  704. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  705. void protobuf_RegisterTypes(const ::std::string&) {
  706. protobuf_AssignDescriptorsOnce();
  707. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 21);
  708. }
  709. void AddDescriptorsImpl() {
  710. InitDefaults();
  711. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  712. "\n:google/protobuf/util/internal/testdata"
  713. "/default_value.proto\022\027google.protobuf.te"
  714. "sting\032\031google/protobuf/any.proto\032\034google"
  715. "/protobuf/struct.proto\032\036google/protobuf/"
  716. "wrappers.proto\"\211\027\n\025DefaultValueTestCases"
  717. "\022<\n\014empty_double\030\001 \001(\0132&.google.protobuf"
  718. ".testing.DoubleMessage\022I\n\031double_with_de"
  719. "fault_value\030\002 \001(\0132&.google.protobuf.test"
  720. "ing.DoubleMessage\022L\n\034double_with_nondefa"
  721. "ult_value\030\003 \001(\0132&.google.protobuf.testin"
  722. "g.DoubleMessage\022\?\n\017repeated_double\030\004 \001(\013"
  723. "2&.google.protobuf.testing.DoubleMessage"
  724. "\022>\n\016nested_message\030\005 \001(\0132&.google.protob"
  725. "uf.testing.DoubleMessage\022G\n\027repeated_nes"
  726. "ted_message\030\006 \001(\0132&.google.protobuf.test"
  727. "ing.DoubleMessage\022I\n\031double_message_with"
  728. "_oneof\030\007 \001(\0132&.google.protobuf.testing.D"
  729. "oubleMessage\022=\n\014empty_struct\030\311\001 \001(\0132&.go"
  730. "ogle.protobuf.testing.StructMessage\022>\n\re"
  731. "mpty_struct2\030\312\001 \001(\0132&.google.protobuf.te"
  732. "sting.StructMessage\022G\n\026struct_with_null_"
  733. "value\030\313\001 \001(\0132&.google.protobuf.testing.S"
  734. "tructMessage\022C\n\022struct_with_values\030\314\001 \001("
  735. "\0132&.google.protobuf.testing.StructMessag"
  736. "e\022J\n\031struct_with_nested_struct\030\315\001 \001(\0132&."
  737. "google.protobuf.testing.StructMessage\022H\n"
  738. "\027struct_with_nested_list\030\316\001 \001(\0132&.google"
  739. ".protobuf.testing.StructMessage\022J\n\031struc"
  740. "t_with_list_of_nulls\030\317\001 \001(\0132&.google.pro"
  741. "tobuf.testing.StructMessage\022J\n\031struct_wi"
  742. "th_list_of_lists\030\320\001 \001(\0132&.google.protobu"
  743. "f.testing.StructMessage\022L\n\033struct_with_l"
  744. "ist_of_structs\030\321\001 \001(\0132&.google.protobuf."
  745. "testing.StructMessage\0222\n\020top_level_struc"
  746. "t\030\322\001 \001(\0132\027.google.protobuf.Struct\022D\n\024val"
  747. "ue_wrapper_simple\030\324\001 \001(\0132%.google.protob"
  748. "uf.testing.ValueMessage\022I\n\031value_wrapper"
  749. "_with_struct\030\325\001 \001(\0132%.google.protobuf.te"
  750. "sting.ValueMessage\022G\n\027value_wrapper_with"
  751. "_list\030\326\001 \001(\0132%.google.protobuf.testing.V"
  752. "alueMessage\022F\n\022list_value_wrapper\030\327\001 \001(\013"
  753. "2).google.protobuf.testing.ListValueMess"
  754. "age\0227\n\026top_level_value_simple\030\330\001 \001(\0132\026.g"
  755. "oogle.protobuf.Value\022<\n\033top_level_value_"
  756. "with_struct\030\331\001 \001(\0132\026.google.protobuf.Val"
  757. "ue\022:\n\031top_level_value_with_list\030\332\001 \001(\0132\026"
  758. ".google.protobuf.Value\0228\n\023top_level_list"
  759. "value\030\333\001 \001(\0132\032.google.protobuf.ListValue"
  760. "\0227\n\tempty_any\030\255\002 \001(\0132#.google.protobuf.t"
  761. "esting.AnyMessage\022;\n\rtype_only_any\030\256\002 \001("
  762. "\0132#.google.protobuf.testing.AnyMessage\022;"
  763. "\n\rrecursive_any\030\257\002 \001(\0132#.google.protobuf"
  764. ".testing.AnyMessage\022D\n\026any_with_message_"
  765. "value\030\260\002 \001(\0132#.google.protobuf.testing.A"
  766. "nyMessage\022E\n\027any_with_nested_message\030\261\002 "
  767. "\001(\0132#.google.protobuf.testing.AnyMessage"
  768. "\022M\n\037any_with_message_containing_map\030\262\002 \001"
  769. "(\0132#.google.protobuf.testing.AnyMessage\022"
  770. "P\n\"any_with_message_containing_struct\030\263\002"
  771. " \001(\0132#.google.protobuf.testing.AnyMessag"
  772. "e\022,\n\rtop_level_any\030\264\002 \001(\0132\024.google.proto"
  773. "buf.Any\022;\n\tempty_map\030\221\003 \001(\0132\'.google.pro"
  774. "tobuf.testing.StringtoIntMap\022\?\n\rstring_t"
  775. "o_int\030\222\003 \001(\0132\'.google.protobuf.testing.S"
  776. "tringtoIntMap\022\?\n\rint_to_string\030\223\003 \001(\0132\'."
  777. "google.protobuf.testing.IntToStringMap\0222"
  778. "\n\006mixed1\030\224\003 \001(\0132!.google.protobuf.testin"
  779. "g.MixedMap\0223\n\006mixed2\030\225\003 \001(\0132\".google.pro"
  780. "tobuf.testing.MixedMap2\0229\n\014empty_mixed2\030"
  781. "\226\003 \001(\0132\".google.protobuf.testing.MixedMa"
  782. "p2\022<\n\016map_of_objects\030\227\003 \001(\0132#.google.pro"
  783. "tobuf.testing.MessageMap\0227\n\013mixed_empty\030"
  784. "\230\003 \001(\0132!.google.protobuf.testing.MixedMa"
  785. "p\022\?\n\021message_map_empty\030\231\003 \001(\0132#.google.p"
  786. "rotobuf.testing.MessageMap\022B\n\014double_val"
  787. "ue\030\365\003 \001(\0132+.google.protobuf.testing.Doub"
  788. "leValueMessage\022J\n\024double_value_default\030\366"
  789. "\003 \001(\0132+.google.protobuf.testing.DoubleVa"
  790. "lueMessage\"\260\002\n\rDoubleMessage\022\024\n\014double_v"
  791. "alue\030\001 \001(\001\022\027\n\017repeated_double\030\002 \003(\001\022>\n\016n"
  792. "ested_message\030\003 \001(\0132&.google.protobuf.te"
  793. "sting.DoubleMessage\022G\n\027repeated_nested_m"
  794. "essage\030\004 \003(\0132&.google.protobuf.testing.D"
  795. "oubleMessage\0224\n\016double_wrapper\030d \001(\0132\034.g"
  796. "oogle.protobuf.DoubleValue\022\023\n\tstr_value\030"
  797. "p \001(\tH\000\022\023\n\tnum_value\030q \001(\003H\000B\007\n\005value\"8\n"
  798. "\rStructMessage\022\'\n\006struct\030\001 \001(\0132\027.google."
  799. "protobuf.Struct\"5\n\014ValueMessage\022%\n\005value"
  800. "\030\001 \001(\0132\026.google.protobuf.Value\"E\n\020ListVa"
  801. "lueMessage\0221\n\rshopping_list\030\001 \001(\0132\032.goog"
  802. "le.protobuf.ListValue\"!\n\016RequestMessage\022"
  803. "\017\n\007content\030\001 \001(\t\"_\n\nAnyMessage\022!\n\003any\030\001 "
  804. "\001(\0132\024.google.protobuf.Any\022.\n\004data\030\002 \001(\0132"
  805. " .google.protobuf.testing.AnyData\"\301\002\n\007An"
  806. "yData\022\014\n\004attr\030\001 \001(\005\022\013\n\003str\030\002 \001(\t\022\014\n\004msgs"
  807. "\030\003 \003(\t\0225\n\013nested_data\030\004 \001(\0132 .google.pro"
  808. "tobuf.testing.AnyData\022\?\n\010map_data\030\007 \003(\0132"
  809. "-.google.protobuf.testing.AnyData.MapDat"
  810. "aEntry\022,\n\013struct_data\030\010 \001(\0132\027.google.pro"
  811. "tobuf.Struct\0227\n\rrepeated_data\030\t \003(\0132 .go"
  812. "ogle.protobuf.testing.AnyData\032.\n\014MapData"
  813. "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"{\n"
  814. "\016StringtoIntMap\022=\n\003map\030\001 \003(\01320.google.pr"
  815. "otobuf.testing.StringtoIntMap.MapEntry\032*"
  816. "\n\010MapEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\002"
  817. "8\001\"{\n\016IntToStringMap\022=\n\003map\030\001 \003(\01320.goog"
  818. "le.protobuf.testing.IntToStringMap.MapEn"
  819. "try\032*\n\010MapEntry\022\013\n\003key\030\001 \001(\005\022\r\n\005value\030\002 "
  820. "\001(\t:\0028\001\"\217\001\n\010MixedMap\022\013\n\003msg\030\001 \001(\t\0227\n\003map"
  821. "\030\002 \003(\0132*.google.protobuf.testing.MixedMa"
  822. "p.MapEntry\022\021\n\tint_value\030\003 \001(\005\032*\n\010MapEntr"
  823. "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\002:\0028\001\"\325\001\n\tMi"
  824. "xedMap2\0228\n\003map\030\001 \003(\0132+.google.protobuf.t"
  825. "esting.MixedMap2.MapEntry\0220\n\002ee\030\002 \001(\0162$."
  826. "google.protobuf.testing.MixedMap2.E\022\013\n\003m"
  827. "sg\030\004 \001(\t\032*\n\010MapEntry\022\013\n\003key\030\001 \001(\005\022\r\n\005val"
  828. "ue\030\002 \001(\010:\0028\001\"#\n\001E\022\006\n\002E0\020\000\022\006\n\002E1\020\001\022\006\n\002E2\020"
  829. "\002\022\006\n\002E3\020\003\"\306\001\n\nMessageMap\0229\n\003map\030\001 \003(\0132,."
  830. "google.protobuf.testing.MessageMap.MapEn"
  831. "try\032*\n\001M\022\021\n\tinner_int\030\001 \001(\005\022\022\n\ninner_tex"
  832. "t\030\002 \001(\t\032Q\n\010MapEntry\022\013\n\003key\030\001 \001(\t\0224\n\005valu"
  833. "e\030\002 \001(\0132%.google.protobuf.testing.Messag"
  834. "eMap.M:\0028\001\"B\n\022DoubleValueMessage\022,\n\006doub"
  835. "le\030\001 \001(\0132\034.google.protobuf.DoubleValue2z"
  836. "\n\027DefaultValueTestService\022_\n\004Call\022\'.goog"
  837. "le.protobuf.testing.RequestMessage\032..goo"
  838. "gle.protobuf.testing.DefaultValueTestCas"
  839. "esb\006proto3"
  840. };
  841. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  842. descriptor, 5090);
  843. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  844. "google/protobuf/util/internal/testdata/default_value.proto", &protobuf_RegisterTypes);
  845. ::protobuf_google_2fprotobuf_2fany_2eproto::AddDescriptors();
  846. ::protobuf_google_2fprotobuf_2fstruct_2eproto::AddDescriptors();
  847. ::protobuf_google_2fprotobuf_2fwrappers_2eproto::AddDescriptors();
  848. }
  849. void AddDescriptors() {
  850. static ::google::protobuf::internal::once_flag once;
  851. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  852. }
  853. // Force AddDescriptors() to be called at dynamic initialization time.
  854. struct StaticDescriptorInitializer {
  855. StaticDescriptorInitializer() {
  856. AddDescriptors();
  857. }
  858. } static_descriptor_initializer;
  859. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto
  860. namespace google {
  861. namespace protobuf {
  862. namespace testing {
  863. const ::google::protobuf::EnumDescriptor* MixedMap2_E_descriptor() {
  864. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  865. return protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_enum_descriptors[0];
  866. }
  867. bool MixedMap2_E_IsValid(int value) {
  868. switch (value) {
  869. case 0:
  870. case 1:
  871. case 2:
  872. case 3:
  873. return true;
  874. default:
  875. return false;
  876. }
  877. }
  878. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  879. const MixedMap2_E MixedMap2::E0;
  880. const MixedMap2_E MixedMap2::E1;
  881. const MixedMap2_E MixedMap2::E2;
  882. const MixedMap2_E MixedMap2::E3;
  883. const MixedMap2_E MixedMap2::E_MIN;
  884. const MixedMap2_E MixedMap2::E_MAX;
  885. const int MixedMap2::E_ARRAYSIZE;
  886. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  887. // ===================================================================
  888. void DefaultValueTestCases::InitAsDefaultInstance() {
  889. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->empty_double_ = const_cast< ::google::protobuf::testing::DoubleMessage*>(
  890. ::google::protobuf::testing::DoubleMessage::internal_default_instance());
  891. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->double_with_default_value_ = const_cast< ::google::protobuf::testing::DoubleMessage*>(
  892. ::google::protobuf::testing::DoubleMessage::internal_default_instance());
  893. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->double_with_nondefault_value_ = const_cast< ::google::protobuf::testing::DoubleMessage*>(
  894. ::google::protobuf::testing::DoubleMessage::internal_default_instance());
  895. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->repeated_double_ = const_cast< ::google::protobuf::testing::DoubleMessage*>(
  896. ::google::protobuf::testing::DoubleMessage::internal_default_instance());
  897. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->nested_message_ = const_cast< ::google::protobuf::testing::DoubleMessage*>(
  898. ::google::protobuf::testing::DoubleMessage::internal_default_instance());
  899. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->repeated_nested_message_ = const_cast< ::google::protobuf::testing::DoubleMessage*>(
  900. ::google::protobuf::testing::DoubleMessage::internal_default_instance());
  901. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->double_message_with_oneof_ = const_cast< ::google::protobuf::testing::DoubleMessage*>(
  902. ::google::protobuf::testing::DoubleMessage::internal_default_instance());
  903. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->empty_struct_ = const_cast< ::google::protobuf::testing::StructMessage*>(
  904. ::google::protobuf::testing::StructMessage::internal_default_instance());
  905. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->empty_struct2_ = const_cast< ::google::protobuf::testing::StructMessage*>(
  906. ::google::protobuf::testing::StructMessage::internal_default_instance());
  907. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->struct_with_null_value_ = const_cast< ::google::protobuf::testing::StructMessage*>(
  908. ::google::protobuf::testing::StructMessage::internal_default_instance());
  909. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->struct_with_values_ = const_cast< ::google::protobuf::testing::StructMessage*>(
  910. ::google::protobuf::testing::StructMessage::internal_default_instance());
  911. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->struct_with_nested_struct_ = const_cast< ::google::protobuf::testing::StructMessage*>(
  912. ::google::protobuf::testing::StructMessage::internal_default_instance());
  913. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->struct_with_nested_list_ = const_cast< ::google::protobuf::testing::StructMessage*>(
  914. ::google::protobuf::testing::StructMessage::internal_default_instance());
  915. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->struct_with_list_of_nulls_ = const_cast< ::google::protobuf::testing::StructMessage*>(
  916. ::google::protobuf::testing::StructMessage::internal_default_instance());
  917. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->struct_with_list_of_lists_ = const_cast< ::google::protobuf::testing::StructMessage*>(
  918. ::google::protobuf::testing::StructMessage::internal_default_instance());
  919. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->struct_with_list_of_structs_ = const_cast< ::google::protobuf::testing::StructMessage*>(
  920. ::google::protobuf::testing::StructMessage::internal_default_instance());
  921. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->top_level_struct_ = const_cast< ::google::protobuf::Struct*>(
  922. ::google::protobuf::Struct::internal_default_instance());
  923. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->value_wrapper_simple_ = const_cast< ::google::protobuf::testing::ValueMessage*>(
  924. ::google::protobuf::testing::ValueMessage::internal_default_instance());
  925. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->value_wrapper_with_struct_ = const_cast< ::google::protobuf::testing::ValueMessage*>(
  926. ::google::protobuf::testing::ValueMessage::internal_default_instance());
  927. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->value_wrapper_with_list_ = const_cast< ::google::protobuf::testing::ValueMessage*>(
  928. ::google::protobuf::testing::ValueMessage::internal_default_instance());
  929. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->list_value_wrapper_ = const_cast< ::google::protobuf::testing::ListValueMessage*>(
  930. ::google::protobuf::testing::ListValueMessage::internal_default_instance());
  931. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->top_level_value_simple_ = const_cast< ::google::protobuf::Value*>(
  932. ::google::protobuf::Value::internal_default_instance());
  933. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->top_level_value_with_struct_ = const_cast< ::google::protobuf::Value*>(
  934. ::google::protobuf::Value::internal_default_instance());
  935. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->top_level_value_with_list_ = const_cast< ::google::protobuf::Value*>(
  936. ::google::protobuf::Value::internal_default_instance());
  937. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->top_level_listvalue_ = const_cast< ::google::protobuf::ListValue*>(
  938. ::google::protobuf::ListValue::internal_default_instance());
  939. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->empty_any_ = const_cast< ::google::protobuf::testing::AnyMessage*>(
  940. ::google::protobuf::testing::AnyMessage::internal_default_instance());
  941. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->type_only_any_ = const_cast< ::google::protobuf::testing::AnyMessage*>(
  942. ::google::protobuf::testing::AnyMessage::internal_default_instance());
  943. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->recursive_any_ = const_cast< ::google::protobuf::testing::AnyMessage*>(
  944. ::google::protobuf::testing::AnyMessage::internal_default_instance());
  945. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->any_with_message_value_ = const_cast< ::google::protobuf::testing::AnyMessage*>(
  946. ::google::protobuf::testing::AnyMessage::internal_default_instance());
  947. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->any_with_nested_message_ = const_cast< ::google::protobuf::testing::AnyMessage*>(
  948. ::google::protobuf::testing::AnyMessage::internal_default_instance());
  949. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->any_with_message_containing_map_ = const_cast< ::google::protobuf::testing::AnyMessage*>(
  950. ::google::protobuf::testing::AnyMessage::internal_default_instance());
  951. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->any_with_message_containing_struct_ = const_cast< ::google::protobuf::testing::AnyMessage*>(
  952. ::google::protobuf::testing::AnyMessage::internal_default_instance());
  953. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->top_level_any_ = const_cast< ::google::protobuf::Any*>(
  954. ::google::protobuf::Any::internal_default_instance());
  955. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->empty_map_ = const_cast< ::google::protobuf::testing::StringtoIntMap*>(
  956. ::google::protobuf::testing::StringtoIntMap::internal_default_instance());
  957. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->string_to_int_ = const_cast< ::google::protobuf::testing::StringtoIntMap*>(
  958. ::google::protobuf::testing::StringtoIntMap::internal_default_instance());
  959. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->int_to_string_ = const_cast< ::google::protobuf::testing::IntToStringMap*>(
  960. ::google::protobuf::testing::IntToStringMap::internal_default_instance());
  961. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->mixed1_ = const_cast< ::google::protobuf::testing::MixedMap*>(
  962. ::google::protobuf::testing::MixedMap::internal_default_instance());
  963. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->mixed2_ = const_cast< ::google::protobuf::testing::MixedMap2*>(
  964. ::google::protobuf::testing::MixedMap2::internal_default_instance());
  965. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->empty_mixed2_ = const_cast< ::google::protobuf::testing::MixedMap2*>(
  966. ::google::protobuf::testing::MixedMap2::internal_default_instance());
  967. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->map_of_objects_ = const_cast< ::google::protobuf::testing::MessageMap*>(
  968. ::google::protobuf::testing::MessageMap::internal_default_instance());
  969. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->mixed_empty_ = const_cast< ::google::protobuf::testing::MixedMap*>(
  970. ::google::protobuf::testing::MixedMap::internal_default_instance());
  971. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->message_map_empty_ = const_cast< ::google::protobuf::testing::MessageMap*>(
  972. ::google::protobuf::testing::MessageMap::internal_default_instance());
  973. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->double_value_ = const_cast< ::google::protobuf::testing::DoubleValueMessage*>(
  974. ::google::protobuf::testing::DoubleValueMessage::internal_default_instance());
  975. ::google::protobuf::testing::_DefaultValueTestCases_default_instance_._instance.get_mutable()->double_value_default_ = const_cast< ::google::protobuf::testing::DoubleValueMessage*>(
  976. ::google::protobuf::testing::DoubleValueMessage::internal_default_instance());
  977. }
  978. void DefaultValueTestCases::clear_top_level_struct() {
  979. if (GetArenaNoVirtual() == NULL && top_level_struct_ != NULL) {
  980. delete top_level_struct_;
  981. }
  982. top_level_struct_ = NULL;
  983. }
  984. void DefaultValueTestCases::clear_top_level_value_simple() {
  985. if (GetArenaNoVirtual() == NULL && top_level_value_simple_ != NULL) {
  986. delete top_level_value_simple_;
  987. }
  988. top_level_value_simple_ = NULL;
  989. }
  990. void DefaultValueTestCases::clear_top_level_value_with_struct() {
  991. if (GetArenaNoVirtual() == NULL && top_level_value_with_struct_ != NULL) {
  992. delete top_level_value_with_struct_;
  993. }
  994. top_level_value_with_struct_ = NULL;
  995. }
  996. void DefaultValueTestCases::clear_top_level_value_with_list() {
  997. if (GetArenaNoVirtual() == NULL && top_level_value_with_list_ != NULL) {
  998. delete top_level_value_with_list_;
  999. }
  1000. top_level_value_with_list_ = NULL;
  1001. }
  1002. void DefaultValueTestCases::clear_top_level_listvalue() {
  1003. if (GetArenaNoVirtual() == NULL && top_level_listvalue_ != NULL) {
  1004. delete top_level_listvalue_;
  1005. }
  1006. top_level_listvalue_ = NULL;
  1007. }
  1008. void DefaultValueTestCases::clear_top_level_any() {
  1009. if (GetArenaNoVirtual() == NULL && top_level_any_ != NULL) {
  1010. delete top_level_any_;
  1011. }
  1012. top_level_any_ = NULL;
  1013. }
  1014. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1015. const int DefaultValueTestCases::kEmptyDoubleFieldNumber;
  1016. const int DefaultValueTestCases::kDoubleWithDefaultValueFieldNumber;
  1017. const int DefaultValueTestCases::kDoubleWithNondefaultValueFieldNumber;
  1018. const int DefaultValueTestCases::kRepeatedDoubleFieldNumber;
  1019. const int DefaultValueTestCases::kNestedMessageFieldNumber;
  1020. const int DefaultValueTestCases::kRepeatedNestedMessageFieldNumber;
  1021. const int DefaultValueTestCases::kDoubleMessageWithOneofFieldNumber;
  1022. const int DefaultValueTestCases::kEmptyStructFieldNumber;
  1023. const int DefaultValueTestCases::kEmptyStruct2FieldNumber;
  1024. const int DefaultValueTestCases::kStructWithNullValueFieldNumber;
  1025. const int DefaultValueTestCases::kStructWithValuesFieldNumber;
  1026. const int DefaultValueTestCases::kStructWithNestedStructFieldNumber;
  1027. const int DefaultValueTestCases::kStructWithNestedListFieldNumber;
  1028. const int DefaultValueTestCases::kStructWithListOfNullsFieldNumber;
  1029. const int DefaultValueTestCases::kStructWithListOfListsFieldNumber;
  1030. const int DefaultValueTestCases::kStructWithListOfStructsFieldNumber;
  1031. const int DefaultValueTestCases::kTopLevelStructFieldNumber;
  1032. const int DefaultValueTestCases::kValueWrapperSimpleFieldNumber;
  1033. const int DefaultValueTestCases::kValueWrapperWithStructFieldNumber;
  1034. const int DefaultValueTestCases::kValueWrapperWithListFieldNumber;
  1035. const int DefaultValueTestCases::kListValueWrapperFieldNumber;
  1036. const int DefaultValueTestCases::kTopLevelValueSimpleFieldNumber;
  1037. const int DefaultValueTestCases::kTopLevelValueWithStructFieldNumber;
  1038. const int DefaultValueTestCases::kTopLevelValueWithListFieldNumber;
  1039. const int DefaultValueTestCases::kTopLevelListvalueFieldNumber;
  1040. const int DefaultValueTestCases::kEmptyAnyFieldNumber;
  1041. const int DefaultValueTestCases::kTypeOnlyAnyFieldNumber;
  1042. const int DefaultValueTestCases::kRecursiveAnyFieldNumber;
  1043. const int DefaultValueTestCases::kAnyWithMessageValueFieldNumber;
  1044. const int DefaultValueTestCases::kAnyWithNestedMessageFieldNumber;
  1045. const int DefaultValueTestCases::kAnyWithMessageContainingMapFieldNumber;
  1046. const int DefaultValueTestCases::kAnyWithMessageContainingStructFieldNumber;
  1047. const int DefaultValueTestCases::kTopLevelAnyFieldNumber;
  1048. const int DefaultValueTestCases::kEmptyMapFieldNumber;
  1049. const int DefaultValueTestCases::kStringToIntFieldNumber;
  1050. const int DefaultValueTestCases::kIntToStringFieldNumber;
  1051. const int DefaultValueTestCases::kMixed1FieldNumber;
  1052. const int DefaultValueTestCases::kMixed2FieldNumber;
  1053. const int DefaultValueTestCases::kEmptyMixed2FieldNumber;
  1054. const int DefaultValueTestCases::kMapOfObjectsFieldNumber;
  1055. const int DefaultValueTestCases::kMixedEmptyFieldNumber;
  1056. const int DefaultValueTestCases::kMessageMapEmptyFieldNumber;
  1057. const int DefaultValueTestCases::kDoubleValueFieldNumber;
  1058. const int DefaultValueTestCases::kDoubleValueDefaultFieldNumber;
  1059. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1060. DefaultValueTestCases::DefaultValueTestCases()
  1061. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1062. ::google::protobuf::internal::InitSCC(
  1063. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_DefaultValueTestCases.base);
  1064. SharedCtor();
  1065. // @@protoc_insertion_point(constructor:google.protobuf.testing.DefaultValueTestCases)
  1066. }
  1067. DefaultValueTestCases::DefaultValueTestCases(const DefaultValueTestCases& from)
  1068. : ::google::protobuf::Message(),
  1069. _internal_metadata_(NULL) {
  1070. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1071. if (from.has_empty_double()) {
  1072. empty_double_ = new ::google::protobuf::testing::DoubleMessage(*from.empty_double_);
  1073. } else {
  1074. empty_double_ = NULL;
  1075. }
  1076. if (from.has_double_with_default_value()) {
  1077. double_with_default_value_ = new ::google::protobuf::testing::DoubleMessage(*from.double_with_default_value_);
  1078. } else {
  1079. double_with_default_value_ = NULL;
  1080. }
  1081. if (from.has_double_with_nondefault_value()) {
  1082. double_with_nondefault_value_ = new ::google::protobuf::testing::DoubleMessage(*from.double_with_nondefault_value_);
  1083. } else {
  1084. double_with_nondefault_value_ = NULL;
  1085. }
  1086. if (from.has_repeated_double()) {
  1087. repeated_double_ = new ::google::protobuf::testing::DoubleMessage(*from.repeated_double_);
  1088. } else {
  1089. repeated_double_ = NULL;
  1090. }
  1091. if (from.has_nested_message()) {
  1092. nested_message_ = new ::google::protobuf::testing::DoubleMessage(*from.nested_message_);
  1093. } else {
  1094. nested_message_ = NULL;
  1095. }
  1096. if (from.has_repeated_nested_message()) {
  1097. repeated_nested_message_ = new ::google::protobuf::testing::DoubleMessage(*from.repeated_nested_message_);
  1098. } else {
  1099. repeated_nested_message_ = NULL;
  1100. }
  1101. if (from.has_double_message_with_oneof()) {
  1102. double_message_with_oneof_ = new ::google::protobuf::testing::DoubleMessage(*from.double_message_with_oneof_);
  1103. } else {
  1104. double_message_with_oneof_ = NULL;
  1105. }
  1106. if (from.has_empty_struct()) {
  1107. empty_struct_ = new ::google::protobuf::testing::StructMessage(*from.empty_struct_);
  1108. } else {
  1109. empty_struct_ = NULL;
  1110. }
  1111. if (from.has_empty_struct2()) {
  1112. empty_struct2_ = new ::google::protobuf::testing::StructMessage(*from.empty_struct2_);
  1113. } else {
  1114. empty_struct2_ = NULL;
  1115. }
  1116. if (from.has_struct_with_null_value()) {
  1117. struct_with_null_value_ = new ::google::protobuf::testing::StructMessage(*from.struct_with_null_value_);
  1118. } else {
  1119. struct_with_null_value_ = NULL;
  1120. }
  1121. if (from.has_struct_with_values()) {
  1122. struct_with_values_ = new ::google::protobuf::testing::StructMessage(*from.struct_with_values_);
  1123. } else {
  1124. struct_with_values_ = NULL;
  1125. }
  1126. if (from.has_struct_with_nested_struct()) {
  1127. struct_with_nested_struct_ = new ::google::protobuf::testing::StructMessage(*from.struct_with_nested_struct_);
  1128. } else {
  1129. struct_with_nested_struct_ = NULL;
  1130. }
  1131. if (from.has_struct_with_nested_list()) {
  1132. struct_with_nested_list_ = new ::google::protobuf::testing::StructMessage(*from.struct_with_nested_list_);
  1133. } else {
  1134. struct_with_nested_list_ = NULL;
  1135. }
  1136. if (from.has_struct_with_list_of_nulls()) {
  1137. struct_with_list_of_nulls_ = new ::google::protobuf::testing::StructMessage(*from.struct_with_list_of_nulls_);
  1138. } else {
  1139. struct_with_list_of_nulls_ = NULL;
  1140. }
  1141. if (from.has_struct_with_list_of_lists()) {
  1142. struct_with_list_of_lists_ = new ::google::protobuf::testing::StructMessage(*from.struct_with_list_of_lists_);
  1143. } else {
  1144. struct_with_list_of_lists_ = NULL;
  1145. }
  1146. if (from.has_struct_with_list_of_structs()) {
  1147. struct_with_list_of_structs_ = new ::google::protobuf::testing::StructMessage(*from.struct_with_list_of_structs_);
  1148. } else {
  1149. struct_with_list_of_structs_ = NULL;
  1150. }
  1151. if (from.has_top_level_struct()) {
  1152. top_level_struct_ = new ::google::protobuf::Struct(*from.top_level_struct_);
  1153. } else {
  1154. top_level_struct_ = NULL;
  1155. }
  1156. if (from.has_value_wrapper_simple()) {
  1157. value_wrapper_simple_ = new ::google::protobuf::testing::ValueMessage(*from.value_wrapper_simple_);
  1158. } else {
  1159. value_wrapper_simple_ = NULL;
  1160. }
  1161. if (from.has_value_wrapper_with_struct()) {
  1162. value_wrapper_with_struct_ = new ::google::protobuf::testing::ValueMessage(*from.value_wrapper_with_struct_);
  1163. } else {
  1164. value_wrapper_with_struct_ = NULL;
  1165. }
  1166. if (from.has_value_wrapper_with_list()) {
  1167. value_wrapper_with_list_ = new ::google::protobuf::testing::ValueMessage(*from.value_wrapper_with_list_);
  1168. } else {
  1169. value_wrapper_with_list_ = NULL;
  1170. }
  1171. if (from.has_list_value_wrapper()) {
  1172. list_value_wrapper_ = new ::google::protobuf::testing::ListValueMessage(*from.list_value_wrapper_);
  1173. } else {
  1174. list_value_wrapper_ = NULL;
  1175. }
  1176. if (from.has_top_level_value_simple()) {
  1177. top_level_value_simple_ = new ::google::protobuf::Value(*from.top_level_value_simple_);
  1178. } else {
  1179. top_level_value_simple_ = NULL;
  1180. }
  1181. if (from.has_top_level_value_with_struct()) {
  1182. top_level_value_with_struct_ = new ::google::protobuf::Value(*from.top_level_value_with_struct_);
  1183. } else {
  1184. top_level_value_with_struct_ = NULL;
  1185. }
  1186. if (from.has_top_level_value_with_list()) {
  1187. top_level_value_with_list_ = new ::google::protobuf::Value(*from.top_level_value_with_list_);
  1188. } else {
  1189. top_level_value_with_list_ = NULL;
  1190. }
  1191. if (from.has_top_level_listvalue()) {
  1192. top_level_listvalue_ = new ::google::protobuf::ListValue(*from.top_level_listvalue_);
  1193. } else {
  1194. top_level_listvalue_ = NULL;
  1195. }
  1196. if (from.has_empty_any()) {
  1197. empty_any_ = new ::google::protobuf::testing::AnyMessage(*from.empty_any_);
  1198. } else {
  1199. empty_any_ = NULL;
  1200. }
  1201. if (from.has_type_only_any()) {
  1202. type_only_any_ = new ::google::protobuf::testing::AnyMessage(*from.type_only_any_);
  1203. } else {
  1204. type_only_any_ = NULL;
  1205. }
  1206. if (from.has_recursive_any()) {
  1207. recursive_any_ = new ::google::protobuf::testing::AnyMessage(*from.recursive_any_);
  1208. } else {
  1209. recursive_any_ = NULL;
  1210. }
  1211. if (from.has_any_with_message_value()) {
  1212. any_with_message_value_ = new ::google::protobuf::testing::AnyMessage(*from.any_with_message_value_);
  1213. } else {
  1214. any_with_message_value_ = NULL;
  1215. }
  1216. if (from.has_any_with_nested_message()) {
  1217. any_with_nested_message_ = new ::google::protobuf::testing::AnyMessage(*from.any_with_nested_message_);
  1218. } else {
  1219. any_with_nested_message_ = NULL;
  1220. }
  1221. if (from.has_any_with_message_containing_map()) {
  1222. any_with_message_containing_map_ = new ::google::protobuf::testing::AnyMessage(*from.any_with_message_containing_map_);
  1223. } else {
  1224. any_with_message_containing_map_ = NULL;
  1225. }
  1226. if (from.has_any_with_message_containing_struct()) {
  1227. any_with_message_containing_struct_ = new ::google::protobuf::testing::AnyMessage(*from.any_with_message_containing_struct_);
  1228. } else {
  1229. any_with_message_containing_struct_ = NULL;
  1230. }
  1231. if (from.has_top_level_any()) {
  1232. top_level_any_ = new ::google::protobuf::Any(*from.top_level_any_);
  1233. } else {
  1234. top_level_any_ = NULL;
  1235. }
  1236. if (from.has_empty_map()) {
  1237. empty_map_ = new ::google::protobuf::testing::StringtoIntMap(*from.empty_map_);
  1238. } else {
  1239. empty_map_ = NULL;
  1240. }
  1241. if (from.has_string_to_int()) {
  1242. string_to_int_ = new ::google::protobuf::testing::StringtoIntMap(*from.string_to_int_);
  1243. } else {
  1244. string_to_int_ = NULL;
  1245. }
  1246. if (from.has_int_to_string()) {
  1247. int_to_string_ = new ::google::protobuf::testing::IntToStringMap(*from.int_to_string_);
  1248. } else {
  1249. int_to_string_ = NULL;
  1250. }
  1251. if (from.has_mixed1()) {
  1252. mixed1_ = new ::google::protobuf::testing::MixedMap(*from.mixed1_);
  1253. } else {
  1254. mixed1_ = NULL;
  1255. }
  1256. if (from.has_mixed2()) {
  1257. mixed2_ = new ::google::protobuf::testing::MixedMap2(*from.mixed2_);
  1258. } else {
  1259. mixed2_ = NULL;
  1260. }
  1261. if (from.has_empty_mixed2()) {
  1262. empty_mixed2_ = new ::google::protobuf::testing::MixedMap2(*from.empty_mixed2_);
  1263. } else {
  1264. empty_mixed2_ = NULL;
  1265. }
  1266. if (from.has_map_of_objects()) {
  1267. map_of_objects_ = new ::google::protobuf::testing::MessageMap(*from.map_of_objects_);
  1268. } else {
  1269. map_of_objects_ = NULL;
  1270. }
  1271. if (from.has_mixed_empty()) {
  1272. mixed_empty_ = new ::google::protobuf::testing::MixedMap(*from.mixed_empty_);
  1273. } else {
  1274. mixed_empty_ = NULL;
  1275. }
  1276. if (from.has_message_map_empty()) {
  1277. message_map_empty_ = new ::google::protobuf::testing::MessageMap(*from.message_map_empty_);
  1278. } else {
  1279. message_map_empty_ = NULL;
  1280. }
  1281. if (from.has_double_value()) {
  1282. double_value_ = new ::google::protobuf::testing::DoubleValueMessage(*from.double_value_);
  1283. } else {
  1284. double_value_ = NULL;
  1285. }
  1286. if (from.has_double_value_default()) {
  1287. double_value_default_ = new ::google::protobuf::testing::DoubleValueMessage(*from.double_value_default_);
  1288. } else {
  1289. double_value_default_ = NULL;
  1290. }
  1291. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.DefaultValueTestCases)
  1292. }
  1293. void DefaultValueTestCases::SharedCtor() {
  1294. ::memset(&empty_double_, 0, static_cast<size_t>(
  1295. reinterpret_cast<char*>(&double_value_default_) -
  1296. reinterpret_cast<char*>(&empty_double_)) + sizeof(double_value_default_));
  1297. }
  1298. DefaultValueTestCases::~DefaultValueTestCases() {
  1299. // @@protoc_insertion_point(destructor:google.protobuf.testing.DefaultValueTestCases)
  1300. SharedDtor();
  1301. }
  1302. void DefaultValueTestCases::SharedDtor() {
  1303. if (this != internal_default_instance()) delete empty_double_;
  1304. if (this != internal_default_instance()) delete double_with_default_value_;
  1305. if (this != internal_default_instance()) delete double_with_nondefault_value_;
  1306. if (this != internal_default_instance()) delete repeated_double_;
  1307. if (this != internal_default_instance()) delete nested_message_;
  1308. if (this != internal_default_instance()) delete repeated_nested_message_;
  1309. if (this != internal_default_instance()) delete double_message_with_oneof_;
  1310. if (this != internal_default_instance()) delete empty_struct_;
  1311. if (this != internal_default_instance()) delete empty_struct2_;
  1312. if (this != internal_default_instance()) delete struct_with_null_value_;
  1313. if (this != internal_default_instance()) delete struct_with_values_;
  1314. if (this != internal_default_instance()) delete struct_with_nested_struct_;
  1315. if (this != internal_default_instance()) delete struct_with_nested_list_;
  1316. if (this != internal_default_instance()) delete struct_with_list_of_nulls_;
  1317. if (this != internal_default_instance()) delete struct_with_list_of_lists_;
  1318. if (this != internal_default_instance()) delete struct_with_list_of_structs_;
  1319. if (this != internal_default_instance()) delete top_level_struct_;
  1320. if (this != internal_default_instance()) delete value_wrapper_simple_;
  1321. if (this != internal_default_instance()) delete value_wrapper_with_struct_;
  1322. if (this != internal_default_instance()) delete value_wrapper_with_list_;
  1323. if (this != internal_default_instance()) delete list_value_wrapper_;
  1324. if (this != internal_default_instance()) delete top_level_value_simple_;
  1325. if (this != internal_default_instance()) delete top_level_value_with_struct_;
  1326. if (this != internal_default_instance()) delete top_level_value_with_list_;
  1327. if (this != internal_default_instance()) delete top_level_listvalue_;
  1328. if (this != internal_default_instance()) delete empty_any_;
  1329. if (this != internal_default_instance()) delete type_only_any_;
  1330. if (this != internal_default_instance()) delete recursive_any_;
  1331. if (this != internal_default_instance()) delete any_with_message_value_;
  1332. if (this != internal_default_instance()) delete any_with_nested_message_;
  1333. if (this != internal_default_instance()) delete any_with_message_containing_map_;
  1334. if (this != internal_default_instance()) delete any_with_message_containing_struct_;
  1335. if (this != internal_default_instance()) delete top_level_any_;
  1336. if (this != internal_default_instance()) delete empty_map_;
  1337. if (this != internal_default_instance()) delete string_to_int_;
  1338. if (this != internal_default_instance()) delete int_to_string_;
  1339. if (this != internal_default_instance()) delete mixed1_;
  1340. if (this != internal_default_instance()) delete mixed2_;
  1341. if (this != internal_default_instance()) delete empty_mixed2_;
  1342. if (this != internal_default_instance()) delete map_of_objects_;
  1343. if (this != internal_default_instance()) delete mixed_empty_;
  1344. if (this != internal_default_instance()) delete message_map_empty_;
  1345. if (this != internal_default_instance()) delete double_value_;
  1346. if (this != internal_default_instance()) delete double_value_default_;
  1347. }
  1348. void DefaultValueTestCases::SetCachedSize(int size) const {
  1349. _cached_size_.Set(size);
  1350. }
  1351. const ::google::protobuf::Descriptor* DefaultValueTestCases::descriptor() {
  1352. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  1353. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1354. }
  1355. const DefaultValueTestCases& DefaultValueTestCases::default_instance() {
  1356. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_DefaultValueTestCases.base);
  1357. return *internal_default_instance();
  1358. }
  1359. void DefaultValueTestCases::Clear() {
  1360. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.DefaultValueTestCases)
  1361. ::google::protobuf::uint32 cached_has_bits = 0;
  1362. // Prevent compiler warnings about cached_has_bits being unused
  1363. (void) cached_has_bits;
  1364. if (GetArenaNoVirtual() == NULL && empty_double_ != NULL) {
  1365. delete empty_double_;
  1366. }
  1367. empty_double_ = NULL;
  1368. if (GetArenaNoVirtual() == NULL && double_with_default_value_ != NULL) {
  1369. delete double_with_default_value_;
  1370. }
  1371. double_with_default_value_ = NULL;
  1372. if (GetArenaNoVirtual() == NULL && double_with_nondefault_value_ != NULL) {
  1373. delete double_with_nondefault_value_;
  1374. }
  1375. double_with_nondefault_value_ = NULL;
  1376. if (GetArenaNoVirtual() == NULL && repeated_double_ != NULL) {
  1377. delete repeated_double_;
  1378. }
  1379. repeated_double_ = NULL;
  1380. if (GetArenaNoVirtual() == NULL && nested_message_ != NULL) {
  1381. delete nested_message_;
  1382. }
  1383. nested_message_ = NULL;
  1384. if (GetArenaNoVirtual() == NULL && repeated_nested_message_ != NULL) {
  1385. delete repeated_nested_message_;
  1386. }
  1387. repeated_nested_message_ = NULL;
  1388. if (GetArenaNoVirtual() == NULL && double_message_with_oneof_ != NULL) {
  1389. delete double_message_with_oneof_;
  1390. }
  1391. double_message_with_oneof_ = NULL;
  1392. if (GetArenaNoVirtual() == NULL && empty_struct_ != NULL) {
  1393. delete empty_struct_;
  1394. }
  1395. empty_struct_ = NULL;
  1396. if (GetArenaNoVirtual() == NULL && empty_struct2_ != NULL) {
  1397. delete empty_struct2_;
  1398. }
  1399. empty_struct2_ = NULL;
  1400. if (GetArenaNoVirtual() == NULL && struct_with_null_value_ != NULL) {
  1401. delete struct_with_null_value_;
  1402. }
  1403. struct_with_null_value_ = NULL;
  1404. if (GetArenaNoVirtual() == NULL && struct_with_values_ != NULL) {
  1405. delete struct_with_values_;
  1406. }
  1407. struct_with_values_ = NULL;
  1408. if (GetArenaNoVirtual() == NULL && struct_with_nested_struct_ != NULL) {
  1409. delete struct_with_nested_struct_;
  1410. }
  1411. struct_with_nested_struct_ = NULL;
  1412. if (GetArenaNoVirtual() == NULL && struct_with_nested_list_ != NULL) {
  1413. delete struct_with_nested_list_;
  1414. }
  1415. struct_with_nested_list_ = NULL;
  1416. if (GetArenaNoVirtual() == NULL && struct_with_list_of_nulls_ != NULL) {
  1417. delete struct_with_list_of_nulls_;
  1418. }
  1419. struct_with_list_of_nulls_ = NULL;
  1420. if (GetArenaNoVirtual() == NULL && struct_with_list_of_lists_ != NULL) {
  1421. delete struct_with_list_of_lists_;
  1422. }
  1423. struct_with_list_of_lists_ = NULL;
  1424. if (GetArenaNoVirtual() == NULL && struct_with_list_of_structs_ != NULL) {
  1425. delete struct_with_list_of_structs_;
  1426. }
  1427. struct_with_list_of_structs_ = NULL;
  1428. if (GetArenaNoVirtual() == NULL && top_level_struct_ != NULL) {
  1429. delete top_level_struct_;
  1430. }
  1431. top_level_struct_ = NULL;
  1432. if (GetArenaNoVirtual() == NULL && value_wrapper_simple_ != NULL) {
  1433. delete value_wrapper_simple_;
  1434. }
  1435. value_wrapper_simple_ = NULL;
  1436. if (GetArenaNoVirtual() == NULL && value_wrapper_with_struct_ != NULL) {
  1437. delete value_wrapper_with_struct_;
  1438. }
  1439. value_wrapper_with_struct_ = NULL;
  1440. if (GetArenaNoVirtual() == NULL && value_wrapper_with_list_ != NULL) {
  1441. delete value_wrapper_with_list_;
  1442. }
  1443. value_wrapper_with_list_ = NULL;
  1444. if (GetArenaNoVirtual() == NULL && list_value_wrapper_ != NULL) {
  1445. delete list_value_wrapper_;
  1446. }
  1447. list_value_wrapper_ = NULL;
  1448. if (GetArenaNoVirtual() == NULL && top_level_value_simple_ != NULL) {
  1449. delete top_level_value_simple_;
  1450. }
  1451. top_level_value_simple_ = NULL;
  1452. if (GetArenaNoVirtual() == NULL && top_level_value_with_struct_ != NULL) {
  1453. delete top_level_value_with_struct_;
  1454. }
  1455. top_level_value_with_struct_ = NULL;
  1456. if (GetArenaNoVirtual() == NULL && top_level_value_with_list_ != NULL) {
  1457. delete top_level_value_with_list_;
  1458. }
  1459. top_level_value_with_list_ = NULL;
  1460. if (GetArenaNoVirtual() == NULL && top_level_listvalue_ != NULL) {
  1461. delete top_level_listvalue_;
  1462. }
  1463. top_level_listvalue_ = NULL;
  1464. if (GetArenaNoVirtual() == NULL && empty_any_ != NULL) {
  1465. delete empty_any_;
  1466. }
  1467. empty_any_ = NULL;
  1468. if (GetArenaNoVirtual() == NULL && type_only_any_ != NULL) {
  1469. delete type_only_any_;
  1470. }
  1471. type_only_any_ = NULL;
  1472. if (GetArenaNoVirtual() == NULL && recursive_any_ != NULL) {
  1473. delete recursive_any_;
  1474. }
  1475. recursive_any_ = NULL;
  1476. if (GetArenaNoVirtual() == NULL && any_with_message_value_ != NULL) {
  1477. delete any_with_message_value_;
  1478. }
  1479. any_with_message_value_ = NULL;
  1480. if (GetArenaNoVirtual() == NULL && any_with_nested_message_ != NULL) {
  1481. delete any_with_nested_message_;
  1482. }
  1483. any_with_nested_message_ = NULL;
  1484. if (GetArenaNoVirtual() == NULL && any_with_message_containing_map_ != NULL) {
  1485. delete any_with_message_containing_map_;
  1486. }
  1487. any_with_message_containing_map_ = NULL;
  1488. if (GetArenaNoVirtual() == NULL && any_with_message_containing_struct_ != NULL) {
  1489. delete any_with_message_containing_struct_;
  1490. }
  1491. any_with_message_containing_struct_ = NULL;
  1492. if (GetArenaNoVirtual() == NULL && top_level_any_ != NULL) {
  1493. delete top_level_any_;
  1494. }
  1495. top_level_any_ = NULL;
  1496. if (GetArenaNoVirtual() == NULL && empty_map_ != NULL) {
  1497. delete empty_map_;
  1498. }
  1499. empty_map_ = NULL;
  1500. if (GetArenaNoVirtual() == NULL && string_to_int_ != NULL) {
  1501. delete string_to_int_;
  1502. }
  1503. string_to_int_ = NULL;
  1504. if (GetArenaNoVirtual() == NULL && int_to_string_ != NULL) {
  1505. delete int_to_string_;
  1506. }
  1507. int_to_string_ = NULL;
  1508. if (GetArenaNoVirtual() == NULL && mixed1_ != NULL) {
  1509. delete mixed1_;
  1510. }
  1511. mixed1_ = NULL;
  1512. if (GetArenaNoVirtual() == NULL && mixed2_ != NULL) {
  1513. delete mixed2_;
  1514. }
  1515. mixed2_ = NULL;
  1516. if (GetArenaNoVirtual() == NULL && empty_mixed2_ != NULL) {
  1517. delete empty_mixed2_;
  1518. }
  1519. empty_mixed2_ = NULL;
  1520. if (GetArenaNoVirtual() == NULL && map_of_objects_ != NULL) {
  1521. delete map_of_objects_;
  1522. }
  1523. map_of_objects_ = NULL;
  1524. if (GetArenaNoVirtual() == NULL && mixed_empty_ != NULL) {
  1525. delete mixed_empty_;
  1526. }
  1527. mixed_empty_ = NULL;
  1528. if (GetArenaNoVirtual() == NULL && message_map_empty_ != NULL) {
  1529. delete message_map_empty_;
  1530. }
  1531. message_map_empty_ = NULL;
  1532. if (GetArenaNoVirtual() == NULL && double_value_ != NULL) {
  1533. delete double_value_;
  1534. }
  1535. double_value_ = NULL;
  1536. if (GetArenaNoVirtual() == NULL && double_value_default_ != NULL) {
  1537. delete double_value_default_;
  1538. }
  1539. double_value_default_ = NULL;
  1540. _internal_metadata_.Clear();
  1541. }
  1542. bool DefaultValueTestCases::MergePartialFromCodedStream(
  1543. ::google::protobuf::io::CodedInputStream* input) {
  1544. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1545. ::google::protobuf::uint32 tag;
  1546. // @@protoc_insertion_point(parse_start:google.protobuf.testing.DefaultValueTestCases)
  1547. for (;;) {
  1548. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  1549. tag = p.first;
  1550. if (!p.second) goto handle_unusual;
  1551. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1552. // .google.protobuf.testing.DoubleMessage empty_double = 1;
  1553. case 1: {
  1554. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1555. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1556. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1557. input, mutable_empty_double()));
  1558. } else {
  1559. goto handle_unusual;
  1560. }
  1561. break;
  1562. }
  1563. // .google.protobuf.testing.DoubleMessage double_with_default_value = 2;
  1564. case 2: {
  1565. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1566. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1567. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1568. input, mutable_double_with_default_value()));
  1569. } else {
  1570. goto handle_unusual;
  1571. }
  1572. break;
  1573. }
  1574. // .google.protobuf.testing.DoubleMessage double_with_nondefault_value = 3;
  1575. case 3: {
  1576. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1577. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1578. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1579. input, mutable_double_with_nondefault_value()));
  1580. } else {
  1581. goto handle_unusual;
  1582. }
  1583. break;
  1584. }
  1585. // .google.protobuf.testing.DoubleMessage repeated_double = 4;
  1586. case 4: {
  1587. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1588. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1589. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1590. input, mutable_repeated_double()));
  1591. } else {
  1592. goto handle_unusual;
  1593. }
  1594. break;
  1595. }
  1596. // .google.protobuf.testing.DoubleMessage nested_message = 5;
  1597. case 5: {
  1598. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1599. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  1600. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1601. input, mutable_nested_message()));
  1602. } else {
  1603. goto handle_unusual;
  1604. }
  1605. break;
  1606. }
  1607. // .google.protobuf.testing.DoubleMessage repeated_nested_message = 6;
  1608. case 6: {
  1609. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1610. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  1611. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1612. input, mutable_repeated_nested_message()));
  1613. } else {
  1614. goto handle_unusual;
  1615. }
  1616. break;
  1617. }
  1618. // .google.protobuf.testing.DoubleMessage double_message_with_oneof = 7;
  1619. case 7: {
  1620. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1621. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  1622. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1623. input, mutable_double_message_with_oneof()));
  1624. } else {
  1625. goto handle_unusual;
  1626. }
  1627. break;
  1628. }
  1629. // .google.protobuf.testing.StructMessage empty_struct = 201;
  1630. case 201: {
  1631. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1632. static_cast< ::google::protobuf::uint8>(74u /* 1610 & 0xFF */)) {
  1633. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1634. input, mutable_empty_struct()));
  1635. } else {
  1636. goto handle_unusual;
  1637. }
  1638. break;
  1639. }
  1640. // .google.protobuf.testing.StructMessage empty_struct2 = 202;
  1641. case 202: {
  1642. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1643. static_cast< ::google::protobuf::uint8>(82u /* 1618 & 0xFF */)) {
  1644. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1645. input, mutable_empty_struct2()));
  1646. } else {
  1647. goto handle_unusual;
  1648. }
  1649. break;
  1650. }
  1651. // .google.protobuf.testing.StructMessage struct_with_null_value = 203;
  1652. case 203: {
  1653. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1654. static_cast< ::google::protobuf::uint8>(90u /* 1626 & 0xFF */)) {
  1655. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1656. input, mutable_struct_with_null_value()));
  1657. } else {
  1658. goto handle_unusual;
  1659. }
  1660. break;
  1661. }
  1662. // .google.protobuf.testing.StructMessage struct_with_values = 204;
  1663. case 204: {
  1664. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1665. static_cast< ::google::protobuf::uint8>(98u /* 1634 & 0xFF */)) {
  1666. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1667. input, mutable_struct_with_values()));
  1668. } else {
  1669. goto handle_unusual;
  1670. }
  1671. break;
  1672. }
  1673. // .google.protobuf.testing.StructMessage struct_with_nested_struct = 205;
  1674. case 205: {
  1675. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1676. static_cast< ::google::protobuf::uint8>(106u /* 1642 & 0xFF */)) {
  1677. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1678. input, mutable_struct_with_nested_struct()));
  1679. } else {
  1680. goto handle_unusual;
  1681. }
  1682. break;
  1683. }
  1684. // .google.protobuf.testing.StructMessage struct_with_nested_list = 206;
  1685. case 206: {
  1686. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1687. static_cast< ::google::protobuf::uint8>(114u /* 1650 & 0xFF */)) {
  1688. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1689. input, mutable_struct_with_nested_list()));
  1690. } else {
  1691. goto handle_unusual;
  1692. }
  1693. break;
  1694. }
  1695. // .google.protobuf.testing.StructMessage struct_with_list_of_nulls = 207;
  1696. case 207: {
  1697. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1698. static_cast< ::google::protobuf::uint8>(122u /* 1658 & 0xFF */)) {
  1699. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1700. input, mutable_struct_with_list_of_nulls()));
  1701. } else {
  1702. goto handle_unusual;
  1703. }
  1704. break;
  1705. }
  1706. // .google.protobuf.testing.StructMessage struct_with_list_of_lists = 208;
  1707. case 208: {
  1708. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1709. static_cast< ::google::protobuf::uint8>(130u /* 1666 & 0xFF */)) {
  1710. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1711. input, mutable_struct_with_list_of_lists()));
  1712. } else {
  1713. goto handle_unusual;
  1714. }
  1715. break;
  1716. }
  1717. // .google.protobuf.testing.StructMessage struct_with_list_of_structs = 209;
  1718. case 209: {
  1719. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1720. static_cast< ::google::protobuf::uint8>(138u /* 1674 & 0xFF */)) {
  1721. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1722. input, mutable_struct_with_list_of_structs()));
  1723. } else {
  1724. goto handle_unusual;
  1725. }
  1726. break;
  1727. }
  1728. // .google.protobuf.Struct top_level_struct = 210;
  1729. case 210: {
  1730. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1731. static_cast< ::google::protobuf::uint8>(146u /* 1682 & 0xFF */)) {
  1732. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1733. input, mutable_top_level_struct()));
  1734. } else {
  1735. goto handle_unusual;
  1736. }
  1737. break;
  1738. }
  1739. // .google.protobuf.testing.ValueMessage value_wrapper_simple = 212;
  1740. case 212: {
  1741. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1742. static_cast< ::google::protobuf::uint8>(162u /* 1698 & 0xFF */)) {
  1743. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1744. input, mutable_value_wrapper_simple()));
  1745. } else {
  1746. goto handle_unusual;
  1747. }
  1748. break;
  1749. }
  1750. // .google.protobuf.testing.ValueMessage value_wrapper_with_struct = 213;
  1751. case 213: {
  1752. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1753. static_cast< ::google::protobuf::uint8>(170u /* 1706 & 0xFF */)) {
  1754. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1755. input, mutable_value_wrapper_with_struct()));
  1756. } else {
  1757. goto handle_unusual;
  1758. }
  1759. break;
  1760. }
  1761. // .google.protobuf.testing.ValueMessage value_wrapper_with_list = 214;
  1762. case 214: {
  1763. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1764. static_cast< ::google::protobuf::uint8>(178u /* 1714 & 0xFF */)) {
  1765. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1766. input, mutable_value_wrapper_with_list()));
  1767. } else {
  1768. goto handle_unusual;
  1769. }
  1770. break;
  1771. }
  1772. // .google.protobuf.testing.ListValueMessage list_value_wrapper = 215;
  1773. case 215: {
  1774. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1775. static_cast< ::google::protobuf::uint8>(186u /* 1722 & 0xFF */)) {
  1776. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1777. input, mutable_list_value_wrapper()));
  1778. } else {
  1779. goto handle_unusual;
  1780. }
  1781. break;
  1782. }
  1783. // .google.protobuf.Value top_level_value_simple = 216;
  1784. case 216: {
  1785. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1786. static_cast< ::google::protobuf::uint8>(194u /* 1730 & 0xFF */)) {
  1787. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1788. input, mutable_top_level_value_simple()));
  1789. } else {
  1790. goto handle_unusual;
  1791. }
  1792. break;
  1793. }
  1794. // .google.protobuf.Value top_level_value_with_struct = 217;
  1795. case 217: {
  1796. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1797. static_cast< ::google::protobuf::uint8>(202u /* 1738 & 0xFF */)) {
  1798. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1799. input, mutable_top_level_value_with_struct()));
  1800. } else {
  1801. goto handle_unusual;
  1802. }
  1803. break;
  1804. }
  1805. // .google.protobuf.Value top_level_value_with_list = 218;
  1806. case 218: {
  1807. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1808. static_cast< ::google::protobuf::uint8>(210u /* 1746 & 0xFF */)) {
  1809. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1810. input, mutable_top_level_value_with_list()));
  1811. } else {
  1812. goto handle_unusual;
  1813. }
  1814. break;
  1815. }
  1816. // .google.protobuf.ListValue top_level_listvalue = 219;
  1817. case 219: {
  1818. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1819. static_cast< ::google::protobuf::uint8>(218u /* 1754 & 0xFF */)) {
  1820. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1821. input, mutable_top_level_listvalue()));
  1822. } else {
  1823. goto handle_unusual;
  1824. }
  1825. break;
  1826. }
  1827. // .google.protobuf.testing.AnyMessage empty_any = 301;
  1828. case 301: {
  1829. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1830. static_cast< ::google::protobuf::uint8>(106u /* 2410 & 0xFF */)) {
  1831. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1832. input, mutable_empty_any()));
  1833. } else {
  1834. goto handle_unusual;
  1835. }
  1836. break;
  1837. }
  1838. // .google.protobuf.testing.AnyMessage type_only_any = 302;
  1839. case 302: {
  1840. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1841. static_cast< ::google::protobuf::uint8>(114u /* 2418 & 0xFF */)) {
  1842. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1843. input, mutable_type_only_any()));
  1844. } else {
  1845. goto handle_unusual;
  1846. }
  1847. break;
  1848. }
  1849. // .google.protobuf.testing.AnyMessage recursive_any = 303;
  1850. case 303: {
  1851. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1852. static_cast< ::google::protobuf::uint8>(122u /* 2426 & 0xFF */)) {
  1853. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1854. input, mutable_recursive_any()));
  1855. } else {
  1856. goto handle_unusual;
  1857. }
  1858. break;
  1859. }
  1860. // .google.protobuf.testing.AnyMessage any_with_message_value = 304;
  1861. case 304: {
  1862. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1863. static_cast< ::google::protobuf::uint8>(130u /* 2434 & 0xFF */)) {
  1864. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1865. input, mutable_any_with_message_value()));
  1866. } else {
  1867. goto handle_unusual;
  1868. }
  1869. break;
  1870. }
  1871. // .google.protobuf.testing.AnyMessage any_with_nested_message = 305;
  1872. case 305: {
  1873. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1874. static_cast< ::google::protobuf::uint8>(138u /* 2442 & 0xFF */)) {
  1875. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1876. input, mutable_any_with_nested_message()));
  1877. } else {
  1878. goto handle_unusual;
  1879. }
  1880. break;
  1881. }
  1882. // .google.protobuf.testing.AnyMessage any_with_message_containing_map = 306;
  1883. case 306: {
  1884. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1885. static_cast< ::google::protobuf::uint8>(146u /* 2450 & 0xFF */)) {
  1886. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1887. input, mutable_any_with_message_containing_map()));
  1888. } else {
  1889. goto handle_unusual;
  1890. }
  1891. break;
  1892. }
  1893. // .google.protobuf.testing.AnyMessage any_with_message_containing_struct = 307;
  1894. case 307: {
  1895. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1896. static_cast< ::google::protobuf::uint8>(154u /* 2458 & 0xFF */)) {
  1897. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1898. input, mutable_any_with_message_containing_struct()));
  1899. } else {
  1900. goto handle_unusual;
  1901. }
  1902. break;
  1903. }
  1904. // .google.protobuf.Any top_level_any = 308;
  1905. case 308: {
  1906. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1907. static_cast< ::google::protobuf::uint8>(162u /* 2466 & 0xFF */)) {
  1908. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1909. input, mutable_top_level_any()));
  1910. } else {
  1911. goto handle_unusual;
  1912. }
  1913. break;
  1914. }
  1915. // .google.protobuf.testing.StringtoIntMap empty_map = 401;
  1916. case 401: {
  1917. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1918. static_cast< ::google::protobuf::uint8>(138u /* 3210 & 0xFF */)) {
  1919. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1920. input, mutable_empty_map()));
  1921. } else {
  1922. goto handle_unusual;
  1923. }
  1924. break;
  1925. }
  1926. // .google.protobuf.testing.StringtoIntMap string_to_int = 402;
  1927. case 402: {
  1928. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1929. static_cast< ::google::protobuf::uint8>(146u /* 3218 & 0xFF */)) {
  1930. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1931. input, mutable_string_to_int()));
  1932. } else {
  1933. goto handle_unusual;
  1934. }
  1935. break;
  1936. }
  1937. // .google.protobuf.testing.IntToStringMap int_to_string = 403;
  1938. case 403: {
  1939. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1940. static_cast< ::google::protobuf::uint8>(154u /* 3226 & 0xFF */)) {
  1941. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1942. input, mutable_int_to_string()));
  1943. } else {
  1944. goto handle_unusual;
  1945. }
  1946. break;
  1947. }
  1948. // .google.protobuf.testing.MixedMap mixed1 = 404;
  1949. case 404: {
  1950. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1951. static_cast< ::google::protobuf::uint8>(162u /* 3234 & 0xFF */)) {
  1952. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1953. input, mutable_mixed1()));
  1954. } else {
  1955. goto handle_unusual;
  1956. }
  1957. break;
  1958. }
  1959. // .google.protobuf.testing.MixedMap2 mixed2 = 405;
  1960. case 405: {
  1961. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1962. static_cast< ::google::protobuf::uint8>(170u /* 3242 & 0xFF */)) {
  1963. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1964. input, mutable_mixed2()));
  1965. } else {
  1966. goto handle_unusual;
  1967. }
  1968. break;
  1969. }
  1970. // .google.protobuf.testing.MixedMap2 empty_mixed2 = 406;
  1971. case 406: {
  1972. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1973. static_cast< ::google::protobuf::uint8>(178u /* 3250 & 0xFF */)) {
  1974. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1975. input, mutable_empty_mixed2()));
  1976. } else {
  1977. goto handle_unusual;
  1978. }
  1979. break;
  1980. }
  1981. // .google.protobuf.testing.MessageMap map_of_objects = 407;
  1982. case 407: {
  1983. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1984. static_cast< ::google::protobuf::uint8>(186u /* 3258 & 0xFF */)) {
  1985. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1986. input, mutable_map_of_objects()));
  1987. } else {
  1988. goto handle_unusual;
  1989. }
  1990. break;
  1991. }
  1992. // .google.protobuf.testing.MixedMap mixed_empty = 408;
  1993. case 408: {
  1994. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1995. static_cast< ::google::protobuf::uint8>(194u /* 3266 & 0xFF */)) {
  1996. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1997. input, mutable_mixed_empty()));
  1998. } else {
  1999. goto handle_unusual;
  2000. }
  2001. break;
  2002. }
  2003. // .google.protobuf.testing.MessageMap message_map_empty = 409;
  2004. case 409: {
  2005. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2006. static_cast< ::google::protobuf::uint8>(202u /* 3274 & 0xFF */)) {
  2007. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2008. input, mutable_message_map_empty()));
  2009. } else {
  2010. goto handle_unusual;
  2011. }
  2012. break;
  2013. }
  2014. // .google.protobuf.testing.DoubleValueMessage double_value = 501;
  2015. case 501: {
  2016. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2017. static_cast< ::google::protobuf::uint8>(170u /* 4010 & 0xFF */)) {
  2018. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2019. input, mutable_double_value()));
  2020. } else {
  2021. goto handle_unusual;
  2022. }
  2023. break;
  2024. }
  2025. // .google.protobuf.testing.DoubleValueMessage double_value_default = 502;
  2026. case 502: {
  2027. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2028. static_cast< ::google::protobuf::uint8>(178u /* 4018 & 0xFF */)) {
  2029. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2030. input, mutable_double_value_default()));
  2031. } else {
  2032. goto handle_unusual;
  2033. }
  2034. break;
  2035. }
  2036. default: {
  2037. handle_unusual:
  2038. if (tag == 0) {
  2039. goto success;
  2040. }
  2041. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2042. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2043. break;
  2044. }
  2045. }
  2046. }
  2047. success:
  2048. // @@protoc_insertion_point(parse_success:google.protobuf.testing.DefaultValueTestCases)
  2049. return true;
  2050. failure:
  2051. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.DefaultValueTestCases)
  2052. return false;
  2053. #undef DO_
  2054. }
  2055. void DefaultValueTestCases::SerializeWithCachedSizes(
  2056. ::google::protobuf::io::CodedOutputStream* output) const {
  2057. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.DefaultValueTestCases)
  2058. ::google::protobuf::uint32 cached_has_bits = 0;
  2059. (void) cached_has_bits;
  2060. // .google.protobuf.testing.DoubleMessage empty_double = 1;
  2061. if (this->has_empty_double()) {
  2062. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2063. 1, this->_internal_empty_double(), output);
  2064. }
  2065. // .google.protobuf.testing.DoubleMessage double_with_default_value = 2;
  2066. if (this->has_double_with_default_value()) {
  2067. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2068. 2, this->_internal_double_with_default_value(), output);
  2069. }
  2070. // .google.protobuf.testing.DoubleMessage double_with_nondefault_value = 3;
  2071. if (this->has_double_with_nondefault_value()) {
  2072. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2073. 3, this->_internal_double_with_nondefault_value(), output);
  2074. }
  2075. // .google.protobuf.testing.DoubleMessage repeated_double = 4;
  2076. if (this->has_repeated_double()) {
  2077. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2078. 4, this->_internal_repeated_double(), output);
  2079. }
  2080. // .google.protobuf.testing.DoubleMessage nested_message = 5;
  2081. if (this->has_nested_message()) {
  2082. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2083. 5, this->_internal_nested_message(), output);
  2084. }
  2085. // .google.protobuf.testing.DoubleMessage repeated_nested_message = 6;
  2086. if (this->has_repeated_nested_message()) {
  2087. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2088. 6, this->_internal_repeated_nested_message(), output);
  2089. }
  2090. // .google.protobuf.testing.DoubleMessage double_message_with_oneof = 7;
  2091. if (this->has_double_message_with_oneof()) {
  2092. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2093. 7, this->_internal_double_message_with_oneof(), output);
  2094. }
  2095. // .google.protobuf.testing.StructMessage empty_struct = 201;
  2096. if (this->has_empty_struct()) {
  2097. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2098. 201, this->_internal_empty_struct(), output);
  2099. }
  2100. // .google.protobuf.testing.StructMessage empty_struct2 = 202;
  2101. if (this->has_empty_struct2()) {
  2102. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2103. 202, this->_internal_empty_struct2(), output);
  2104. }
  2105. // .google.protobuf.testing.StructMessage struct_with_null_value = 203;
  2106. if (this->has_struct_with_null_value()) {
  2107. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2108. 203, this->_internal_struct_with_null_value(), output);
  2109. }
  2110. // .google.protobuf.testing.StructMessage struct_with_values = 204;
  2111. if (this->has_struct_with_values()) {
  2112. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2113. 204, this->_internal_struct_with_values(), output);
  2114. }
  2115. // .google.protobuf.testing.StructMessage struct_with_nested_struct = 205;
  2116. if (this->has_struct_with_nested_struct()) {
  2117. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2118. 205, this->_internal_struct_with_nested_struct(), output);
  2119. }
  2120. // .google.protobuf.testing.StructMessage struct_with_nested_list = 206;
  2121. if (this->has_struct_with_nested_list()) {
  2122. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2123. 206, this->_internal_struct_with_nested_list(), output);
  2124. }
  2125. // .google.protobuf.testing.StructMessage struct_with_list_of_nulls = 207;
  2126. if (this->has_struct_with_list_of_nulls()) {
  2127. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2128. 207, this->_internal_struct_with_list_of_nulls(), output);
  2129. }
  2130. // .google.protobuf.testing.StructMessage struct_with_list_of_lists = 208;
  2131. if (this->has_struct_with_list_of_lists()) {
  2132. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2133. 208, this->_internal_struct_with_list_of_lists(), output);
  2134. }
  2135. // .google.protobuf.testing.StructMessage struct_with_list_of_structs = 209;
  2136. if (this->has_struct_with_list_of_structs()) {
  2137. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2138. 209, this->_internal_struct_with_list_of_structs(), output);
  2139. }
  2140. // .google.protobuf.Struct top_level_struct = 210;
  2141. if (this->has_top_level_struct()) {
  2142. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2143. 210, this->_internal_top_level_struct(), output);
  2144. }
  2145. // .google.protobuf.testing.ValueMessage value_wrapper_simple = 212;
  2146. if (this->has_value_wrapper_simple()) {
  2147. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2148. 212, this->_internal_value_wrapper_simple(), output);
  2149. }
  2150. // .google.protobuf.testing.ValueMessage value_wrapper_with_struct = 213;
  2151. if (this->has_value_wrapper_with_struct()) {
  2152. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2153. 213, this->_internal_value_wrapper_with_struct(), output);
  2154. }
  2155. // .google.protobuf.testing.ValueMessage value_wrapper_with_list = 214;
  2156. if (this->has_value_wrapper_with_list()) {
  2157. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2158. 214, this->_internal_value_wrapper_with_list(), output);
  2159. }
  2160. // .google.protobuf.testing.ListValueMessage list_value_wrapper = 215;
  2161. if (this->has_list_value_wrapper()) {
  2162. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2163. 215, this->_internal_list_value_wrapper(), output);
  2164. }
  2165. // .google.protobuf.Value top_level_value_simple = 216;
  2166. if (this->has_top_level_value_simple()) {
  2167. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2168. 216, this->_internal_top_level_value_simple(), output);
  2169. }
  2170. // .google.protobuf.Value top_level_value_with_struct = 217;
  2171. if (this->has_top_level_value_with_struct()) {
  2172. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2173. 217, this->_internal_top_level_value_with_struct(), output);
  2174. }
  2175. // .google.protobuf.Value top_level_value_with_list = 218;
  2176. if (this->has_top_level_value_with_list()) {
  2177. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2178. 218, this->_internal_top_level_value_with_list(), output);
  2179. }
  2180. // .google.protobuf.ListValue top_level_listvalue = 219;
  2181. if (this->has_top_level_listvalue()) {
  2182. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2183. 219, this->_internal_top_level_listvalue(), output);
  2184. }
  2185. // .google.protobuf.testing.AnyMessage empty_any = 301;
  2186. if (this->has_empty_any()) {
  2187. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2188. 301, this->_internal_empty_any(), output);
  2189. }
  2190. // .google.protobuf.testing.AnyMessage type_only_any = 302;
  2191. if (this->has_type_only_any()) {
  2192. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2193. 302, this->_internal_type_only_any(), output);
  2194. }
  2195. // .google.protobuf.testing.AnyMessage recursive_any = 303;
  2196. if (this->has_recursive_any()) {
  2197. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2198. 303, this->_internal_recursive_any(), output);
  2199. }
  2200. // .google.protobuf.testing.AnyMessage any_with_message_value = 304;
  2201. if (this->has_any_with_message_value()) {
  2202. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2203. 304, this->_internal_any_with_message_value(), output);
  2204. }
  2205. // .google.protobuf.testing.AnyMessage any_with_nested_message = 305;
  2206. if (this->has_any_with_nested_message()) {
  2207. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2208. 305, this->_internal_any_with_nested_message(), output);
  2209. }
  2210. // .google.protobuf.testing.AnyMessage any_with_message_containing_map = 306;
  2211. if (this->has_any_with_message_containing_map()) {
  2212. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2213. 306, this->_internal_any_with_message_containing_map(), output);
  2214. }
  2215. // .google.protobuf.testing.AnyMessage any_with_message_containing_struct = 307;
  2216. if (this->has_any_with_message_containing_struct()) {
  2217. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2218. 307, this->_internal_any_with_message_containing_struct(), output);
  2219. }
  2220. // .google.protobuf.Any top_level_any = 308;
  2221. if (this->has_top_level_any()) {
  2222. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2223. 308, this->_internal_top_level_any(), output);
  2224. }
  2225. // .google.protobuf.testing.StringtoIntMap empty_map = 401;
  2226. if (this->has_empty_map()) {
  2227. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2228. 401, this->_internal_empty_map(), output);
  2229. }
  2230. // .google.protobuf.testing.StringtoIntMap string_to_int = 402;
  2231. if (this->has_string_to_int()) {
  2232. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2233. 402, this->_internal_string_to_int(), output);
  2234. }
  2235. // .google.protobuf.testing.IntToStringMap int_to_string = 403;
  2236. if (this->has_int_to_string()) {
  2237. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2238. 403, this->_internal_int_to_string(), output);
  2239. }
  2240. // .google.protobuf.testing.MixedMap mixed1 = 404;
  2241. if (this->has_mixed1()) {
  2242. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2243. 404, this->_internal_mixed1(), output);
  2244. }
  2245. // .google.protobuf.testing.MixedMap2 mixed2 = 405;
  2246. if (this->has_mixed2()) {
  2247. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2248. 405, this->_internal_mixed2(), output);
  2249. }
  2250. // .google.protobuf.testing.MixedMap2 empty_mixed2 = 406;
  2251. if (this->has_empty_mixed2()) {
  2252. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2253. 406, this->_internal_empty_mixed2(), output);
  2254. }
  2255. // .google.protobuf.testing.MessageMap map_of_objects = 407;
  2256. if (this->has_map_of_objects()) {
  2257. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2258. 407, this->_internal_map_of_objects(), output);
  2259. }
  2260. // .google.protobuf.testing.MixedMap mixed_empty = 408;
  2261. if (this->has_mixed_empty()) {
  2262. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2263. 408, this->_internal_mixed_empty(), output);
  2264. }
  2265. // .google.protobuf.testing.MessageMap message_map_empty = 409;
  2266. if (this->has_message_map_empty()) {
  2267. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2268. 409, this->_internal_message_map_empty(), output);
  2269. }
  2270. // .google.protobuf.testing.DoubleValueMessage double_value = 501;
  2271. if (this->has_double_value()) {
  2272. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2273. 501, this->_internal_double_value(), output);
  2274. }
  2275. // .google.protobuf.testing.DoubleValueMessage double_value_default = 502;
  2276. if (this->has_double_value_default()) {
  2277. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2278. 502, this->_internal_double_value_default(), output);
  2279. }
  2280. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2281. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2282. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2283. }
  2284. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.DefaultValueTestCases)
  2285. }
  2286. ::google::protobuf::uint8* DefaultValueTestCases::InternalSerializeWithCachedSizesToArray(
  2287. bool deterministic, ::google::protobuf::uint8* target) const {
  2288. (void)deterministic; // Unused
  2289. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.DefaultValueTestCases)
  2290. ::google::protobuf::uint32 cached_has_bits = 0;
  2291. (void) cached_has_bits;
  2292. // .google.protobuf.testing.DoubleMessage empty_double = 1;
  2293. if (this->has_empty_double()) {
  2294. target = ::google::protobuf::internal::WireFormatLite::
  2295. InternalWriteMessageToArray(
  2296. 1, this->_internal_empty_double(), deterministic, target);
  2297. }
  2298. // .google.protobuf.testing.DoubleMessage double_with_default_value = 2;
  2299. if (this->has_double_with_default_value()) {
  2300. target = ::google::protobuf::internal::WireFormatLite::
  2301. InternalWriteMessageToArray(
  2302. 2, this->_internal_double_with_default_value(), deterministic, target);
  2303. }
  2304. // .google.protobuf.testing.DoubleMessage double_with_nondefault_value = 3;
  2305. if (this->has_double_with_nondefault_value()) {
  2306. target = ::google::protobuf::internal::WireFormatLite::
  2307. InternalWriteMessageToArray(
  2308. 3, this->_internal_double_with_nondefault_value(), deterministic, target);
  2309. }
  2310. // .google.protobuf.testing.DoubleMessage repeated_double = 4;
  2311. if (this->has_repeated_double()) {
  2312. target = ::google::protobuf::internal::WireFormatLite::
  2313. InternalWriteMessageToArray(
  2314. 4, this->_internal_repeated_double(), deterministic, target);
  2315. }
  2316. // .google.protobuf.testing.DoubleMessage nested_message = 5;
  2317. if (this->has_nested_message()) {
  2318. target = ::google::protobuf::internal::WireFormatLite::
  2319. InternalWriteMessageToArray(
  2320. 5, this->_internal_nested_message(), deterministic, target);
  2321. }
  2322. // .google.protobuf.testing.DoubleMessage repeated_nested_message = 6;
  2323. if (this->has_repeated_nested_message()) {
  2324. target = ::google::protobuf::internal::WireFormatLite::
  2325. InternalWriteMessageToArray(
  2326. 6, this->_internal_repeated_nested_message(), deterministic, target);
  2327. }
  2328. // .google.protobuf.testing.DoubleMessage double_message_with_oneof = 7;
  2329. if (this->has_double_message_with_oneof()) {
  2330. target = ::google::protobuf::internal::WireFormatLite::
  2331. InternalWriteMessageToArray(
  2332. 7, this->_internal_double_message_with_oneof(), deterministic, target);
  2333. }
  2334. // .google.protobuf.testing.StructMessage empty_struct = 201;
  2335. if (this->has_empty_struct()) {
  2336. target = ::google::protobuf::internal::WireFormatLite::
  2337. InternalWriteMessageToArray(
  2338. 201, this->_internal_empty_struct(), deterministic, target);
  2339. }
  2340. // .google.protobuf.testing.StructMessage empty_struct2 = 202;
  2341. if (this->has_empty_struct2()) {
  2342. target = ::google::protobuf::internal::WireFormatLite::
  2343. InternalWriteMessageToArray(
  2344. 202, this->_internal_empty_struct2(), deterministic, target);
  2345. }
  2346. // .google.protobuf.testing.StructMessage struct_with_null_value = 203;
  2347. if (this->has_struct_with_null_value()) {
  2348. target = ::google::protobuf::internal::WireFormatLite::
  2349. InternalWriteMessageToArray(
  2350. 203, this->_internal_struct_with_null_value(), deterministic, target);
  2351. }
  2352. // .google.protobuf.testing.StructMessage struct_with_values = 204;
  2353. if (this->has_struct_with_values()) {
  2354. target = ::google::protobuf::internal::WireFormatLite::
  2355. InternalWriteMessageToArray(
  2356. 204, this->_internal_struct_with_values(), deterministic, target);
  2357. }
  2358. // .google.protobuf.testing.StructMessage struct_with_nested_struct = 205;
  2359. if (this->has_struct_with_nested_struct()) {
  2360. target = ::google::protobuf::internal::WireFormatLite::
  2361. InternalWriteMessageToArray(
  2362. 205, this->_internal_struct_with_nested_struct(), deterministic, target);
  2363. }
  2364. // .google.protobuf.testing.StructMessage struct_with_nested_list = 206;
  2365. if (this->has_struct_with_nested_list()) {
  2366. target = ::google::protobuf::internal::WireFormatLite::
  2367. InternalWriteMessageToArray(
  2368. 206, this->_internal_struct_with_nested_list(), deterministic, target);
  2369. }
  2370. // .google.protobuf.testing.StructMessage struct_with_list_of_nulls = 207;
  2371. if (this->has_struct_with_list_of_nulls()) {
  2372. target = ::google::protobuf::internal::WireFormatLite::
  2373. InternalWriteMessageToArray(
  2374. 207, this->_internal_struct_with_list_of_nulls(), deterministic, target);
  2375. }
  2376. // .google.protobuf.testing.StructMessage struct_with_list_of_lists = 208;
  2377. if (this->has_struct_with_list_of_lists()) {
  2378. target = ::google::protobuf::internal::WireFormatLite::
  2379. InternalWriteMessageToArray(
  2380. 208, this->_internal_struct_with_list_of_lists(), deterministic, target);
  2381. }
  2382. // .google.protobuf.testing.StructMessage struct_with_list_of_structs = 209;
  2383. if (this->has_struct_with_list_of_structs()) {
  2384. target = ::google::protobuf::internal::WireFormatLite::
  2385. InternalWriteMessageToArray(
  2386. 209, this->_internal_struct_with_list_of_structs(), deterministic, target);
  2387. }
  2388. // .google.protobuf.Struct top_level_struct = 210;
  2389. if (this->has_top_level_struct()) {
  2390. target = ::google::protobuf::internal::WireFormatLite::
  2391. InternalWriteMessageToArray(
  2392. 210, this->_internal_top_level_struct(), deterministic, target);
  2393. }
  2394. // .google.protobuf.testing.ValueMessage value_wrapper_simple = 212;
  2395. if (this->has_value_wrapper_simple()) {
  2396. target = ::google::protobuf::internal::WireFormatLite::
  2397. InternalWriteMessageToArray(
  2398. 212, this->_internal_value_wrapper_simple(), deterministic, target);
  2399. }
  2400. // .google.protobuf.testing.ValueMessage value_wrapper_with_struct = 213;
  2401. if (this->has_value_wrapper_with_struct()) {
  2402. target = ::google::protobuf::internal::WireFormatLite::
  2403. InternalWriteMessageToArray(
  2404. 213, this->_internal_value_wrapper_with_struct(), deterministic, target);
  2405. }
  2406. // .google.protobuf.testing.ValueMessage value_wrapper_with_list = 214;
  2407. if (this->has_value_wrapper_with_list()) {
  2408. target = ::google::protobuf::internal::WireFormatLite::
  2409. InternalWriteMessageToArray(
  2410. 214, this->_internal_value_wrapper_with_list(), deterministic, target);
  2411. }
  2412. // .google.protobuf.testing.ListValueMessage list_value_wrapper = 215;
  2413. if (this->has_list_value_wrapper()) {
  2414. target = ::google::protobuf::internal::WireFormatLite::
  2415. InternalWriteMessageToArray(
  2416. 215, this->_internal_list_value_wrapper(), deterministic, target);
  2417. }
  2418. // .google.protobuf.Value top_level_value_simple = 216;
  2419. if (this->has_top_level_value_simple()) {
  2420. target = ::google::protobuf::internal::WireFormatLite::
  2421. InternalWriteMessageToArray(
  2422. 216, this->_internal_top_level_value_simple(), deterministic, target);
  2423. }
  2424. // .google.protobuf.Value top_level_value_with_struct = 217;
  2425. if (this->has_top_level_value_with_struct()) {
  2426. target = ::google::protobuf::internal::WireFormatLite::
  2427. InternalWriteMessageToArray(
  2428. 217, this->_internal_top_level_value_with_struct(), deterministic, target);
  2429. }
  2430. // .google.protobuf.Value top_level_value_with_list = 218;
  2431. if (this->has_top_level_value_with_list()) {
  2432. target = ::google::protobuf::internal::WireFormatLite::
  2433. InternalWriteMessageToArray(
  2434. 218, this->_internal_top_level_value_with_list(), deterministic, target);
  2435. }
  2436. // .google.protobuf.ListValue top_level_listvalue = 219;
  2437. if (this->has_top_level_listvalue()) {
  2438. target = ::google::protobuf::internal::WireFormatLite::
  2439. InternalWriteMessageToArray(
  2440. 219, this->_internal_top_level_listvalue(), deterministic, target);
  2441. }
  2442. // .google.protobuf.testing.AnyMessage empty_any = 301;
  2443. if (this->has_empty_any()) {
  2444. target = ::google::protobuf::internal::WireFormatLite::
  2445. InternalWriteMessageToArray(
  2446. 301, this->_internal_empty_any(), deterministic, target);
  2447. }
  2448. // .google.protobuf.testing.AnyMessage type_only_any = 302;
  2449. if (this->has_type_only_any()) {
  2450. target = ::google::protobuf::internal::WireFormatLite::
  2451. InternalWriteMessageToArray(
  2452. 302, this->_internal_type_only_any(), deterministic, target);
  2453. }
  2454. // .google.protobuf.testing.AnyMessage recursive_any = 303;
  2455. if (this->has_recursive_any()) {
  2456. target = ::google::protobuf::internal::WireFormatLite::
  2457. InternalWriteMessageToArray(
  2458. 303, this->_internal_recursive_any(), deterministic, target);
  2459. }
  2460. // .google.protobuf.testing.AnyMessage any_with_message_value = 304;
  2461. if (this->has_any_with_message_value()) {
  2462. target = ::google::protobuf::internal::WireFormatLite::
  2463. InternalWriteMessageToArray(
  2464. 304, this->_internal_any_with_message_value(), deterministic, target);
  2465. }
  2466. // .google.protobuf.testing.AnyMessage any_with_nested_message = 305;
  2467. if (this->has_any_with_nested_message()) {
  2468. target = ::google::protobuf::internal::WireFormatLite::
  2469. InternalWriteMessageToArray(
  2470. 305, this->_internal_any_with_nested_message(), deterministic, target);
  2471. }
  2472. // .google.protobuf.testing.AnyMessage any_with_message_containing_map = 306;
  2473. if (this->has_any_with_message_containing_map()) {
  2474. target = ::google::protobuf::internal::WireFormatLite::
  2475. InternalWriteMessageToArray(
  2476. 306, this->_internal_any_with_message_containing_map(), deterministic, target);
  2477. }
  2478. // .google.protobuf.testing.AnyMessage any_with_message_containing_struct = 307;
  2479. if (this->has_any_with_message_containing_struct()) {
  2480. target = ::google::protobuf::internal::WireFormatLite::
  2481. InternalWriteMessageToArray(
  2482. 307, this->_internal_any_with_message_containing_struct(), deterministic, target);
  2483. }
  2484. // .google.protobuf.Any top_level_any = 308;
  2485. if (this->has_top_level_any()) {
  2486. target = ::google::protobuf::internal::WireFormatLite::
  2487. InternalWriteMessageToArray(
  2488. 308, this->_internal_top_level_any(), deterministic, target);
  2489. }
  2490. // .google.protobuf.testing.StringtoIntMap empty_map = 401;
  2491. if (this->has_empty_map()) {
  2492. target = ::google::protobuf::internal::WireFormatLite::
  2493. InternalWriteMessageToArray(
  2494. 401, this->_internal_empty_map(), deterministic, target);
  2495. }
  2496. // .google.protobuf.testing.StringtoIntMap string_to_int = 402;
  2497. if (this->has_string_to_int()) {
  2498. target = ::google::protobuf::internal::WireFormatLite::
  2499. InternalWriteMessageToArray(
  2500. 402, this->_internal_string_to_int(), deterministic, target);
  2501. }
  2502. // .google.protobuf.testing.IntToStringMap int_to_string = 403;
  2503. if (this->has_int_to_string()) {
  2504. target = ::google::protobuf::internal::WireFormatLite::
  2505. InternalWriteMessageToArray(
  2506. 403, this->_internal_int_to_string(), deterministic, target);
  2507. }
  2508. // .google.protobuf.testing.MixedMap mixed1 = 404;
  2509. if (this->has_mixed1()) {
  2510. target = ::google::protobuf::internal::WireFormatLite::
  2511. InternalWriteMessageToArray(
  2512. 404, this->_internal_mixed1(), deterministic, target);
  2513. }
  2514. // .google.protobuf.testing.MixedMap2 mixed2 = 405;
  2515. if (this->has_mixed2()) {
  2516. target = ::google::protobuf::internal::WireFormatLite::
  2517. InternalWriteMessageToArray(
  2518. 405, this->_internal_mixed2(), deterministic, target);
  2519. }
  2520. // .google.protobuf.testing.MixedMap2 empty_mixed2 = 406;
  2521. if (this->has_empty_mixed2()) {
  2522. target = ::google::protobuf::internal::WireFormatLite::
  2523. InternalWriteMessageToArray(
  2524. 406, this->_internal_empty_mixed2(), deterministic, target);
  2525. }
  2526. // .google.protobuf.testing.MessageMap map_of_objects = 407;
  2527. if (this->has_map_of_objects()) {
  2528. target = ::google::protobuf::internal::WireFormatLite::
  2529. InternalWriteMessageToArray(
  2530. 407, this->_internal_map_of_objects(), deterministic, target);
  2531. }
  2532. // .google.protobuf.testing.MixedMap mixed_empty = 408;
  2533. if (this->has_mixed_empty()) {
  2534. target = ::google::protobuf::internal::WireFormatLite::
  2535. InternalWriteMessageToArray(
  2536. 408, this->_internal_mixed_empty(), deterministic, target);
  2537. }
  2538. // .google.protobuf.testing.MessageMap message_map_empty = 409;
  2539. if (this->has_message_map_empty()) {
  2540. target = ::google::protobuf::internal::WireFormatLite::
  2541. InternalWriteMessageToArray(
  2542. 409, this->_internal_message_map_empty(), deterministic, target);
  2543. }
  2544. // .google.protobuf.testing.DoubleValueMessage double_value = 501;
  2545. if (this->has_double_value()) {
  2546. target = ::google::protobuf::internal::WireFormatLite::
  2547. InternalWriteMessageToArray(
  2548. 501, this->_internal_double_value(), deterministic, target);
  2549. }
  2550. // .google.protobuf.testing.DoubleValueMessage double_value_default = 502;
  2551. if (this->has_double_value_default()) {
  2552. target = ::google::protobuf::internal::WireFormatLite::
  2553. InternalWriteMessageToArray(
  2554. 502, this->_internal_double_value_default(), deterministic, target);
  2555. }
  2556. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2557. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2558. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2559. }
  2560. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.DefaultValueTestCases)
  2561. return target;
  2562. }
  2563. size_t DefaultValueTestCases::ByteSizeLong() const {
  2564. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.DefaultValueTestCases)
  2565. size_t total_size = 0;
  2566. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2567. total_size +=
  2568. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2569. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2570. }
  2571. // .google.protobuf.testing.DoubleMessage empty_double = 1;
  2572. if (this->has_empty_double()) {
  2573. total_size += 1 +
  2574. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2575. *empty_double_);
  2576. }
  2577. // .google.protobuf.testing.DoubleMessage double_with_default_value = 2;
  2578. if (this->has_double_with_default_value()) {
  2579. total_size += 1 +
  2580. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2581. *double_with_default_value_);
  2582. }
  2583. // .google.protobuf.testing.DoubleMessage double_with_nondefault_value = 3;
  2584. if (this->has_double_with_nondefault_value()) {
  2585. total_size += 1 +
  2586. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2587. *double_with_nondefault_value_);
  2588. }
  2589. // .google.protobuf.testing.DoubleMessage repeated_double = 4;
  2590. if (this->has_repeated_double()) {
  2591. total_size += 1 +
  2592. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2593. *repeated_double_);
  2594. }
  2595. // .google.protobuf.testing.DoubleMessage nested_message = 5;
  2596. if (this->has_nested_message()) {
  2597. total_size += 1 +
  2598. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2599. *nested_message_);
  2600. }
  2601. // .google.protobuf.testing.DoubleMessage repeated_nested_message = 6;
  2602. if (this->has_repeated_nested_message()) {
  2603. total_size += 1 +
  2604. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2605. *repeated_nested_message_);
  2606. }
  2607. // .google.protobuf.testing.DoubleMessage double_message_with_oneof = 7;
  2608. if (this->has_double_message_with_oneof()) {
  2609. total_size += 1 +
  2610. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2611. *double_message_with_oneof_);
  2612. }
  2613. // .google.protobuf.testing.StructMessage empty_struct = 201;
  2614. if (this->has_empty_struct()) {
  2615. total_size += 2 +
  2616. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2617. *empty_struct_);
  2618. }
  2619. // .google.protobuf.testing.StructMessage empty_struct2 = 202;
  2620. if (this->has_empty_struct2()) {
  2621. total_size += 2 +
  2622. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2623. *empty_struct2_);
  2624. }
  2625. // .google.protobuf.testing.StructMessage struct_with_null_value = 203;
  2626. if (this->has_struct_with_null_value()) {
  2627. total_size += 2 +
  2628. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2629. *struct_with_null_value_);
  2630. }
  2631. // .google.protobuf.testing.StructMessage struct_with_values = 204;
  2632. if (this->has_struct_with_values()) {
  2633. total_size += 2 +
  2634. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2635. *struct_with_values_);
  2636. }
  2637. // .google.protobuf.testing.StructMessage struct_with_nested_struct = 205;
  2638. if (this->has_struct_with_nested_struct()) {
  2639. total_size += 2 +
  2640. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2641. *struct_with_nested_struct_);
  2642. }
  2643. // .google.protobuf.testing.StructMessage struct_with_nested_list = 206;
  2644. if (this->has_struct_with_nested_list()) {
  2645. total_size += 2 +
  2646. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2647. *struct_with_nested_list_);
  2648. }
  2649. // .google.protobuf.testing.StructMessage struct_with_list_of_nulls = 207;
  2650. if (this->has_struct_with_list_of_nulls()) {
  2651. total_size += 2 +
  2652. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2653. *struct_with_list_of_nulls_);
  2654. }
  2655. // .google.protobuf.testing.StructMessage struct_with_list_of_lists = 208;
  2656. if (this->has_struct_with_list_of_lists()) {
  2657. total_size += 2 +
  2658. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2659. *struct_with_list_of_lists_);
  2660. }
  2661. // .google.protobuf.testing.StructMessage struct_with_list_of_structs = 209;
  2662. if (this->has_struct_with_list_of_structs()) {
  2663. total_size += 2 +
  2664. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2665. *struct_with_list_of_structs_);
  2666. }
  2667. // .google.protobuf.Struct top_level_struct = 210;
  2668. if (this->has_top_level_struct()) {
  2669. total_size += 2 +
  2670. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2671. *top_level_struct_);
  2672. }
  2673. // .google.protobuf.testing.ValueMessage value_wrapper_simple = 212;
  2674. if (this->has_value_wrapper_simple()) {
  2675. total_size += 2 +
  2676. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2677. *value_wrapper_simple_);
  2678. }
  2679. // .google.protobuf.testing.ValueMessage value_wrapper_with_struct = 213;
  2680. if (this->has_value_wrapper_with_struct()) {
  2681. total_size += 2 +
  2682. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2683. *value_wrapper_with_struct_);
  2684. }
  2685. // .google.protobuf.testing.ValueMessage value_wrapper_with_list = 214;
  2686. if (this->has_value_wrapper_with_list()) {
  2687. total_size += 2 +
  2688. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2689. *value_wrapper_with_list_);
  2690. }
  2691. // .google.protobuf.testing.ListValueMessage list_value_wrapper = 215;
  2692. if (this->has_list_value_wrapper()) {
  2693. total_size += 2 +
  2694. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2695. *list_value_wrapper_);
  2696. }
  2697. // .google.protobuf.Value top_level_value_simple = 216;
  2698. if (this->has_top_level_value_simple()) {
  2699. total_size += 2 +
  2700. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2701. *top_level_value_simple_);
  2702. }
  2703. // .google.protobuf.Value top_level_value_with_struct = 217;
  2704. if (this->has_top_level_value_with_struct()) {
  2705. total_size += 2 +
  2706. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2707. *top_level_value_with_struct_);
  2708. }
  2709. // .google.protobuf.Value top_level_value_with_list = 218;
  2710. if (this->has_top_level_value_with_list()) {
  2711. total_size += 2 +
  2712. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2713. *top_level_value_with_list_);
  2714. }
  2715. // .google.protobuf.ListValue top_level_listvalue = 219;
  2716. if (this->has_top_level_listvalue()) {
  2717. total_size += 2 +
  2718. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2719. *top_level_listvalue_);
  2720. }
  2721. // .google.protobuf.testing.AnyMessage empty_any = 301;
  2722. if (this->has_empty_any()) {
  2723. total_size += 2 +
  2724. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2725. *empty_any_);
  2726. }
  2727. // .google.protobuf.testing.AnyMessage type_only_any = 302;
  2728. if (this->has_type_only_any()) {
  2729. total_size += 2 +
  2730. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2731. *type_only_any_);
  2732. }
  2733. // .google.protobuf.testing.AnyMessage recursive_any = 303;
  2734. if (this->has_recursive_any()) {
  2735. total_size += 2 +
  2736. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2737. *recursive_any_);
  2738. }
  2739. // .google.protobuf.testing.AnyMessage any_with_message_value = 304;
  2740. if (this->has_any_with_message_value()) {
  2741. total_size += 2 +
  2742. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2743. *any_with_message_value_);
  2744. }
  2745. // .google.protobuf.testing.AnyMessage any_with_nested_message = 305;
  2746. if (this->has_any_with_nested_message()) {
  2747. total_size += 2 +
  2748. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2749. *any_with_nested_message_);
  2750. }
  2751. // .google.protobuf.testing.AnyMessage any_with_message_containing_map = 306;
  2752. if (this->has_any_with_message_containing_map()) {
  2753. total_size += 2 +
  2754. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2755. *any_with_message_containing_map_);
  2756. }
  2757. // .google.protobuf.testing.AnyMessage any_with_message_containing_struct = 307;
  2758. if (this->has_any_with_message_containing_struct()) {
  2759. total_size += 2 +
  2760. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2761. *any_with_message_containing_struct_);
  2762. }
  2763. // .google.protobuf.Any top_level_any = 308;
  2764. if (this->has_top_level_any()) {
  2765. total_size += 2 +
  2766. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2767. *top_level_any_);
  2768. }
  2769. // .google.protobuf.testing.StringtoIntMap empty_map = 401;
  2770. if (this->has_empty_map()) {
  2771. total_size += 2 +
  2772. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2773. *empty_map_);
  2774. }
  2775. // .google.protobuf.testing.StringtoIntMap string_to_int = 402;
  2776. if (this->has_string_to_int()) {
  2777. total_size += 2 +
  2778. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2779. *string_to_int_);
  2780. }
  2781. // .google.protobuf.testing.IntToStringMap int_to_string = 403;
  2782. if (this->has_int_to_string()) {
  2783. total_size += 2 +
  2784. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2785. *int_to_string_);
  2786. }
  2787. // .google.protobuf.testing.MixedMap mixed1 = 404;
  2788. if (this->has_mixed1()) {
  2789. total_size += 2 +
  2790. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2791. *mixed1_);
  2792. }
  2793. // .google.protobuf.testing.MixedMap2 mixed2 = 405;
  2794. if (this->has_mixed2()) {
  2795. total_size += 2 +
  2796. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2797. *mixed2_);
  2798. }
  2799. // .google.protobuf.testing.MixedMap2 empty_mixed2 = 406;
  2800. if (this->has_empty_mixed2()) {
  2801. total_size += 2 +
  2802. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2803. *empty_mixed2_);
  2804. }
  2805. // .google.protobuf.testing.MessageMap map_of_objects = 407;
  2806. if (this->has_map_of_objects()) {
  2807. total_size += 2 +
  2808. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2809. *map_of_objects_);
  2810. }
  2811. // .google.protobuf.testing.MixedMap mixed_empty = 408;
  2812. if (this->has_mixed_empty()) {
  2813. total_size += 2 +
  2814. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2815. *mixed_empty_);
  2816. }
  2817. // .google.protobuf.testing.MessageMap message_map_empty = 409;
  2818. if (this->has_message_map_empty()) {
  2819. total_size += 2 +
  2820. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2821. *message_map_empty_);
  2822. }
  2823. // .google.protobuf.testing.DoubleValueMessage double_value = 501;
  2824. if (this->has_double_value()) {
  2825. total_size += 2 +
  2826. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2827. *double_value_);
  2828. }
  2829. // .google.protobuf.testing.DoubleValueMessage double_value_default = 502;
  2830. if (this->has_double_value_default()) {
  2831. total_size += 2 +
  2832. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2833. *double_value_default_);
  2834. }
  2835. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2836. SetCachedSize(cached_size);
  2837. return total_size;
  2838. }
  2839. void DefaultValueTestCases::MergeFrom(const ::google::protobuf::Message& from) {
  2840. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.DefaultValueTestCases)
  2841. GOOGLE_DCHECK_NE(&from, this);
  2842. const DefaultValueTestCases* source =
  2843. ::google::protobuf::internal::DynamicCastToGenerated<const DefaultValueTestCases>(
  2844. &from);
  2845. if (source == NULL) {
  2846. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.DefaultValueTestCases)
  2847. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2848. } else {
  2849. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.DefaultValueTestCases)
  2850. MergeFrom(*source);
  2851. }
  2852. }
  2853. void DefaultValueTestCases::MergeFrom(const DefaultValueTestCases& from) {
  2854. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.DefaultValueTestCases)
  2855. GOOGLE_DCHECK_NE(&from, this);
  2856. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2857. ::google::protobuf::uint32 cached_has_bits = 0;
  2858. (void) cached_has_bits;
  2859. if (from.has_empty_double()) {
  2860. mutable_empty_double()->::google::protobuf::testing::DoubleMessage::MergeFrom(from.empty_double());
  2861. }
  2862. if (from.has_double_with_default_value()) {
  2863. mutable_double_with_default_value()->::google::protobuf::testing::DoubleMessage::MergeFrom(from.double_with_default_value());
  2864. }
  2865. if (from.has_double_with_nondefault_value()) {
  2866. mutable_double_with_nondefault_value()->::google::protobuf::testing::DoubleMessage::MergeFrom(from.double_with_nondefault_value());
  2867. }
  2868. if (from.has_repeated_double()) {
  2869. mutable_repeated_double()->::google::protobuf::testing::DoubleMessage::MergeFrom(from.repeated_double());
  2870. }
  2871. if (from.has_nested_message()) {
  2872. mutable_nested_message()->::google::protobuf::testing::DoubleMessage::MergeFrom(from.nested_message());
  2873. }
  2874. if (from.has_repeated_nested_message()) {
  2875. mutable_repeated_nested_message()->::google::protobuf::testing::DoubleMessage::MergeFrom(from.repeated_nested_message());
  2876. }
  2877. if (from.has_double_message_with_oneof()) {
  2878. mutable_double_message_with_oneof()->::google::protobuf::testing::DoubleMessage::MergeFrom(from.double_message_with_oneof());
  2879. }
  2880. if (from.has_empty_struct()) {
  2881. mutable_empty_struct()->::google::protobuf::testing::StructMessage::MergeFrom(from.empty_struct());
  2882. }
  2883. if (from.has_empty_struct2()) {
  2884. mutable_empty_struct2()->::google::protobuf::testing::StructMessage::MergeFrom(from.empty_struct2());
  2885. }
  2886. if (from.has_struct_with_null_value()) {
  2887. mutable_struct_with_null_value()->::google::protobuf::testing::StructMessage::MergeFrom(from.struct_with_null_value());
  2888. }
  2889. if (from.has_struct_with_values()) {
  2890. mutable_struct_with_values()->::google::protobuf::testing::StructMessage::MergeFrom(from.struct_with_values());
  2891. }
  2892. if (from.has_struct_with_nested_struct()) {
  2893. mutable_struct_with_nested_struct()->::google::protobuf::testing::StructMessage::MergeFrom(from.struct_with_nested_struct());
  2894. }
  2895. if (from.has_struct_with_nested_list()) {
  2896. mutable_struct_with_nested_list()->::google::protobuf::testing::StructMessage::MergeFrom(from.struct_with_nested_list());
  2897. }
  2898. if (from.has_struct_with_list_of_nulls()) {
  2899. mutable_struct_with_list_of_nulls()->::google::protobuf::testing::StructMessage::MergeFrom(from.struct_with_list_of_nulls());
  2900. }
  2901. if (from.has_struct_with_list_of_lists()) {
  2902. mutable_struct_with_list_of_lists()->::google::protobuf::testing::StructMessage::MergeFrom(from.struct_with_list_of_lists());
  2903. }
  2904. if (from.has_struct_with_list_of_structs()) {
  2905. mutable_struct_with_list_of_structs()->::google::protobuf::testing::StructMessage::MergeFrom(from.struct_with_list_of_structs());
  2906. }
  2907. if (from.has_top_level_struct()) {
  2908. mutable_top_level_struct()->::google::protobuf::Struct::MergeFrom(from.top_level_struct());
  2909. }
  2910. if (from.has_value_wrapper_simple()) {
  2911. mutable_value_wrapper_simple()->::google::protobuf::testing::ValueMessage::MergeFrom(from.value_wrapper_simple());
  2912. }
  2913. if (from.has_value_wrapper_with_struct()) {
  2914. mutable_value_wrapper_with_struct()->::google::protobuf::testing::ValueMessage::MergeFrom(from.value_wrapper_with_struct());
  2915. }
  2916. if (from.has_value_wrapper_with_list()) {
  2917. mutable_value_wrapper_with_list()->::google::protobuf::testing::ValueMessage::MergeFrom(from.value_wrapper_with_list());
  2918. }
  2919. if (from.has_list_value_wrapper()) {
  2920. mutable_list_value_wrapper()->::google::protobuf::testing::ListValueMessage::MergeFrom(from.list_value_wrapper());
  2921. }
  2922. if (from.has_top_level_value_simple()) {
  2923. mutable_top_level_value_simple()->::google::protobuf::Value::MergeFrom(from.top_level_value_simple());
  2924. }
  2925. if (from.has_top_level_value_with_struct()) {
  2926. mutable_top_level_value_with_struct()->::google::protobuf::Value::MergeFrom(from.top_level_value_with_struct());
  2927. }
  2928. if (from.has_top_level_value_with_list()) {
  2929. mutable_top_level_value_with_list()->::google::protobuf::Value::MergeFrom(from.top_level_value_with_list());
  2930. }
  2931. if (from.has_top_level_listvalue()) {
  2932. mutable_top_level_listvalue()->::google::protobuf::ListValue::MergeFrom(from.top_level_listvalue());
  2933. }
  2934. if (from.has_empty_any()) {
  2935. mutable_empty_any()->::google::protobuf::testing::AnyMessage::MergeFrom(from.empty_any());
  2936. }
  2937. if (from.has_type_only_any()) {
  2938. mutable_type_only_any()->::google::protobuf::testing::AnyMessage::MergeFrom(from.type_only_any());
  2939. }
  2940. if (from.has_recursive_any()) {
  2941. mutable_recursive_any()->::google::protobuf::testing::AnyMessage::MergeFrom(from.recursive_any());
  2942. }
  2943. if (from.has_any_with_message_value()) {
  2944. mutable_any_with_message_value()->::google::protobuf::testing::AnyMessage::MergeFrom(from.any_with_message_value());
  2945. }
  2946. if (from.has_any_with_nested_message()) {
  2947. mutable_any_with_nested_message()->::google::protobuf::testing::AnyMessage::MergeFrom(from.any_with_nested_message());
  2948. }
  2949. if (from.has_any_with_message_containing_map()) {
  2950. mutable_any_with_message_containing_map()->::google::protobuf::testing::AnyMessage::MergeFrom(from.any_with_message_containing_map());
  2951. }
  2952. if (from.has_any_with_message_containing_struct()) {
  2953. mutable_any_with_message_containing_struct()->::google::protobuf::testing::AnyMessage::MergeFrom(from.any_with_message_containing_struct());
  2954. }
  2955. if (from.has_top_level_any()) {
  2956. mutable_top_level_any()->::google::protobuf::Any::MergeFrom(from.top_level_any());
  2957. }
  2958. if (from.has_empty_map()) {
  2959. mutable_empty_map()->::google::protobuf::testing::StringtoIntMap::MergeFrom(from.empty_map());
  2960. }
  2961. if (from.has_string_to_int()) {
  2962. mutable_string_to_int()->::google::protobuf::testing::StringtoIntMap::MergeFrom(from.string_to_int());
  2963. }
  2964. if (from.has_int_to_string()) {
  2965. mutable_int_to_string()->::google::protobuf::testing::IntToStringMap::MergeFrom(from.int_to_string());
  2966. }
  2967. if (from.has_mixed1()) {
  2968. mutable_mixed1()->::google::protobuf::testing::MixedMap::MergeFrom(from.mixed1());
  2969. }
  2970. if (from.has_mixed2()) {
  2971. mutable_mixed2()->::google::protobuf::testing::MixedMap2::MergeFrom(from.mixed2());
  2972. }
  2973. if (from.has_empty_mixed2()) {
  2974. mutable_empty_mixed2()->::google::protobuf::testing::MixedMap2::MergeFrom(from.empty_mixed2());
  2975. }
  2976. if (from.has_map_of_objects()) {
  2977. mutable_map_of_objects()->::google::protobuf::testing::MessageMap::MergeFrom(from.map_of_objects());
  2978. }
  2979. if (from.has_mixed_empty()) {
  2980. mutable_mixed_empty()->::google::protobuf::testing::MixedMap::MergeFrom(from.mixed_empty());
  2981. }
  2982. if (from.has_message_map_empty()) {
  2983. mutable_message_map_empty()->::google::protobuf::testing::MessageMap::MergeFrom(from.message_map_empty());
  2984. }
  2985. if (from.has_double_value()) {
  2986. mutable_double_value()->::google::protobuf::testing::DoubleValueMessage::MergeFrom(from.double_value());
  2987. }
  2988. if (from.has_double_value_default()) {
  2989. mutable_double_value_default()->::google::protobuf::testing::DoubleValueMessage::MergeFrom(from.double_value_default());
  2990. }
  2991. }
  2992. void DefaultValueTestCases::CopyFrom(const ::google::protobuf::Message& from) {
  2993. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.DefaultValueTestCases)
  2994. if (&from == this) return;
  2995. Clear();
  2996. MergeFrom(from);
  2997. }
  2998. void DefaultValueTestCases::CopyFrom(const DefaultValueTestCases& from) {
  2999. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.DefaultValueTestCases)
  3000. if (&from == this) return;
  3001. Clear();
  3002. MergeFrom(from);
  3003. }
  3004. bool DefaultValueTestCases::IsInitialized() const {
  3005. return true;
  3006. }
  3007. void DefaultValueTestCases::Swap(DefaultValueTestCases* other) {
  3008. if (other == this) return;
  3009. InternalSwap(other);
  3010. }
  3011. void DefaultValueTestCases::InternalSwap(DefaultValueTestCases* other) {
  3012. using std::swap;
  3013. swap(empty_double_, other->empty_double_);
  3014. swap(double_with_default_value_, other->double_with_default_value_);
  3015. swap(double_with_nondefault_value_, other->double_with_nondefault_value_);
  3016. swap(repeated_double_, other->repeated_double_);
  3017. swap(nested_message_, other->nested_message_);
  3018. swap(repeated_nested_message_, other->repeated_nested_message_);
  3019. swap(double_message_with_oneof_, other->double_message_with_oneof_);
  3020. swap(empty_struct_, other->empty_struct_);
  3021. swap(empty_struct2_, other->empty_struct2_);
  3022. swap(struct_with_null_value_, other->struct_with_null_value_);
  3023. swap(struct_with_values_, other->struct_with_values_);
  3024. swap(struct_with_nested_struct_, other->struct_with_nested_struct_);
  3025. swap(struct_with_nested_list_, other->struct_with_nested_list_);
  3026. swap(struct_with_list_of_nulls_, other->struct_with_list_of_nulls_);
  3027. swap(struct_with_list_of_lists_, other->struct_with_list_of_lists_);
  3028. swap(struct_with_list_of_structs_, other->struct_with_list_of_structs_);
  3029. swap(top_level_struct_, other->top_level_struct_);
  3030. swap(value_wrapper_simple_, other->value_wrapper_simple_);
  3031. swap(value_wrapper_with_struct_, other->value_wrapper_with_struct_);
  3032. swap(value_wrapper_with_list_, other->value_wrapper_with_list_);
  3033. swap(list_value_wrapper_, other->list_value_wrapper_);
  3034. swap(top_level_value_simple_, other->top_level_value_simple_);
  3035. swap(top_level_value_with_struct_, other->top_level_value_with_struct_);
  3036. swap(top_level_value_with_list_, other->top_level_value_with_list_);
  3037. swap(top_level_listvalue_, other->top_level_listvalue_);
  3038. swap(empty_any_, other->empty_any_);
  3039. swap(type_only_any_, other->type_only_any_);
  3040. swap(recursive_any_, other->recursive_any_);
  3041. swap(any_with_message_value_, other->any_with_message_value_);
  3042. swap(any_with_nested_message_, other->any_with_nested_message_);
  3043. swap(any_with_message_containing_map_, other->any_with_message_containing_map_);
  3044. swap(any_with_message_containing_struct_, other->any_with_message_containing_struct_);
  3045. swap(top_level_any_, other->top_level_any_);
  3046. swap(empty_map_, other->empty_map_);
  3047. swap(string_to_int_, other->string_to_int_);
  3048. swap(int_to_string_, other->int_to_string_);
  3049. swap(mixed1_, other->mixed1_);
  3050. swap(mixed2_, other->mixed2_);
  3051. swap(empty_mixed2_, other->empty_mixed2_);
  3052. swap(map_of_objects_, other->map_of_objects_);
  3053. swap(mixed_empty_, other->mixed_empty_);
  3054. swap(message_map_empty_, other->message_map_empty_);
  3055. swap(double_value_, other->double_value_);
  3056. swap(double_value_default_, other->double_value_default_);
  3057. _internal_metadata_.Swap(&other->_internal_metadata_);
  3058. }
  3059. ::google::protobuf::Metadata DefaultValueTestCases::GetMetadata() const {
  3060. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  3061. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  3062. }
  3063. // ===================================================================
  3064. void DoubleMessage::InitAsDefaultInstance() {
  3065. ::google::protobuf::testing::_DoubleMessage_default_instance_._instance.get_mutable()->nested_message_ = const_cast< ::google::protobuf::testing::DoubleMessage*>(
  3066. ::google::protobuf::testing::DoubleMessage::internal_default_instance());
  3067. ::google::protobuf::testing::_DoubleMessage_default_instance_._instance.get_mutable()->double_wrapper_ = const_cast< ::google::protobuf::DoubleValue*>(
  3068. ::google::protobuf::DoubleValue::internal_default_instance());
  3069. ::google::protobuf::testing::_DoubleMessage_default_instance_.str_value_.UnsafeSetDefault(
  3070. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3071. ::google::protobuf::testing::_DoubleMessage_default_instance_.num_value_ = GOOGLE_LONGLONG(0);
  3072. }
  3073. void DoubleMessage::clear_double_wrapper() {
  3074. if (GetArenaNoVirtual() == NULL && double_wrapper_ != NULL) {
  3075. delete double_wrapper_;
  3076. }
  3077. double_wrapper_ = NULL;
  3078. }
  3079. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3080. const int DoubleMessage::kDoubleValueFieldNumber;
  3081. const int DoubleMessage::kRepeatedDoubleFieldNumber;
  3082. const int DoubleMessage::kNestedMessageFieldNumber;
  3083. const int DoubleMessage::kRepeatedNestedMessageFieldNumber;
  3084. const int DoubleMessage::kDoubleWrapperFieldNumber;
  3085. const int DoubleMessage::kStrValueFieldNumber;
  3086. const int DoubleMessage::kNumValueFieldNumber;
  3087. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3088. DoubleMessage::DoubleMessage()
  3089. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3090. ::google::protobuf::internal::InitSCC(
  3091. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_DoubleMessage.base);
  3092. SharedCtor();
  3093. // @@protoc_insertion_point(constructor:google.protobuf.testing.DoubleMessage)
  3094. }
  3095. DoubleMessage::DoubleMessage(const DoubleMessage& from)
  3096. : ::google::protobuf::Message(),
  3097. _internal_metadata_(NULL),
  3098. repeated_double_(from.repeated_double_),
  3099. repeated_nested_message_(from.repeated_nested_message_) {
  3100. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3101. if (from.has_nested_message()) {
  3102. nested_message_ = new ::google::protobuf::testing::DoubleMessage(*from.nested_message_);
  3103. } else {
  3104. nested_message_ = NULL;
  3105. }
  3106. if (from.has_double_wrapper()) {
  3107. double_wrapper_ = new ::google::protobuf::DoubleValue(*from.double_wrapper_);
  3108. } else {
  3109. double_wrapper_ = NULL;
  3110. }
  3111. double_value_ = from.double_value_;
  3112. clear_has_value();
  3113. switch (from.value_case()) {
  3114. case kStrValue: {
  3115. set_str_value(from.str_value());
  3116. break;
  3117. }
  3118. case kNumValue: {
  3119. set_num_value(from.num_value());
  3120. break;
  3121. }
  3122. case VALUE_NOT_SET: {
  3123. break;
  3124. }
  3125. }
  3126. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.DoubleMessage)
  3127. }
  3128. void DoubleMessage::SharedCtor() {
  3129. ::memset(&nested_message_, 0, static_cast<size_t>(
  3130. reinterpret_cast<char*>(&double_value_) -
  3131. reinterpret_cast<char*>(&nested_message_)) + sizeof(double_value_));
  3132. clear_has_value();
  3133. }
  3134. DoubleMessage::~DoubleMessage() {
  3135. // @@protoc_insertion_point(destructor:google.protobuf.testing.DoubleMessage)
  3136. SharedDtor();
  3137. }
  3138. void DoubleMessage::SharedDtor() {
  3139. if (this != internal_default_instance()) delete nested_message_;
  3140. if (this != internal_default_instance()) delete double_wrapper_;
  3141. if (has_value()) {
  3142. clear_value();
  3143. }
  3144. }
  3145. void DoubleMessage::SetCachedSize(int size) const {
  3146. _cached_size_.Set(size);
  3147. }
  3148. const ::google::protobuf::Descriptor* DoubleMessage::descriptor() {
  3149. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  3150. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3151. }
  3152. const DoubleMessage& DoubleMessage::default_instance() {
  3153. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_DoubleMessage.base);
  3154. return *internal_default_instance();
  3155. }
  3156. void DoubleMessage::clear_value() {
  3157. // @@protoc_insertion_point(one_of_clear_start:google.protobuf.testing.DoubleMessage)
  3158. switch (value_case()) {
  3159. case kStrValue: {
  3160. value_.str_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3161. break;
  3162. }
  3163. case kNumValue: {
  3164. // No need to clear
  3165. break;
  3166. }
  3167. case VALUE_NOT_SET: {
  3168. break;
  3169. }
  3170. }
  3171. _oneof_case_[0] = VALUE_NOT_SET;
  3172. }
  3173. void DoubleMessage::Clear() {
  3174. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.DoubleMessage)
  3175. ::google::protobuf::uint32 cached_has_bits = 0;
  3176. // Prevent compiler warnings about cached_has_bits being unused
  3177. (void) cached_has_bits;
  3178. repeated_double_.Clear();
  3179. repeated_nested_message_.Clear();
  3180. if (GetArenaNoVirtual() == NULL && nested_message_ != NULL) {
  3181. delete nested_message_;
  3182. }
  3183. nested_message_ = NULL;
  3184. if (GetArenaNoVirtual() == NULL && double_wrapper_ != NULL) {
  3185. delete double_wrapper_;
  3186. }
  3187. double_wrapper_ = NULL;
  3188. double_value_ = 0;
  3189. clear_value();
  3190. _internal_metadata_.Clear();
  3191. }
  3192. bool DoubleMessage::MergePartialFromCodedStream(
  3193. ::google::protobuf::io::CodedInputStream* input) {
  3194. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3195. ::google::protobuf::uint32 tag;
  3196. // @@protoc_insertion_point(parse_start:google.protobuf.testing.DoubleMessage)
  3197. for (;;) {
  3198. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  3199. tag = p.first;
  3200. if (!p.second) goto handle_unusual;
  3201. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3202. // double double_value = 1;
  3203. case 1: {
  3204. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3205. static_cast< ::google::protobuf::uint8>(9u /* 9 & 0xFF */)) {
  3206. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  3207. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  3208. input, &double_value_)));
  3209. } else {
  3210. goto handle_unusual;
  3211. }
  3212. break;
  3213. }
  3214. // repeated double repeated_double = 2;
  3215. case 2: {
  3216. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3217. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  3218. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  3219. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  3220. input, this->mutable_repeated_double())));
  3221. } else if (
  3222. static_cast< ::google::protobuf::uint8>(tag) ==
  3223. static_cast< ::google::protobuf::uint8>(17u /* 17 & 0xFF */)) {
  3224. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  3225. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  3226. 1, 18u, input, this->mutable_repeated_double())));
  3227. } else {
  3228. goto handle_unusual;
  3229. }
  3230. break;
  3231. }
  3232. // .google.protobuf.testing.DoubleMessage nested_message = 3;
  3233. case 3: {
  3234. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3235. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  3236. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3237. input, mutable_nested_message()));
  3238. } else {
  3239. goto handle_unusual;
  3240. }
  3241. break;
  3242. }
  3243. // repeated .google.protobuf.testing.DoubleMessage repeated_nested_message = 4;
  3244. case 4: {
  3245. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3246. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  3247. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3248. input, add_repeated_nested_message()));
  3249. } else {
  3250. goto handle_unusual;
  3251. }
  3252. break;
  3253. }
  3254. // .google.protobuf.DoubleValue double_wrapper = 100;
  3255. case 100: {
  3256. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3257. static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) {
  3258. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3259. input, mutable_double_wrapper()));
  3260. } else {
  3261. goto handle_unusual;
  3262. }
  3263. break;
  3264. }
  3265. // string str_value = 112;
  3266. case 112: {
  3267. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3268. static_cast< ::google::protobuf::uint8>(130u /* 898 & 0xFF */)) {
  3269. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  3270. input, this->mutable_str_value()));
  3271. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3272. this->str_value().data(), static_cast<int>(this->str_value().length()),
  3273. ::google::protobuf::internal::WireFormatLite::PARSE,
  3274. "google.protobuf.testing.DoubleMessage.str_value"));
  3275. } else {
  3276. goto handle_unusual;
  3277. }
  3278. break;
  3279. }
  3280. // int64 num_value = 113;
  3281. case 113: {
  3282. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3283. static_cast< ::google::protobuf::uint8>(136u /* 904 & 0xFF */)) {
  3284. clear_value();
  3285. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  3286. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  3287. input, &value_.num_value_)));
  3288. set_has_num_value();
  3289. } else {
  3290. goto handle_unusual;
  3291. }
  3292. break;
  3293. }
  3294. default: {
  3295. handle_unusual:
  3296. if (tag == 0) {
  3297. goto success;
  3298. }
  3299. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3300. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3301. break;
  3302. }
  3303. }
  3304. }
  3305. success:
  3306. // @@protoc_insertion_point(parse_success:google.protobuf.testing.DoubleMessage)
  3307. return true;
  3308. failure:
  3309. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.DoubleMessage)
  3310. return false;
  3311. #undef DO_
  3312. }
  3313. void DoubleMessage::SerializeWithCachedSizes(
  3314. ::google::protobuf::io::CodedOutputStream* output) const {
  3315. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.DoubleMessage)
  3316. ::google::protobuf::uint32 cached_has_bits = 0;
  3317. (void) cached_has_bits;
  3318. // double double_value = 1;
  3319. if (this->double_value() != 0) {
  3320. ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->double_value(), output);
  3321. }
  3322. // repeated double repeated_double = 2;
  3323. if (this->repeated_double_size() > 0) {
  3324. ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  3325. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  3326. _repeated_double_cached_byte_size_));
  3327. ::google::protobuf::internal::WireFormatLite::WriteDoubleArray(
  3328. this->repeated_double().data(), this->repeated_double_size(), output);
  3329. }
  3330. // .google.protobuf.testing.DoubleMessage nested_message = 3;
  3331. if (this->has_nested_message()) {
  3332. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3333. 3, this->_internal_nested_message(), output);
  3334. }
  3335. // repeated .google.protobuf.testing.DoubleMessage repeated_nested_message = 4;
  3336. for (unsigned int i = 0,
  3337. n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
  3338. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3339. 4,
  3340. this->repeated_nested_message(static_cast<int>(i)),
  3341. output);
  3342. }
  3343. // .google.protobuf.DoubleValue double_wrapper = 100;
  3344. if (this->has_double_wrapper()) {
  3345. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3346. 100, this->_internal_double_wrapper(), output);
  3347. }
  3348. // string str_value = 112;
  3349. if (has_str_value()) {
  3350. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3351. this->str_value().data(), static_cast<int>(this->str_value().length()),
  3352. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3353. "google.protobuf.testing.DoubleMessage.str_value");
  3354. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3355. 112, this->str_value(), output);
  3356. }
  3357. // int64 num_value = 113;
  3358. if (has_num_value()) {
  3359. ::google::protobuf::internal::WireFormatLite::WriteInt64(113, this->num_value(), output);
  3360. }
  3361. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3362. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3363. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3364. }
  3365. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.DoubleMessage)
  3366. }
  3367. ::google::protobuf::uint8* DoubleMessage::InternalSerializeWithCachedSizesToArray(
  3368. bool deterministic, ::google::protobuf::uint8* target) const {
  3369. (void)deterministic; // Unused
  3370. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.DoubleMessage)
  3371. ::google::protobuf::uint32 cached_has_bits = 0;
  3372. (void) cached_has_bits;
  3373. // double double_value = 1;
  3374. if (this->double_value() != 0) {
  3375. target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->double_value(), target);
  3376. }
  3377. // repeated double repeated_double = 2;
  3378. if (this->repeated_double_size() > 0) {
  3379. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  3380. 2,
  3381. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  3382. target);
  3383. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  3384. static_cast< ::google::protobuf::int32>(
  3385. _repeated_double_cached_byte_size_), target);
  3386. target = ::google::protobuf::internal::WireFormatLite::
  3387. WriteDoubleNoTagToArray(this->repeated_double_, target);
  3388. }
  3389. // .google.protobuf.testing.DoubleMessage nested_message = 3;
  3390. if (this->has_nested_message()) {
  3391. target = ::google::protobuf::internal::WireFormatLite::
  3392. InternalWriteMessageToArray(
  3393. 3, this->_internal_nested_message(), deterministic, target);
  3394. }
  3395. // repeated .google.protobuf.testing.DoubleMessage repeated_nested_message = 4;
  3396. for (unsigned int i = 0,
  3397. n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
  3398. target = ::google::protobuf::internal::WireFormatLite::
  3399. InternalWriteMessageToArray(
  3400. 4, this->repeated_nested_message(static_cast<int>(i)), deterministic, target);
  3401. }
  3402. // .google.protobuf.DoubleValue double_wrapper = 100;
  3403. if (this->has_double_wrapper()) {
  3404. target = ::google::protobuf::internal::WireFormatLite::
  3405. InternalWriteMessageToArray(
  3406. 100, this->_internal_double_wrapper(), deterministic, target);
  3407. }
  3408. // string str_value = 112;
  3409. if (has_str_value()) {
  3410. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3411. this->str_value().data(), static_cast<int>(this->str_value().length()),
  3412. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3413. "google.protobuf.testing.DoubleMessage.str_value");
  3414. target =
  3415. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  3416. 112, this->str_value(), target);
  3417. }
  3418. // int64 num_value = 113;
  3419. if (has_num_value()) {
  3420. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(113, this->num_value(), target);
  3421. }
  3422. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3423. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3424. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3425. }
  3426. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.DoubleMessage)
  3427. return target;
  3428. }
  3429. size_t DoubleMessage::ByteSizeLong() const {
  3430. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.DoubleMessage)
  3431. size_t total_size = 0;
  3432. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3433. total_size +=
  3434. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3435. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3436. }
  3437. // repeated double repeated_double = 2;
  3438. {
  3439. unsigned int count = static_cast<unsigned int>(this->repeated_double_size());
  3440. size_t data_size = 8UL * count;
  3441. if (data_size > 0) {
  3442. total_size += 1 +
  3443. ::google::protobuf::internal::WireFormatLite::Int32Size(
  3444. static_cast< ::google::protobuf::int32>(data_size));
  3445. }
  3446. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  3447. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3448. _repeated_double_cached_byte_size_ = cached_size;
  3449. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3450. total_size += data_size;
  3451. }
  3452. // repeated .google.protobuf.testing.DoubleMessage repeated_nested_message = 4;
  3453. {
  3454. unsigned int count = static_cast<unsigned int>(this->repeated_nested_message_size());
  3455. total_size += 1UL * count;
  3456. for (unsigned int i = 0; i < count; i++) {
  3457. total_size +=
  3458. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3459. this->repeated_nested_message(static_cast<int>(i)));
  3460. }
  3461. }
  3462. // .google.protobuf.testing.DoubleMessage nested_message = 3;
  3463. if (this->has_nested_message()) {
  3464. total_size += 1 +
  3465. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3466. *nested_message_);
  3467. }
  3468. // .google.protobuf.DoubleValue double_wrapper = 100;
  3469. if (this->has_double_wrapper()) {
  3470. total_size += 2 +
  3471. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3472. *double_wrapper_);
  3473. }
  3474. // double double_value = 1;
  3475. if (this->double_value() != 0) {
  3476. total_size += 1 + 8;
  3477. }
  3478. switch (value_case()) {
  3479. // string str_value = 112;
  3480. case kStrValue: {
  3481. total_size += 2 +
  3482. ::google::protobuf::internal::WireFormatLite::StringSize(
  3483. this->str_value());
  3484. break;
  3485. }
  3486. // int64 num_value = 113;
  3487. case kNumValue: {
  3488. total_size += 2 +
  3489. ::google::protobuf::internal::WireFormatLite::Int64Size(
  3490. this->num_value());
  3491. break;
  3492. }
  3493. case VALUE_NOT_SET: {
  3494. break;
  3495. }
  3496. }
  3497. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3498. SetCachedSize(cached_size);
  3499. return total_size;
  3500. }
  3501. void DoubleMessage::MergeFrom(const ::google::protobuf::Message& from) {
  3502. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.DoubleMessage)
  3503. GOOGLE_DCHECK_NE(&from, this);
  3504. const DoubleMessage* source =
  3505. ::google::protobuf::internal::DynamicCastToGenerated<const DoubleMessage>(
  3506. &from);
  3507. if (source == NULL) {
  3508. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.DoubleMessage)
  3509. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3510. } else {
  3511. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.DoubleMessage)
  3512. MergeFrom(*source);
  3513. }
  3514. }
  3515. void DoubleMessage::MergeFrom(const DoubleMessage& from) {
  3516. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.DoubleMessage)
  3517. GOOGLE_DCHECK_NE(&from, this);
  3518. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3519. ::google::protobuf::uint32 cached_has_bits = 0;
  3520. (void) cached_has_bits;
  3521. repeated_double_.MergeFrom(from.repeated_double_);
  3522. repeated_nested_message_.MergeFrom(from.repeated_nested_message_);
  3523. if (from.has_nested_message()) {
  3524. mutable_nested_message()->::google::protobuf::testing::DoubleMessage::MergeFrom(from.nested_message());
  3525. }
  3526. if (from.has_double_wrapper()) {
  3527. mutable_double_wrapper()->::google::protobuf::DoubleValue::MergeFrom(from.double_wrapper());
  3528. }
  3529. if (from.double_value() != 0) {
  3530. set_double_value(from.double_value());
  3531. }
  3532. switch (from.value_case()) {
  3533. case kStrValue: {
  3534. set_str_value(from.str_value());
  3535. break;
  3536. }
  3537. case kNumValue: {
  3538. set_num_value(from.num_value());
  3539. break;
  3540. }
  3541. case VALUE_NOT_SET: {
  3542. break;
  3543. }
  3544. }
  3545. }
  3546. void DoubleMessage::CopyFrom(const ::google::protobuf::Message& from) {
  3547. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.DoubleMessage)
  3548. if (&from == this) return;
  3549. Clear();
  3550. MergeFrom(from);
  3551. }
  3552. void DoubleMessage::CopyFrom(const DoubleMessage& from) {
  3553. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.DoubleMessage)
  3554. if (&from == this) return;
  3555. Clear();
  3556. MergeFrom(from);
  3557. }
  3558. bool DoubleMessage::IsInitialized() const {
  3559. return true;
  3560. }
  3561. void DoubleMessage::Swap(DoubleMessage* other) {
  3562. if (other == this) return;
  3563. InternalSwap(other);
  3564. }
  3565. void DoubleMessage::InternalSwap(DoubleMessage* other) {
  3566. using std::swap;
  3567. repeated_double_.InternalSwap(&other->repeated_double_);
  3568. CastToBase(&repeated_nested_message_)->InternalSwap(CastToBase(&other->repeated_nested_message_));
  3569. swap(nested_message_, other->nested_message_);
  3570. swap(double_wrapper_, other->double_wrapper_);
  3571. swap(double_value_, other->double_value_);
  3572. swap(value_, other->value_);
  3573. swap(_oneof_case_[0], other->_oneof_case_[0]);
  3574. _internal_metadata_.Swap(&other->_internal_metadata_);
  3575. }
  3576. ::google::protobuf::Metadata DoubleMessage::GetMetadata() const {
  3577. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  3578. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  3579. }
  3580. // ===================================================================
  3581. void StructMessage::InitAsDefaultInstance() {
  3582. ::google::protobuf::testing::_StructMessage_default_instance_._instance.get_mutable()->struct__ = const_cast< ::google::protobuf::Struct*>(
  3583. ::google::protobuf::Struct::internal_default_instance());
  3584. }
  3585. void StructMessage::clear_struct_() {
  3586. if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
  3587. delete struct__;
  3588. }
  3589. struct__ = NULL;
  3590. }
  3591. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3592. const int StructMessage::kStructFieldNumber;
  3593. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3594. StructMessage::StructMessage()
  3595. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3596. ::google::protobuf::internal::InitSCC(
  3597. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_StructMessage.base);
  3598. SharedCtor();
  3599. // @@protoc_insertion_point(constructor:google.protobuf.testing.StructMessage)
  3600. }
  3601. StructMessage::StructMessage(const StructMessage& from)
  3602. : ::google::protobuf::Message(),
  3603. _internal_metadata_(NULL) {
  3604. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3605. if (from.has_struct_()) {
  3606. struct__ = new ::google::protobuf::Struct(*from.struct__);
  3607. } else {
  3608. struct__ = NULL;
  3609. }
  3610. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.StructMessage)
  3611. }
  3612. void StructMessage::SharedCtor() {
  3613. struct__ = NULL;
  3614. }
  3615. StructMessage::~StructMessage() {
  3616. // @@protoc_insertion_point(destructor:google.protobuf.testing.StructMessage)
  3617. SharedDtor();
  3618. }
  3619. void StructMessage::SharedDtor() {
  3620. if (this != internal_default_instance()) delete struct__;
  3621. }
  3622. void StructMessage::SetCachedSize(int size) const {
  3623. _cached_size_.Set(size);
  3624. }
  3625. const ::google::protobuf::Descriptor* StructMessage::descriptor() {
  3626. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  3627. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3628. }
  3629. const StructMessage& StructMessage::default_instance() {
  3630. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_StructMessage.base);
  3631. return *internal_default_instance();
  3632. }
  3633. void StructMessage::Clear() {
  3634. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.StructMessage)
  3635. ::google::protobuf::uint32 cached_has_bits = 0;
  3636. // Prevent compiler warnings about cached_has_bits being unused
  3637. (void) cached_has_bits;
  3638. if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
  3639. delete struct__;
  3640. }
  3641. struct__ = NULL;
  3642. _internal_metadata_.Clear();
  3643. }
  3644. bool StructMessage::MergePartialFromCodedStream(
  3645. ::google::protobuf::io::CodedInputStream* input) {
  3646. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3647. ::google::protobuf::uint32 tag;
  3648. // @@protoc_insertion_point(parse_start:google.protobuf.testing.StructMessage)
  3649. for (;;) {
  3650. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3651. tag = p.first;
  3652. if (!p.second) goto handle_unusual;
  3653. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3654. // .google.protobuf.Struct struct = 1;
  3655. case 1: {
  3656. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3657. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3658. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3659. input, mutable_struct_()));
  3660. } else {
  3661. goto handle_unusual;
  3662. }
  3663. break;
  3664. }
  3665. default: {
  3666. handle_unusual:
  3667. if (tag == 0) {
  3668. goto success;
  3669. }
  3670. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3671. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3672. break;
  3673. }
  3674. }
  3675. }
  3676. success:
  3677. // @@protoc_insertion_point(parse_success:google.protobuf.testing.StructMessage)
  3678. return true;
  3679. failure:
  3680. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.StructMessage)
  3681. return false;
  3682. #undef DO_
  3683. }
  3684. void StructMessage::SerializeWithCachedSizes(
  3685. ::google::protobuf::io::CodedOutputStream* output) const {
  3686. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.StructMessage)
  3687. ::google::protobuf::uint32 cached_has_bits = 0;
  3688. (void) cached_has_bits;
  3689. // .google.protobuf.Struct struct = 1;
  3690. if (this->has_struct_()) {
  3691. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3692. 1, this->_internal_struct_(), output);
  3693. }
  3694. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3695. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3696. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3697. }
  3698. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.StructMessage)
  3699. }
  3700. ::google::protobuf::uint8* StructMessage::InternalSerializeWithCachedSizesToArray(
  3701. bool deterministic, ::google::protobuf::uint8* target) const {
  3702. (void)deterministic; // Unused
  3703. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.StructMessage)
  3704. ::google::protobuf::uint32 cached_has_bits = 0;
  3705. (void) cached_has_bits;
  3706. // .google.protobuf.Struct struct = 1;
  3707. if (this->has_struct_()) {
  3708. target = ::google::protobuf::internal::WireFormatLite::
  3709. InternalWriteMessageToArray(
  3710. 1, this->_internal_struct_(), deterministic, target);
  3711. }
  3712. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3713. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3714. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3715. }
  3716. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.StructMessage)
  3717. return target;
  3718. }
  3719. size_t StructMessage::ByteSizeLong() const {
  3720. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.StructMessage)
  3721. size_t total_size = 0;
  3722. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3723. total_size +=
  3724. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3725. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3726. }
  3727. // .google.protobuf.Struct struct = 1;
  3728. if (this->has_struct_()) {
  3729. total_size += 1 +
  3730. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3731. *struct__);
  3732. }
  3733. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3734. SetCachedSize(cached_size);
  3735. return total_size;
  3736. }
  3737. void StructMessage::MergeFrom(const ::google::protobuf::Message& from) {
  3738. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.StructMessage)
  3739. GOOGLE_DCHECK_NE(&from, this);
  3740. const StructMessage* source =
  3741. ::google::protobuf::internal::DynamicCastToGenerated<const StructMessage>(
  3742. &from);
  3743. if (source == NULL) {
  3744. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.StructMessage)
  3745. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3746. } else {
  3747. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.StructMessage)
  3748. MergeFrom(*source);
  3749. }
  3750. }
  3751. void StructMessage::MergeFrom(const StructMessage& from) {
  3752. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.StructMessage)
  3753. GOOGLE_DCHECK_NE(&from, this);
  3754. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3755. ::google::protobuf::uint32 cached_has_bits = 0;
  3756. (void) cached_has_bits;
  3757. if (from.has_struct_()) {
  3758. mutable_struct_()->::google::protobuf::Struct::MergeFrom(from.struct_());
  3759. }
  3760. }
  3761. void StructMessage::CopyFrom(const ::google::protobuf::Message& from) {
  3762. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.StructMessage)
  3763. if (&from == this) return;
  3764. Clear();
  3765. MergeFrom(from);
  3766. }
  3767. void StructMessage::CopyFrom(const StructMessage& from) {
  3768. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.StructMessage)
  3769. if (&from == this) return;
  3770. Clear();
  3771. MergeFrom(from);
  3772. }
  3773. bool StructMessage::IsInitialized() const {
  3774. return true;
  3775. }
  3776. void StructMessage::Swap(StructMessage* other) {
  3777. if (other == this) return;
  3778. InternalSwap(other);
  3779. }
  3780. void StructMessage::InternalSwap(StructMessage* other) {
  3781. using std::swap;
  3782. swap(struct__, other->struct__);
  3783. _internal_metadata_.Swap(&other->_internal_metadata_);
  3784. }
  3785. ::google::protobuf::Metadata StructMessage::GetMetadata() const {
  3786. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  3787. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  3788. }
  3789. // ===================================================================
  3790. void ValueMessage::InitAsDefaultInstance() {
  3791. ::google::protobuf::testing::_ValueMessage_default_instance_._instance.get_mutable()->value_ = const_cast< ::google::protobuf::Value*>(
  3792. ::google::protobuf::Value::internal_default_instance());
  3793. }
  3794. void ValueMessage::clear_value() {
  3795. if (GetArenaNoVirtual() == NULL && value_ != NULL) {
  3796. delete value_;
  3797. }
  3798. value_ = NULL;
  3799. }
  3800. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3801. const int ValueMessage::kValueFieldNumber;
  3802. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3803. ValueMessage::ValueMessage()
  3804. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3805. ::google::protobuf::internal::InitSCC(
  3806. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_ValueMessage.base);
  3807. SharedCtor();
  3808. // @@protoc_insertion_point(constructor:google.protobuf.testing.ValueMessage)
  3809. }
  3810. ValueMessage::ValueMessage(const ValueMessage& from)
  3811. : ::google::protobuf::Message(),
  3812. _internal_metadata_(NULL) {
  3813. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3814. if (from.has_value()) {
  3815. value_ = new ::google::protobuf::Value(*from.value_);
  3816. } else {
  3817. value_ = NULL;
  3818. }
  3819. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.ValueMessage)
  3820. }
  3821. void ValueMessage::SharedCtor() {
  3822. value_ = NULL;
  3823. }
  3824. ValueMessage::~ValueMessage() {
  3825. // @@protoc_insertion_point(destructor:google.protobuf.testing.ValueMessage)
  3826. SharedDtor();
  3827. }
  3828. void ValueMessage::SharedDtor() {
  3829. if (this != internal_default_instance()) delete value_;
  3830. }
  3831. void ValueMessage::SetCachedSize(int size) const {
  3832. _cached_size_.Set(size);
  3833. }
  3834. const ::google::protobuf::Descriptor* ValueMessage::descriptor() {
  3835. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  3836. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3837. }
  3838. const ValueMessage& ValueMessage::default_instance() {
  3839. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_ValueMessage.base);
  3840. return *internal_default_instance();
  3841. }
  3842. void ValueMessage::Clear() {
  3843. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.ValueMessage)
  3844. ::google::protobuf::uint32 cached_has_bits = 0;
  3845. // Prevent compiler warnings about cached_has_bits being unused
  3846. (void) cached_has_bits;
  3847. if (GetArenaNoVirtual() == NULL && value_ != NULL) {
  3848. delete value_;
  3849. }
  3850. value_ = NULL;
  3851. _internal_metadata_.Clear();
  3852. }
  3853. bool ValueMessage::MergePartialFromCodedStream(
  3854. ::google::protobuf::io::CodedInputStream* input) {
  3855. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3856. ::google::protobuf::uint32 tag;
  3857. // @@protoc_insertion_point(parse_start:google.protobuf.testing.ValueMessage)
  3858. for (;;) {
  3859. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3860. tag = p.first;
  3861. if (!p.second) goto handle_unusual;
  3862. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3863. // .google.protobuf.Value value = 1;
  3864. case 1: {
  3865. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3866. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3867. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3868. input, mutable_value()));
  3869. } else {
  3870. goto handle_unusual;
  3871. }
  3872. break;
  3873. }
  3874. default: {
  3875. handle_unusual:
  3876. if (tag == 0) {
  3877. goto success;
  3878. }
  3879. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3880. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3881. break;
  3882. }
  3883. }
  3884. }
  3885. success:
  3886. // @@protoc_insertion_point(parse_success:google.protobuf.testing.ValueMessage)
  3887. return true;
  3888. failure:
  3889. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.ValueMessage)
  3890. return false;
  3891. #undef DO_
  3892. }
  3893. void ValueMessage::SerializeWithCachedSizes(
  3894. ::google::protobuf::io::CodedOutputStream* output) const {
  3895. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.ValueMessage)
  3896. ::google::protobuf::uint32 cached_has_bits = 0;
  3897. (void) cached_has_bits;
  3898. // .google.protobuf.Value value = 1;
  3899. if (this->has_value()) {
  3900. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3901. 1, this->_internal_value(), output);
  3902. }
  3903. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3904. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3905. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3906. }
  3907. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.ValueMessage)
  3908. }
  3909. ::google::protobuf::uint8* ValueMessage::InternalSerializeWithCachedSizesToArray(
  3910. bool deterministic, ::google::protobuf::uint8* target) const {
  3911. (void)deterministic; // Unused
  3912. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.ValueMessage)
  3913. ::google::protobuf::uint32 cached_has_bits = 0;
  3914. (void) cached_has_bits;
  3915. // .google.protobuf.Value value = 1;
  3916. if (this->has_value()) {
  3917. target = ::google::protobuf::internal::WireFormatLite::
  3918. InternalWriteMessageToArray(
  3919. 1, this->_internal_value(), deterministic, target);
  3920. }
  3921. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3922. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3923. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3924. }
  3925. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.ValueMessage)
  3926. return target;
  3927. }
  3928. size_t ValueMessage::ByteSizeLong() const {
  3929. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.ValueMessage)
  3930. size_t total_size = 0;
  3931. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3932. total_size +=
  3933. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3934. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3935. }
  3936. // .google.protobuf.Value value = 1;
  3937. if (this->has_value()) {
  3938. total_size += 1 +
  3939. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3940. *value_);
  3941. }
  3942. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3943. SetCachedSize(cached_size);
  3944. return total_size;
  3945. }
  3946. void ValueMessage::MergeFrom(const ::google::protobuf::Message& from) {
  3947. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.ValueMessage)
  3948. GOOGLE_DCHECK_NE(&from, this);
  3949. const ValueMessage* source =
  3950. ::google::protobuf::internal::DynamicCastToGenerated<const ValueMessage>(
  3951. &from);
  3952. if (source == NULL) {
  3953. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.ValueMessage)
  3954. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3955. } else {
  3956. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.ValueMessage)
  3957. MergeFrom(*source);
  3958. }
  3959. }
  3960. void ValueMessage::MergeFrom(const ValueMessage& from) {
  3961. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.ValueMessage)
  3962. GOOGLE_DCHECK_NE(&from, this);
  3963. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3964. ::google::protobuf::uint32 cached_has_bits = 0;
  3965. (void) cached_has_bits;
  3966. if (from.has_value()) {
  3967. mutable_value()->::google::protobuf::Value::MergeFrom(from.value());
  3968. }
  3969. }
  3970. void ValueMessage::CopyFrom(const ::google::protobuf::Message& from) {
  3971. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.ValueMessage)
  3972. if (&from == this) return;
  3973. Clear();
  3974. MergeFrom(from);
  3975. }
  3976. void ValueMessage::CopyFrom(const ValueMessage& from) {
  3977. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.ValueMessage)
  3978. if (&from == this) return;
  3979. Clear();
  3980. MergeFrom(from);
  3981. }
  3982. bool ValueMessage::IsInitialized() const {
  3983. return true;
  3984. }
  3985. void ValueMessage::Swap(ValueMessage* other) {
  3986. if (other == this) return;
  3987. InternalSwap(other);
  3988. }
  3989. void ValueMessage::InternalSwap(ValueMessage* other) {
  3990. using std::swap;
  3991. swap(value_, other->value_);
  3992. _internal_metadata_.Swap(&other->_internal_metadata_);
  3993. }
  3994. ::google::protobuf::Metadata ValueMessage::GetMetadata() const {
  3995. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  3996. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  3997. }
  3998. // ===================================================================
  3999. void ListValueMessage::InitAsDefaultInstance() {
  4000. ::google::protobuf::testing::_ListValueMessage_default_instance_._instance.get_mutable()->shopping_list_ = const_cast< ::google::protobuf::ListValue*>(
  4001. ::google::protobuf::ListValue::internal_default_instance());
  4002. }
  4003. void ListValueMessage::clear_shopping_list() {
  4004. if (GetArenaNoVirtual() == NULL && shopping_list_ != NULL) {
  4005. delete shopping_list_;
  4006. }
  4007. shopping_list_ = NULL;
  4008. }
  4009. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4010. const int ListValueMessage::kShoppingListFieldNumber;
  4011. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4012. ListValueMessage::ListValueMessage()
  4013. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4014. ::google::protobuf::internal::InitSCC(
  4015. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_ListValueMessage.base);
  4016. SharedCtor();
  4017. // @@protoc_insertion_point(constructor:google.protobuf.testing.ListValueMessage)
  4018. }
  4019. ListValueMessage::ListValueMessage(const ListValueMessage& from)
  4020. : ::google::protobuf::Message(),
  4021. _internal_metadata_(NULL) {
  4022. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4023. if (from.has_shopping_list()) {
  4024. shopping_list_ = new ::google::protobuf::ListValue(*from.shopping_list_);
  4025. } else {
  4026. shopping_list_ = NULL;
  4027. }
  4028. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.ListValueMessage)
  4029. }
  4030. void ListValueMessage::SharedCtor() {
  4031. shopping_list_ = NULL;
  4032. }
  4033. ListValueMessage::~ListValueMessage() {
  4034. // @@protoc_insertion_point(destructor:google.protobuf.testing.ListValueMessage)
  4035. SharedDtor();
  4036. }
  4037. void ListValueMessage::SharedDtor() {
  4038. if (this != internal_default_instance()) delete shopping_list_;
  4039. }
  4040. void ListValueMessage::SetCachedSize(int size) const {
  4041. _cached_size_.Set(size);
  4042. }
  4043. const ::google::protobuf::Descriptor* ListValueMessage::descriptor() {
  4044. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  4045. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4046. }
  4047. const ListValueMessage& ListValueMessage::default_instance() {
  4048. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_ListValueMessage.base);
  4049. return *internal_default_instance();
  4050. }
  4051. void ListValueMessage::Clear() {
  4052. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.ListValueMessage)
  4053. ::google::protobuf::uint32 cached_has_bits = 0;
  4054. // Prevent compiler warnings about cached_has_bits being unused
  4055. (void) cached_has_bits;
  4056. if (GetArenaNoVirtual() == NULL && shopping_list_ != NULL) {
  4057. delete shopping_list_;
  4058. }
  4059. shopping_list_ = NULL;
  4060. _internal_metadata_.Clear();
  4061. }
  4062. bool ListValueMessage::MergePartialFromCodedStream(
  4063. ::google::protobuf::io::CodedInputStream* input) {
  4064. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4065. ::google::protobuf::uint32 tag;
  4066. // @@protoc_insertion_point(parse_start:google.protobuf.testing.ListValueMessage)
  4067. for (;;) {
  4068. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4069. tag = p.first;
  4070. if (!p.second) goto handle_unusual;
  4071. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4072. // .google.protobuf.ListValue shopping_list = 1;
  4073. case 1: {
  4074. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4075. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4076. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4077. input, mutable_shopping_list()));
  4078. } else {
  4079. goto handle_unusual;
  4080. }
  4081. break;
  4082. }
  4083. default: {
  4084. handle_unusual:
  4085. if (tag == 0) {
  4086. goto success;
  4087. }
  4088. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4089. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4090. break;
  4091. }
  4092. }
  4093. }
  4094. success:
  4095. // @@protoc_insertion_point(parse_success:google.protobuf.testing.ListValueMessage)
  4096. return true;
  4097. failure:
  4098. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.ListValueMessage)
  4099. return false;
  4100. #undef DO_
  4101. }
  4102. void ListValueMessage::SerializeWithCachedSizes(
  4103. ::google::protobuf::io::CodedOutputStream* output) const {
  4104. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.ListValueMessage)
  4105. ::google::protobuf::uint32 cached_has_bits = 0;
  4106. (void) cached_has_bits;
  4107. // .google.protobuf.ListValue shopping_list = 1;
  4108. if (this->has_shopping_list()) {
  4109. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4110. 1, this->_internal_shopping_list(), output);
  4111. }
  4112. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4113. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4114. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4115. }
  4116. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.ListValueMessage)
  4117. }
  4118. ::google::protobuf::uint8* ListValueMessage::InternalSerializeWithCachedSizesToArray(
  4119. bool deterministic, ::google::protobuf::uint8* target) const {
  4120. (void)deterministic; // Unused
  4121. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.ListValueMessage)
  4122. ::google::protobuf::uint32 cached_has_bits = 0;
  4123. (void) cached_has_bits;
  4124. // .google.protobuf.ListValue shopping_list = 1;
  4125. if (this->has_shopping_list()) {
  4126. target = ::google::protobuf::internal::WireFormatLite::
  4127. InternalWriteMessageToArray(
  4128. 1, this->_internal_shopping_list(), deterministic, target);
  4129. }
  4130. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4131. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4132. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4133. }
  4134. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.ListValueMessage)
  4135. return target;
  4136. }
  4137. size_t ListValueMessage::ByteSizeLong() const {
  4138. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.ListValueMessage)
  4139. size_t total_size = 0;
  4140. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4141. total_size +=
  4142. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4143. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4144. }
  4145. // .google.protobuf.ListValue shopping_list = 1;
  4146. if (this->has_shopping_list()) {
  4147. total_size += 1 +
  4148. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4149. *shopping_list_);
  4150. }
  4151. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4152. SetCachedSize(cached_size);
  4153. return total_size;
  4154. }
  4155. void ListValueMessage::MergeFrom(const ::google::protobuf::Message& from) {
  4156. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.ListValueMessage)
  4157. GOOGLE_DCHECK_NE(&from, this);
  4158. const ListValueMessage* source =
  4159. ::google::protobuf::internal::DynamicCastToGenerated<const ListValueMessage>(
  4160. &from);
  4161. if (source == NULL) {
  4162. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.ListValueMessage)
  4163. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4164. } else {
  4165. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.ListValueMessage)
  4166. MergeFrom(*source);
  4167. }
  4168. }
  4169. void ListValueMessage::MergeFrom(const ListValueMessage& from) {
  4170. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.ListValueMessage)
  4171. GOOGLE_DCHECK_NE(&from, this);
  4172. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4173. ::google::protobuf::uint32 cached_has_bits = 0;
  4174. (void) cached_has_bits;
  4175. if (from.has_shopping_list()) {
  4176. mutable_shopping_list()->::google::protobuf::ListValue::MergeFrom(from.shopping_list());
  4177. }
  4178. }
  4179. void ListValueMessage::CopyFrom(const ::google::protobuf::Message& from) {
  4180. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.ListValueMessage)
  4181. if (&from == this) return;
  4182. Clear();
  4183. MergeFrom(from);
  4184. }
  4185. void ListValueMessage::CopyFrom(const ListValueMessage& from) {
  4186. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.ListValueMessage)
  4187. if (&from == this) return;
  4188. Clear();
  4189. MergeFrom(from);
  4190. }
  4191. bool ListValueMessage::IsInitialized() const {
  4192. return true;
  4193. }
  4194. void ListValueMessage::Swap(ListValueMessage* other) {
  4195. if (other == this) return;
  4196. InternalSwap(other);
  4197. }
  4198. void ListValueMessage::InternalSwap(ListValueMessage* other) {
  4199. using std::swap;
  4200. swap(shopping_list_, other->shopping_list_);
  4201. _internal_metadata_.Swap(&other->_internal_metadata_);
  4202. }
  4203. ::google::protobuf::Metadata ListValueMessage::GetMetadata() const {
  4204. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  4205. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  4206. }
  4207. // ===================================================================
  4208. void RequestMessage::InitAsDefaultInstance() {
  4209. }
  4210. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4211. const int RequestMessage::kContentFieldNumber;
  4212. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4213. RequestMessage::RequestMessage()
  4214. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4215. ::google::protobuf::internal::InitSCC(
  4216. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_RequestMessage.base);
  4217. SharedCtor();
  4218. // @@protoc_insertion_point(constructor:google.protobuf.testing.RequestMessage)
  4219. }
  4220. RequestMessage::RequestMessage(const RequestMessage& from)
  4221. : ::google::protobuf::Message(),
  4222. _internal_metadata_(NULL) {
  4223. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4224. content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4225. if (from.content().size() > 0) {
  4226. content_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.content_);
  4227. }
  4228. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.RequestMessage)
  4229. }
  4230. void RequestMessage::SharedCtor() {
  4231. content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4232. }
  4233. RequestMessage::~RequestMessage() {
  4234. // @@protoc_insertion_point(destructor:google.protobuf.testing.RequestMessage)
  4235. SharedDtor();
  4236. }
  4237. void RequestMessage::SharedDtor() {
  4238. content_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4239. }
  4240. void RequestMessage::SetCachedSize(int size) const {
  4241. _cached_size_.Set(size);
  4242. }
  4243. const ::google::protobuf::Descriptor* RequestMessage::descriptor() {
  4244. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  4245. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4246. }
  4247. const RequestMessage& RequestMessage::default_instance() {
  4248. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_RequestMessage.base);
  4249. return *internal_default_instance();
  4250. }
  4251. void RequestMessage::Clear() {
  4252. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.RequestMessage)
  4253. ::google::protobuf::uint32 cached_has_bits = 0;
  4254. // Prevent compiler warnings about cached_has_bits being unused
  4255. (void) cached_has_bits;
  4256. content_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4257. _internal_metadata_.Clear();
  4258. }
  4259. bool RequestMessage::MergePartialFromCodedStream(
  4260. ::google::protobuf::io::CodedInputStream* input) {
  4261. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4262. ::google::protobuf::uint32 tag;
  4263. // @@protoc_insertion_point(parse_start:google.protobuf.testing.RequestMessage)
  4264. for (;;) {
  4265. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4266. tag = p.first;
  4267. if (!p.second) goto handle_unusual;
  4268. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4269. // string content = 1;
  4270. case 1: {
  4271. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4272. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4273. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4274. input, this->mutable_content()));
  4275. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4276. this->content().data(), static_cast<int>(this->content().length()),
  4277. ::google::protobuf::internal::WireFormatLite::PARSE,
  4278. "google.protobuf.testing.RequestMessage.content"));
  4279. } else {
  4280. goto handle_unusual;
  4281. }
  4282. break;
  4283. }
  4284. default: {
  4285. handle_unusual:
  4286. if (tag == 0) {
  4287. goto success;
  4288. }
  4289. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4290. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4291. break;
  4292. }
  4293. }
  4294. }
  4295. success:
  4296. // @@protoc_insertion_point(parse_success:google.protobuf.testing.RequestMessage)
  4297. return true;
  4298. failure:
  4299. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.RequestMessage)
  4300. return false;
  4301. #undef DO_
  4302. }
  4303. void RequestMessage::SerializeWithCachedSizes(
  4304. ::google::protobuf::io::CodedOutputStream* output) const {
  4305. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.RequestMessage)
  4306. ::google::protobuf::uint32 cached_has_bits = 0;
  4307. (void) cached_has_bits;
  4308. // string content = 1;
  4309. if (this->content().size() > 0) {
  4310. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4311. this->content().data(), static_cast<int>(this->content().length()),
  4312. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4313. "google.protobuf.testing.RequestMessage.content");
  4314. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  4315. 1, this->content(), output);
  4316. }
  4317. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4318. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4319. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4320. }
  4321. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.RequestMessage)
  4322. }
  4323. ::google::protobuf::uint8* RequestMessage::InternalSerializeWithCachedSizesToArray(
  4324. bool deterministic, ::google::protobuf::uint8* target) const {
  4325. (void)deterministic; // Unused
  4326. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.RequestMessage)
  4327. ::google::protobuf::uint32 cached_has_bits = 0;
  4328. (void) cached_has_bits;
  4329. // string content = 1;
  4330. if (this->content().size() > 0) {
  4331. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4332. this->content().data(), static_cast<int>(this->content().length()),
  4333. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4334. "google.protobuf.testing.RequestMessage.content");
  4335. target =
  4336. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  4337. 1, this->content(), target);
  4338. }
  4339. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4340. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4341. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4342. }
  4343. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.RequestMessage)
  4344. return target;
  4345. }
  4346. size_t RequestMessage::ByteSizeLong() const {
  4347. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.RequestMessage)
  4348. size_t total_size = 0;
  4349. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4350. total_size +=
  4351. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4352. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4353. }
  4354. // string content = 1;
  4355. if (this->content().size() > 0) {
  4356. total_size += 1 +
  4357. ::google::protobuf::internal::WireFormatLite::StringSize(
  4358. this->content());
  4359. }
  4360. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4361. SetCachedSize(cached_size);
  4362. return total_size;
  4363. }
  4364. void RequestMessage::MergeFrom(const ::google::protobuf::Message& from) {
  4365. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.RequestMessage)
  4366. GOOGLE_DCHECK_NE(&from, this);
  4367. const RequestMessage* source =
  4368. ::google::protobuf::internal::DynamicCastToGenerated<const RequestMessage>(
  4369. &from);
  4370. if (source == NULL) {
  4371. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.RequestMessage)
  4372. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4373. } else {
  4374. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.RequestMessage)
  4375. MergeFrom(*source);
  4376. }
  4377. }
  4378. void RequestMessage::MergeFrom(const RequestMessage& from) {
  4379. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.RequestMessage)
  4380. GOOGLE_DCHECK_NE(&from, this);
  4381. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4382. ::google::protobuf::uint32 cached_has_bits = 0;
  4383. (void) cached_has_bits;
  4384. if (from.content().size() > 0) {
  4385. content_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.content_);
  4386. }
  4387. }
  4388. void RequestMessage::CopyFrom(const ::google::protobuf::Message& from) {
  4389. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.RequestMessage)
  4390. if (&from == this) return;
  4391. Clear();
  4392. MergeFrom(from);
  4393. }
  4394. void RequestMessage::CopyFrom(const RequestMessage& from) {
  4395. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.RequestMessage)
  4396. if (&from == this) return;
  4397. Clear();
  4398. MergeFrom(from);
  4399. }
  4400. bool RequestMessage::IsInitialized() const {
  4401. return true;
  4402. }
  4403. void RequestMessage::Swap(RequestMessage* other) {
  4404. if (other == this) return;
  4405. InternalSwap(other);
  4406. }
  4407. void RequestMessage::InternalSwap(RequestMessage* other) {
  4408. using std::swap;
  4409. content_.Swap(&other->content_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  4410. GetArenaNoVirtual());
  4411. _internal_metadata_.Swap(&other->_internal_metadata_);
  4412. }
  4413. ::google::protobuf::Metadata RequestMessage::GetMetadata() const {
  4414. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  4415. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  4416. }
  4417. // ===================================================================
  4418. void AnyMessage::InitAsDefaultInstance() {
  4419. ::google::protobuf::testing::_AnyMessage_default_instance_._instance.get_mutable()->any_ = const_cast< ::google::protobuf::Any*>(
  4420. ::google::protobuf::Any::internal_default_instance());
  4421. ::google::protobuf::testing::_AnyMessage_default_instance_._instance.get_mutable()->data_ = const_cast< ::google::protobuf::testing::AnyData*>(
  4422. ::google::protobuf::testing::AnyData::internal_default_instance());
  4423. }
  4424. void AnyMessage::clear_any() {
  4425. if (GetArenaNoVirtual() == NULL && any_ != NULL) {
  4426. delete any_;
  4427. }
  4428. any_ = NULL;
  4429. }
  4430. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4431. const int AnyMessage::kAnyFieldNumber;
  4432. const int AnyMessage::kDataFieldNumber;
  4433. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4434. AnyMessage::AnyMessage()
  4435. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4436. ::google::protobuf::internal::InitSCC(
  4437. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_AnyMessage.base);
  4438. SharedCtor();
  4439. // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyMessage)
  4440. }
  4441. AnyMessage::AnyMessage(const AnyMessage& from)
  4442. : ::google::protobuf::Message(),
  4443. _internal_metadata_(NULL) {
  4444. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4445. if (from.has_any()) {
  4446. any_ = new ::google::protobuf::Any(*from.any_);
  4447. } else {
  4448. any_ = NULL;
  4449. }
  4450. if (from.has_data()) {
  4451. data_ = new ::google::protobuf::testing::AnyData(*from.data_);
  4452. } else {
  4453. data_ = NULL;
  4454. }
  4455. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyMessage)
  4456. }
  4457. void AnyMessage::SharedCtor() {
  4458. ::memset(&any_, 0, static_cast<size_t>(
  4459. reinterpret_cast<char*>(&data_) -
  4460. reinterpret_cast<char*>(&any_)) + sizeof(data_));
  4461. }
  4462. AnyMessage::~AnyMessage() {
  4463. // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyMessage)
  4464. SharedDtor();
  4465. }
  4466. void AnyMessage::SharedDtor() {
  4467. if (this != internal_default_instance()) delete any_;
  4468. if (this != internal_default_instance()) delete data_;
  4469. }
  4470. void AnyMessage::SetCachedSize(int size) const {
  4471. _cached_size_.Set(size);
  4472. }
  4473. const ::google::protobuf::Descriptor* AnyMessage::descriptor() {
  4474. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  4475. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4476. }
  4477. const AnyMessage& AnyMessage::default_instance() {
  4478. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_AnyMessage.base);
  4479. return *internal_default_instance();
  4480. }
  4481. void AnyMessage::Clear() {
  4482. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyMessage)
  4483. ::google::protobuf::uint32 cached_has_bits = 0;
  4484. // Prevent compiler warnings about cached_has_bits being unused
  4485. (void) cached_has_bits;
  4486. if (GetArenaNoVirtual() == NULL && any_ != NULL) {
  4487. delete any_;
  4488. }
  4489. any_ = NULL;
  4490. if (GetArenaNoVirtual() == NULL && data_ != NULL) {
  4491. delete data_;
  4492. }
  4493. data_ = NULL;
  4494. _internal_metadata_.Clear();
  4495. }
  4496. bool AnyMessage::MergePartialFromCodedStream(
  4497. ::google::protobuf::io::CodedInputStream* input) {
  4498. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4499. ::google::protobuf::uint32 tag;
  4500. // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyMessage)
  4501. for (;;) {
  4502. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4503. tag = p.first;
  4504. if (!p.second) goto handle_unusual;
  4505. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4506. // .google.protobuf.Any any = 1;
  4507. case 1: {
  4508. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4509. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4510. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4511. input, mutable_any()));
  4512. } else {
  4513. goto handle_unusual;
  4514. }
  4515. break;
  4516. }
  4517. // .google.protobuf.testing.AnyData data = 2;
  4518. case 2: {
  4519. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4520. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  4521. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4522. input, mutable_data()));
  4523. } else {
  4524. goto handle_unusual;
  4525. }
  4526. break;
  4527. }
  4528. default: {
  4529. handle_unusual:
  4530. if (tag == 0) {
  4531. goto success;
  4532. }
  4533. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4534. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4535. break;
  4536. }
  4537. }
  4538. }
  4539. success:
  4540. // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyMessage)
  4541. return true;
  4542. failure:
  4543. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyMessage)
  4544. return false;
  4545. #undef DO_
  4546. }
  4547. void AnyMessage::SerializeWithCachedSizes(
  4548. ::google::protobuf::io::CodedOutputStream* output) const {
  4549. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyMessage)
  4550. ::google::protobuf::uint32 cached_has_bits = 0;
  4551. (void) cached_has_bits;
  4552. // .google.protobuf.Any any = 1;
  4553. if (this->has_any()) {
  4554. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4555. 1, this->_internal_any(), output);
  4556. }
  4557. // .google.protobuf.testing.AnyData data = 2;
  4558. if (this->has_data()) {
  4559. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4560. 2, this->_internal_data(), output);
  4561. }
  4562. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4563. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4564. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4565. }
  4566. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyMessage)
  4567. }
  4568. ::google::protobuf::uint8* AnyMessage::InternalSerializeWithCachedSizesToArray(
  4569. bool deterministic, ::google::protobuf::uint8* target) const {
  4570. (void)deterministic; // Unused
  4571. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyMessage)
  4572. ::google::protobuf::uint32 cached_has_bits = 0;
  4573. (void) cached_has_bits;
  4574. // .google.protobuf.Any any = 1;
  4575. if (this->has_any()) {
  4576. target = ::google::protobuf::internal::WireFormatLite::
  4577. InternalWriteMessageToArray(
  4578. 1, this->_internal_any(), deterministic, target);
  4579. }
  4580. // .google.protobuf.testing.AnyData data = 2;
  4581. if (this->has_data()) {
  4582. target = ::google::protobuf::internal::WireFormatLite::
  4583. InternalWriteMessageToArray(
  4584. 2, this->_internal_data(), deterministic, target);
  4585. }
  4586. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4587. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4588. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4589. }
  4590. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyMessage)
  4591. return target;
  4592. }
  4593. size_t AnyMessage::ByteSizeLong() const {
  4594. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyMessage)
  4595. size_t total_size = 0;
  4596. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4597. total_size +=
  4598. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4599. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4600. }
  4601. // .google.protobuf.Any any = 1;
  4602. if (this->has_any()) {
  4603. total_size += 1 +
  4604. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4605. *any_);
  4606. }
  4607. // .google.protobuf.testing.AnyData data = 2;
  4608. if (this->has_data()) {
  4609. total_size += 1 +
  4610. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4611. *data_);
  4612. }
  4613. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4614. SetCachedSize(cached_size);
  4615. return total_size;
  4616. }
  4617. void AnyMessage::MergeFrom(const ::google::protobuf::Message& from) {
  4618. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyMessage)
  4619. GOOGLE_DCHECK_NE(&from, this);
  4620. const AnyMessage* source =
  4621. ::google::protobuf::internal::DynamicCastToGenerated<const AnyMessage>(
  4622. &from);
  4623. if (source == NULL) {
  4624. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyMessage)
  4625. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4626. } else {
  4627. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyMessage)
  4628. MergeFrom(*source);
  4629. }
  4630. }
  4631. void AnyMessage::MergeFrom(const AnyMessage& from) {
  4632. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyMessage)
  4633. GOOGLE_DCHECK_NE(&from, this);
  4634. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4635. ::google::protobuf::uint32 cached_has_bits = 0;
  4636. (void) cached_has_bits;
  4637. if (from.has_any()) {
  4638. mutable_any()->::google::protobuf::Any::MergeFrom(from.any());
  4639. }
  4640. if (from.has_data()) {
  4641. mutable_data()->::google::protobuf::testing::AnyData::MergeFrom(from.data());
  4642. }
  4643. }
  4644. void AnyMessage::CopyFrom(const ::google::protobuf::Message& from) {
  4645. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyMessage)
  4646. if (&from == this) return;
  4647. Clear();
  4648. MergeFrom(from);
  4649. }
  4650. void AnyMessage::CopyFrom(const AnyMessage& from) {
  4651. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyMessage)
  4652. if (&from == this) return;
  4653. Clear();
  4654. MergeFrom(from);
  4655. }
  4656. bool AnyMessage::IsInitialized() const {
  4657. return true;
  4658. }
  4659. void AnyMessage::Swap(AnyMessage* other) {
  4660. if (other == this) return;
  4661. InternalSwap(other);
  4662. }
  4663. void AnyMessage::InternalSwap(AnyMessage* other) {
  4664. using std::swap;
  4665. swap(any_, other->any_);
  4666. swap(data_, other->data_);
  4667. _internal_metadata_.Swap(&other->_internal_metadata_);
  4668. }
  4669. ::google::protobuf::Metadata AnyMessage::GetMetadata() const {
  4670. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  4671. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  4672. }
  4673. // ===================================================================
  4674. AnyData_MapDataEntry_DoNotUse::AnyData_MapDataEntry_DoNotUse() {}
  4675. AnyData_MapDataEntry_DoNotUse::AnyData_MapDataEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  4676. void AnyData_MapDataEntry_DoNotUse::MergeFrom(const AnyData_MapDataEntry_DoNotUse& other) {
  4677. MergeFromInternal(other);
  4678. }
  4679. ::google::protobuf::Metadata AnyData_MapDataEntry_DoNotUse::GetMetadata() const {
  4680. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  4681. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[7];
  4682. }
  4683. void AnyData_MapDataEntry_DoNotUse::MergeFrom(
  4684. const ::google::protobuf::Message& other) {
  4685. ::google::protobuf::Message::MergeFrom(other);
  4686. }
  4687. // ===================================================================
  4688. void AnyData::InitAsDefaultInstance() {
  4689. ::google::protobuf::testing::_AnyData_default_instance_._instance.get_mutable()->nested_data_ = const_cast< ::google::protobuf::testing::AnyData*>(
  4690. ::google::protobuf::testing::AnyData::internal_default_instance());
  4691. ::google::protobuf::testing::_AnyData_default_instance_._instance.get_mutable()->struct_data_ = const_cast< ::google::protobuf::Struct*>(
  4692. ::google::protobuf::Struct::internal_default_instance());
  4693. }
  4694. void AnyData::clear_struct_data() {
  4695. if (GetArenaNoVirtual() == NULL && struct_data_ != NULL) {
  4696. delete struct_data_;
  4697. }
  4698. struct_data_ = NULL;
  4699. }
  4700. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4701. const int AnyData::kAttrFieldNumber;
  4702. const int AnyData::kStrFieldNumber;
  4703. const int AnyData::kMsgsFieldNumber;
  4704. const int AnyData::kNestedDataFieldNumber;
  4705. const int AnyData::kMapDataFieldNumber;
  4706. const int AnyData::kStructDataFieldNumber;
  4707. const int AnyData::kRepeatedDataFieldNumber;
  4708. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4709. AnyData::AnyData()
  4710. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4711. ::google::protobuf::internal::InitSCC(
  4712. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_AnyData.base);
  4713. SharedCtor();
  4714. // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyData)
  4715. }
  4716. AnyData::AnyData(const AnyData& from)
  4717. : ::google::protobuf::Message(),
  4718. _internal_metadata_(NULL),
  4719. msgs_(from.msgs_),
  4720. repeated_data_(from.repeated_data_) {
  4721. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4722. map_data_.MergeFrom(from.map_data_);
  4723. str_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4724. if (from.str().size() > 0) {
  4725. str_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_);
  4726. }
  4727. if (from.has_nested_data()) {
  4728. nested_data_ = new ::google::protobuf::testing::AnyData(*from.nested_data_);
  4729. } else {
  4730. nested_data_ = NULL;
  4731. }
  4732. if (from.has_struct_data()) {
  4733. struct_data_ = new ::google::protobuf::Struct(*from.struct_data_);
  4734. } else {
  4735. struct_data_ = NULL;
  4736. }
  4737. attr_ = from.attr_;
  4738. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyData)
  4739. }
  4740. void AnyData::SharedCtor() {
  4741. str_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4742. ::memset(&nested_data_, 0, static_cast<size_t>(
  4743. reinterpret_cast<char*>(&attr_) -
  4744. reinterpret_cast<char*>(&nested_data_)) + sizeof(attr_));
  4745. }
  4746. AnyData::~AnyData() {
  4747. // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyData)
  4748. SharedDtor();
  4749. }
  4750. void AnyData::SharedDtor() {
  4751. str_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4752. if (this != internal_default_instance()) delete nested_data_;
  4753. if (this != internal_default_instance()) delete struct_data_;
  4754. }
  4755. void AnyData::SetCachedSize(int size) const {
  4756. _cached_size_.Set(size);
  4757. }
  4758. const ::google::protobuf::Descriptor* AnyData::descriptor() {
  4759. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  4760. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4761. }
  4762. const AnyData& AnyData::default_instance() {
  4763. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_AnyData.base);
  4764. return *internal_default_instance();
  4765. }
  4766. void AnyData::Clear() {
  4767. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyData)
  4768. ::google::protobuf::uint32 cached_has_bits = 0;
  4769. // Prevent compiler warnings about cached_has_bits being unused
  4770. (void) cached_has_bits;
  4771. msgs_.Clear();
  4772. map_data_.Clear();
  4773. repeated_data_.Clear();
  4774. str_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4775. if (GetArenaNoVirtual() == NULL && nested_data_ != NULL) {
  4776. delete nested_data_;
  4777. }
  4778. nested_data_ = NULL;
  4779. if (GetArenaNoVirtual() == NULL && struct_data_ != NULL) {
  4780. delete struct_data_;
  4781. }
  4782. struct_data_ = NULL;
  4783. attr_ = 0;
  4784. _internal_metadata_.Clear();
  4785. }
  4786. bool AnyData::MergePartialFromCodedStream(
  4787. ::google::protobuf::io::CodedInputStream* input) {
  4788. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4789. ::google::protobuf::uint32 tag;
  4790. // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyData)
  4791. for (;;) {
  4792. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4793. tag = p.first;
  4794. if (!p.second) goto handle_unusual;
  4795. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4796. // int32 attr = 1;
  4797. case 1: {
  4798. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4799. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  4800. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  4801. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  4802. input, &attr_)));
  4803. } else {
  4804. goto handle_unusual;
  4805. }
  4806. break;
  4807. }
  4808. // string str = 2;
  4809. case 2: {
  4810. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4811. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  4812. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4813. input, this->mutable_str()));
  4814. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4815. this->str().data(), static_cast<int>(this->str().length()),
  4816. ::google::protobuf::internal::WireFormatLite::PARSE,
  4817. "google.protobuf.testing.AnyData.str"));
  4818. } else {
  4819. goto handle_unusual;
  4820. }
  4821. break;
  4822. }
  4823. // repeated string msgs = 3;
  4824. case 3: {
  4825. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4826. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  4827. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4828. input, this->add_msgs()));
  4829. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4830. this->msgs(this->msgs_size() - 1).data(),
  4831. static_cast<int>(this->msgs(this->msgs_size() - 1).length()),
  4832. ::google::protobuf::internal::WireFormatLite::PARSE,
  4833. "google.protobuf.testing.AnyData.msgs"));
  4834. } else {
  4835. goto handle_unusual;
  4836. }
  4837. break;
  4838. }
  4839. // .google.protobuf.testing.AnyData nested_data = 4;
  4840. case 4: {
  4841. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4842. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  4843. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4844. input, mutable_nested_data()));
  4845. } else {
  4846. goto handle_unusual;
  4847. }
  4848. break;
  4849. }
  4850. // map<string, string> map_data = 7;
  4851. case 7: {
  4852. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4853. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  4854. AnyData_MapDataEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  4855. AnyData_MapDataEntry_DoNotUse,
  4856. ::std::string, ::std::string,
  4857. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  4858. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  4859. 0 >,
  4860. ::google::protobuf::Map< ::std::string, ::std::string > > parser(&map_data_);
  4861. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  4862. input, &parser));
  4863. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4864. parser.key().data(), static_cast<int>(parser.key().length()),
  4865. ::google::protobuf::internal::WireFormatLite::PARSE,
  4866. "google.protobuf.testing.AnyData.MapDataEntry.key"));
  4867. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4868. parser.value().data(), static_cast<int>(parser.value().length()),
  4869. ::google::protobuf::internal::WireFormatLite::PARSE,
  4870. "google.protobuf.testing.AnyData.MapDataEntry.value"));
  4871. } else {
  4872. goto handle_unusual;
  4873. }
  4874. break;
  4875. }
  4876. // .google.protobuf.Struct struct_data = 8;
  4877. case 8: {
  4878. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4879. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  4880. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4881. input, mutable_struct_data()));
  4882. } else {
  4883. goto handle_unusual;
  4884. }
  4885. break;
  4886. }
  4887. // repeated .google.protobuf.testing.AnyData repeated_data = 9;
  4888. case 9: {
  4889. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4890. static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
  4891. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4892. input, add_repeated_data()));
  4893. } else {
  4894. goto handle_unusual;
  4895. }
  4896. break;
  4897. }
  4898. default: {
  4899. handle_unusual:
  4900. if (tag == 0) {
  4901. goto success;
  4902. }
  4903. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4904. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4905. break;
  4906. }
  4907. }
  4908. }
  4909. success:
  4910. // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyData)
  4911. return true;
  4912. failure:
  4913. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyData)
  4914. return false;
  4915. #undef DO_
  4916. }
  4917. void AnyData::SerializeWithCachedSizes(
  4918. ::google::protobuf::io::CodedOutputStream* output) const {
  4919. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyData)
  4920. ::google::protobuf::uint32 cached_has_bits = 0;
  4921. (void) cached_has_bits;
  4922. // int32 attr = 1;
  4923. if (this->attr() != 0) {
  4924. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->attr(), output);
  4925. }
  4926. // string str = 2;
  4927. if (this->str().size() > 0) {
  4928. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4929. this->str().data(), static_cast<int>(this->str().length()),
  4930. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4931. "google.protobuf.testing.AnyData.str");
  4932. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  4933. 2, this->str(), output);
  4934. }
  4935. // repeated string msgs = 3;
  4936. for (int i = 0, n = this->msgs_size(); i < n; i++) {
  4937. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4938. this->msgs(i).data(), static_cast<int>(this->msgs(i).length()),
  4939. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4940. "google.protobuf.testing.AnyData.msgs");
  4941. ::google::protobuf::internal::WireFormatLite::WriteString(
  4942. 3, this->msgs(i), output);
  4943. }
  4944. // .google.protobuf.testing.AnyData nested_data = 4;
  4945. if (this->has_nested_data()) {
  4946. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4947. 4, this->_internal_nested_data(), output);
  4948. }
  4949. // map<string, string> map_data = 7;
  4950. if (!this->map_data().empty()) {
  4951. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  4952. ConstPtr;
  4953. typedef ConstPtr SortItem;
  4954. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  4955. struct Utf8Check {
  4956. static void Check(ConstPtr p) {
  4957. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4958. p->first.data(), static_cast<int>(p->first.length()),
  4959. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4960. "google.protobuf.testing.AnyData.MapDataEntry.key");
  4961. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4962. p->second.data(), static_cast<int>(p->second.length()),
  4963. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4964. "google.protobuf.testing.AnyData.MapDataEntry.value");
  4965. }
  4966. };
  4967. if (output->IsSerializationDeterministic() &&
  4968. this->map_data().size() > 1) {
  4969. ::std::unique_ptr<SortItem[]> items(
  4970. new SortItem[this->map_data().size()]);
  4971. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  4972. size_type n = 0;
  4973. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  4974. it = this->map_data().begin();
  4975. it != this->map_data().end(); ++it, ++n) {
  4976. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  4977. }
  4978. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  4979. ::std::unique_ptr<AnyData_MapDataEntry_DoNotUse> entry;
  4980. for (size_type i = 0; i < n; i++) {
  4981. entry.reset(map_data_.NewEntryWrapper(
  4982. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  4983. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4984. 7, *entry, output);
  4985. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  4986. }
  4987. } else {
  4988. ::std::unique_ptr<AnyData_MapDataEntry_DoNotUse> entry;
  4989. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  4990. it = this->map_data().begin();
  4991. it != this->map_data().end(); ++it) {
  4992. entry.reset(map_data_.NewEntryWrapper(
  4993. it->first, it->second));
  4994. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4995. 7, *entry, output);
  4996. Utf8Check::Check(&*it);
  4997. }
  4998. }
  4999. }
  5000. // .google.protobuf.Struct struct_data = 8;
  5001. if (this->has_struct_data()) {
  5002. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5003. 8, this->_internal_struct_data(), output);
  5004. }
  5005. // repeated .google.protobuf.testing.AnyData repeated_data = 9;
  5006. for (unsigned int i = 0,
  5007. n = static_cast<unsigned int>(this->repeated_data_size()); i < n; i++) {
  5008. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5009. 9,
  5010. this->repeated_data(static_cast<int>(i)),
  5011. output);
  5012. }
  5013. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5014. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5015. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5016. }
  5017. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyData)
  5018. }
  5019. ::google::protobuf::uint8* AnyData::InternalSerializeWithCachedSizesToArray(
  5020. bool deterministic, ::google::protobuf::uint8* target) const {
  5021. (void)deterministic; // Unused
  5022. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyData)
  5023. ::google::protobuf::uint32 cached_has_bits = 0;
  5024. (void) cached_has_bits;
  5025. // int32 attr = 1;
  5026. if (this->attr() != 0) {
  5027. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->attr(), target);
  5028. }
  5029. // string str = 2;
  5030. if (this->str().size() > 0) {
  5031. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5032. this->str().data(), static_cast<int>(this->str().length()),
  5033. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5034. "google.protobuf.testing.AnyData.str");
  5035. target =
  5036. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  5037. 2, this->str(), target);
  5038. }
  5039. // repeated string msgs = 3;
  5040. for (int i = 0, n = this->msgs_size(); i < n; i++) {
  5041. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5042. this->msgs(i).data(), static_cast<int>(this->msgs(i).length()),
  5043. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5044. "google.protobuf.testing.AnyData.msgs");
  5045. target = ::google::protobuf::internal::WireFormatLite::
  5046. WriteStringToArray(3, this->msgs(i), target);
  5047. }
  5048. // .google.protobuf.testing.AnyData nested_data = 4;
  5049. if (this->has_nested_data()) {
  5050. target = ::google::protobuf::internal::WireFormatLite::
  5051. InternalWriteMessageToArray(
  5052. 4, this->_internal_nested_data(), deterministic, target);
  5053. }
  5054. // map<string, string> map_data = 7;
  5055. if (!this->map_data().empty()) {
  5056. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  5057. ConstPtr;
  5058. typedef ConstPtr SortItem;
  5059. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  5060. struct Utf8Check {
  5061. static void Check(ConstPtr p) {
  5062. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5063. p->first.data(), static_cast<int>(p->first.length()),
  5064. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5065. "google.protobuf.testing.AnyData.MapDataEntry.key");
  5066. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5067. p->second.data(), static_cast<int>(p->second.length()),
  5068. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5069. "google.protobuf.testing.AnyData.MapDataEntry.value");
  5070. }
  5071. };
  5072. if (deterministic &&
  5073. this->map_data().size() > 1) {
  5074. ::std::unique_ptr<SortItem[]> items(
  5075. new SortItem[this->map_data().size()]);
  5076. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  5077. size_type n = 0;
  5078. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  5079. it = this->map_data().begin();
  5080. it != this->map_data().end(); ++it, ++n) {
  5081. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5082. }
  5083. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5084. ::std::unique_ptr<AnyData_MapDataEntry_DoNotUse> entry;
  5085. for (size_type i = 0; i < n; i++) {
  5086. entry.reset(map_data_.NewEntryWrapper(
  5087. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  5088. target = ::google::protobuf::internal::WireFormatLite::
  5089. InternalWriteMessageNoVirtualToArray(
  5090. 7, *entry, deterministic, target);
  5091. ;
  5092. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  5093. }
  5094. } else {
  5095. ::std::unique_ptr<AnyData_MapDataEntry_DoNotUse> entry;
  5096. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  5097. it = this->map_data().begin();
  5098. it != this->map_data().end(); ++it) {
  5099. entry.reset(map_data_.NewEntryWrapper(
  5100. it->first, it->second));
  5101. target = ::google::protobuf::internal::WireFormatLite::
  5102. InternalWriteMessageNoVirtualToArray(
  5103. 7, *entry, deterministic, target);
  5104. ;
  5105. Utf8Check::Check(&*it);
  5106. }
  5107. }
  5108. }
  5109. // .google.protobuf.Struct struct_data = 8;
  5110. if (this->has_struct_data()) {
  5111. target = ::google::protobuf::internal::WireFormatLite::
  5112. InternalWriteMessageToArray(
  5113. 8, this->_internal_struct_data(), deterministic, target);
  5114. }
  5115. // repeated .google.protobuf.testing.AnyData repeated_data = 9;
  5116. for (unsigned int i = 0,
  5117. n = static_cast<unsigned int>(this->repeated_data_size()); i < n; i++) {
  5118. target = ::google::protobuf::internal::WireFormatLite::
  5119. InternalWriteMessageToArray(
  5120. 9, this->repeated_data(static_cast<int>(i)), deterministic, target);
  5121. }
  5122. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5123. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5124. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5125. }
  5126. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyData)
  5127. return target;
  5128. }
  5129. size_t AnyData::ByteSizeLong() const {
  5130. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyData)
  5131. size_t total_size = 0;
  5132. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5133. total_size +=
  5134. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5135. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5136. }
  5137. // repeated string msgs = 3;
  5138. total_size += 1 *
  5139. ::google::protobuf::internal::FromIntSize(this->msgs_size());
  5140. for (int i = 0, n = this->msgs_size(); i < n; i++) {
  5141. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  5142. this->msgs(i));
  5143. }
  5144. // map<string, string> map_data = 7;
  5145. total_size += 1 *
  5146. ::google::protobuf::internal::FromIntSize(this->map_data_size());
  5147. {
  5148. ::std::unique_ptr<AnyData_MapDataEntry_DoNotUse> entry;
  5149. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  5150. it = this->map_data().begin();
  5151. it != this->map_data().end(); ++it) {
  5152. entry.reset(map_data_.NewEntryWrapper(it->first, it->second));
  5153. total_size += ::google::protobuf::internal::WireFormatLite::
  5154. MessageSizeNoVirtual(*entry);
  5155. }
  5156. }
  5157. // repeated .google.protobuf.testing.AnyData repeated_data = 9;
  5158. {
  5159. unsigned int count = static_cast<unsigned int>(this->repeated_data_size());
  5160. total_size += 1UL * count;
  5161. for (unsigned int i = 0; i < count; i++) {
  5162. total_size +=
  5163. ::google::protobuf::internal::WireFormatLite::MessageSize(
  5164. this->repeated_data(static_cast<int>(i)));
  5165. }
  5166. }
  5167. // string str = 2;
  5168. if (this->str().size() > 0) {
  5169. total_size += 1 +
  5170. ::google::protobuf::internal::WireFormatLite::StringSize(
  5171. this->str());
  5172. }
  5173. // .google.protobuf.testing.AnyData nested_data = 4;
  5174. if (this->has_nested_data()) {
  5175. total_size += 1 +
  5176. ::google::protobuf::internal::WireFormatLite::MessageSize(
  5177. *nested_data_);
  5178. }
  5179. // .google.protobuf.Struct struct_data = 8;
  5180. if (this->has_struct_data()) {
  5181. total_size += 1 +
  5182. ::google::protobuf::internal::WireFormatLite::MessageSize(
  5183. *struct_data_);
  5184. }
  5185. // int32 attr = 1;
  5186. if (this->attr() != 0) {
  5187. total_size += 1 +
  5188. ::google::protobuf::internal::WireFormatLite::Int32Size(
  5189. this->attr());
  5190. }
  5191. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5192. SetCachedSize(cached_size);
  5193. return total_size;
  5194. }
  5195. void AnyData::MergeFrom(const ::google::protobuf::Message& from) {
  5196. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyData)
  5197. GOOGLE_DCHECK_NE(&from, this);
  5198. const AnyData* source =
  5199. ::google::protobuf::internal::DynamicCastToGenerated<const AnyData>(
  5200. &from);
  5201. if (source == NULL) {
  5202. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyData)
  5203. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5204. } else {
  5205. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyData)
  5206. MergeFrom(*source);
  5207. }
  5208. }
  5209. void AnyData::MergeFrom(const AnyData& from) {
  5210. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyData)
  5211. GOOGLE_DCHECK_NE(&from, this);
  5212. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5213. ::google::protobuf::uint32 cached_has_bits = 0;
  5214. (void) cached_has_bits;
  5215. msgs_.MergeFrom(from.msgs_);
  5216. map_data_.MergeFrom(from.map_data_);
  5217. repeated_data_.MergeFrom(from.repeated_data_);
  5218. if (from.str().size() > 0) {
  5219. str_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_);
  5220. }
  5221. if (from.has_nested_data()) {
  5222. mutable_nested_data()->::google::protobuf::testing::AnyData::MergeFrom(from.nested_data());
  5223. }
  5224. if (from.has_struct_data()) {
  5225. mutable_struct_data()->::google::protobuf::Struct::MergeFrom(from.struct_data());
  5226. }
  5227. if (from.attr() != 0) {
  5228. set_attr(from.attr());
  5229. }
  5230. }
  5231. void AnyData::CopyFrom(const ::google::protobuf::Message& from) {
  5232. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyData)
  5233. if (&from == this) return;
  5234. Clear();
  5235. MergeFrom(from);
  5236. }
  5237. void AnyData::CopyFrom(const AnyData& from) {
  5238. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyData)
  5239. if (&from == this) return;
  5240. Clear();
  5241. MergeFrom(from);
  5242. }
  5243. bool AnyData::IsInitialized() const {
  5244. return true;
  5245. }
  5246. void AnyData::Swap(AnyData* other) {
  5247. if (other == this) return;
  5248. InternalSwap(other);
  5249. }
  5250. void AnyData::InternalSwap(AnyData* other) {
  5251. using std::swap;
  5252. msgs_.InternalSwap(CastToBase(&other->msgs_));
  5253. map_data_.Swap(&other->map_data_);
  5254. CastToBase(&repeated_data_)->InternalSwap(CastToBase(&other->repeated_data_));
  5255. str_.Swap(&other->str_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  5256. GetArenaNoVirtual());
  5257. swap(nested_data_, other->nested_data_);
  5258. swap(struct_data_, other->struct_data_);
  5259. swap(attr_, other->attr_);
  5260. _internal_metadata_.Swap(&other->_internal_metadata_);
  5261. }
  5262. ::google::protobuf::Metadata AnyData::GetMetadata() const {
  5263. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  5264. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  5265. }
  5266. // ===================================================================
  5267. StringtoIntMap_MapEntry_DoNotUse::StringtoIntMap_MapEntry_DoNotUse() {}
  5268. StringtoIntMap_MapEntry_DoNotUse::StringtoIntMap_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  5269. void StringtoIntMap_MapEntry_DoNotUse::MergeFrom(const StringtoIntMap_MapEntry_DoNotUse& other) {
  5270. MergeFromInternal(other);
  5271. }
  5272. ::google::protobuf::Metadata StringtoIntMap_MapEntry_DoNotUse::GetMetadata() const {
  5273. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  5274. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[9];
  5275. }
  5276. void StringtoIntMap_MapEntry_DoNotUse::MergeFrom(
  5277. const ::google::protobuf::Message& other) {
  5278. ::google::protobuf::Message::MergeFrom(other);
  5279. }
  5280. // ===================================================================
  5281. void StringtoIntMap::InitAsDefaultInstance() {
  5282. }
  5283. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5284. const int StringtoIntMap::kMapFieldNumber;
  5285. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5286. StringtoIntMap::StringtoIntMap()
  5287. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5288. ::google::protobuf::internal::InitSCC(
  5289. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_StringtoIntMap.base);
  5290. SharedCtor();
  5291. // @@protoc_insertion_point(constructor:google.protobuf.testing.StringtoIntMap)
  5292. }
  5293. StringtoIntMap::StringtoIntMap(const StringtoIntMap& from)
  5294. : ::google::protobuf::Message(),
  5295. _internal_metadata_(NULL) {
  5296. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5297. map_.MergeFrom(from.map_);
  5298. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.StringtoIntMap)
  5299. }
  5300. void StringtoIntMap::SharedCtor() {
  5301. }
  5302. StringtoIntMap::~StringtoIntMap() {
  5303. // @@protoc_insertion_point(destructor:google.protobuf.testing.StringtoIntMap)
  5304. SharedDtor();
  5305. }
  5306. void StringtoIntMap::SharedDtor() {
  5307. }
  5308. void StringtoIntMap::SetCachedSize(int size) const {
  5309. _cached_size_.Set(size);
  5310. }
  5311. const ::google::protobuf::Descriptor* StringtoIntMap::descriptor() {
  5312. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  5313. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5314. }
  5315. const StringtoIntMap& StringtoIntMap::default_instance() {
  5316. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_StringtoIntMap.base);
  5317. return *internal_default_instance();
  5318. }
  5319. void StringtoIntMap::Clear() {
  5320. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.StringtoIntMap)
  5321. ::google::protobuf::uint32 cached_has_bits = 0;
  5322. // Prevent compiler warnings about cached_has_bits being unused
  5323. (void) cached_has_bits;
  5324. map_.Clear();
  5325. _internal_metadata_.Clear();
  5326. }
  5327. bool StringtoIntMap::MergePartialFromCodedStream(
  5328. ::google::protobuf::io::CodedInputStream* input) {
  5329. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5330. ::google::protobuf::uint32 tag;
  5331. // @@protoc_insertion_point(parse_start:google.protobuf.testing.StringtoIntMap)
  5332. for (;;) {
  5333. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5334. tag = p.first;
  5335. if (!p.second) goto handle_unusual;
  5336. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5337. // map<string, int32> map = 1;
  5338. case 1: {
  5339. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5340. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5341. StringtoIntMap_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  5342. StringtoIntMap_MapEntry_DoNotUse,
  5343. ::std::string, ::google::protobuf::int32,
  5344. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  5345. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  5346. 0 >,
  5347. ::google::protobuf::Map< ::std::string, ::google::protobuf::int32 > > parser(&map_);
  5348. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  5349. input, &parser));
  5350. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5351. parser.key().data(), static_cast<int>(parser.key().length()),
  5352. ::google::protobuf::internal::WireFormatLite::PARSE,
  5353. "google.protobuf.testing.StringtoIntMap.MapEntry.key"));
  5354. } else {
  5355. goto handle_unusual;
  5356. }
  5357. break;
  5358. }
  5359. default: {
  5360. handle_unusual:
  5361. if (tag == 0) {
  5362. goto success;
  5363. }
  5364. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5365. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5366. break;
  5367. }
  5368. }
  5369. }
  5370. success:
  5371. // @@protoc_insertion_point(parse_success:google.protobuf.testing.StringtoIntMap)
  5372. return true;
  5373. failure:
  5374. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.StringtoIntMap)
  5375. return false;
  5376. #undef DO_
  5377. }
  5378. void StringtoIntMap::SerializeWithCachedSizes(
  5379. ::google::protobuf::io::CodedOutputStream* output) const {
  5380. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.StringtoIntMap)
  5381. ::google::protobuf::uint32 cached_has_bits = 0;
  5382. (void) cached_has_bits;
  5383. // map<string, int32> map = 1;
  5384. if (!this->map().empty()) {
  5385. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_pointer
  5386. ConstPtr;
  5387. typedef ConstPtr SortItem;
  5388. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  5389. struct Utf8Check {
  5390. static void Check(ConstPtr p) {
  5391. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5392. p->first.data(), static_cast<int>(p->first.length()),
  5393. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5394. "google.protobuf.testing.StringtoIntMap.MapEntry.key");
  5395. }
  5396. };
  5397. if (output->IsSerializationDeterministic() &&
  5398. this->map().size() > 1) {
  5399. ::std::unique_ptr<SortItem[]> items(
  5400. new SortItem[this->map().size()]);
  5401. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::size_type size_type;
  5402. size_type n = 0;
  5403. for (::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_iterator
  5404. it = this->map().begin();
  5405. it != this->map().end(); ++it, ++n) {
  5406. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5407. }
  5408. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5409. ::std::unique_ptr<StringtoIntMap_MapEntry_DoNotUse> entry;
  5410. for (size_type i = 0; i < n; i++) {
  5411. entry.reset(map_.NewEntryWrapper(
  5412. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  5413. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5414. 1, *entry, output);
  5415. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  5416. }
  5417. } else {
  5418. ::std::unique_ptr<StringtoIntMap_MapEntry_DoNotUse> entry;
  5419. for (::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_iterator
  5420. it = this->map().begin();
  5421. it != this->map().end(); ++it) {
  5422. entry.reset(map_.NewEntryWrapper(
  5423. it->first, it->second));
  5424. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5425. 1, *entry, output);
  5426. Utf8Check::Check(&*it);
  5427. }
  5428. }
  5429. }
  5430. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5431. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5432. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5433. }
  5434. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.StringtoIntMap)
  5435. }
  5436. ::google::protobuf::uint8* StringtoIntMap::InternalSerializeWithCachedSizesToArray(
  5437. bool deterministic, ::google::protobuf::uint8* target) const {
  5438. (void)deterministic; // Unused
  5439. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.StringtoIntMap)
  5440. ::google::protobuf::uint32 cached_has_bits = 0;
  5441. (void) cached_has_bits;
  5442. // map<string, int32> map = 1;
  5443. if (!this->map().empty()) {
  5444. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_pointer
  5445. ConstPtr;
  5446. typedef ConstPtr SortItem;
  5447. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  5448. struct Utf8Check {
  5449. static void Check(ConstPtr p) {
  5450. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5451. p->first.data(), static_cast<int>(p->first.length()),
  5452. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5453. "google.protobuf.testing.StringtoIntMap.MapEntry.key");
  5454. }
  5455. };
  5456. if (deterministic &&
  5457. this->map().size() > 1) {
  5458. ::std::unique_ptr<SortItem[]> items(
  5459. new SortItem[this->map().size()]);
  5460. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::size_type size_type;
  5461. size_type n = 0;
  5462. for (::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_iterator
  5463. it = this->map().begin();
  5464. it != this->map().end(); ++it, ++n) {
  5465. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5466. }
  5467. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5468. ::std::unique_ptr<StringtoIntMap_MapEntry_DoNotUse> entry;
  5469. for (size_type i = 0; i < n; i++) {
  5470. entry.reset(map_.NewEntryWrapper(
  5471. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  5472. target = ::google::protobuf::internal::WireFormatLite::
  5473. InternalWriteMessageNoVirtualToArray(
  5474. 1, *entry, deterministic, target);
  5475. ;
  5476. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  5477. }
  5478. } else {
  5479. ::std::unique_ptr<StringtoIntMap_MapEntry_DoNotUse> entry;
  5480. for (::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_iterator
  5481. it = this->map().begin();
  5482. it != this->map().end(); ++it) {
  5483. entry.reset(map_.NewEntryWrapper(
  5484. it->first, it->second));
  5485. target = ::google::protobuf::internal::WireFormatLite::
  5486. InternalWriteMessageNoVirtualToArray(
  5487. 1, *entry, deterministic, target);
  5488. ;
  5489. Utf8Check::Check(&*it);
  5490. }
  5491. }
  5492. }
  5493. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5494. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5495. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5496. }
  5497. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.StringtoIntMap)
  5498. return target;
  5499. }
  5500. size_t StringtoIntMap::ByteSizeLong() const {
  5501. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.StringtoIntMap)
  5502. size_t total_size = 0;
  5503. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5504. total_size +=
  5505. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5506. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5507. }
  5508. // map<string, int32> map = 1;
  5509. total_size += 1 *
  5510. ::google::protobuf::internal::FromIntSize(this->map_size());
  5511. {
  5512. ::std::unique_ptr<StringtoIntMap_MapEntry_DoNotUse> entry;
  5513. for (::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_iterator
  5514. it = this->map().begin();
  5515. it != this->map().end(); ++it) {
  5516. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  5517. total_size += ::google::protobuf::internal::WireFormatLite::
  5518. MessageSizeNoVirtual(*entry);
  5519. }
  5520. }
  5521. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5522. SetCachedSize(cached_size);
  5523. return total_size;
  5524. }
  5525. void StringtoIntMap::MergeFrom(const ::google::protobuf::Message& from) {
  5526. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.StringtoIntMap)
  5527. GOOGLE_DCHECK_NE(&from, this);
  5528. const StringtoIntMap* source =
  5529. ::google::protobuf::internal::DynamicCastToGenerated<const StringtoIntMap>(
  5530. &from);
  5531. if (source == NULL) {
  5532. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.StringtoIntMap)
  5533. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5534. } else {
  5535. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.StringtoIntMap)
  5536. MergeFrom(*source);
  5537. }
  5538. }
  5539. void StringtoIntMap::MergeFrom(const StringtoIntMap& from) {
  5540. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.StringtoIntMap)
  5541. GOOGLE_DCHECK_NE(&from, this);
  5542. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5543. ::google::protobuf::uint32 cached_has_bits = 0;
  5544. (void) cached_has_bits;
  5545. map_.MergeFrom(from.map_);
  5546. }
  5547. void StringtoIntMap::CopyFrom(const ::google::protobuf::Message& from) {
  5548. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.StringtoIntMap)
  5549. if (&from == this) return;
  5550. Clear();
  5551. MergeFrom(from);
  5552. }
  5553. void StringtoIntMap::CopyFrom(const StringtoIntMap& from) {
  5554. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.StringtoIntMap)
  5555. if (&from == this) return;
  5556. Clear();
  5557. MergeFrom(from);
  5558. }
  5559. bool StringtoIntMap::IsInitialized() const {
  5560. return true;
  5561. }
  5562. void StringtoIntMap::Swap(StringtoIntMap* other) {
  5563. if (other == this) return;
  5564. InternalSwap(other);
  5565. }
  5566. void StringtoIntMap::InternalSwap(StringtoIntMap* other) {
  5567. using std::swap;
  5568. map_.Swap(&other->map_);
  5569. _internal_metadata_.Swap(&other->_internal_metadata_);
  5570. }
  5571. ::google::protobuf::Metadata StringtoIntMap::GetMetadata() const {
  5572. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  5573. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  5574. }
  5575. // ===================================================================
  5576. IntToStringMap_MapEntry_DoNotUse::IntToStringMap_MapEntry_DoNotUse() {}
  5577. IntToStringMap_MapEntry_DoNotUse::IntToStringMap_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  5578. void IntToStringMap_MapEntry_DoNotUse::MergeFrom(const IntToStringMap_MapEntry_DoNotUse& other) {
  5579. MergeFromInternal(other);
  5580. }
  5581. ::google::protobuf::Metadata IntToStringMap_MapEntry_DoNotUse::GetMetadata() const {
  5582. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  5583. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[11];
  5584. }
  5585. void IntToStringMap_MapEntry_DoNotUse::MergeFrom(
  5586. const ::google::protobuf::Message& other) {
  5587. ::google::protobuf::Message::MergeFrom(other);
  5588. }
  5589. // ===================================================================
  5590. void IntToStringMap::InitAsDefaultInstance() {
  5591. }
  5592. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5593. const int IntToStringMap::kMapFieldNumber;
  5594. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5595. IntToStringMap::IntToStringMap()
  5596. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5597. ::google::protobuf::internal::InitSCC(
  5598. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_IntToStringMap.base);
  5599. SharedCtor();
  5600. // @@protoc_insertion_point(constructor:google.protobuf.testing.IntToStringMap)
  5601. }
  5602. IntToStringMap::IntToStringMap(const IntToStringMap& from)
  5603. : ::google::protobuf::Message(),
  5604. _internal_metadata_(NULL) {
  5605. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5606. map_.MergeFrom(from.map_);
  5607. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.IntToStringMap)
  5608. }
  5609. void IntToStringMap::SharedCtor() {
  5610. }
  5611. IntToStringMap::~IntToStringMap() {
  5612. // @@protoc_insertion_point(destructor:google.protobuf.testing.IntToStringMap)
  5613. SharedDtor();
  5614. }
  5615. void IntToStringMap::SharedDtor() {
  5616. }
  5617. void IntToStringMap::SetCachedSize(int size) const {
  5618. _cached_size_.Set(size);
  5619. }
  5620. const ::google::protobuf::Descriptor* IntToStringMap::descriptor() {
  5621. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  5622. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5623. }
  5624. const IntToStringMap& IntToStringMap::default_instance() {
  5625. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_IntToStringMap.base);
  5626. return *internal_default_instance();
  5627. }
  5628. void IntToStringMap::Clear() {
  5629. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.IntToStringMap)
  5630. ::google::protobuf::uint32 cached_has_bits = 0;
  5631. // Prevent compiler warnings about cached_has_bits being unused
  5632. (void) cached_has_bits;
  5633. map_.Clear();
  5634. _internal_metadata_.Clear();
  5635. }
  5636. bool IntToStringMap::MergePartialFromCodedStream(
  5637. ::google::protobuf::io::CodedInputStream* input) {
  5638. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5639. ::google::protobuf::uint32 tag;
  5640. // @@protoc_insertion_point(parse_start:google.protobuf.testing.IntToStringMap)
  5641. for (;;) {
  5642. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5643. tag = p.first;
  5644. if (!p.second) goto handle_unusual;
  5645. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5646. // map<int32, string> map = 1;
  5647. case 1: {
  5648. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5649. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5650. IntToStringMap_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  5651. IntToStringMap_MapEntry_DoNotUse,
  5652. ::google::protobuf::int32, ::std::string,
  5653. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  5654. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  5655. 0 >,
  5656. ::google::protobuf::Map< ::google::protobuf::int32, ::std::string > > parser(&map_);
  5657. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  5658. input, &parser));
  5659. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5660. parser.value().data(), static_cast<int>(parser.value().length()),
  5661. ::google::protobuf::internal::WireFormatLite::PARSE,
  5662. "google.protobuf.testing.IntToStringMap.MapEntry.value"));
  5663. } else {
  5664. goto handle_unusual;
  5665. }
  5666. break;
  5667. }
  5668. default: {
  5669. handle_unusual:
  5670. if (tag == 0) {
  5671. goto success;
  5672. }
  5673. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5674. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5675. break;
  5676. }
  5677. }
  5678. }
  5679. success:
  5680. // @@protoc_insertion_point(parse_success:google.protobuf.testing.IntToStringMap)
  5681. return true;
  5682. failure:
  5683. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.IntToStringMap)
  5684. return false;
  5685. #undef DO_
  5686. }
  5687. void IntToStringMap::SerializeWithCachedSizes(
  5688. ::google::protobuf::io::CodedOutputStream* output) const {
  5689. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.IntToStringMap)
  5690. ::google::protobuf::uint32 cached_has_bits = 0;
  5691. (void) cached_has_bits;
  5692. // map<int32, string> map = 1;
  5693. if (!this->map().empty()) {
  5694. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_pointer
  5695. ConstPtr;
  5696. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  5697. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  5698. struct Utf8Check {
  5699. static void Check(ConstPtr p) {
  5700. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5701. p->second.data(), static_cast<int>(p->second.length()),
  5702. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5703. "google.protobuf.testing.IntToStringMap.MapEntry.value");
  5704. }
  5705. };
  5706. if (output->IsSerializationDeterministic() &&
  5707. this->map().size() > 1) {
  5708. ::std::unique_ptr<SortItem[]> items(
  5709. new SortItem[this->map().size()]);
  5710. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::size_type size_type;
  5711. size_type n = 0;
  5712. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  5713. it = this->map().begin();
  5714. it != this->map().end(); ++it, ++n) {
  5715. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5716. }
  5717. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5718. ::std::unique_ptr<IntToStringMap_MapEntry_DoNotUse> entry;
  5719. for (size_type i = 0; i < n; i++) {
  5720. entry.reset(map_.NewEntryWrapper(
  5721. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  5722. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5723. 1, *entry, output);
  5724. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)].second);
  5725. }
  5726. } else {
  5727. ::std::unique_ptr<IntToStringMap_MapEntry_DoNotUse> entry;
  5728. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  5729. it = this->map().begin();
  5730. it != this->map().end(); ++it) {
  5731. entry.reset(map_.NewEntryWrapper(
  5732. it->first, it->second));
  5733. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5734. 1, *entry, output);
  5735. Utf8Check::Check(&*it);
  5736. }
  5737. }
  5738. }
  5739. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5740. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5741. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5742. }
  5743. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.IntToStringMap)
  5744. }
  5745. ::google::protobuf::uint8* IntToStringMap::InternalSerializeWithCachedSizesToArray(
  5746. bool deterministic, ::google::protobuf::uint8* target) const {
  5747. (void)deterministic; // Unused
  5748. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.IntToStringMap)
  5749. ::google::protobuf::uint32 cached_has_bits = 0;
  5750. (void) cached_has_bits;
  5751. // map<int32, string> map = 1;
  5752. if (!this->map().empty()) {
  5753. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_pointer
  5754. ConstPtr;
  5755. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  5756. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  5757. struct Utf8Check {
  5758. static void Check(ConstPtr p) {
  5759. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5760. p->second.data(), static_cast<int>(p->second.length()),
  5761. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5762. "google.protobuf.testing.IntToStringMap.MapEntry.value");
  5763. }
  5764. };
  5765. if (deterministic &&
  5766. this->map().size() > 1) {
  5767. ::std::unique_ptr<SortItem[]> items(
  5768. new SortItem[this->map().size()]);
  5769. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::size_type size_type;
  5770. size_type n = 0;
  5771. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  5772. it = this->map().begin();
  5773. it != this->map().end(); ++it, ++n) {
  5774. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5775. }
  5776. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5777. ::std::unique_ptr<IntToStringMap_MapEntry_DoNotUse> entry;
  5778. for (size_type i = 0; i < n; i++) {
  5779. entry.reset(map_.NewEntryWrapper(
  5780. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  5781. target = ::google::protobuf::internal::WireFormatLite::
  5782. InternalWriteMessageNoVirtualToArray(
  5783. 1, *entry, deterministic, target);
  5784. ;
  5785. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)].second);
  5786. }
  5787. } else {
  5788. ::std::unique_ptr<IntToStringMap_MapEntry_DoNotUse> entry;
  5789. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  5790. it = this->map().begin();
  5791. it != this->map().end(); ++it) {
  5792. entry.reset(map_.NewEntryWrapper(
  5793. it->first, it->second));
  5794. target = ::google::protobuf::internal::WireFormatLite::
  5795. InternalWriteMessageNoVirtualToArray(
  5796. 1, *entry, deterministic, target);
  5797. ;
  5798. Utf8Check::Check(&*it);
  5799. }
  5800. }
  5801. }
  5802. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5803. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5804. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5805. }
  5806. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.IntToStringMap)
  5807. return target;
  5808. }
  5809. size_t IntToStringMap::ByteSizeLong() const {
  5810. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.IntToStringMap)
  5811. size_t total_size = 0;
  5812. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5813. total_size +=
  5814. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5815. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5816. }
  5817. // map<int32, string> map = 1;
  5818. total_size += 1 *
  5819. ::google::protobuf::internal::FromIntSize(this->map_size());
  5820. {
  5821. ::std::unique_ptr<IntToStringMap_MapEntry_DoNotUse> entry;
  5822. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  5823. it = this->map().begin();
  5824. it != this->map().end(); ++it) {
  5825. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  5826. total_size += ::google::protobuf::internal::WireFormatLite::
  5827. MessageSizeNoVirtual(*entry);
  5828. }
  5829. }
  5830. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5831. SetCachedSize(cached_size);
  5832. return total_size;
  5833. }
  5834. void IntToStringMap::MergeFrom(const ::google::protobuf::Message& from) {
  5835. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.IntToStringMap)
  5836. GOOGLE_DCHECK_NE(&from, this);
  5837. const IntToStringMap* source =
  5838. ::google::protobuf::internal::DynamicCastToGenerated<const IntToStringMap>(
  5839. &from);
  5840. if (source == NULL) {
  5841. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.IntToStringMap)
  5842. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5843. } else {
  5844. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.IntToStringMap)
  5845. MergeFrom(*source);
  5846. }
  5847. }
  5848. void IntToStringMap::MergeFrom(const IntToStringMap& from) {
  5849. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.IntToStringMap)
  5850. GOOGLE_DCHECK_NE(&from, this);
  5851. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5852. ::google::protobuf::uint32 cached_has_bits = 0;
  5853. (void) cached_has_bits;
  5854. map_.MergeFrom(from.map_);
  5855. }
  5856. void IntToStringMap::CopyFrom(const ::google::protobuf::Message& from) {
  5857. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.IntToStringMap)
  5858. if (&from == this) return;
  5859. Clear();
  5860. MergeFrom(from);
  5861. }
  5862. void IntToStringMap::CopyFrom(const IntToStringMap& from) {
  5863. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.IntToStringMap)
  5864. if (&from == this) return;
  5865. Clear();
  5866. MergeFrom(from);
  5867. }
  5868. bool IntToStringMap::IsInitialized() const {
  5869. return true;
  5870. }
  5871. void IntToStringMap::Swap(IntToStringMap* other) {
  5872. if (other == this) return;
  5873. InternalSwap(other);
  5874. }
  5875. void IntToStringMap::InternalSwap(IntToStringMap* other) {
  5876. using std::swap;
  5877. map_.Swap(&other->map_);
  5878. _internal_metadata_.Swap(&other->_internal_metadata_);
  5879. }
  5880. ::google::protobuf::Metadata IntToStringMap::GetMetadata() const {
  5881. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  5882. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  5883. }
  5884. // ===================================================================
  5885. MixedMap_MapEntry_DoNotUse::MixedMap_MapEntry_DoNotUse() {}
  5886. MixedMap_MapEntry_DoNotUse::MixedMap_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  5887. void MixedMap_MapEntry_DoNotUse::MergeFrom(const MixedMap_MapEntry_DoNotUse& other) {
  5888. MergeFromInternal(other);
  5889. }
  5890. ::google::protobuf::Metadata MixedMap_MapEntry_DoNotUse::GetMetadata() const {
  5891. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  5892. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[13];
  5893. }
  5894. void MixedMap_MapEntry_DoNotUse::MergeFrom(
  5895. const ::google::protobuf::Message& other) {
  5896. ::google::protobuf::Message::MergeFrom(other);
  5897. }
  5898. // ===================================================================
  5899. void MixedMap::InitAsDefaultInstance() {
  5900. }
  5901. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5902. const int MixedMap::kMsgFieldNumber;
  5903. const int MixedMap::kMapFieldNumber;
  5904. const int MixedMap::kIntValueFieldNumber;
  5905. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5906. MixedMap::MixedMap()
  5907. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5908. ::google::protobuf::internal::InitSCC(
  5909. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MixedMap.base);
  5910. SharedCtor();
  5911. // @@protoc_insertion_point(constructor:google.protobuf.testing.MixedMap)
  5912. }
  5913. MixedMap::MixedMap(const MixedMap& from)
  5914. : ::google::protobuf::Message(),
  5915. _internal_metadata_(NULL) {
  5916. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5917. map_.MergeFrom(from.map_);
  5918. msg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5919. if (from.msg().size() > 0) {
  5920. msg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.msg_);
  5921. }
  5922. int_value_ = from.int_value_;
  5923. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MixedMap)
  5924. }
  5925. void MixedMap::SharedCtor() {
  5926. msg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5927. int_value_ = 0;
  5928. }
  5929. MixedMap::~MixedMap() {
  5930. // @@protoc_insertion_point(destructor:google.protobuf.testing.MixedMap)
  5931. SharedDtor();
  5932. }
  5933. void MixedMap::SharedDtor() {
  5934. msg_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5935. }
  5936. void MixedMap::SetCachedSize(int size) const {
  5937. _cached_size_.Set(size);
  5938. }
  5939. const ::google::protobuf::Descriptor* MixedMap::descriptor() {
  5940. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  5941. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5942. }
  5943. const MixedMap& MixedMap::default_instance() {
  5944. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MixedMap.base);
  5945. return *internal_default_instance();
  5946. }
  5947. void MixedMap::Clear() {
  5948. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MixedMap)
  5949. ::google::protobuf::uint32 cached_has_bits = 0;
  5950. // Prevent compiler warnings about cached_has_bits being unused
  5951. (void) cached_has_bits;
  5952. map_.Clear();
  5953. msg_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5954. int_value_ = 0;
  5955. _internal_metadata_.Clear();
  5956. }
  5957. bool MixedMap::MergePartialFromCodedStream(
  5958. ::google::protobuf::io::CodedInputStream* input) {
  5959. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5960. ::google::protobuf::uint32 tag;
  5961. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MixedMap)
  5962. for (;;) {
  5963. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5964. tag = p.first;
  5965. if (!p.second) goto handle_unusual;
  5966. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5967. // string msg = 1;
  5968. case 1: {
  5969. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5970. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5971. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5972. input, this->mutable_msg()));
  5973. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5974. this->msg().data(), static_cast<int>(this->msg().length()),
  5975. ::google::protobuf::internal::WireFormatLite::PARSE,
  5976. "google.protobuf.testing.MixedMap.msg"));
  5977. } else {
  5978. goto handle_unusual;
  5979. }
  5980. break;
  5981. }
  5982. // map<string, float> map = 2;
  5983. case 2: {
  5984. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5985. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  5986. MixedMap_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  5987. MixedMap_MapEntry_DoNotUse,
  5988. ::std::string, float,
  5989. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  5990. ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT,
  5991. 0 >,
  5992. ::google::protobuf::Map< ::std::string, float > > parser(&map_);
  5993. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  5994. input, &parser));
  5995. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5996. parser.key().data(), static_cast<int>(parser.key().length()),
  5997. ::google::protobuf::internal::WireFormatLite::PARSE,
  5998. "google.protobuf.testing.MixedMap.MapEntry.key"));
  5999. } else {
  6000. goto handle_unusual;
  6001. }
  6002. break;
  6003. }
  6004. // int32 int_value = 3;
  6005. case 3: {
  6006. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6007. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  6008. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6009. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  6010. input, &int_value_)));
  6011. } else {
  6012. goto handle_unusual;
  6013. }
  6014. break;
  6015. }
  6016. default: {
  6017. handle_unusual:
  6018. if (tag == 0) {
  6019. goto success;
  6020. }
  6021. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6022. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6023. break;
  6024. }
  6025. }
  6026. }
  6027. success:
  6028. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MixedMap)
  6029. return true;
  6030. failure:
  6031. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MixedMap)
  6032. return false;
  6033. #undef DO_
  6034. }
  6035. void MixedMap::SerializeWithCachedSizes(
  6036. ::google::protobuf::io::CodedOutputStream* output) const {
  6037. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MixedMap)
  6038. ::google::protobuf::uint32 cached_has_bits = 0;
  6039. (void) cached_has_bits;
  6040. // string msg = 1;
  6041. if (this->msg().size() > 0) {
  6042. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6043. this->msg().data(), static_cast<int>(this->msg().length()),
  6044. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6045. "google.protobuf.testing.MixedMap.msg");
  6046. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6047. 1, this->msg(), output);
  6048. }
  6049. // map<string, float> map = 2;
  6050. if (!this->map().empty()) {
  6051. typedef ::google::protobuf::Map< ::std::string, float >::const_pointer
  6052. ConstPtr;
  6053. typedef ConstPtr SortItem;
  6054. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  6055. struct Utf8Check {
  6056. static void Check(ConstPtr p) {
  6057. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6058. p->first.data(), static_cast<int>(p->first.length()),
  6059. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6060. "google.protobuf.testing.MixedMap.MapEntry.key");
  6061. }
  6062. };
  6063. if (output->IsSerializationDeterministic() &&
  6064. this->map().size() > 1) {
  6065. ::std::unique_ptr<SortItem[]> items(
  6066. new SortItem[this->map().size()]);
  6067. typedef ::google::protobuf::Map< ::std::string, float >::size_type size_type;
  6068. size_type n = 0;
  6069. for (::google::protobuf::Map< ::std::string, float >::const_iterator
  6070. it = this->map().begin();
  6071. it != this->map().end(); ++it, ++n) {
  6072. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  6073. }
  6074. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  6075. ::std::unique_ptr<MixedMap_MapEntry_DoNotUse> entry;
  6076. for (size_type i = 0; i < n; i++) {
  6077. entry.reset(map_.NewEntryWrapper(
  6078. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  6079. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6080. 2, *entry, output);
  6081. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  6082. }
  6083. } else {
  6084. ::std::unique_ptr<MixedMap_MapEntry_DoNotUse> entry;
  6085. for (::google::protobuf::Map< ::std::string, float >::const_iterator
  6086. it = this->map().begin();
  6087. it != this->map().end(); ++it) {
  6088. entry.reset(map_.NewEntryWrapper(
  6089. it->first, it->second));
  6090. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6091. 2, *entry, output);
  6092. Utf8Check::Check(&*it);
  6093. }
  6094. }
  6095. }
  6096. // int32 int_value = 3;
  6097. if (this->int_value() != 0) {
  6098. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->int_value(), output);
  6099. }
  6100. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6101. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  6102. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  6103. }
  6104. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MixedMap)
  6105. }
  6106. ::google::protobuf::uint8* MixedMap::InternalSerializeWithCachedSizesToArray(
  6107. bool deterministic, ::google::protobuf::uint8* target) const {
  6108. (void)deterministic; // Unused
  6109. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MixedMap)
  6110. ::google::protobuf::uint32 cached_has_bits = 0;
  6111. (void) cached_has_bits;
  6112. // string msg = 1;
  6113. if (this->msg().size() > 0) {
  6114. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6115. this->msg().data(), static_cast<int>(this->msg().length()),
  6116. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6117. "google.protobuf.testing.MixedMap.msg");
  6118. target =
  6119. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  6120. 1, this->msg(), target);
  6121. }
  6122. // map<string, float> map = 2;
  6123. if (!this->map().empty()) {
  6124. typedef ::google::protobuf::Map< ::std::string, float >::const_pointer
  6125. ConstPtr;
  6126. typedef ConstPtr SortItem;
  6127. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  6128. struct Utf8Check {
  6129. static void Check(ConstPtr p) {
  6130. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6131. p->first.data(), static_cast<int>(p->first.length()),
  6132. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6133. "google.protobuf.testing.MixedMap.MapEntry.key");
  6134. }
  6135. };
  6136. if (deterministic &&
  6137. this->map().size() > 1) {
  6138. ::std::unique_ptr<SortItem[]> items(
  6139. new SortItem[this->map().size()]);
  6140. typedef ::google::protobuf::Map< ::std::string, float >::size_type size_type;
  6141. size_type n = 0;
  6142. for (::google::protobuf::Map< ::std::string, float >::const_iterator
  6143. it = this->map().begin();
  6144. it != this->map().end(); ++it, ++n) {
  6145. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  6146. }
  6147. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  6148. ::std::unique_ptr<MixedMap_MapEntry_DoNotUse> entry;
  6149. for (size_type i = 0; i < n; i++) {
  6150. entry.reset(map_.NewEntryWrapper(
  6151. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  6152. target = ::google::protobuf::internal::WireFormatLite::
  6153. InternalWriteMessageNoVirtualToArray(
  6154. 2, *entry, deterministic, target);
  6155. ;
  6156. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  6157. }
  6158. } else {
  6159. ::std::unique_ptr<MixedMap_MapEntry_DoNotUse> entry;
  6160. for (::google::protobuf::Map< ::std::string, float >::const_iterator
  6161. it = this->map().begin();
  6162. it != this->map().end(); ++it) {
  6163. entry.reset(map_.NewEntryWrapper(
  6164. it->first, it->second));
  6165. target = ::google::protobuf::internal::WireFormatLite::
  6166. InternalWriteMessageNoVirtualToArray(
  6167. 2, *entry, deterministic, target);
  6168. ;
  6169. Utf8Check::Check(&*it);
  6170. }
  6171. }
  6172. }
  6173. // int32 int_value = 3;
  6174. if (this->int_value() != 0) {
  6175. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->int_value(), target);
  6176. }
  6177. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6178. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  6179. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  6180. }
  6181. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MixedMap)
  6182. return target;
  6183. }
  6184. size_t MixedMap::ByteSizeLong() const {
  6185. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MixedMap)
  6186. size_t total_size = 0;
  6187. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6188. total_size +=
  6189. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  6190. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  6191. }
  6192. // map<string, float> map = 2;
  6193. total_size += 1 *
  6194. ::google::protobuf::internal::FromIntSize(this->map_size());
  6195. {
  6196. ::std::unique_ptr<MixedMap_MapEntry_DoNotUse> entry;
  6197. for (::google::protobuf::Map< ::std::string, float >::const_iterator
  6198. it = this->map().begin();
  6199. it != this->map().end(); ++it) {
  6200. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  6201. total_size += ::google::protobuf::internal::WireFormatLite::
  6202. MessageSizeNoVirtual(*entry);
  6203. }
  6204. }
  6205. // string msg = 1;
  6206. if (this->msg().size() > 0) {
  6207. total_size += 1 +
  6208. ::google::protobuf::internal::WireFormatLite::StringSize(
  6209. this->msg());
  6210. }
  6211. // int32 int_value = 3;
  6212. if (this->int_value() != 0) {
  6213. total_size += 1 +
  6214. ::google::protobuf::internal::WireFormatLite::Int32Size(
  6215. this->int_value());
  6216. }
  6217. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6218. SetCachedSize(cached_size);
  6219. return total_size;
  6220. }
  6221. void MixedMap::MergeFrom(const ::google::protobuf::Message& from) {
  6222. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MixedMap)
  6223. GOOGLE_DCHECK_NE(&from, this);
  6224. const MixedMap* source =
  6225. ::google::protobuf::internal::DynamicCastToGenerated<const MixedMap>(
  6226. &from);
  6227. if (source == NULL) {
  6228. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MixedMap)
  6229. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  6230. } else {
  6231. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MixedMap)
  6232. MergeFrom(*source);
  6233. }
  6234. }
  6235. void MixedMap::MergeFrom(const MixedMap& from) {
  6236. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MixedMap)
  6237. GOOGLE_DCHECK_NE(&from, this);
  6238. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6239. ::google::protobuf::uint32 cached_has_bits = 0;
  6240. (void) cached_has_bits;
  6241. map_.MergeFrom(from.map_);
  6242. if (from.msg().size() > 0) {
  6243. msg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.msg_);
  6244. }
  6245. if (from.int_value() != 0) {
  6246. set_int_value(from.int_value());
  6247. }
  6248. }
  6249. void MixedMap::CopyFrom(const ::google::protobuf::Message& from) {
  6250. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MixedMap)
  6251. if (&from == this) return;
  6252. Clear();
  6253. MergeFrom(from);
  6254. }
  6255. void MixedMap::CopyFrom(const MixedMap& from) {
  6256. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MixedMap)
  6257. if (&from == this) return;
  6258. Clear();
  6259. MergeFrom(from);
  6260. }
  6261. bool MixedMap::IsInitialized() const {
  6262. return true;
  6263. }
  6264. void MixedMap::Swap(MixedMap* other) {
  6265. if (other == this) return;
  6266. InternalSwap(other);
  6267. }
  6268. void MixedMap::InternalSwap(MixedMap* other) {
  6269. using std::swap;
  6270. map_.Swap(&other->map_);
  6271. msg_.Swap(&other->msg_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  6272. GetArenaNoVirtual());
  6273. swap(int_value_, other->int_value_);
  6274. _internal_metadata_.Swap(&other->_internal_metadata_);
  6275. }
  6276. ::google::protobuf::Metadata MixedMap::GetMetadata() const {
  6277. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  6278. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  6279. }
  6280. // ===================================================================
  6281. MixedMap2_MapEntry_DoNotUse::MixedMap2_MapEntry_DoNotUse() {}
  6282. MixedMap2_MapEntry_DoNotUse::MixedMap2_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  6283. void MixedMap2_MapEntry_DoNotUse::MergeFrom(const MixedMap2_MapEntry_DoNotUse& other) {
  6284. MergeFromInternal(other);
  6285. }
  6286. ::google::protobuf::Metadata MixedMap2_MapEntry_DoNotUse::GetMetadata() const {
  6287. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  6288. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[15];
  6289. }
  6290. void MixedMap2_MapEntry_DoNotUse::MergeFrom(
  6291. const ::google::protobuf::Message& other) {
  6292. ::google::protobuf::Message::MergeFrom(other);
  6293. }
  6294. // ===================================================================
  6295. void MixedMap2::InitAsDefaultInstance() {
  6296. }
  6297. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6298. const int MixedMap2::kMapFieldNumber;
  6299. const int MixedMap2::kEeFieldNumber;
  6300. const int MixedMap2::kMsgFieldNumber;
  6301. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6302. MixedMap2::MixedMap2()
  6303. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6304. ::google::protobuf::internal::InitSCC(
  6305. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MixedMap2.base);
  6306. SharedCtor();
  6307. // @@protoc_insertion_point(constructor:google.protobuf.testing.MixedMap2)
  6308. }
  6309. MixedMap2::MixedMap2(const MixedMap2& from)
  6310. : ::google::protobuf::Message(),
  6311. _internal_metadata_(NULL) {
  6312. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6313. map_.MergeFrom(from.map_);
  6314. msg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6315. if (from.msg().size() > 0) {
  6316. msg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.msg_);
  6317. }
  6318. ee_ = from.ee_;
  6319. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MixedMap2)
  6320. }
  6321. void MixedMap2::SharedCtor() {
  6322. msg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6323. ee_ = 0;
  6324. }
  6325. MixedMap2::~MixedMap2() {
  6326. // @@protoc_insertion_point(destructor:google.protobuf.testing.MixedMap2)
  6327. SharedDtor();
  6328. }
  6329. void MixedMap2::SharedDtor() {
  6330. msg_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6331. }
  6332. void MixedMap2::SetCachedSize(int size) const {
  6333. _cached_size_.Set(size);
  6334. }
  6335. const ::google::protobuf::Descriptor* MixedMap2::descriptor() {
  6336. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  6337. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6338. }
  6339. const MixedMap2& MixedMap2::default_instance() {
  6340. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MixedMap2.base);
  6341. return *internal_default_instance();
  6342. }
  6343. void MixedMap2::Clear() {
  6344. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MixedMap2)
  6345. ::google::protobuf::uint32 cached_has_bits = 0;
  6346. // Prevent compiler warnings about cached_has_bits being unused
  6347. (void) cached_has_bits;
  6348. map_.Clear();
  6349. msg_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6350. ee_ = 0;
  6351. _internal_metadata_.Clear();
  6352. }
  6353. bool MixedMap2::MergePartialFromCodedStream(
  6354. ::google::protobuf::io::CodedInputStream* input) {
  6355. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6356. ::google::protobuf::uint32 tag;
  6357. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MixedMap2)
  6358. for (;;) {
  6359. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6360. tag = p.first;
  6361. if (!p.second) goto handle_unusual;
  6362. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6363. // map<int32, bool> map = 1;
  6364. case 1: {
  6365. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6366. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  6367. MixedMap2_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  6368. MixedMap2_MapEntry_DoNotUse,
  6369. ::google::protobuf::int32, bool,
  6370. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  6371. ::google::protobuf::internal::WireFormatLite::TYPE_BOOL,
  6372. 0 >,
  6373. ::google::protobuf::Map< ::google::protobuf::int32, bool > > parser(&map_);
  6374. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  6375. input, &parser));
  6376. } else {
  6377. goto handle_unusual;
  6378. }
  6379. break;
  6380. }
  6381. // .google.protobuf.testing.MixedMap2.E ee = 2;
  6382. case 2: {
  6383. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6384. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  6385. int value;
  6386. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6387. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  6388. input, &value)));
  6389. set_ee(static_cast< ::google::protobuf::testing::MixedMap2_E >(value));
  6390. } else {
  6391. goto handle_unusual;
  6392. }
  6393. break;
  6394. }
  6395. // string msg = 4;
  6396. case 4: {
  6397. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6398. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  6399. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6400. input, this->mutable_msg()));
  6401. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6402. this->msg().data(), static_cast<int>(this->msg().length()),
  6403. ::google::protobuf::internal::WireFormatLite::PARSE,
  6404. "google.protobuf.testing.MixedMap2.msg"));
  6405. } else {
  6406. goto handle_unusual;
  6407. }
  6408. break;
  6409. }
  6410. default: {
  6411. handle_unusual:
  6412. if (tag == 0) {
  6413. goto success;
  6414. }
  6415. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6416. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6417. break;
  6418. }
  6419. }
  6420. }
  6421. success:
  6422. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MixedMap2)
  6423. return true;
  6424. failure:
  6425. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MixedMap2)
  6426. return false;
  6427. #undef DO_
  6428. }
  6429. void MixedMap2::SerializeWithCachedSizes(
  6430. ::google::protobuf::io::CodedOutputStream* output) const {
  6431. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MixedMap2)
  6432. ::google::protobuf::uint32 cached_has_bits = 0;
  6433. (void) cached_has_bits;
  6434. // map<int32, bool> map = 1;
  6435. if (!this->map().empty()) {
  6436. typedef ::google::protobuf::Map< ::google::protobuf::int32, bool >::const_pointer
  6437. ConstPtr;
  6438. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  6439. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  6440. if (output->IsSerializationDeterministic() &&
  6441. this->map().size() > 1) {
  6442. ::std::unique_ptr<SortItem[]> items(
  6443. new SortItem[this->map().size()]);
  6444. typedef ::google::protobuf::Map< ::google::protobuf::int32, bool >::size_type size_type;
  6445. size_type n = 0;
  6446. for (::google::protobuf::Map< ::google::protobuf::int32, bool >::const_iterator
  6447. it = this->map().begin();
  6448. it != this->map().end(); ++it, ++n) {
  6449. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  6450. }
  6451. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  6452. ::std::unique_ptr<MixedMap2_MapEntry_DoNotUse> entry;
  6453. for (size_type i = 0; i < n; i++) {
  6454. entry.reset(map_.NewEntryWrapper(
  6455. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  6456. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6457. 1, *entry, output);
  6458. }
  6459. } else {
  6460. ::std::unique_ptr<MixedMap2_MapEntry_DoNotUse> entry;
  6461. for (::google::protobuf::Map< ::google::protobuf::int32, bool >::const_iterator
  6462. it = this->map().begin();
  6463. it != this->map().end(); ++it) {
  6464. entry.reset(map_.NewEntryWrapper(
  6465. it->first, it->second));
  6466. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6467. 1, *entry, output);
  6468. }
  6469. }
  6470. }
  6471. // .google.protobuf.testing.MixedMap2.E ee = 2;
  6472. if (this->ee() != 0) {
  6473. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  6474. 2, this->ee(), output);
  6475. }
  6476. // string msg = 4;
  6477. if (this->msg().size() > 0) {
  6478. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6479. this->msg().data(), static_cast<int>(this->msg().length()),
  6480. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6481. "google.protobuf.testing.MixedMap2.msg");
  6482. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6483. 4, this->msg(), output);
  6484. }
  6485. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6486. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  6487. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  6488. }
  6489. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MixedMap2)
  6490. }
  6491. ::google::protobuf::uint8* MixedMap2::InternalSerializeWithCachedSizesToArray(
  6492. bool deterministic, ::google::protobuf::uint8* target) const {
  6493. (void)deterministic; // Unused
  6494. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MixedMap2)
  6495. ::google::protobuf::uint32 cached_has_bits = 0;
  6496. (void) cached_has_bits;
  6497. // map<int32, bool> map = 1;
  6498. if (!this->map().empty()) {
  6499. typedef ::google::protobuf::Map< ::google::protobuf::int32, bool >::const_pointer
  6500. ConstPtr;
  6501. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  6502. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  6503. if (deterministic &&
  6504. this->map().size() > 1) {
  6505. ::std::unique_ptr<SortItem[]> items(
  6506. new SortItem[this->map().size()]);
  6507. typedef ::google::protobuf::Map< ::google::protobuf::int32, bool >::size_type size_type;
  6508. size_type n = 0;
  6509. for (::google::protobuf::Map< ::google::protobuf::int32, bool >::const_iterator
  6510. it = this->map().begin();
  6511. it != this->map().end(); ++it, ++n) {
  6512. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  6513. }
  6514. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  6515. ::std::unique_ptr<MixedMap2_MapEntry_DoNotUse> entry;
  6516. for (size_type i = 0; i < n; i++) {
  6517. entry.reset(map_.NewEntryWrapper(
  6518. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  6519. target = ::google::protobuf::internal::WireFormatLite::
  6520. InternalWriteMessageNoVirtualToArray(
  6521. 1, *entry, deterministic, target);
  6522. ;
  6523. }
  6524. } else {
  6525. ::std::unique_ptr<MixedMap2_MapEntry_DoNotUse> entry;
  6526. for (::google::protobuf::Map< ::google::protobuf::int32, bool >::const_iterator
  6527. it = this->map().begin();
  6528. it != this->map().end(); ++it) {
  6529. entry.reset(map_.NewEntryWrapper(
  6530. it->first, it->second));
  6531. target = ::google::protobuf::internal::WireFormatLite::
  6532. InternalWriteMessageNoVirtualToArray(
  6533. 1, *entry, deterministic, target);
  6534. ;
  6535. }
  6536. }
  6537. }
  6538. // .google.protobuf.testing.MixedMap2.E ee = 2;
  6539. if (this->ee() != 0) {
  6540. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  6541. 2, this->ee(), target);
  6542. }
  6543. // string msg = 4;
  6544. if (this->msg().size() > 0) {
  6545. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6546. this->msg().data(), static_cast<int>(this->msg().length()),
  6547. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6548. "google.protobuf.testing.MixedMap2.msg");
  6549. target =
  6550. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  6551. 4, this->msg(), target);
  6552. }
  6553. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6554. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  6555. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  6556. }
  6557. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MixedMap2)
  6558. return target;
  6559. }
  6560. size_t MixedMap2::ByteSizeLong() const {
  6561. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MixedMap2)
  6562. size_t total_size = 0;
  6563. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6564. total_size +=
  6565. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  6566. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  6567. }
  6568. // map<int32, bool> map = 1;
  6569. total_size += 1 *
  6570. ::google::protobuf::internal::FromIntSize(this->map_size());
  6571. {
  6572. ::std::unique_ptr<MixedMap2_MapEntry_DoNotUse> entry;
  6573. for (::google::protobuf::Map< ::google::protobuf::int32, bool >::const_iterator
  6574. it = this->map().begin();
  6575. it != this->map().end(); ++it) {
  6576. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  6577. total_size += ::google::protobuf::internal::WireFormatLite::
  6578. MessageSizeNoVirtual(*entry);
  6579. }
  6580. }
  6581. // string msg = 4;
  6582. if (this->msg().size() > 0) {
  6583. total_size += 1 +
  6584. ::google::protobuf::internal::WireFormatLite::StringSize(
  6585. this->msg());
  6586. }
  6587. // .google.protobuf.testing.MixedMap2.E ee = 2;
  6588. if (this->ee() != 0) {
  6589. total_size += 1 +
  6590. ::google::protobuf::internal::WireFormatLite::EnumSize(this->ee());
  6591. }
  6592. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6593. SetCachedSize(cached_size);
  6594. return total_size;
  6595. }
  6596. void MixedMap2::MergeFrom(const ::google::protobuf::Message& from) {
  6597. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MixedMap2)
  6598. GOOGLE_DCHECK_NE(&from, this);
  6599. const MixedMap2* source =
  6600. ::google::protobuf::internal::DynamicCastToGenerated<const MixedMap2>(
  6601. &from);
  6602. if (source == NULL) {
  6603. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MixedMap2)
  6604. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  6605. } else {
  6606. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MixedMap2)
  6607. MergeFrom(*source);
  6608. }
  6609. }
  6610. void MixedMap2::MergeFrom(const MixedMap2& from) {
  6611. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MixedMap2)
  6612. GOOGLE_DCHECK_NE(&from, this);
  6613. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6614. ::google::protobuf::uint32 cached_has_bits = 0;
  6615. (void) cached_has_bits;
  6616. map_.MergeFrom(from.map_);
  6617. if (from.msg().size() > 0) {
  6618. msg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.msg_);
  6619. }
  6620. if (from.ee() != 0) {
  6621. set_ee(from.ee());
  6622. }
  6623. }
  6624. void MixedMap2::CopyFrom(const ::google::protobuf::Message& from) {
  6625. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MixedMap2)
  6626. if (&from == this) return;
  6627. Clear();
  6628. MergeFrom(from);
  6629. }
  6630. void MixedMap2::CopyFrom(const MixedMap2& from) {
  6631. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MixedMap2)
  6632. if (&from == this) return;
  6633. Clear();
  6634. MergeFrom(from);
  6635. }
  6636. bool MixedMap2::IsInitialized() const {
  6637. return true;
  6638. }
  6639. void MixedMap2::Swap(MixedMap2* other) {
  6640. if (other == this) return;
  6641. InternalSwap(other);
  6642. }
  6643. void MixedMap2::InternalSwap(MixedMap2* other) {
  6644. using std::swap;
  6645. map_.Swap(&other->map_);
  6646. msg_.Swap(&other->msg_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  6647. GetArenaNoVirtual());
  6648. swap(ee_, other->ee_);
  6649. _internal_metadata_.Swap(&other->_internal_metadata_);
  6650. }
  6651. ::google::protobuf::Metadata MixedMap2::GetMetadata() const {
  6652. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  6653. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  6654. }
  6655. // ===================================================================
  6656. void MessageMap_M::InitAsDefaultInstance() {
  6657. }
  6658. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6659. const int MessageMap_M::kInnerIntFieldNumber;
  6660. const int MessageMap_M::kInnerTextFieldNumber;
  6661. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6662. MessageMap_M::MessageMap_M()
  6663. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6664. ::google::protobuf::internal::InitSCC(
  6665. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MessageMap_M.base);
  6666. SharedCtor();
  6667. // @@protoc_insertion_point(constructor:google.protobuf.testing.MessageMap.M)
  6668. }
  6669. MessageMap_M::MessageMap_M(const MessageMap_M& from)
  6670. : ::google::protobuf::Message(),
  6671. _internal_metadata_(NULL) {
  6672. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6673. inner_text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6674. if (from.inner_text().size() > 0) {
  6675. inner_text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.inner_text_);
  6676. }
  6677. inner_int_ = from.inner_int_;
  6678. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MessageMap.M)
  6679. }
  6680. void MessageMap_M::SharedCtor() {
  6681. inner_text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6682. inner_int_ = 0;
  6683. }
  6684. MessageMap_M::~MessageMap_M() {
  6685. // @@protoc_insertion_point(destructor:google.protobuf.testing.MessageMap.M)
  6686. SharedDtor();
  6687. }
  6688. void MessageMap_M::SharedDtor() {
  6689. inner_text_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6690. }
  6691. void MessageMap_M::SetCachedSize(int size) const {
  6692. _cached_size_.Set(size);
  6693. }
  6694. const ::google::protobuf::Descriptor* MessageMap_M::descriptor() {
  6695. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  6696. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6697. }
  6698. const MessageMap_M& MessageMap_M::default_instance() {
  6699. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MessageMap_M.base);
  6700. return *internal_default_instance();
  6701. }
  6702. void MessageMap_M::Clear() {
  6703. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MessageMap.M)
  6704. ::google::protobuf::uint32 cached_has_bits = 0;
  6705. // Prevent compiler warnings about cached_has_bits being unused
  6706. (void) cached_has_bits;
  6707. inner_text_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6708. inner_int_ = 0;
  6709. _internal_metadata_.Clear();
  6710. }
  6711. bool MessageMap_M::MergePartialFromCodedStream(
  6712. ::google::protobuf::io::CodedInputStream* input) {
  6713. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6714. ::google::protobuf::uint32 tag;
  6715. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MessageMap.M)
  6716. for (;;) {
  6717. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6718. tag = p.first;
  6719. if (!p.second) goto handle_unusual;
  6720. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6721. // int32 inner_int = 1;
  6722. case 1: {
  6723. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6724. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  6725. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6726. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  6727. input, &inner_int_)));
  6728. } else {
  6729. goto handle_unusual;
  6730. }
  6731. break;
  6732. }
  6733. // string inner_text = 2;
  6734. case 2: {
  6735. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6736. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  6737. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6738. input, this->mutable_inner_text()));
  6739. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6740. this->inner_text().data(), static_cast<int>(this->inner_text().length()),
  6741. ::google::protobuf::internal::WireFormatLite::PARSE,
  6742. "google.protobuf.testing.MessageMap.M.inner_text"));
  6743. } else {
  6744. goto handle_unusual;
  6745. }
  6746. break;
  6747. }
  6748. default: {
  6749. handle_unusual:
  6750. if (tag == 0) {
  6751. goto success;
  6752. }
  6753. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6754. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6755. break;
  6756. }
  6757. }
  6758. }
  6759. success:
  6760. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MessageMap.M)
  6761. return true;
  6762. failure:
  6763. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MessageMap.M)
  6764. return false;
  6765. #undef DO_
  6766. }
  6767. void MessageMap_M::SerializeWithCachedSizes(
  6768. ::google::protobuf::io::CodedOutputStream* output) const {
  6769. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MessageMap.M)
  6770. ::google::protobuf::uint32 cached_has_bits = 0;
  6771. (void) cached_has_bits;
  6772. // int32 inner_int = 1;
  6773. if (this->inner_int() != 0) {
  6774. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->inner_int(), output);
  6775. }
  6776. // string inner_text = 2;
  6777. if (this->inner_text().size() > 0) {
  6778. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6779. this->inner_text().data(), static_cast<int>(this->inner_text().length()),
  6780. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6781. "google.protobuf.testing.MessageMap.M.inner_text");
  6782. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6783. 2, this->inner_text(), output);
  6784. }
  6785. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6786. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  6787. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  6788. }
  6789. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MessageMap.M)
  6790. }
  6791. ::google::protobuf::uint8* MessageMap_M::InternalSerializeWithCachedSizesToArray(
  6792. bool deterministic, ::google::protobuf::uint8* target) const {
  6793. (void)deterministic; // Unused
  6794. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MessageMap.M)
  6795. ::google::protobuf::uint32 cached_has_bits = 0;
  6796. (void) cached_has_bits;
  6797. // int32 inner_int = 1;
  6798. if (this->inner_int() != 0) {
  6799. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->inner_int(), target);
  6800. }
  6801. // string inner_text = 2;
  6802. if (this->inner_text().size() > 0) {
  6803. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6804. this->inner_text().data(), static_cast<int>(this->inner_text().length()),
  6805. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6806. "google.protobuf.testing.MessageMap.M.inner_text");
  6807. target =
  6808. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  6809. 2, this->inner_text(), target);
  6810. }
  6811. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6812. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  6813. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  6814. }
  6815. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MessageMap.M)
  6816. return target;
  6817. }
  6818. size_t MessageMap_M::ByteSizeLong() const {
  6819. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MessageMap.M)
  6820. size_t total_size = 0;
  6821. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6822. total_size +=
  6823. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  6824. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  6825. }
  6826. // string inner_text = 2;
  6827. if (this->inner_text().size() > 0) {
  6828. total_size += 1 +
  6829. ::google::protobuf::internal::WireFormatLite::StringSize(
  6830. this->inner_text());
  6831. }
  6832. // int32 inner_int = 1;
  6833. if (this->inner_int() != 0) {
  6834. total_size += 1 +
  6835. ::google::protobuf::internal::WireFormatLite::Int32Size(
  6836. this->inner_int());
  6837. }
  6838. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6839. SetCachedSize(cached_size);
  6840. return total_size;
  6841. }
  6842. void MessageMap_M::MergeFrom(const ::google::protobuf::Message& from) {
  6843. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MessageMap.M)
  6844. GOOGLE_DCHECK_NE(&from, this);
  6845. const MessageMap_M* source =
  6846. ::google::protobuf::internal::DynamicCastToGenerated<const MessageMap_M>(
  6847. &from);
  6848. if (source == NULL) {
  6849. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MessageMap.M)
  6850. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  6851. } else {
  6852. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MessageMap.M)
  6853. MergeFrom(*source);
  6854. }
  6855. }
  6856. void MessageMap_M::MergeFrom(const MessageMap_M& from) {
  6857. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MessageMap.M)
  6858. GOOGLE_DCHECK_NE(&from, this);
  6859. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6860. ::google::protobuf::uint32 cached_has_bits = 0;
  6861. (void) cached_has_bits;
  6862. if (from.inner_text().size() > 0) {
  6863. inner_text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.inner_text_);
  6864. }
  6865. if (from.inner_int() != 0) {
  6866. set_inner_int(from.inner_int());
  6867. }
  6868. }
  6869. void MessageMap_M::CopyFrom(const ::google::protobuf::Message& from) {
  6870. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MessageMap.M)
  6871. if (&from == this) return;
  6872. Clear();
  6873. MergeFrom(from);
  6874. }
  6875. void MessageMap_M::CopyFrom(const MessageMap_M& from) {
  6876. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MessageMap.M)
  6877. if (&from == this) return;
  6878. Clear();
  6879. MergeFrom(from);
  6880. }
  6881. bool MessageMap_M::IsInitialized() const {
  6882. return true;
  6883. }
  6884. void MessageMap_M::Swap(MessageMap_M* other) {
  6885. if (other == this) return;
  6886. InternalSwap(other);
  6887. }
  6888. void MessageMap_M::InternalSwap(MessageMap_M* other) {
  6889. using std::swap;
  6890. inner_text_.Swap(&other->inner_text_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  6891. GetArenaNoVirtual());
  6892. swap(inner_int_, other->inner_int_);
  6893. _internal_metadata_.Swap(&other->_internal_metadata_);
  6894. }
  6895. ::google::protobuf::Metadata MessageMap_M::GetMetadata() const {
  6896. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  6897. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  6898. }
  6899. // ===================================================================
  6900. MessageMap_MapEntry_DoNotUse::MessageMap_MapEntry_DoNotUse() {}
  6901. MessageMap_MapEntry_DoNotUse::MessageMap_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  6902. void MessageMap_MapEntry_DoNotUse::MergeFrom(const MessageMap_MapEntry_DoNotUse& other) {
  6903. MergeFromInternal(other);
  6904. }
  6905. ::google::protobuf::Metadata MessageMap_MapEntry_DoNotUse::GetMetadata() const {
  6906. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  6907. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[18];
  6908. }
  6909. void MessageMap_MapEntry_DoNotUse::MergeFrom(
  6910. const ::google::protobuf::Message& other) {
  6911. ::google::protobuf::Message::MergeFrom(other);
  6912. }
  6913. // ===================================================================
  6914. void MessageMap::InitAsDefaultInstance() {
  6915. }
  6916. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6917. const int MessageMap::kMapFieldNumber;
  6918. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6919. MessageMap::MessageMap()
  6920. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6921. ::google::protobuf::internal::InitSCC(
  6922. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MessageMap.base);
  6923. SharedCtor();
  6924. // @@protoc_insertion_point(constructor:google.protobuf.testing.MessageMap)
  6925. }
  6926. MessageMap::MessageMap(const MessageMap& from)
  6927. : ::google::protobuf::Message(),
  6928. _internal_metadata_(NULL) {
  6929. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6930. map_.MergeFrom(from.map_);
  6931. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MessageMap)
  6932. }
  6933. void MessageMap::SharedCtor() {
  6934. }
  6935. MessageMap::~MessageMap() {
  6936. // @@protoc_insertion_point(destructor:google.protobuf.testing.MessageMap)
  6937. SharedDtor();
  6938. }
  6939. void MessageMap::SharedDtor() {
  6940. }
  6941. void MessageMap::SetCachedSize(int size) const {
  6942. _cached_size_.Set(size);
  6943. }
  6944. const ::google::protobuf::Descriptor* MessageMap::descriptor() {
  6945. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  6946. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6947. }
  6948. const MessageMap& MessageMap::default_instance() {
  6949. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_MessageMap.base);
  6950. return *internal_default_instance();
  6951. }
  6952. void MessageMap::Clear() {
  6953. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MessageMap)
  6954. ::google::protobuf::uint32 cached_has_bits = 0;
  6955. // Prevent compiler warnings about cached_has_bits being unused
  6956. (void) cached_has_bits;
  6957. map_.Clear();
  6958. _internal_metadata_.Clear();
  6959. }
  6960. bool MessageMap::MergePartialFromCodedStream(
  6961. ::google::protobuf::io::CodedInputStream* input) {
  6962. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6963. ::google::protobuf::uint32 tag;
  6964. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MessageMap)
  6965. for (;;) {
  6966. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6967. tag = p.first;
  6968. if (!p.second) goto handle_unusual;
  6969. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6970. // map<string, .google.protobuf.testing.MessageMap.M> map = 1;
  6971. case 1: {
  6972. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6973. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  6974. MessageMap_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  6975. MessageMap_MapEntry_DoNotUse,
  6976. ::std::string, ::google::protobuf::testing::MessageMap_M,
  6977. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  6978. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  6979. 0 >,
  6980. ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MessageMap_M > > parser(&map_);
  6981. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  6982. input, &parser));
  6983. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6984. parser.key().data(), static_cast<int>(parser.key().length()),
  6985. ::google::protobuf::internal::WireFormatLite::PARSE,
  6986. "google.protobuf.testing.MessageMap.MapEntry.key"));
  6987. } else {
  6988. goto handle_unusual;
  6989. }
  6990. break;
  6991. }
  6992. default: {
  6993. handle_unusual:
  6994. if (tag == 0) {
  6995. goto success;
  6996. }
  6997. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6998. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6999. break;
  7000. }
  7001. }
  7002. }
  7003. success:
  7004. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MessageMap)
  7005. return true;
  7006. failure:
  7007. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MessageMap)
  7008. return false;
  7009. #undef DO_
  7010. }
  7011. void MessageMap::SerializeWithCachedSizes(
  7012. ::google::protobuf::io::CodedOutputStream* output) const {
  7013. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MessageMap)
  7014. ::google::protobuf::uint32 cached_has_bits = 0;
  7015. (void) cached_has_bits;
  7016. // map<string, .google.protobuf.testing.MessageMap.M> map = 1;
  7017. if (!this->map().empty()) {
  7018. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MessageMap_M >::const_pointer
  7019. ConstPtr;
  7020. typedef ConstPtr SortItem;
  7021. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  7022. struct Utf8Check {
  7023. static void Check(ConstPtr p) {
  7024. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7025. p->first.data(), static_cast<int>(p->first.length()),
  7026. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7027. "google.protobuf.testing.MessageMap.MapEntry.key");
  7028. }
  7029. };
  7030. if (output->IsSerializationDeterministic() &&
  7031. this->map().size() > 1) {
  7032. ::std::unique_ptr<SortItem[]> items(
  7033. new SortItem[this->map().size()]);
  7034. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MessageMap_M >::size_type size_type;
  7035. size_type n = 0;
  7036. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MessageMap_M >::const_iterator
  7037. it = this->map().begin();
  7038. it != this->map().end(); ++it, ++n) {
  7039. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  7040. }
  7041. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  7042. ::std::unique_ptr<MessageMap_MapEntry_DoNotUse> entry;
  7043. for (size_type i = 0; i < n; i++) {
  7044. entry.reset(map_.NewEntryWrapper(
  7045. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  7046. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7047. 1, *entry, output);
  7048. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  7049. }
  7050. } else {
  7051. ::std::unique_ptr<MessageMap_MapEntry_DoNotUse> entry;
  7052. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MessageMap_M >::const_iterator
  7053. it = this->map().begin();
  7054. it != this->map().end(); ++it) {
  7055. entry.reset(map_.NewEntryWrapper(
  7056. it->first, it->second));
  7057. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7058. 1, *entry, output);
  7059. Utf8Check::Check(&*it);
  7060. }
  7061. }
  7062. }
  7063. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7064. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  7065. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  7066. }
  7067. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MessageMap)
  7068. }
  7069. ::google::protobuf::uint8* MessageMap::InternalSerializeWithCachedSizesToArray(
  7070. bool deterministic, ::google::protobuf::uint8* target) const {
  7071. (void)deterministic; // Unused
  7072. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MessageMap)
  7073. ::google::protobuf::uint32 cached_has_bits = 0;
  7074. (void) cached_has_bits;
  7075. // map<string, .google.protobuf.testing.MessageMap.M> map = 1;
  7076. if (!this->map().empty()) {
  7077. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MessageMap_M >::const_pointer
  7078. ConstPtr;
  7079. typedef ConstPtr SortItem;
  7080. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  7081. struct Utf8Check {
  7082. static void Check(ConstPtr p) {
  7083. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7084. p->first.data(), static_cast<int>(p->first.length()),
  7085. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7086. "google.protobuf.testing.MessageMap.MapEntry.key");
  7087. }
  7088. };
  7089. if (deterministic &&
  7090. this->map().size() > 1) {
  7091. ::std::unique_ptr<SortItem[]> items(
  7092. new SortItem[this->map().size()]);
  7093. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MessageMap_M >::size_type size_type;
  7094. size_type n = 0;
  7095. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MessageMap_M >::const_iterator
  7096. it = this->map().begin();
  7097. it != this->map().end(); ++it, ++n) {
  7098. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  7099. }
  7100. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  7101. ::std::unique_ptr<MessageMap_MapEntry_DoNotUse> entry;
  7102. for (size_type i = 0; i < n; i++) {
  7103. entry.reset(map_.NewEntryWrapper(
  7104. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  7105. target = ::google::protobuf::internal::WireFormatLite::
  7106. InternalWriteMessageNoVirtualToArray(
  7107. 1, *entry, deterministic, target);
  7108. ;
  7109. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  7110. }
  7111. } else {
  7112. ::std::unique_ptr<MessageMap_MapEntry_DoNotUse> entry;
  7113. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MessageMap_M >::const_iterator
  7114. it = this->map().begin();
  7115. it != this->map().end(); ++it) {
  7116. entry.reset(map_.NewEntryWrapper(
  7117. it->first, it->second));
  7118. target = ::google::protobuf::internal::WireFormatLite::
  7119. InternalWriteMessageNoVirtualToArray(
  7120. 1, *entry, deterministic, target);
  7121. ;
  7122. Utf8Check::Check(&*it);
  7123. }
  7124. }
  7125. }
  7126. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7127. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  7128. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  7129. }
  7130. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MessageMap)
  7131. return target;
  7132. }
  7133. size_t MessageMap::ByteSizeLong() const {
  7134. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MessageMap)
  7135. size_t total_size = 0;
  7136. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7137. total_size +=
  7138. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  7139. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  7140. }
  7141. // map<string, .google.protobuf.testing.MessageMap.M> map = 1;
  7142. total_size += 1 *
  7143. ::google::protobuf::internal::FromIntSize(this->map_size());
  7144. {
  7145. ::std::unique_ptr<MessageMap_MapEntry_DoNotUse> entry;
  7146. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MessageMap_M >::const_iterator
  7147. it = this->map().begin();
  7148. it != this->map().end(); ++it) {
  7149. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  7150. total_size += ::google::protobuf::internal::WireFormatLite::
  7151. MessageSizeNoVirtual(*entry);
  7152. }
  7153. }
  7154. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7155. SetCachedSize(cached_size);
  7156. return total_size;
  7157. }
  7158. void MessageMap::MergeFrom(const ::google::protobuf::Message& from) {
  7159. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MessageMap)
  7160. GOOGLE_DCHECK_NE(&from, this);
  7161. const MessageMap* source =
  7162. ::google::protobuf::internal::DynamicCastToGenerated<const MessageMap>(
  7163. &from);
  7164. if (source == NULL) {
  7165. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MessageMap)
  7166. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  7167. } else {
  7168. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MessageMap)
  7169. MergeFrom(*source);
  7170. }
  7171. }
  7172. void MessageMap::MergeFrom(const MessageMap& from) {
  7173. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MessageMap)
  7174. GOOGLE_DCHECK_NE(&from, this);
  7175. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7176. ::google::protobuf::uint32 cached_has_bits = 0;
  7177. (void) cached_has_bits;
  7178. map_.MergeFrom(from.map_);
  7179. }
  7180. void MessageMap::CopyFrom(const ::google::protobuf::Message& from) {
  7181. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MessageMap)
  7182. if (&from == this) return;
  7183. Clear();
  7184. MergeFrom(from);
  7185. }
  7186. void MessageMap::CopyFrom(const MessageMap& from) {
  7187. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MessageMap)
  7188. if (&from == this) return;
  7189. Clear();
  7190. MergeFrom(from);
  7191. }
  7192. bool MessageMap::IsInitialized() const {
  7193. return true;
  7194. }
  7195. void MessageMap::Swap(MessageMap* other) {
  7196. if (other == this) return;
  7197. InternalSwap(other);
  7198. }
  7199. void MessageMap::InternalSwap(MessageMap* other) {
  7200. using std::swap;
  7201. map_.Swap(&other->map_);
  7202. _internal_metadata_.Swap(&other->_internal_metadata_);
  7203. }
  7204. ::google::protobuf::Metadata MessageMap::GetMetadata() const {
  7205. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  7206. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  7207. }
  7208. // ===================================================================
  7209. void DoubleValueMessage::InitAsDefaultInstance() {
  7210. ::google::protobuf::testing::_DoubleValueMessage_default_instance_._instance.get_mutable()->double__ = const_cast< ::google::protobuf::DoubleValue*>(
  7211. ::google::protobuf::DoubleValue::internal_default_instance());
  7212. }
  7213. void DoubleValueMessage::clear_double_() {
  7214. if (GetArenaNoVirtual() == NULL && double__ != NULL) {
  7215. delete double__;
  7216. }
  7217. double__ = NULL;
  7218. }
  7219. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  7220. const int DoubleValueMessage::kDoubleFieldNumber;
  7221. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  7222. DoubleValueMessage::DoubleValueMessage()
  7223. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  7224. ::google::protobuf::internal::InitSCC(
  7225. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_DoubleValueMessage.base);
  7226. SharedCtor();
  7227. // @@protoc_insertion_point(constructor:google.protobuf.testing.DoubleValueMessage)
  7228. }
  7229. DoubleValueMessage::DoubleValueMessage(const DoubleValueMessage& from)
  7230. : ::google::protobuf::Message(),
  7231. _internal_metadata_(NULL) {
  7232. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7233. if (from.has_double_()) {
  7234. double__ = new ::google::protobuf::DoubleValue(*from.double__);
  7235. } else {
  7236. double__ = NULL;
  7237. }
  7238. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.DoubleValueMessage)
  7239. }
  7240. void DoubleValueMessage::SharedCtor() {
  7241. double__ = NULL;
  7242. }
  7243. DoubleValueMessage::~DoubleValueMessage() {
  7244. // @@protoc_insertion_point(destructor:google.protobuf.testing.DoubleValueMessage)
  7245. SharedDtor();
  7246. }
  7247. void DoubleValueMessage::SharedDtor() {
  7248. if (this != internal_default_instance()) delete double__;
  7249. }
  7250. void DoubleValueMessage::SetCachedSize(int size) const {
  7251. _cached_size_.Set(size);
  7252. }
  7253. const ::google::protobuf::Descriptor* DoubleValueMessage::descriptor() {
  7254. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  7255. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  7256. }
  7257. const DoubleValueMessage& DoubleValueMessage::default_instance() {
  7258. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::scc_info_DoubleValueMessage.base);
  7259. return *internal_default_instance();
  7260. }
  7261. void DoubleValueMessage::Clear() {
  7262. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.DoubleValueMessage)
  7263. ::google::protobuf::uint32 cached_has_bits = 0;
  7264. // Prevent compiler warnings about cached_has_bits being unused
  7265. (void) cached_has_bits;
  7266. if (GetArenaNoVirtual() == NULL && double__ != NULL) {
  7267. delete double__;
  7268. }
  7269. double__ = NULL;
  7270. _internal_metadata_.Clear();
  7271. }
  7272. bool DoubleValueMessage::MergePartialFromCodedStream(
  7273. ::google::protobuf::io::CodedInputStream* input) {
  7274. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7275. ::google::protobuf::uint32 tag;
  7276. // @@protoc_insertion_point(parse_start:google.protobuf.testing.DoubleValueMessage)
  7277. for (;;) {
  7278. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7279. tag = p.first;
  7280. if (!p.second) goto handle_unusual;
  7281. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  7282. // .google.protobuf.DoubleValue double = 1;
  7283. case 1: {
  7284. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7285. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  7286. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  7287. input, mutable_double_()));
  7288. } else {
  7289. goto handle_unusual;
  7290. }
  7291. break;
  7292. }
  7293. default: {
  7294. handle_unusual:
  7295. if (tag == 0) {
  7296. goto success;
  7297. }
  7298. DO_(::google::protobuf::internal::WireFormat::SkipField(
  7299. input, tag, _internal_metadata_.mutable_unknown_fields()));
  7300. break;
  7301. }
  7302. }
  7303. }
  7304. success:
  7305. // @@protoc_insertion_point(parse_success:google.protobuf.testing.DoubleValueMessage)
  7306. return true;
  7307. failure:
  7308. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.DoubleValueMessage)
  7309. return false;
  7310. #undef DO_
  7311. }
  7312. void DoubleValueMessage::SerializeWithCachedSizes(
  7313. ::google::protobuf::io::CodedOutputStream* output) const {
  7314. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.DoubleValueMessage)
  7315. ::google::protobuf::uint32 cached_has_bits = 0;
  7316. (void) cached_has_bits;
  7317. // .google.protobuf.DoubleValue double = 1;
  7318. if (this->has_double_()) {
  7319. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7320. 1, this->_internal_double_(), output);
  7321. }
  7322. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7323. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  7324. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  7325. }
  7326. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.DoubleValueMessage)
  7327. }
  7328. ::google::protobuf::uint8* DoubleValueMessage::InternalSerializeWithCachedSizesToArray(
  7329. bool deterministic, ::google::protobuf::uint8* target) const {
  7330. (void)deterministic; // Unused
  7331. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.DoubleValueMessage)
  7332. ::google::protobuf::uint32 cached_has_bits = 0;
  7333. (void) cached_has_bits;
  7334. // .google.protobuf.DoubleValue double = 1;
  7335. if (this->has_double_()) {
  7336. target = ::google::protobuf::internal::WireFormatLite::
  7337. InternalWriteMessageToArray(
  7338. 1, this->_internal_double_(), deterministic, target);
  7339. }
  7340. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7341. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  7342. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  7343. }
  7344. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.DoubleValueMessage)
  7345. return target;
  7346. }
  7347. size_t DoubleValueMessage::ByteSizeLong() const {
  7348. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.DoubleValueMessage)
  7349. size_t total_size = 0;
  7350. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7351. total_size +=
  7352. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  7353. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  7354. }
  7355. // .google.protobuf.DoubleValue double = 1;
  7356. if (this->has_double_()) {
  7357. total_size += 1 +
  7358. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7359. *double__);
  7360. }
  7361. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7362. SetCachedSize(cached_size);
  7363. return total_size;
  7364. }
  7365. void DoubleValueMessage::MergeFrom(const ::google::protobuf::Message& from) {
  7366. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.DoubleValueMessage)
  7367. GOOGLE_DCHECK_NE(&from, this);
  7368. const DoubleValueMessage* source =
  7369. ::google::protobuf::internal::DynamicCastToGenerated<const DoubleValueMessage>(
  7370. &from);
  7371. if (source == NULL) {
  7372. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.DoubleValueMessage)
  7373. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  7374. } else {
  7375. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.DoubleValueMessage)
  7376. MergeFrom(*source);
  7377. }
  7378. }
  7379. void DoubleValueMessage::MergeFrom(const DoubleValueMessage& from) {
  7380. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.DoubleValueMessage)
  7381. GOOGLE_DCHECK_NE(&from, this);
  7382. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7383. ::google::protobuf::uint32 cached_has_bits = 0;
  7384. (void) cached_has_bits;
  7385. if (from.has_double_()) {
  7386. mutable_double_()->::google::protobuf::DoubleValue::MergeFrom(from.double_());
  7387. }
  7388. }
  7389. void DoubleValueMessage::CopyFrom(const ::google::protobuf::Message& from) {
  7390. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.DoubleValueMessage)
  7391. if (&from == this) return;
  7392. Clear();
  7393. MergeFrom(from);
  7394. }
  7395. void DoubleValueMessage::CopyFrom(const DoubleValueMessage& from) {
  7396. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.DoubleValueMessage)
  7397. if (&from == this) return;
  7398. Clear();
  7399. MergeFrom(from);
  7400. }
  7401. bool DoubleValueMessage::IsInitialized() const {
  7402. return true;
  7403. }
  7404. void DoubleValueMessage::Swap(DoubleValueMessage* other) {
  7405. if (other == this) return;
  7406. InternalSwap(other);
  7407. }
  7408. void DoubleValueMessage::InternalSwap(DoubleValueMessage* other) {
  7409. using std::swap;
  7410. swap(double__, other->double__);
  7411. _internal_metadata_.Swap(&other->_internal_metadata_);
  7412. }
  7413. ::google::protobuf::Metadata DoubleValueMessage::GetMetadata() const {
  7414. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
  7415. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fdefault_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
  7416. }
  7417. // @@protoc_insertion_point(namespace_scope)
  7418. } // namespace testing
  7419. } // namespace protobuf
  7420. } // namespace google
  7421. namespace google {
  7422. namespace protobuf {
  7423. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::DefaultValueTestCases* Arena::CreateMaybeMessage< ::google::protobuf::testing::DefaultValueTestCases >(Arena* arena) {
  7424. return Arena::CreateInternal< ::google::protobuf::testing::DefaultValueTestCases >(arena);
  7425. }
  7426. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::DoubleMessage* Arena::CreateMaybeMessage< ::google::protobuf::testing::DoubleMessage >(Arena* arena) {
  7427. return Arena::CreateInternal< ::google::protobuf::testing::DoubleMessage >(arena);
  7428. }
  7429. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StructMessage* Arena::CreateMaybeMessage< ::google::protobuf::testing::StructMessage >(Arena* arena) {
  7430. return Arena::CreateInternal< ::google::protobuf::testing::StructMessage >(arena);
  7431. }
  7432. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::ValueMessage* Arena::CreateMaybeMessage< ::google::protobuf::testing::ValueMessage >(Arena* arena) {
  7433. return Arena::CreateInternal< ::google::protobuf::testing::ValueMessage >(arena);
  7434. }
  7435. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::ListValueMessage* Arena::CreateMaybeMessage< ::google::protobuf::testing::ListValueMessage >(Arena* arena) {
  7436. return Arena::CreateInternal< ::google::protobuf::testing::ListValueMessage >(arena);
  7437. }
  7438. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::RequestMessage* Arena::CreateMaybeMessage< ::google::protobuf::testing::RequestMessage >(Arena* arena) {
  7439. return Arena::CreateInternal< ::google::protobuf::testing::RequestMessage >(arena);
  7440. }
  7441. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyMessage* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyMessage >(Arena* arena) {
  7442. return Arena::CreateInternal< ::google::protobuf::testing::AnyMessage >(arena);
  7443. }
  7444. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyData_MapDataEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyData_MapDataEntry_DoNotUse >(Arena* arena) {
  7445. return Arena::CreateInternal< ::google::protobuf::testing::AnyData_MapDataEntry_DoNotUse >(arena);
  7446. }
  7447. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyData* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyData >(Arena* arena) {
  7448. return Arena::CreateInternal< ::google::protobuf::testing::AnyData >(arena);
  7449. }
  7450. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StringtoIntMap_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::StringtoIntMap_MapEntry_DoNotUse >(Arena* arena) {
  7451. return Arena::CreateInternal< ::google::protobuf::testing::StringtoIntMap_MapEntry_DoNotUse >(arena);
  7452. }
  7453. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StringtoIntMap* Arena::CreateMaybeMessage< ::google::protobuf::testing::StringtoIntMap >(Arena* arena) {
  7454. return Arena::CreateInternal< ::google::protobuf::testing::StringtoIntMap >(arena);
  7455. }
  7456. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::IntToStringMap_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::IntToStringMap_MapEntry_DoNotUse >(Arena* arena) {
  7457. return Arena::CreateInternal< ::google::protobuf::testing::IntToStringMap_MapEntry_DoNotUse >(arena);
  7458. }
  7459. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::IntToStringMap* Arena::CreateMaybeMessage< ::google::protobuf::testing::IntToStringMap >(Arena* arena) {
  7460. return Arena::CreateInternal< ::google::protobuf::testing::IntToStringMap >(arena);
  7461. }
  7462. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MixedMap_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MixedMap_MapEntry_DoNotUse >(Arena* arena) {
  7463. return Arena::CreateInternal< ::google::protobuf::testing::MixedMap_MapEntry_DoNotUse >(arena);
  7464. }
  7465. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MixedMap* Arena::CreateMaybeMessage< ::google::protobuf::testing::MixedMap >(Arena* arena) {
  7466. return Arena::CreateInternal< ::google::protobuf::testing::MixedMap >(arena);
  7467. }
  7468. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MixedMap2_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MixedMap2_MapEntry_DoNotUse >(Arena* arena) {
  7469. return Arena::CreateInternal< ::google::protobuf::testing::MixedMap2_MapEntry_DoNotUse >(arena);
  7470. }
  7471. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MixedMap2* Arena::CreateMaybeMessage< ::google::protobuf::testing::MixedMap2 >(Arena* arena) {
  7472. return Arena::CreateInternal< ::google::protobuf::testing::MixedMap2 >(arena);
  7473. }
  7474. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MessageMap_M* Arena::CreateMaybeMessage< ::google::protobuf::testing::MessageMap_M >(Arena* arena) {
  7475. return Arena::CreateInternal< ::google::protobuf::testing::MessageMap_M >(arena);
  7476. }
  7477. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MessageMap_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MessageMap_MapEntry_DoNotUse >(Arena* arena) {
  7478. return Arena::CreateInternal< ::google::protobuf::testing::MessageMap_MapEntry_DoNotUse >(arena);
  7479. }
  7480. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MessageMap* Arena::CreateMaybeMessage< ::google::protobuf::testing::MessageMap >(Arena* arena) {
  7481. return Arena::CreateInternal< ::google::protobuf::testing::MessageMap >(arena);
  7482. }
  7483. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::DoubleValueMessage* Arena::CreateMaybeMessage< ::google::protobuf::testing::DoubleValueMessage >(Arena* arena) {
  7484. return Arena::CreateInternal< ::google::protobuf::testing::DoubleValueMessage >(arena);
  7485. }
  7486. } // namespace protobuf
  7487. } // namespace google
  7488. // @@protoc_insertion_point(global_scope)