struct.pb.cc 226 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/util/internal/testdata/struct.proto
  3. #include <google/protobuf/util/internal/testdata/struct.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_2fstruct_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue;
  20. } // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
  21. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto {
  22. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ListValueWrapper;
  23. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_ListvalueMapEntry_DoNotUse;
  24. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_StructMapEntry_DoNotUse;
  25. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_ValueMapEntry_DoNotUse;
  26. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_RepeatedListValueWrapper;
  27. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_RepeatedValueWrapper;
  28. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_StructWrapper;
  29. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ValueWrapper;
  30. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<3> scc_info_MapOfStruct;
  31. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto
  32. namespace google {
  33. namespace protobuf {
  34. namespace testing {
  35. class StructTestCasesDefaultTypeInternal {
  36. public:
  37. ::google::protobuf::internal::ExplicitlyConstructed<StructTestCases>
  38. _instance;
  39. } _StructTestCases_default_instance_;
  40. class StructWrapperDefaultTypeInternal {
  41. public:
  42. ::google::protobuf::internal::ExplicitlyConstructed<StructWrapper>
  43. _instance;
  44. } _StructWrapper_default_instance_;
  45. class ValueWrapperDefaultTypeInternal {
  46. public:
  47. ::google::protobuf::internal::ExplicitlyConstructed<ValueWrapper>
  48. _instance;
  49. } _ValueWrapper_default_instance_;
  50. class RepeatedValueWrapperDefaultTypeInternal {
  51. public:
  52. ::google::protobuf::internal::ExplicitlyConstructed<RepeatedValueWrapper>
  53. _instance;
  54. } _RepeatedValueWrapper_default_instance_;
  55. class ListValueWrapperDefaultTypeInternal {
  56. public:
  57. ::google::protobuf::internal::ExplicitlyConstructed<ListValueWrapper>
  58. _instance;
  59. } _ListValueWrapper_default_instance_;
  60. class RepeatedListValueWrapperDefaultTypeInternal {
  61. public:
  62. ::google::protobuf::internal::ExplicitlyConstructed<RepeatedListValueWrapper>
  63. _instance;
  64. } _RepeatedListValueWrapper_default_instance_;
  65. class MapOfStruct_StructMapEntry_DoNotUseDefaultTypeInternal {
  66. public:
  67. ::google::protobuf::internal::ExplicitlyConstructed<MapOfStruct_StructMapEntry_DoNotUse>
  68. _instance;
  69. } _MapOfStruct_StructMapEntry_DoNotUse_default_instance_;
  70. class MapOfStruct_ValueMapEntry_DoNotUseDefaultTypeInternal {
  71. public:
  72. ::google::protobuf::internal::ExplicitlyConstructed<MapOfStruct_ValueMapEntry_DoNotUse>
  73. _instance;
  74. } _MapOfStruct_ValueMapEntry_DoNotUse_default_instance_;
  75. class MapOfStruct_ListvalueMapEntry_DoNotUseDefaultTypeInternal {
  76. public:
  77. ::google::protobuf::internal::ExplicitlyConstructed<MapOfStruct_ListvalueMapEntry_DoNotUse>
  78. _instance;
  79. } _MapOfStruct_ListvalueMapEntry_DoNotUse_default_instance_;
  80. class MapOfStructDefaultTypeInternal {
  81. public:
  82. ::google::protobuf::internal::ExplicitlyConstructed<MapOfStruct>
  83. _instance;
  84. } _MapOfStruct_default_instance_;
  85. class DummyDefaultTypeInternal {
  86. public:
  87. ::google::protobuf::internal::ExplicitlyConstructed<Dummy>
  88. _instance;
  89. } _Dummy_default_instance_;
  90. class StructTypeDefaultTypeInternal {
  91. public:
  92. ::google::protobuf::internal::ExplicitlyConstructed<StructType>
  93. _instance;
  94. } _StructType_default_instance_;
  95. } // namespace testing
  96. } // namespace protobuf
  97. } // namespace google
  98. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto {
  99. static void InitDefaultsStructTestCases() {
  100. GOOGLE_PROTOBUF_VERIFY_VERSION;
  101. {
  102. void* ptr = &::google::protobuf::testing::_StructTestCases_default_instance_;
  103. new (ptr) ::google::protobuf::testing::StructTestCases();
  104. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  105. }
  106. ::google::protobuf::testing::StructTestCases::InitAsDefaultInstance();
  107. }
  108. ::google::protobuf::internal::SCCInfo<7> scc_info_StructTestCases =
  109. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 7, InitDefaultsStructTestCases}, {
  110. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructWrapper.base,
  111. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,
  112. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ValueWrapper.base,
  113. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ListValueWrapper.base,
  114. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedValueWrapper.base,
  115. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedListValueWrapper.base,
  116. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct.base,}};
  117. static void InitDefaultsStructWrapper() {
  118. GOOGLE_PROTOBUF_VERIFY_VERSION;
  119. {
  120. void* ptr = &::google::protobuf::testing::_StructWrapper_default_instance_;
  121. new (ptr) ::google::protobuf::testing::StructWrapper();
  122. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  123. }
  124. ::google::protobuf::testing::StructWrapper::InitAsDefaultInstance();
  125. }
  126. ::google::protobuf::internal::SCCInfo<1> scc_info_StructWrapper =
  127. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStructWrapper}, {
  128. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  129. static void InitDefaultsValueWrapper() {
  130. GOOGLE_PROTOBUF_VERIFY_VERSION;
  131. {
  132. void* ptr = &::google::protobuf::testing::_ValueWrapper_default_instance_;
  133. new (ptr) ::google::protobuf::testing::ValueWrapper();
  134. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  135. }
  136. ::google::protobuf::testing::ValueWrapper::InitAsDefaultInstance();
  137. }
  138. ::google::protobuf::internal::SCCInfo<1> scc_info_ValueWrapper =
  139. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsValueWrapper}, {
  140. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  141. static void InitDefaultsRepeatedValueWrapper() {
  142. GOOGLE_PROTOBUF_VERIFY_VERSION;
  143. {
  144. void* ptr = &::google::protobuf::testing::_RepeatedValueWrapper_default_instance_;
  145. new (ptr) ::google::protobuf::testing::RepeatedValueWrapper();
  146. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  147. }
  148. ::google::protobuf::testing::RepeatedValueWrapper::InitAsDefaultInstance();
  149. }
  150. ::google::protobuf::internal::SCCInfo<1> scc_info_RepeatedValueWrapper =
  151. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRepeatedValueWrapper}, {
  152. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  153. static void InitDefaultsListValueWrapper() {
  154. GOOGLE_PROTOBUF_VERIFY_VERSION;
  155. {
  156. void* ptr = &::google::protobuf::testing::_ListValueWrapper_default_instance_;
  157. new (ptr) ::google::protobuf::testing::ListValueWrapper();
  158. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  159. }
  160. ::google::protobuf::testing::ListValueWrapper::InitAsDefaultInstance();
  161. }
  162. ::google::protobuf::internal::SCCInfo<1> scc_info_ListValueWrapper =
  163. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsListValueWrapper}, {
  164. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  165. static void InitDefaultsRepeatedListValueWrapper() {
  166. GOOGLE_PROTOBUF_VERIFY_VERSION;
  167. {
  168. void* ptr = &::google::protobuf::testing::_RepeatedListValueWrapper_default_instance_;
  169. new (ptr) ::google::protobuf::testing::RepeatedListValueWrapper();
  170. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  171. }
  172. ::google::protobuf::testing::RepeatedListValueWrapper::InitAsDefaultInstance();
  173. }
  174. ::google::protobuf::internal::SCCInfo<1> scc_info_RepeatedListValueWrapper =
  175. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRepeatedListValueWrapper}, {
  176. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  177. static void InitDefaultsMapOfStruct_StructMapEntry_DoNotUse() {
  178. GOOGLE_PROTOBUF_VERIFY_VERSION;
  179. {
  180. void* ptr = &::google::protobuf::testing::_MapOfStruct_StructMapEntry_DoNotUse_default_instance_;
  181. new (ptr) ::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse();
  182. }
  183. ::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse::InitAsDefaultInstance();
  184. }
  185. ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_StructMapEntry_DoNotUse =
  186. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapOfStruct_StructMapEntry_DoNotUse}, {
  187. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  188. static void InitDefaultsMapOfStruct_ValueMapEntry_DoNotUse() {
  189. GOOGLE_PROTOBUF_VERIFY_VERSION;
  190. {
  191. void* ptr = &::google::protobuf::testing::_MapOfStruct_ValueMapEntry_DoNotUse_default_instance_;
  192. new (ptr) ::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse();
  193. }
  194. ::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse::InitAsDefaultInstance();
  195. }
  196. ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_ValueMapEntry_DoNotUse =
  197. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapOfStruct_ValueMapEntry_DoNotUse}, {
  198. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  199. static void InitDefaultsMapOfStruct_ListvalueMapEntry_DoNotUse() {
  200. GOOGLE_PROTOBUF_VERIFY_VERSION;
  201. {
  202. void* ptr = &::google::protobuf::testing::_MapOfStruct_ListvalueMapEntry_DoNotUse_default_instance_;
  203. new (ptr) ::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse();
  204. }
  205. ::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse::InitAsDefaultInstance();
  206. }
  207. ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfStruct_ListvalueMapEntry_DoNotUse =
  208. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapOfStruct_ListvalueMapEntry_DoNotUse}, {
  209. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  210. static void InitDefaultsMapOfStruct() {
  211. GOOGLE_PROTOBUF_VERIFY_VERSION;
  212. {
  213. void* ptr = &::google::protobuf::testing::_MapOfStruct_default_instance_;
  214. new (ptr) ::google::protobuf::testing::MapOfStruct();
  215. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  216. }
  217. ::google::protobuf::testing::MapOfStruct::InitAsDefaultInstance();
  218. }
  219. ::google::protobuf::internal::SCCInfo<3> scc_info_MapOfStruct =
  220. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsMapOfStruct}, {
  221. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct_StructMapEntry_DoNotUse.base,
  222. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct_ValueMapEntry_DoNotUse.base,
  223. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct_ListvalueMapEntry_DoNotUse.base,}};
  224. static void InitDefaultsDummy() {
  225. GOOGLE_PROTOBUF_VERIFY_VERSION;
  226. {
  227. void* ptr = &::google::protobuf::testing::_Dummy_default_instance_;
  228. new (ptr) ::google::protobuf::testing::Dummy();
  229. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  230. }
  231. ::google::protobuf::testing::Dummy::InitAsDefaultInstance();
  232. }
  233. ::google::protobuf::internal::SCCInfo<0> scc_info_Dummy =
  234. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDummy}, {}};
  235. static void InitDefaultsStructType() {
  236. GOOGLE_PROTOBUF_VERIFY_VERSION;
  237. {
  238. void* ptr = &::google::protobuf::testing::_StructType_default_instance_;
  239. new (ptr) ::google::protobuf::testing::StructType();
  240. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  241. }
  242. ::google::protobuf::testing::StructType::InitAsDefaultInstance();
  243. }
  244. ::google::protobuf::internal::SCCInfo<1> scc_info_StructType =
  245. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStructType}, {
  246. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  247. void InitDefaults() {
  248. ::google::protobuf::internal::InitSCC(&scc_info_StructTestCases.base);
  249. ::google::protobuf::internal::InitSCC(&scc_info_StructWrapper.base);
  250. ::google::protobuf::internal::InitSCC(&scc_info_ValueWrapper.base);
  251. ::google::protobuf::internal::InitSCC(&scc_info_RepeatedValueWrapper.base);
  252. ::google::protobuf::internal::InitSCC(&scc_info_ListValueWrapper.base);
  253. ::google::protobuf::internal::InitSCC(&scc_info_RepeatedListValueWrapper.base);
  254. ::google::protobuf::internal::InitSCC(&scc_info_MapOfStruct_StructMapEntry_DoNotUse.base);
  255. ::google::protobuf::internal::InitSCC(&scc_info_MapOfStruct_ValueMapEntry_DoNotUse.base);
  256. ::google::protobuf::internal::InitSCC(&scc_info_MapOfStruct_ListvalueMapEntry_DoNotUse.base);
  257. ::google::protobuf::internal::InitSCC(&scc_info_MapOfStruct.base);
  258. ::google::protobuf::internal::InitSCC(&scc_info_Dummy.base);
  259. ::google::protobuf::internal::InitSCC(&scc_info_StructType.base);
  260. }
  261. ::google::protobuf::Metadata file_level_metadata[12];
  262. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  263. ~0u, // no _has_bits_
  264. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, _internal_metadata_),
  265. ~0u, // no _extensions_
  266. ~0u, // no _oneof_case_
  267. ~0u, // no _weak_field_map_
  268. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, empty_value_),
  269. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, empty_value2_),
  270. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, null_value_),
  271. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, simple_struct_),
  272. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, longer_struct_),
  273. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_nested_struct_),
  274. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_nested_list_),
  275. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_list_of_nulls_),
  276. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_list_of_lists_),
  277. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_list_of_structs_),
  278. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_empty_list_),
  279. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, struct_with_list_with_empty_struct_),
  280. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_struct_),
  281. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_struct_with_empty_list_),
  282. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_struct_with_list_with_empty_struct_),
  283. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, value_wrapper_simple_),
  284. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, value_wrapper_with_struct_),
  285. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, value_wrapper_with_list_),
  286. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, value_wrapper_with_empty_list_),
  287. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, value_wrapper_with_list_with_empty_struct_),
  288. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, list_value_wrapper_),
  289. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, list_value_wrapper_with_empty_list_),
  290. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, list_value_wrapper_with_list_with_empty_struct_),
  291. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_value_simple_),
  292. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_value_with_struct_),
  293. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_value_with_list_),
  294. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_value_with_empty_list_),
  295. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_value_with_list_with_empty_struct_),
  296. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_listvalue_),
  297. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_empty_listvalue_),
  298. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, top_level_listvalue_with_empty_struct_),
  299. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, repeated_value_),
  300. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, repeated_value_nested_list_),
  301. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, repeated_value_nested_list2_),
  302. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, repeated_value_nested_list3_),
  303. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, repeated_listvalue_),
  304. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, map_of_struct_),
  305. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, map_of_struct_value_),
  306. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructTestCases, map_of_listvalue_),
  307. ~0u, // no _has_bits_
  308. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructWrapper, _internal_metadata_),
  309. ~0u, // no _extensions_
  310. ~0u, // no _oneof_case_
  311. ~0u, // no _weak_field_map_
  312. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructWrapper, struct__),
  313. ~0u, // no _has_bits_
  314. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ValueWrapper, _internal_metadata_),
  315. ~0u, // no _extensions_
  316. ~0u, // no _oneof_case_
  317. ~0u, // no _weak_field_map_
  318. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ValueWrapper, value_),
  319. ~0u, // no _has_bits_
  320. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::RepeatedValueWrapper, _internal_metadata_),
  321. ~0u, // no _extensions_
  322. ~0u, // no _oneof_case_
  323. ~0u, // no _weak_field_map_
  324. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::RepeatedValueWrapper, values_),
  325. ~0u, // no _has_bits_
  326. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ListValueWrapper, _internal_metadata_),
  327. ~0u, // no _extensions_
  328. ~0u, // no _oneof_case_
  329. ~0u, // no _weak_field_map_
  330. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::ListValueWrapper, shopping_list_),
  331. ~0u, // no _has_bits_
  332. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::RepeatedListValueWrapper, _internal_metadata_),
  333. ~0u, // no _extensions_
  334. ~0u, // no _oneof_case_
  335. ~0u, // no _weak_field_map_
  336. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::RepeatedListValueWrapper, dimensions_),
  337. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse, _has_bits_),
  338. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse, _internal_metadata_),
  339. ~0u, // no _extensions_
  340. ~0u, // no _oneof_case_
  341. ~0u, // no _weak_field_map_
  342. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse, key_),
  343. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse, value_),
  344. 0,
  345. 1,
  346. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse, _has_bits_),
  347. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse, _internal_metadata_),
  348. ~0u, // no _extensions_
  349. ~0u, // no _oneof_case_
  350. ~0u, // no _weak_field_map_
  351. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse, key_),
  352. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse, value_),
  353. 0,
  354. 1,
  355. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse, _has_bits_),
  356. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse, _internal_metadata_),
  357. ~0u, // no _extensions_
  358. ~0u, // no _oneof_case_
  359. ~0u, // no _weak_field_map_
  360. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse, key_),
  361. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse, value_),
  362. 0,
  363. 1,
  364. ~0u, // no _has_bits_
  365. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct, _internal_metadata_),
  366. ~0u, // no _extensions_
  367. ~0u, // no _oneof_case_
  368. ~0u, // no _weak_field_map_
  369. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct, struct_map_),
  370. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct, value_map_),
  371. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfStruct, listvalue_map_),
  372. ~0u, // no _has_bits_
  373. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Dummy, _internal_metadata_),
  374. ~0u, // no _extensions_
  375. ~0u, // no _oneof_case_
  376. ~0u, // no _weak_field_map_
  377. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Dummy, text_),
  378. ~0u, // no _has_bits_
  379. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructType, _internal_metadata_),
  380. ~0u, // no _extensions_
  381. ~0u, // no _oneof_case_
  382. ~0u, // no _weak_field_map_
  383. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StructType, object_),
  384. };
  385. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  386. { 0, -1, sizeof(::google::protobuf::testing::StructTestCases)},
  387. { 44, -1, sizeof(::google::protobuf::testing::StructWrapper)},
  388. { 50, -1, sizeof(::google::protobuf::testing::ValueWrapper)},
  389. { 56, -1, sizeof(::google::protobuf::testing::RepeatedValueWrapper)},
  390. { 62, -1, sizeof(::google::protobuf::testing::ListValueWrapper)},
  391. { 68, -1, sizeof(::google::protobuf::testing::RepeatedListValueWrapper)},
  392. { 74, 81, sizeof(::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse)},
  393. { 83, 90, sizeof(::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse)},
  394. { 92, 99, sizeof(::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse)},
  395. { 101, -1, sizeof(::google::protobuf::testing::MapOfStruct)},
  396. { 109, -1, sizeof(::google::protobuf::testing::Dummy)},
  397. { 115, -1, sizeof(::google::protobuf::testing::StructType)},
  398. };
  399. static ::google::protobuf::Message const * const file_default_instances[] = {
  400. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StructTestCases_default_instance_),
  401. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StructWrapper_default_instance_),
  402. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_ValueWrapper_default_instance_),
  403. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_RepeatedValueWrapper_default_instance_),
  404. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_ListValueWrapper_default_instance_),
  405. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_RepeatedListValueWrapper_default_instance_),
  406. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOfStruct_StructMapEntry_DoNotUse_default_instance_),
  407. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOfStruct_ValueMapEntry_DoNotUse_default_instance_),
  408. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOfStruct_ListvalueMapEntry_DoNotUse_default_instance_),
  409. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOfStruct_default_instance_),
  410. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Dummy_default_instance_),
  411. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StructType_default_instance_),
  412. };
  413. void protobuf_AssignDescriptors() {
  414. AddDescriptors();
  415. AssignDescriptors(
  416. "google/protobuf/util/internal/testdata/struct.proto", schemas, file_default_instances, TableStruct::offsets,
  417. file_level_metadata, NULL, NULL);
  418. }
  419. void protobuf_AssignDescriptorsOnce() {
  420. static ::google::protobuf::internal::once_flag once;
  421. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  422. }
  423. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  424. void protobuf_RegisterTypes(const ::std::string&) {
  425. protobuf_AssignDescriptorsOnce();
  426. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 12);
  427. }
  428. void AddDescriptorsImpl() {
  429. InitDefaults();
  430. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  431. "\n3google/protobuf/util/internal/testdata"
  432. "/struct.proto\022\027google.protobuf.testing\032\034"
  433. "google/protobuf/struct.proto\"\360\025\n\017StructT"
  434. "estCases\022;\n\013empty_value\030\001 \001(\0132&.google.p"
  435. "rotobuf.testing.StructWrapper\022<\n\014empty_v"
  436. "alue2\030\002 \001(\0132&.google.protobuf.testing.St"
  437. "ructWrapper\022:\n\nnull_value\030\003 \001(\0132&.google"
  438. ".protobuf.testing.StructWrapper\022=\n\rsimpl"
  439. "e_struct\030\004 \001(\0132&.google.protobuf.testing"
  440. ".StructWrapper\022=\n\rlonger_struct\030\005 \001(\0132&."
  441. "google.protobuf.testing.StructWrapper\022I\n"
  442. "\031struct_with_nested_struct\030\006 \001(\0132&.googl"
  443. "e.protobuf.testing.StructWrapper\022G\n\027stru"
  444. "ct_with_nested_list\030\007 \001(\0132&.google.proto"
  445. "buf.testing.StructWrapper\022I\n\031struct_with"
  446. "_list_of_nulls\030\010 \001(\0132&.google.protobuf.t"
  447. "esting.StructWrapper\022I\n\031struct_with_list"
  448. "_of_lists\030\t \001(\0132&.google.protobuf.testin"
  449. "g.StructWrapper\022K\n\033struct_with_list_of_s"
  450. "tructs\030\n \001(\0132&.google.protobuf.testing.S"
  451. "tructWrapper\022F\n\026struct_with_empty_list\030\013"
  452. " \001(\0132&.google.protobuf.testing.StructWra"
  453. "pper\022R\n\"struct_with_list_with_empty_stru"
  454. "ct\030\014 \001(\0132&.google.protobuf.testing.Struc"
  455. "tWrapper\0221\n\020top_level_struct\030\r \001(\0132\027.goo"
  456. "gle.protobuf.Struct\022A\n top_level_struct_"
  457. "with_empty_list\030\016 \001(\0132\027.google.protobuf."
  458. "Struct\022M\n,top_level_struct_with_list_wit"
  459. "h_empty_struct\030\017 \001(\0132\027.google.protobuf.S"
  460. "truct\022C\n\024value_wrapper_simple\030\020 \001(\0132%.go"
  461. "ogle.protobuf.testing.ValueWrapper\022H\n\031va"
  462. "lue_wrapper_with_struct\030\021 \001(\0132%.google.p"
  463. "rotobuf.testing.ValueWrapper\022F\n\027value_wr"
  464. "apper_with_list\030\022 \001(\0132%.google.protobuf."
  465. "testing.ValueWrapper\022L\n\035value_wrapper_wi"
  466. "th_empty_list\030\023 \001(\0132%.google.protobuf.te"
  467. "sting.ValueWrapper\022X\n)value_wrapper_with"
  468. "_list_with_empty_struct\030\024 \001(\0132%.google.p"
  469. "rotobuf.testing.ValueWrapper\022E\n\022list_val"
  470. "ue_wrapper\030\025 \001(\0132).google.protobuf.testi"
  471. "ng.ListValueWrapper\022U\n\"list_value_wrappe"
  472. "r_with_empty_list\030\026 \001(\0132).google.protobu"
  473. "f.testing.ListValueWrapper\022a\n.list_value"
  474. "_wrapper_with_list_with_empty_struct\030\027 \001"
  475. "(\0132).google.protobuf.testing.ListValueWr"
  476. "apper\0226\n\026top_level_value_simple\030\030 \001(\0132\026."
  477. "google.protobuf.Value\022;\n\033top_level_value"
  478. "_with_struct\030\031 \001(\0132\026.google.protobuf.Val"
  479. "ue\0229\n\031top_level_value_with_list\030\032 \001(\0132\026."
  480. "google.protobuf.Value\022\?\n\037top_level_value"
  481. "_with_empty_list\030\033 \001(\0132\026.google.protobuf"
  482. ".Value\022K\n+top_level_value_with_list_with"
  483. "_empty_struct\030\034 \001(\0132\026.google.protobuf.Va"
  484. "lue\0227\n\023top_level_listvalue\030\035 \001(\0132\032.googl"
  485. "e.protobuf.ListValue\022=\n\031top_level_empty_"
  486. "listvalue\030\036 \001(\0132\032.google.protobuf.ListVa"
  487. "lue\022I\n%top_level_listvalue_with_empty_st"
  488. "ruct\030\037 \001(\0132\032.google.protobuf.ListValue\022E"
  489. "\n\016repeated_value\030 \001(\0132-.google.protobuf"
  490. ".testing.RepeatedValueWrapper\022Q\n\032repeate"
  491. "d_value_nested_list\030! \001(\0132-.google.proto"
  492. "buf.testing.RepeatedValueWrapper\022R\n\033repe"
  493. "ated_value_nested_list2\030\" \001(\0132-.google.p"
  494. "rotobuf.testing.RepeatedValueWrapper\022R\n\033"
  495. "repeated_value_nested_list3\030# \001(\0132-.goog"
  496. "le.protobuf.testing.RepeatedValueWrapper"
  497. "\022M\n\022repeated_listvalue\030$ \001(\01321.google.pr"
  498. "otobuf.testing.RepeatedListValueWrapper\022"
  499. ";\n\rmap_of_struct\030% \001(\0132$.google.protobuf"
  500. ".testing.MapOfStruct\022A\n\023map_of_struct_va"
  501. "lue\030& \001(\0132$.google.protobuf.testing.MapO"
  502. "fStruct\022>\n\020map_of_listvalue\030\' \001(\0132$.goog"
  503. "le.protobuf.testing.MapOfStruct\"8\n\rStruc"
  504. "tWrapper\022\'\n\006struct\030\001 \001(\0132\027.google.protob"
  505. "uf.Struct\"5\n\014ValueWrapper\022%\n\005value\030\001 \001(\013"
  506. "2\026.google.protobuf.Value\">\n\024RepeatedValu"
  507. "eWrapper\022&\n\006values\030\001 \003(\0132\026.google.protob"
  508. "uf.Value\"E\n\020ListValueWrapper\0221\n\rshopping"
  509. "_list\030\001 \001(\0132\032.google.protobuf.ListValue\""
  510. "J\n\030RepeatedListValueWrapper\022.\n\ndimension"
  511. "s\030\001 \003(\0132\032.google.protobuf.ListValue\"\321\003\n\013"
  512. "MapOfStruct\022G\n\nstruct_map\030\001 \003(\01323.google"
  513. ".protobuf.testing.MapOfStruct.StructMapE"
  514. "ntry\022E\n\tvalue_map\030\002 \003(\01322.google.protobu"
  515. "f.testing.MapOfStruct.ValueMapEntry\022M\n\rl"
  516. "istvalue_map\030\003 \003(\01326.google.protobuf.tes"
  517. "ting.MapOfStruct.ListvalueMapEntry\032I\n\016St"
  518. "ructMapEntry\022\013\n\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\013"
  519. "2\027.google.protobuf.Struct:\0028\001\032G\n\rValueMa"
  520. "pEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goo"
  521. "gle.protobuf.Value:\0028\001\032O\n\021ListvalueMapEn"
  522. "try\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.google"
  523. ".protobuf.ListValue:\0028\001\"\025\n\005Dummy\022\014\n\004text"
  524. "\030\001 \001(\t\"5\n\nStructType\022\'\n\006object\030\001 \001(\0132\027.g"
  525. "oogle.protobuf.Struct2e\n\021StructTestServi"
  526. "ce\022P\n\004Call\022\036.google.protobuf.testing.Dum"
  527. "my\032(.google.protobuf.testing.StructTestC"
  528. "asesb\006proto3"
  529. };
  530. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  531. descriptor, 3892);
  532. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  533. "google/protobuf/util/internal/testdata/struct.proto", &protobuf_RegisterTypes);
  534. ::protobuf_google_2fprotobuf_2fstruct_2eproto::AddDescriptors();
  535. }
  536. void AddDescriptors() {
  537. static ::google::protobuf::internal::once_flag once;
  538. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  539. }
  540. // Force AddDescriptors() to be called at dynamic initialization time.
  541. struct StaticDescriptorInitializer {
  542. StaticDescriptorInitializer() {
  543. AddDescriptors();
  544. }
  545. } static_descriptor_initializer;
  546. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto
  547. namespace google {
  548. namespace protobuf {
  549. namespace testing {
  550. // ===================================================================
  551. void StructTestCases::InitAsDefaultInstance() {
  552. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->empty_value_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  553. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  554. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->empty_value2_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  555. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  556. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->null_value_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  557. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  558. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->simple_struct_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  559. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  560. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->longer_struct_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  561. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  562. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_nested_struct_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  563. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  564. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_nested_list_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  565. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  566. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_list_of_nulls_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  567. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  568. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_list_of_lists_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  569. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  570. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_list_of_structs_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  571. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  572. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_empty_list_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  573. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  574. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->struct_with_list_with_empty_struct_ = const_cast< ::google::protobuf::testing::StructWrapper*>(
  575. ::google::protobuf::testing::StructWrapper::internal_default_instance());
  576. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_struct_ = const_cast< ::google::protobuf::Struct*>(
  577. ::google::protobuf::Struct::internal_default_instance());
  578. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_struct_with_empty_list_ = const_cast< ::google::protobuf::Struct*>(
  579. ::google::protobuf::Struct::internal_default_instance());
  580. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_struct_with_list_with_empty_struct_ = const_cast< ::google::protobuf::Struct*>(
  581. ::google::protobuf::Struct::internal_default_instance());
  582. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->value_wrapper_simple_ = const_cast< ::google::protobuf::testing::ValueWrapper*>(
  583. ::google::protobuf::testing::ValueWrapper::internal_default_instance());
  584. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->value_wrapper_with_struct_ = const_cast< ::google::protobuf::testing::ValueWrapper*>(
  585. ::google::protobuf::testing::ValueWrapper::internal_default_instance());
  586. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->value_wrapper_with_list_ = const_cast< ::google::protobuf::testing::ValueWrapper*>(
  587. ::google::protobuf::testing::ValueWrapper::internal_default_instance());
  588. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->value_wrapper_with_empty_list_ = const_cast< ::google::protobuf::testing::ValueWrapper*>(
  589. ::google::protobuf::testing::ValueWrapper::internal_default_instance());
  590. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->value_wrapper_with_list_with_empty_struct_ = const_cast< ::google::protobuf::testing::ValueWrapper*>(
  591. ::google::protobuf::testing::ValueWrapper::internal_default_instance());
  592. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->list_value_wrapper_ = const_cast< ::google::protobuf::testing::ListValueWrapper*>(
  593. ::google::protobuf::testing::ListValueWrapper::internal_default_instance());
  594. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->list_value_wrapper_with_empty_list_ = const_cast< ::google::protobuf::testing::ListValueWrapper*>(
  595. ::google::protobuf::testing::ListValueWrapper::internal_default_instance());
  596. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->list_value_wrapper_with_list_with_empty_struct_ = const_cast< ::google::protobuf::testing::ListValueWrapper*>(
  597. ::google::protobuf::testing::ListValueWrapper::internal_default_instance());
  598. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_value_simple_ = const_cast< ::google::protobuf::Value*>(
  599. ::google::protobuf::Value::internal_default_instance());
  600. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_value_with_struct_ = const_cast< ::google::protobuf::Value*>(
  601. ::google::protobuf::Value::internal_default_instance());
  602. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_value_with_list_ = const_cast< ::google::protobuf::Value*>(
  603. ::google::protobuf::Value::internal_default_instance());
  604. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_value_with_empty_list_ = const_cast< ::google::protobuf::Value*>(
  605. ::google::protobuf::Value::internal_default_instance());
  606. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_value_with_list_with_empty_struct_ = const_cast< ::google::protobuf::Value*>(
  607. ::google::protobuf::Value::internal_default_instance());
  608. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_listvalue_ = const_cast< ::google::protobuf::ListValue*>(
  609. ::google::protobuf::ListValue::internal_default_instance());
  610. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_empty_listvalue_ = const_cast< ::google::protobuf::ListValue*>(
  611. ::google::protobuf::ListValue::internal_default_instance());
  612. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->top_level_listvalue_with_empty_struct_ = const_cast< ::google::protobuf::ListValue*>(
  613. ::google::protobuf::ListValue::internal_default_instance());
  614. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->repeated_value_ = const_cast< ::google::protobuf::testing::RepeatedValueWrapper*>(
  615. ::google::protobuf::testing::RepeatedValueWrapper::internal_default_instance());
  616. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->repeated_value_nested_list_ = const_cast< ::google::protobuf::testing::RepeatedValueWrapper*>(
  617. ::google::protobuf::testing::RepeatedValueWrapper::internal_default_instance());
  618. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->repeated_value_nested_list2_ = const_cast< ::google::protobuf::testing::RepeatedValueWrapper*>(
  619. ::google::protobuf::testing::RepeatedValueWrapper::internal_default_instance());
  620. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->repeated_value_nested_list3_ = const_cast< ::google::protobuf::testing::RepeatedValueWrapper*>(
  621. ::google::protobuf::testing::RepeatedValueWrapper::internal_default_instance());
  622. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->repeated_listvalue_ = const_cast< ::google::protobuf::testing::RepeatedListValueWrapper*>(
  623. ::google::protobuf::testing::RepeatedListValueWrapper::internal_default_instance());
  624. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->map_of_struct_ = const_cast< ::google::protobuf::testing::MapOfStruct*>(
  625. ::google::protobuf::testing::MapOfStruct::internal_default_instance());
  626. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->map_of_struct_value_ = const_cast< ::google::protobuf::testing::MapOfStruct*>(
  627. ::google::protobuf::testing::MapOfStruct::internal_default_instance());
  628. ::google::protobuf::testing::_StructTestCases_default_instance_._instance.get_mutable()->map_of_listvalue_ = const_cast< ::google::protobuf::testing::MapOfStruct*>(
  629. ::google::protobuf::testing::MapOfStruct::internal_default_instance());
  630. }
  631. void StructTestCases::clear_top_level_struct() {
  632. if (GetArenaNoVirtual() == NULL && top_level_struct_ != NULL) {
  633. delete top_level_struct_;
  634. }
  635. top_level_struct_ = NULL;
  636. }
  637. void StructTestCases::clear_top_level_struct_with_empty_list() {
  638. if (GetArenaNoVirtual() == NULL && top_level_struct_with_empty_list_ != NULL) {
  639. delete top_level_struct_with_empty_list_;
  640. }
  641. top_level_struct_with_empty_list_ = NULL;
  642. }
  643. void StructTestCases::clear_top_level_struct_with_list_with_empty_struct() {
  644. if (GetArenaNoVirtual() == NULL && top_level_struct_with_list_with_empty_struct_ != NULL) {
  645. delete top_level_struct_with_list_with_empty_struct_;
  646. }
  647. top_level_struct_with_list_with_empty_struct_ = NULL;
  648. }
  649. void StructTestCases::clear_top_level_value_simple() {
  650. if (GetArenaNoVirtual() == NULL && top_level_value_simple_ != NULL) {
  651. delete top_level_value_simple_;
  652. }
  653. top_level_value_simple_ = NULL;
  654. }
  655. void StructTestCases::clear_top_level_value_with_struct() {
  656. if (GetArenaNoVirtual() == NULL && top_level_value_with_struct_ != NULL) {
  657. delete top_level_value_with_struct_;
  658. }
  659. top_level_value_with_struct_ = NULL;
  660. }
  661. void StructTestCases::clear_top_level_value_with_list() {
  662. if (GetArenaNoVirtual() == NULL && top_level_value_with_list_ != NULL) {
  663. delete top_level_value_with_list_;
  664. }
  665. top_level_value_with_list_ = NULL;
  666. }
  667. void StructTestCases::clear_top_level_value_with_empty_list() {
  668. if (GetArenaNoVirtual() == NULL && top_level_value_with_empty_list_ != NULL) {
  669. delete top_level_value_with_empty_list_;
  670. }
  671. top_level_value_with_empty_list_ = NULL;
  672. }
  673. void StructTestCases::clear_top_level_value_with_list_with_empty_struct() {
  674. if (GetArenaNoVirtual() == NULL && top_level_value_with_list_with_empty_struct_ != NULL) {
  675. delete top_level_value_with_list_with_empty_struct_;
  676. }
  677. top_level_value_with_list_with_empty_struct_ = NULL;
  678. }
  679. void StructTestCases::clear_top_level_listvalue() {
  680. if (GetArenaNoVirtual() == NULL && top_level_listvalue_ != NULL) {
  681. delete top_level_listvalue_;
  682. }
  683. top_level_listvalue_ = NULL;
  684. }
  685. void StructTestCases::clear_top_level_empty_listvalue() {
  686. if (GetArenaNoVirtual() == NULL && top_level_empty_listvalue_ != NULL) {
  687. delete top_level_empty_listvalue_;
  688. }
  689. top_level_empty_listvalue_ = NULL;
  690. }
  691. void StructTestCases::clear_top_level_listvalue_with_empty_struct() {
  692. if (GetArenaNoVirtual() == NULL && top_level_listvalue_with_empty_struct_ != NULL) {
  693. delete top_level_listvalue_with_empty_struct_;
  694. }
  695. top_level_listvalue_with_empty_struct_ = NULL;
  696. }
  697. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  698. const int StructTestCases::kEmptyValueFieldNumber;
  699. const int StructTestCases::kEmptyValue2FieldNumber;
  700. const int StructTestCases::kNullValueFieldNumber;
  701. const int StructTestCases::kSimpleStructFieldNumber;
  702. const int StructTestCases::kLongerStructFieldNumber;
  703. const int StructTestCases::kStructWithNestedStructFieldNumber;
  704. const int StructTestCases::kStructWithNestedListFieldNumber;
  705. const int StructTestCases::kStructWithListOfNullsFieldNumber;
  706. const int StructTestCases::kStructWithListOfListsFieldNumber;
  707. const int StructTestCases::kStructWithListOfStructsFieldNumber;
  708. const int StructTestCases::kStructWithEmptyListFieldNumber;
  709. const int StructTestCases::kStructWithListWithEmptyStructFieldNumber;
  710. const int StructTestCases::kTopLevelStructFieldNumber;
  711. const int StructTestCases::kTopLevelStructWithEmptyListFieldNumber;
  712. const int StructTestCases::kTopLevelStructWithListWithEmptyStructFieldNumber;
  713. const int StructTestCases::kValueWrapperSimpleFieldNumber;
  714. const int StructTestCases::kValueWrapperWithStructFieldNumber;
  715. const int StructTestCases::kValueWrapperWithListFieldNumber;
  716. const int StructTestCases::kValueWrapperWithEmptyListFieldNumber;
  717. const int StructTestCases::kValueWrapperWithListWithEmptyStructFieldNumber;
  718. const int StructTestCases::kListValueWrapperFieldNumber;
  719. const int StructTestCases::kListValueWrapperWithEmptyListFieldNumber;
  720. const int StructTestCases::kListValueWrapperWithListWithEmptyStructFieldNumber;
  721. const int StructTestCases::kTopLevelValueSimpleFieldNumber;
  722. const int StructTestCases::kTopLevelValueWithStructFieldNumber;
  723. const int StructTestCases::kTopLevelValueWithListFieldNumber;
  724. const int StructTestCases::kTopLevelValueWithEmptyListFieldNumber;
  725. const int StructTestCases::kTopLevelValueWithListWithEmptyStructFieldNumber;
  726. const int StructTestCases::kTopLevelListvalueFieldNumber;
  727. const int StructTestCases::kTopLevelEmptyListvalueFieldNumber;
  728. const int StructTestCases::kTopLevelListvalueWithEmptyStructFieldNumber;
  729. const int StructTestCases::kRepeatedValueFieldNumber;
  730. const int StructTestCases::kRepeatedValueNestedListFieldNumber;
  731. const int StructTestCases::kRepeatedValueNestedList2FieldNumber;
  732. const int StructTestCases::kRepeatedValueNestedList3FieldNumber;
  733. const int StructTestCases::kRepeatedListvalueFieldNumber;
  734. const int StructTestCases::kMapOfStructFieldNumber;
  735. const int StructTestCases::kMapOfStructValueFieldNumber;
  736. const int StructTestCases::kMapOfListvalueFieldNumber;
  737. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  738. StructTestCases::StructTestCases()
  739. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  740. ::google::protobuf::internal::InitSCC(
  741. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructTestCases.base);
  742. SharedCtor();
  743. // @@protoc_insertion_point(constructor:google.protobuf.testing.StructTestCases)
  744. }
  745. StructTestCases::StructTestCases(const StructTestCases& from)
  746. : ::google::protobuf::Message(),
  747. _internal_metadata_(NULL) {
  748. _internal_metadata_.MergeFrom(from._internal_metadata_);
  749. if (from.has_empty_value()) {
  750. empty_value_ = new ::google::protobuf::testing::StructWrapper(*from.empty_value_);
  751. } else {
  752. empty_value_ = NULL;
  753. }
  754. if (from.has_empty_value2()) {
  755. empty_value2_ = new ::google::protobuf::testing::StructWrapper(*from.empty_value2_);
  756. } else {
  757. empty_value2_ = NULL;
  758. }
  759. if (from.has_null_value()) {
  760. null_value_ = new ::google::protobuf::testing::StructWrapper(*from.null_value_);
  761. } else {
  762. null_value_ = NULL;
  763. }
  764. if (from.has_simple_struct()) {
  765. simple_struct_ = new ::google::protobuf::testing::StructWrapper(*from.simple_struct_);
  766. } else {
  767. simple_struct_ = NULL;
  768. }
  769. if (from.has_longer_struct()) {
  770. longer_struct_ = new ::google::protobuf::testing::StructWrapper(*from.longer_struct_);
  771. } else {
  772. longer_struct_ = NULL;
  773. }
  774. if (from.has_struct_with_nested_struct()) {
  775. struct_with_nested_struct_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_nested_struct_);
  776. } else {
  777. struct_with_nested_struct_ = NULL;
  778. }
  779. if (from.has_struct_with_nested_list()) {
  780. struct_with_nested_list_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_nested_list_);
  781. } else {
  782. struct_with_nested_list_ = NULL;
  783. }
  784. if (from.has_struct_with_list_of_nulls()) {
  785. struct_with_list_of_nulls_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_list_of_nulls_);
  786. } else {
  787. struct_with_list_of_nulls_ = NULL;
  788. }
  789. if (from.has_struct_with_list_of_lists()) {
  790. struct_with_list_of_lists_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_list_of_lists_);
  791. } else {
  792. struct_with_list_of_lists_ = NULL;
  793. }
  794. if (from.has_struct_with_list_of_structs()) {
  795. struct_with_list_of_structs_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_list_of_structs_);
  796. } else {
  797. struct_with_list_of_structs_ = NULL;
  798. }
  799. if (from.has_struct_with_empty_list()) {
  800. struct_with_empty_list_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_empty_list_);
  801. } else {
  802. struct_with_empty_list_ = NULL;
  803. }
  804. if (from.has_struct_with_list_with_empty_struct()) {
  805. struct_with_list_with_empty_struct_ = new ::google::protobuf::testing::StructWrapper(*from.struct_with_list_with_empty_struct_);
  806. } else {
  807. struct_with_list_with_empty_struct_ = NULL;
  808. }
  809. if (from.has_top_level_struct()) {
  810. top_level_struct_ = new ::google::protobuf::Struct(*from.top_level_struct_);
  811. } else {
  812. top_level_struct_ = NULL;
  813. }
  814. if (from.has_top_level_struct_with_empty_list()) {
  815. top_level_struct_with_empty_list_ = new ::google::protobuf::Struct(*from.top_level_struct_with_empty_list_);
  816. } else {
  817. top_level_struct_with_empty_list_ = NULL;
  818. }
  819. if (from.has_top_level_struct_with_list_with_empty_struct()) {
  820. top_level_struct_with_list_with_empty_struct_ = new ::google::protobuf::Struct(*from.top_level_struct_with_list_with_empty_struct_);
  821. } else {
  822. top_level_struct_with_list_with_empty_struct_ = NULL;
  823. }
  824. if (from.has_value_wrapper_simple()) {
  825. value_wrapper_simple_ = new ::google::protobuf::testing::ValueWrapper(*from.value_wrapper_simple_);
  826. } else {
  827. value_wrapper_simple_ = NULL;
  828. }
  829. if (from.has_value_wrapper_with_struct()) {
  830. value_wrapper_with_struct_ = new ::google::protobuf::testing::ValueWrapper(*from.value_wrapper_with_struct_);
  831. } else {
  832. value_wrapper_with_struct_ = NULL;
  833. }
  834. if (from.has_value_wrapper_with_list()) {
  835. value_wrapper_with_list_ = new ::google::protobuf::testing::ValueWrapper(*from.value_wrapper_with_list_);
  836. } else {
  837. value_wrapper_with_list_ = NULL;
  838. }
  839. if (from.has_value_wrapper_with_empty_list()) {
  840. value_wrapper_with_empty_list_ = new ::google::protobuf::testing::ValueWrapper(*from.value_wrapper_with_empty_list_);
  841. } else {
  842. value_wrapper_with_empty_list_ = NULL;
  843. }
  844. if (from.has_value_wrapper_with_list_with_empty_struct()) {
  845. value_wrapper_with_list_with_empty_struct_ = new ::google::protobuf::testing::ValueWrapper(*from.value_wrapper_with_list_with_empty_struct_);
  846. } else {
  847. value_wrapper_with_list_with_empty_struct_ = NULL;
  848. }
  849. if (from.has_list_value_wrapper()) {
  850. list_value_wrapper_ = new ::google::protobuf::testing::ListValueWrapper(*from.list_value_wrapper_);
  851. } else {
  852. list_value_wrapper_ = NULL;
  853. }
  854. if (from.has_list_value_wrapper_with_empty_list()) {
  855. list_value_wrapper_with_empty_list_ = new ::google::protobuf::testing::ListValueWrapper(*from.list_value_wrapper_with_empty_list_);
  856. } else {
  857. list_value_wrapper_with_empty_list_ = NULL;
  858. }
  859. if (from.has_list_value_wrapper_with_list_with_empty_struct()) {
  860. list_value_wrapper_with_list_with_empty_struct_ = new ::google::protobuf::testing::ListValueWrapper(*from.list_value_wrapper_with_list_with_empty_struct_);
  861. } else {
  862. list_value_wrapper_with_list_with_empty_struct_ = NULL;
  863. }
  864. if (from.has_top_level_value_simple()) {
  865. top_level_value_simple_ = new ::google::protobuf::Value(*from.top_level_value_simple_);
  866. } else {
  867. top_level_value_simple_ = NULL;
  868. }
  869. if (from.has_top_level_value_with_struct()) {
  870. top_level_value_with_struct_ = new ::google::protobuf::Value(*from.top_level_value_with_struct_);
  871. } else {
  872. top_level_value_with_struct_ = NULL;
  873. }
  874. if (from.has_top_level_value_with_list()) {
  875. top_level_value_with_list_ = new ::google::protobuf::Value(*from.top_level_value_with_list_);
  876. } else {
  877. top_level_value_with_list_ = NULL;
  878. }
  879. if (from.has_top_level_value_with_empty_list()) {
  880. top_level_value_with_empty_list_ = new ::google::protobuf::Value(*from.top_level_value_with_empty_list_);
  881. } else {
  882. top_level_value_with_empty_list_ = NULL;
  883. }
  884. if (from.has_top_level_value_with_list_with_empty_struct()) {
  885. top_level_value_with_list_with_empty_struct_ = new ::google::protobuf::Value(*from.top_level_value_with_list_with_empty_struct_);
  886. } else {
  887. top_level_value_with_list_with_empty_struct_ = NULL;
  888. }
  889. if (from.has_top_level_listvalue()) {
  890. top_level_listvalue_ = new ::google::protobuf::ListValue(*from.top_level_listvalue_);
  891. } else {
  892. top_level_listvalue_ = NULL;
  893. }
  894. if (from.has_top_level_empty_listvalue()) {
  895. top_level_empty_listvalue_ = new ::google::protobuf::ListValue(*from.top_level_empty_listvalue_);
  896. } else {
  897. top_level_empty_listvalue_ = NULL;
  898. }
  899. if (from.has_top_level_listvalue_with_empty_struct()) {
  900. top_level_listvalue_with_empty_struct_ = new ::google::protobuf::ListValue(*from.top_level_listvalue_with_empty_struct_);
  901. } else {
  902. top_level_listvalue_with_empty_struct_ = NULL;
  903. }
  904. if (from.has_repeated_value()) {
  905. repeated_value_ = new ::google::protobuf::testing::RepeatedValueWrapper(*from.repeated_value_);
  906. } else {
  907. repeated_value_ = NULL;
  908. }
  909. if (from.has_repeated_value_nested_list()) {
  910. repeated_value_nested_list_ = new ::google::protobuf::testing::RepeatedValueWrapper(*from.repeated_value_nested_list_);
  911. } else {
  912. repeated_value_nested_list_ = NULL;
  913. }
  914. if (from.has_repeated_value_nested_list2()) {
  915. repeated_value_nested_list2_ = new ::google::protobuf::testing::RepeatedValueWrapper(*from.repeated_value_nested_list2_);
  916. } else {
  917. repeated_value_nested_list2_ = NULL;
  918. }
  919. if (from.has_repeated_value_nested_list3()) {
  920. repeated_value_nested_list3_ = new ::google::protobuf::testing::RepeatedValueWrapper(*from.repeated_value_nested_list3_);
  921. } else {
  922. repeated_value_nested_list3_ = NULL;
  923. }
  924. if (from.has_repeated_listvalue()) {
  925. repeated_listvalue_ = new ::google::protobuf::testing::RepeatedListValueWrapper(*from.repeated_listvalue_);
  926. } else {
  927. repeated_listvalue_ = NULL;
  928. }
  929. if (from.has_map_of_struct()) {
  930. map_of_struct_ = new ::google::protobuf::testing::MapOfStruct(*from.map_of_struct_);
  931. } else {
  932. map_of_struct_ = NULL;
  933. }
  934. if (from.has_map_of_struct_value()) {
  935. map_of_struct_value_ = new ::google::protobuf::testing::MapOfStruct(*from.map_of_struct_value_);
  936. } else {
  937. map_of_struct_value_ = NULL;
  938. }
  939. if (from.has_map_of_listvalue()) {
  940. map_of_listvalue_ = new ::google::protobuf::testing::MapOfStruct(*from.map_of_listvalue_);
  941. } else {
  942. map_of_listvalue_ = NULL;
  943. }
  944. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.StructTestCases)
  945. }
  946. void StructTestCases::SharedCtor() {
  947. ::memset(&empty_value_, 0, static_cast<size_t>(
  948. reinterpret_cast<char*>(&map_of_listvalue_) -
  949. reinterpret_cast<char*>(&empty_value_)) + sizeof(map_of_listvalue_));
  950. }
  951. StructTestCases::~StructTestCases() {
  952. // @@protoc_insertion_point(destructor:google.protobuf.testing.StructTestCases)
  953. SharedDtor();
  954. }
  955. void StructTestCases::SharedDtor() {
  956. if (this != internal_default_instance()) delete empty_value_;
  957. if (this != internal_default_instance()) delete empty_value2_;
  958. if (this != internal_default_instance()) delete null_value_;
  959. if (this != internal_default_instance()) delete simple_struct_;
  960. if (this != internal_default_instance()) delete longer_struct_;
  961. if (this != internal_default_instance()) delete struct_with_nested_struct_;
  962. if (this != internal_default_instance()) delete struct_with_nested_list_;
  963. if (this != internal_default_instance()) delete struct_with_list_of_nulls_;
  964. if (this != internal_default_instance()) delete struct_with_list_of_lists_;
  965. if (this != internal_default_instance()) delete struct_with_list_of_structs_;
  966. if (this != internal_default_instance()) delete struct_with_empty_list_;
  967. if (this != internal_default_instance()) delete struct_with_list_with_empty_struct_;
  968. if (this != internal_default_instance()) delete top_level_struct_;
  969. if (this != internal_default_instance()) delete top_level_struct_with_empty_list_;
  970. if (this != internal_default_instance()) delete top_level_struct_with_list_with_empty_struct_;
  971. if (this != internal_default_instance()) delete value_wrapper_simple_;
  972. if (this != internal_default_instance()) delete value_wrapper_with_struct_;
  973. if (this != internal_default_instance()) delete value_wrapper_with_list_;
  974. if (this != internal_default_instance()) delete value_wrapper_with_empty_list_;
  975. if (this != internal_default_instance()) delete value_wrapper_with_list_with_empty_struct_;
  976. if (this != internal_default_instance()) delete list_value_wrapper_;
  977. if (this != internal_default_instance()) delete list_value_wrapper_with_empty_list_;
  978. if (this != internal_default_instance()) delete list_value_wrapper_with_list_with_empty_struct_;
  979. if (this != internal_default_instance()) delete top_level_value_simple_;
  980. if (this != internal_default_instance()) delete top_level_value_with_struct_;
  981. if (this != internal_default_instance()) delete top_level_value_with_list_;
  982. if (this != internal_default_instance()) delete top_level_value_with_empty_list_;
  983. if (this != internal_default_instance()) delete top_level_value_with_list_with_empty_struct_;
  984. if (this != internal_default_instance()) delete top_level_listvalue_;
  985. if (this != internal_default_instance()) delete top_level_empty_listvalue_;
  986. if (this != internal_default_instance()) delete top_level_listvalue_with_empty_struct_;
  987. if (this != internal_default_instance()) delete repeated_value_;
  988. if (this != internal_default_instance()) delete repeated_value_nested_list_;
  989. if (this != internal_default_instance()) delete repeated_value_nested_list2_;
  990. if (this != internal_default_instance()) delete repeated_value_nested_list3_;
  991. if (this != internal_default_instance()) delete repeated_listvalue_;
  992. if (this != internal_default_instance()) delete map_of_struct_;
  993. if (this != internal_default_instance()) delete map_of_struct_value_;
  994. if (this != internal_default_instance()) delete map_of_listvalue_;
  995. }
  996. void StructTestCases::SetCachedSize(int size) const {
  997. _cached_size_.Set(size);
  998. }
  999. const ::google::protobuf::Descriptor* StructTestCases::descriptor() {
  1000. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  1001. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1002. }
  1003. const StructTestCases& StructTestCases::default_instance() {
  1004. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructTestCases.base);
  1005. return *internal_default_instance();
  1006. }
  1007. void StructTestCases::Clear() {
  1008. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.StructTestCases)
  1009. ::google::protobuf::uint32 cached_has_bits = 0;
  1010. // Prevent compiler warnings about cached_has_bits being unused
  1011. (void) cached_has_bits;
  1012. if (GetArenaNoVirtual() == NULL && empty_value_ != NULL) {
  1013. delete empty_value_;
  1014. }
  1015. empty_value_ = NULL;
  1016. if (GetArenaNoVirtual() == NULL && empty_value2_ != NULL) {
  1017. delete empty_value2_;
  1018. }
  1019. empty_value2_ = NULL;
  1020. if (GetArenaNoVirtual() == NULL && null_value_ != NULL) {
  1021. delete null_value_;
  1022. }
  1023. null_value_ = NULL;
  1024. if (GetArenaNoVirtual() == NULL && simple_struct_ != NULL) {
  1025. delete simple_struct_;
  1026. }
  1027. simple_struct_ = NULL;
  1028. if (GetArenaNoVirtual() == NULL && longer_struct_ != NULL) {
  1029. delete longer_struct_;
  1030. }
  1031. longer_struct_ = NULL;
  1032. if (GetArenaNoVirtual() == NULL && struct_with_nested_struct_ != NULL) {
  1033. delete struct_with_nested_struct_;
  1034. }
  1035. struct_with_nested_struct_ = NULL;
  1036. if (GetArenaNoVirtual() == NULL && struct_with_nested_list_ != NULL) {
  1037. delete struct_with_nested_list_;
  1038. }
  1039. struct_with_nested_list_ = NULL;
  1040. if (GetArenaNoVirtual() == NULL && struct_with_list_of_nulls_ != NULL) {
  1041. delete struct_with_list_of_nulls_;
  1042. }
  1043. struct_with_list_of_nulls_ = NULL;
  1044. if (GetArenaNoVirtual() == NULL && struct_with_list_of_lists_ != NULL) {
  1045. delete struct_with_list_of_lists_;
  1046. }
  1047. struct_with_list_of_lists_ = NULL;
  1048. if (GetArenaNoVirtual() == NULL && struct_with_list_of_structs_ != NULL) {
  1049. delete struct_with_list_of_structs_;
  1050. }
  1051. struct_with_list_of_structs_ = NULL;
  1052. if (GetArenaNoVirtual() == NULL && struct_with_empty_list_ != NULL) {
  1053. delete struct_with_empty_list_;
  1054. }
  1055. struct_with_empty_list_ = NULL;
  1056. if (GetArenaNoVirtual() == NULL && struct_with_list_with_empty_struct_ != NULL) {
  1057. delete struct_with_list_with_empty_struct_;
  1058. }
  1059. struct_with_list_with_empty_struct_ = NULL;
  1060. if (GetArenaNoVirtual() == NULL && top_level_struct_ != NULL) {
  1061. delete top_level_struct_;
  1062. }
  1063. top_level_struct_ = NULL;
  1064. if (GetArenaNoVirtual() == NULL && top_level_struct_with_empty_list_ != NULL) {
  1065. delete top_level_struct_with_empty_list_;
  1066. }
  1067. top_level_struct_with_empty_list_ = NULL;
  1068. if (GetArenaNoVirtual() == NULL && top_level_struct_with_list_with_empty_struct_ != NULL) {
  1069. delete top_level_struct_with_list_with_empty_struct_;
  1070. }
  1071. top_level_struct_with_list_with_empty_struct_ = NULL;
  1072. if (GetArenaNoVirtual() == NULL && value_wrapper_simple_ != NULL) {
  1073. delete value_wrapper_simple_;
  1074. }
  1075. value_wrapper_simple_ = NULL;
  1076. if (GetArenaNoVirtual() == NULL && value_wrapper_with_struct_ != NULL) {
  1077. delete value_wrapper_with_struct_;
  1078. }
  1079. value_wrapper_with_struct_ = NULL;
  1080. if (GetArenaNoVirtual() == NULL && value_wrapper_with_list_ != NULL) {
  1081. delete value_wrapper_with_list_;
  1082. }
  1083. value_wrapper_with_list_ = NULL;
  1084. if (GetArenaNoVirtual() == NULL && value_wrapper_with_empty_list_ != NULL) {
  1085. delete value_wrapper_with_empty_list_;
  1086. }
  1087. value_wrapper_with_empty_list_ = NULL;
  1088. if (GetArenaNoVirtual() == NULL && value_wrapper_with_list_with_empty_struct_ != NULL) {
  1089. delete value_wrapper_with_list_with_empty_struct_;
  1090. }
  1091. value_wrapper_with_list_with_empty_struct_ = NULL;
  1092. if (GetArenaNoVirtual() == NULL && list_value_wrapper_ != NULL) {
  1093. delete list_value_wrapper_;
  1094. }
  1095. list_value_wrapper_ = NULL;
  1096. if (GetArenaNoVirtual() == NULL && list_value_wrapper_with_empty_list_ != NULL) {
  1097. delete list_value_wrapper_with_empty_list_;
  1098. }
  1099. list_value_wrapper_with_empty_list_ = NULL;
  1100. if (GetArenaNoVirtual() == NULL && list_value_wrapper_with_list_with_empty_struct_ != NULL) {
  1101. delete list_value_wrapper_with_list_with_empty_struct_;
  1102. }
  1103. list_value_wrapper_with_list_with_empty_struct_ = NULL;
  1104. if (GetArenaNoVirtual() == NULL && top_level_value_simple_ != NULL) {
  1105. delete top_level_value_simple_;
  1106. }
  1107. top_level_value_simple_ = NULL;
  1108. if (GetArenaNoVirtual() == NULL && top_level_value_with_struct_ != NULL) {
  1109. delete top_level_value_with_struct_;
  1110. }
  1111. top_level_value_with_struct_ = NULL;
  1112. if (GetArenaNoVirtual() == NULL && top_level_value_with_list_ != NULL) {
  1113. delete top_level_value_with_list_;
  1114. }
  1115. top_level_value_with_list_ = NULL;
  1116. if (GetArenaNoVirtual() == NULL && top_level_value_with_empty_list_ != NULL) {
  1117. delete top_level_value_with_empty_list_;
  1118. }
  1119. top_level_value_with_empty_list_ = NULL;
  1120. if (GetArenaNoVirtual() == NULL && top_level_value_with_list_with_empty_struct_ != NULL) {
  1121. delete top_level_value_with_list_with_empty_struct_;
  1122. }
  1123. top_level_value_with_list_with_empty_struct_ = NULL;
  1124. if (GetArenaNoVirtual() == NULL && top_level_listvalue_ != NULL) {
  1125. delete top_level_listvalue_;
  1126. }
  1127. top_level_listvalue_ = NULL;
  1128. if (GetArenaNoVirtual() == NULL && top_level_empty_listvalue_ != NULL) {
  1129. delete top_level_empty_listvalue_;
  1130. }
  1131. top_level_empty_listvalue_ = NULL;
  1132. if (GetArenaNoVirtual() == NULL && top_level_listvalue_with_empty_struct_ != NULL) {
  1133. delete top_level_listvalue_with_empty_struct_;
  1134. }
  1135. top_level_listvalue_with_empty_struct_ = NULL;
  1136. if (GetArenaNoVirtual() == NULL && repeated_value_ != NULL) {
  1137. delete repeated_value_;
  1138. }
  1139. repeated_value_ = NULL;
  1140. if (GetArenaNoVirtual() == NULL && repeated_value_nested_list_ != NULL) {
  1141. delete repeated_value_nested_list_;
  1142. }
  1143. repeated_value_nested_list_ = NULL;
  1144. if (GetArenaNoVirtual() == NULL && repeated_value_nested_list2_ != NULL) {
  1145. delete repeated_value_nested_list2_;
  1146. }
  1147. repeated_value_nested_list2_ = NULL;
  1148. if (GetArenaNoVirtual() == NULL && repeated_value_nested_list3_ != NULL) {
  1149. delete repeated_value_nested_list3_;
  1150. }
  1151. repeated_value_nested_list3_ = NULL;
  1152. if (GetArenaNoVirtual() == NULL && repeated_listvalue_ != NULL) {
  1153. delete repeated_listvalue_;
  1154. }
  1155. repeated_listvalue_ = NULL;
  1156. if (GetArenaNoVirtual() == NULL && map_of_struct_ != NULL) {
  1157. delete map_of_struct_;
  1158. }
  1159. map_of_struct_ = NULL;
  1160. if (GetArenaNoVirtual() == NULL && map_of_struct_value_ != NULL) {
  1161. delete map_of_struct_value_;
  1162. }
  1163. map_of_struct_value_ = NULL;
  1164. if (GetArenaNoVirtual() == NULL && map_of_listvalue_ != NULL) {
  1165. delete map_of_listvalue_;
  1166. }
  1167. map_of_listvalue_ = NULL;
  1168. _internal_metadata_.Clear();
  1169. }
  1170. bool StructTestCases::MergePartialFromCodedStream(
  1171. ::google::protobuf::io::CodedInputStream* input) {
  1172. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1173. ::google::protobuf::uint32 tag;
  1174. // @@protoc_insertion_point(parse_start:google.protobuf.testing.StructTestCases)
  1175. for (;;) {
  1176. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  1177. tag = p.first;
  1178. if (!p.second) goto handle_unusual;
  1179. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1180. // .google.protobuf.testing.StructWrapper empty_value = 1;
  1181. case 1: {
  1182. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1183. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1184. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1185. input, mutable_empty_value()));
  1186. } else {
  1187. goto handle_unusual;
  1188. }
  1189. break;
  1190. }
  1191. // .google.protobuf.testing.StructWrapper empty_value2 = 2;
  1192. case 2: {
  1193. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1194. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1195. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1196. input, mutable_empty_value2()));
  1197. } else {
  1198. goto handle_unusual;
  1199. }
  1200. break;
  1201. }
  1202. // .google.protobuf.testing.StructWrapper null_value = 3;
  1203. case 3: {
  1204. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1205. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1206. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1207. input, mutable_null_value()));
  1208. } else {
  1209. goto handle_unusual;
  1210. }
  1211. break;
  1212. }
  1213. // .google.protobuf.testing.StructWrapper simple_struct = 4;
  1214. case 4: {
  1215. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1216. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1217. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1218. input, mutable_simple_struct()));
  1219. } else {
  1220. goto handle_unusual;
  1221. }
  1222. break;
  1223. }
  1224. // .google.protobuf.testing.StructWrapper longer_struct = 5;
  1225. case 5: {
  1226. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1227. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  1228. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1229. input, mutable_longer_struct()));
  1230. } else {
  1231. goto handle_unusual;
  1232. }
  1233. break;
  1234. }
  1235. // .google.protobuf.testing.StructWrapper struct_with_nested_struct = 6;
  1236. case 6: {
  1237. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1238. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  1239. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1240. input, mutable_struct_with_nested_struct()));
  1241. } else {
  1242. goto handle_unusual;
  1243. }
  1244. break;
  1245. }
  1246. // .google.protobuf.testing.StructWrapper struct_with_nested_list = 7;
  1247. case 7: {
  1248. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1249. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  1250. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1251. input, mutable_struct_with_nested_list()));
  1252. } else {
  1253. goto handle_unusual;
  1254. }
  1255. break;
  1256. }
  1257. // .google.protobuf.testing.StructWrapper struct_with_list_of_nulls = 8;
  1258. case 8: {
  1259. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1260. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  1261. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1262. input, mutable_struct_with_list_of_nulls()));
  1263. } else {
  1264. goto handle_unusual;
  1265. }
  1266. break;
  1267. }
  1268. // .google.protobuf.testing.StructWrapper struct_with_list_of_lists = 9;
  1269. case 9: {
  1270. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1271. static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
  1272. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1273. input, mutable_struct_with_list_of_lists()));
  1274. } else {
  1275. goto handle_unusual;
  1276. }
  1277. break;
  1278. }
  1279. // .google.protobuf.testing.StructWrapper struct_with_list_of_structs = 10;
  1280. case 10: {
  1281. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1282. static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
  1283. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1284. input, mutable_struct_with_list_of_structs()));
  1285. } else {
  1286. goto handle_unusual;
  1287. }
  1288. break;
  1289. }
  1290. // .google.protobuf.testing.StructWrapper struct_with_empty_list = 11;
  1291. case 11: {
  1292. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1293. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  1294. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1295. input, mutable_struct_with_empty_list()));
  1296. } else {
  1297. goto handle_unusual;
  1298. }
  1299. break;
  1300. }
  1301. // .google.protobuf.testing.StructWrapper struct_with_list_with_empty_struct = 12;
  1302. case 12: {
  1303. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1304. static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
  1305. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1306. input, mutable_struct_with_list_with_empty_struct()));
  1307. } else {
  1308. goto handle_unusual;
  1309. }
  1310. break;
  1311. }
  1312. // .google.protobuf.Struct top_level_struct = 13;
  1313. case 13: {
  1314. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1315. static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
  1316. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1317. input, mutable_top_level_struct()));
  1318. } else {
  1319. goto handle_unusual;
  1320. }
  1321. break;
  1322. }
  1323. // .google.protobuf.Struct top_level_struct_with_empty_list = 14;
  1324. case 14: {
  1325. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1326. static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
  1327. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1328. input, mutable_top_level_struct_with_empty_list()));
  1329. } else {
  1330. goto handle_unusual;
  1331. }
  1332. break;
  1333. }
  1334. // .google.protobuf.Struct top_level_struct_with_list_with_empty_struct = 15;
  1335. case 15: {
  1336. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1337. static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
  1338. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1339. input, mutable_top_level_struct_with_list_with_empty_struct()));
  1340. } else {
  1341. goto handle_unusual;
  1342. }
  1343. break;
  1344. }
  1345. // .google.protobuf.testing.ValueWrapper value_wrapper_simple = 16;
  1346. case 16: {
  1347. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1348. static_cast< ::google::protobuf::uint8>(130u /* 130 & 0xFF */)) {
  1349. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1350. input, mutable_value_wrapper_simple()));
  1351. } else {
  1352. goto handle_unusual;
  1353. }
  1354. break;
  1355. }
  1356. // .google.protobuf.testing.ValueWrapper value_wrapper_with_struct = 17;
  1357. case 17: {
  1358. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1359. static_cast< ::google::protobuf::uint8>(138u /* 138 & 0xFF */)) {
  1360. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1361. input, mutable_value_wrapper_with_struct()));
  1362. } else {
  1363. goto handle_unusual;
  1364. }
  1365. break;
  1366. }
  1367. // .google.protobuf.testing.ValueWrapper value_wrapper_with_list = 18;
  1368. case 18: {
  1369. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1370. static_cast< ::google::protobuf::uint8>(146u /* 146 & 0xFF */)) {
  1371. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1372. input, mutable_value_wrapper_with_list()));
  1373. } else {
  1374. goto handle_unusual;
  1375. }
  1376. break;
  1377. }
  1378. // .google.protobuf.testing.ValueWrapper value_wrapper_with_empty_list = 19;
  1379. case 19: {
  1380. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1381. static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) {
  1382. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1383. input, mutable_value_wrapper_with_empty_list()));
  1384. } else {
  1385. goto handle_unusual;
  1386. }
  1387. break;
  1388. }
  1389. // .google.protobuf.testing.ValueWrapper value_wrapper_with_list_with_empty_struct = 20;
  1390. case 20: {
  1391. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1392. static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) {
  1393. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1394. input, mutable_value_wrapper_with_list_with_empty_struct()));
  1395. } else {
  1396. goto handle_unusual;
  1397. }
  1398. break;
  1399. }
  1400. // .google.protobuf.testing.ListValueWrapper list_value_wrapper = 21;
  1401. case 21: {
  1402. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1403. static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) {
  1404. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1405. input, mutable_list_value_wrapper()));
  1406. } else {
  1407. goto handle_unusual;
  1408. }
  1409. break;
  1410. }
  1411. // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_empty_list = 22;
  1412. case 22: {
  1413. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1414. static_cast< ::google::protobuf::uint8>(178u /* 178 & 0xFF */)) {
  1415. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1416. input, mutable_list_value_wrapper_with_empty_list()));
  1417. } else {
  1418. goto handle_unusual;
  1419. }
  1420. break;
  1421. }
  1422. // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_list_with_empty_struct = 23;
  1423. case 23: {
  1424. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1425. static_cast< ::google::protobuf::uint8>(186u /* 186 & 0xFF */)) {
  1426. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1427. input, mutable_list_value_wrapper_with_list_with_empty_struct()));
  1428. } else {
  1429. goto handle_unusual;
  1430. }
  1431. break;
  1432. }
  1433. // .google.protobuf.Value top_level_value_simple = 24;
  1434. case 24: {
  1435. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1436. static_cast< ::google::protobuf::uint8>(194u /* 194 & 0xFF */)) {
  1437. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1438. input, mutable_top_level_value_simple()));
  1439. } else {
  1440. goto handle_unusual;
  1441. }
  1442. break;
  1443. }
  1444. // .google.protobuf.Value top_level_value_with_struct = 25;
  1445. case 25: {
  1446. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1447. static_cast< ::google::protobuf::uint8>(202u /* 202 & 0xFF */)) {
  1448. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1449. input, mutable_top_level_value_with_struct()));
  1450. } else {
  1451. goto handle_unusual;
  1452. }
  1453. break;
  1454. }
  1455. // .google.protobuf.Value top_level_value_with_list = 26;
  1456. case 26: {
  1457. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1458. static_cast< ::google::protobuf::uint8>(210u /* 210 & 0xFF */)) {
  1459. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1460. input, mutable_top_level_value_with_list()));
  1461. } else {
  1462. goto handle_unusual;
  1463. }
  1464. break;
  1465. }
  1466. // .google.protobuf.Value top_level_value_with_empty_list = 27;
  1467. case 27: {
  1468. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1469. static_cast< ::google::protobuf::uint8>(218u /* 218 & 0xFF */)) {
  1470. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1471. input, mutable_top_level_value_with_empty_list()));
  1472. } else {
  1473. goto handle_unusual;
  1474. }
  1475. break;
  1476. }
  1477. // .google.protobuf.Value top_level_value_with_list_with_empty_struct = 28;
  1478. case 28: {
  1479. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1480. static_cast< ::google::protobuf::uint8>(226u /* 226 & 0xFF */)) {
  1481. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1482. input, mutable_top_level_value_with_list_with_empty_struct()));
  1483. } else {
  1484. goto handle_unusual;
  1485. }
  1486. break;
  1487. }
  1488. // .google.protobuf.ListValue top_level_listvalue = 29;
  1489. case 29: {
  1490. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1491. static_cast< ::google::protobuf::uint8>(234u /* 234 & 0xFF */)) {
  1492. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1493. input, mutable_top_level_listvalue()));
  1494. } else {
  1495. goto handle_unusual;
  1496. }
  1497. break;
  1498. }
  1499. // .google.protobuf.ListValue top_level_empty_listvalue = 30;
  1500. case 30: {
  1501. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1502. static_cast< ::google::protobuf::uint8>(242u /* 242 & 0xFF */)) {
  1503. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1504. input, mutable_top_level_empty_listvalue()));
  1505. } else {
  1506. goto handle_unusual;
  1507. }
  1508. break;
  1509. }
  1510. // .google.protobuf.ListValue top_level_listvalue_with_empty_struct = 31;
  1511. case 31: {
  1512. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1513. static_cast< ::google::protobuf::uint8>(250u /* 250 & 0xFF */)) {
  1514. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1515. input, mutable_top_level_listvalue_with_empty_struct()));
  1516. } else {
  1517. goto handle_unusual;
  1518. }
  1519. break;
  1520. }
  1521. // .google.protobuf.testing.RepeatedValueWrapper repeated_value = 32;
  1522. case 32: {
  1523. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1524. static_cast< ::google::protobuf::uint8>(2u /* 258 & 0xFF */)) {
  1525. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1526. input, mutable_repeated_value()));
  1527. } else {
  1528. goto handle_unusual;
  1529. }
  1530. break;
  1531. }
  1532. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list = 33;
  1533. case 33: {
  1534. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1535. static_cast< ::google::protobuf::uint8>(10u /* 266 & 0xFF */)) {
  1536. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1537. input, mutable_repeated_value_nested_list()));
  1538. } else {
  1539. goto handle_unusual;
  1540. }
  1541. break;
  1542. }
  1543. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list2 = 34;
  1544. case 34: {
  1545. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1546. static_cast< ::google::protobuf::uint8>(18u /* 274 & 0xFF */)) {
  1547. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1548. input, mutable_repeated_value_nested_list2()));
  1549. } else {
  1550. goto handle_unusual;
  1551. }
  1552. break;
  1553. }
  1554. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list3 = 35;
  1555. case 35: {
  1556. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1557. static_cast< ::google::protobuf::uint8>(26u /* 282 & 0xFF */)) {
  1558. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1559. input, mutable_repeated_value_nested_list3()));
  1560. } else {
  1561. goto handle_unusual;
  1562. }
  1563. break;
  1564. }
  1565. // .google.protobuf.testing.RepeatedListValueWrapper repeated_listvalue = 36;
  1566. case 36: {
  1567. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1568. static_cast< ::google::protobuf::uint8>(34u /* 290 & 0xFF */)) {
  1569. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1570. input, mutable_repeated_listvalue()));
  1571. } else {
  1572. goto handle_unusual;
  1573. }
  1574. break;
  1575. }
  1576. // .google.protobuf.testing.MapOfStruct map_of_struct = 37;
  1577. case 37: {
  1578. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1579. static_cast< ::google::protobuf::uint8>(42u /* 298 & 0xFF */)) {
  1580. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1581. input, mutable_map_of_struct()));
  1582. } else {
  1583. goto handle_unusual;
  1584. }
  1585. break;
  1586. }
  1587. // .google.protobuf.testing.MapOfStruct map_of_struct_value = 38;
  1588. case 38: {
  1589. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1590. static_cast< ::google::protobuf::uint8>(50u /* 306 & 0xFF */)) {
  1591. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1592. input, mutable_map_of_struct_value()));
  1593. } else {
  1594. goto handle_unusual;
  1595. }
  1596. break;
  1597. }
  1598. // .google.protobuf.testing.MapOfStruct map_of_listvalue = 39;
  1599. case 39: {
  1600. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1601. static_cast< ::google::protobuf::uint8>(58u /* 314 & 0xFF */)) {
  1602. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1603. input, mutable_map_of_listvalue()));
  1604. } else {
  1605. goto handle_unusual;
  1606. }
  1607. break;
  1608. }
  1609. default: {
  1610. handle_unusual:
  1611. if (tag == 0) {
  1612. goto success;
  1613. }
  1614. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1615. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1616. break;
  1617. }
  1618. }
  1619. }
  1620. success:
  1621. // @@protoc_insertion_point(parse_success:google.protobuf.testing.StructTestCases)
  1622. return true;
  1623. failure:
  1624. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.StructTestCases)
  1625. return false;
  1626. #undef DO_
  1627. }
  1628. void StructTestCases::SerializeWithCachedSizes(
  1629. ::google::protobuf::io::CodedOutputStream* output) const {
  1630. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.StructTestCases)
  1631. ::google::protobuf::uint32 cached_has_bits = 0;
  1632. (void) cached_has_bits;
  1633. // .google.protobuf.testing.StructWrapper empty_value = 1;
  1634. if (this->has_empty_value()) {
  1635. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1636. 1, this->_internal_empty_value(), output);
  1637. }
  1638. // .google.protobuf.testing.StructWrapper empty_value2 = 2;
  1639. if (this->has_empty_value2()) {
  1640. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1641. 2, this->_internal_empty_value2(), output);
  1642. }
  1643. // .google.protobuf.testing.StructWrapper null_value = 3;
  1644. if (this->has_null_value()) {
  1645. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1646. 3, this->_internal_null_value(), output);
  1647. }
  1648. // .google.protobuf.testing.StructWrapper simple_struct = 4;
  1649. if (this->has_simple_struct()) {
  1650. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1651. 4, this->_internal_simple_struct(), output);
  1652. }
  1653. // .google.protobuf.testing.StructWrapper longer_struct = 5;
  1654. if (this->has_longer_struct()) {
  1655. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1656. 5, this->_internal_longer_struct(), output);
  1657. }
  1658. // .google.protobuf.testing.StructWrapper struct_with_nested_struct = 6;
  1659. if (this->has_struct_with_nested_struct()) {
  1660. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1661. 6, this->_internal_struct_with_nested_struct(), output);
  1662. }
  1663. // .google.protobuf.testing.StructWrapper struct_with_nested_list = 7;
  1664. if (this->has_struct_with_nested_list()) {
  1665. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1666. 7, this->_internal_struct_with_nested_list(), output);
  1667. }
  1668. // .google.protobuf.testing.StructWrapper struct_with_list_of_nulls = 8;
  1669. if (this->has_struct_with_list_of_nulls()) {
  1670. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1671. 8, this->_internal_struct_with_list_of_nulls(), output);
  1672. }
  1673. // .google.protobuf.testing.StructWrapper struct_with_list_of_lists = 9;
  1674. if (this->has_struct_with_list_of_lists()) {
  1675. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1676. 9, this->_internal_struct_with_list_of_lists(), output);
  1677. }
  1678. // .google.protobuf.testing.StructWrapper struct_with_list_of_structs = 10;
  1679. if (this->has_struct_with_list_of_structs()) {
  1680. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1681. 10, this->_internal_struct_with_list_of_structs(), output);
  1682. }
  1683. // .google.protobuf.testing.StructWrapper struct_with_empty_list = 11;
  1684. if (this->has_struct_with_empty_list()) {
  1685. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1686. 11, this->_internal_struct_with_empty_list(), output);
  1687. }
  1688. // .google.protobuf.testing.StructWrapper struct_with_list_with_empty_struct = 12;
  1689. if (this->has_struct_with_list_with_empty_struct()) {
  1690. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1691. 12, this->_internal_struct_with_list_with_empty_struct(), output);
  1692. }
  1693. // .google.protobuf.Struct top_level_struct = 13;
  1694. if (this->has_top_level_struct()) {
  1695. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1696. 13, this->_internal_top_level_struct(), output);
  1697. }
  1698. // .google.protobuf.Struct top_level_struct_with_empty_list = 14;
  1699. if (this->has_top_level_struct_with_empty_list()) {
  1700. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1701. 14, this->_internal_top_level_struct_with_empty_list(), output);
  1702. }
  1703. // .google.protobuf.Struct top_level_struct_with_list_with_empty_struct = 15;
  1704. if (this->has_top_level_struct_with_list_with_empty_struct()) {
  1705. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1706. 15, this->_internal_top_level_struct_with_list_with_empty_struct(), output);
  1707. }
  1708. // .google.protobuf.testing.ValueWrapper value_wrapper_simple = 16;
  1709. if (this->has_value_wrapper_simple()) {
  1710. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1711. 16, this->_internal_value_wrapper_simple(), output);
  1712. }
  1713. // .google.protobuf.testing.ValueWrapper value_wrapper_with_struct = 17;
  1714. if (this->has_value_wrapper_with_struct()) {
  1715. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1716. 17, this->_internal_value_wrapper_with_struct(), output);
  1717. }
  1718. // .google.protobuf.testing.ValueWrapper value_wrapper_with_list = 18;
  1719. if (this->has_value_wrapper_with_list()) {
  1720. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1721. 18, this->_internal_value_wrapper_with_list(), output);
  1722. }
  1723. // .google.protobuf.testing.ValueWrapper value_wrapper_with_empty_list = 19;
  1724. if (this->has_value_wrapper_with_empty_list()) {
  1725. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1726. 19, this->_internal_value_wrapper_with_empty_list(), output);
  1727. }
  1728. // .google.protobuf.testing.ValueWrapper value_wrapper_with_list_with_empty_struct = 20;
  1729. if (this->has_value_wrapper_with_list_with_empty_struct()) {
  1730. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1731. 20, this->_internal_value_wrapper_with_list_with_empty_struct(), output);
  1732. }
  1733. // .google.protobuf.testing.ListValueWrapper list_value_wrapper = 21;
  1734. if (this->has_list_value_wrapper()) {
  1735. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1736. 21, this->_internal_list_value_wrapper(), output);
  1737. }
  1738. // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_empty_list = 22;
  1739. if (this->has_list_value_wrapper_with_empty_list()) {
  1740. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1741. 22, this->_internal_list_value_wrapper_with_empty_list(), output);
  1742. }
  1743. // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_list_with_empty_struct = 23;
  1744. if (this->has_list_value_wrapper_with_list_with_empty_struct()) {
  1745. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1746. 23, this->_internal_list_value_wrapper_with_list_with_empty_struct(), output);
  1747. }
  1748. // .google.protobuf.Value top_level_value_simple = 24;
  1749. if (this->has_top_level_value_simple()) {
  1750. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1751. 24, this->_internal_top_level_value_simple(), output);
  1752. }
  1753. // .google.protobuf.Value top_level_value_with_struct = 25;
  1754. if (this->has_top_level_value_with_struct()) {
  1755. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1756. 25, this->_internal_top_level_value_with_struct(), output);
  1757. }
  1758. // .google.protobuf.Value top_level_value_with_list = 26;
  1759. if (this->has_top_level_value_with_list()) {
  1760. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1761. 26, this->_internal_top_level_value_with_list(), output);
  1762. }
  1763. // .google.protobuf.Value top_level_value_with_empty_list = 27;
  1764. if (this->has_top_level_value_with_empty_list()) {
  1765. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1766. 27, this->_internal_top_level_value_with_empty_list(), output);
  1767. }
  1768. // .google.protobuf.Value top_level_value_with_list_with_empty_struct = 28;
  1769. if (this->has_top_level_value_with_list_with_empty_struct()) {
  1770. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1771. 28, this->_internal_top_level_value_with_list_with_empty_struct(), output);
  1772. }
  1773. // .google.protobuf.ListValue top_level_listvalue = 29;
  1774. if (this->has_top_level_listvalue()) {
  1775. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1776. 29, this->_internal_top_level_listvalue(), output);
  1777. }
  1778. // .google.protobuf.ListValue top_level_empty_listvalue = 30;
  1779. if (this->has_top_level_empty_listvalue()) {
  1780. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1781. 30, this->_internal_top_level_empty_listvalue(), output);
  1782. }
  1783. // .google.protobuf.ListValue top_level_listvalue_with_empty_struct = 31;
  1784. if (this->has_top_level_listvalue_with_empty_struct()) {
  1785. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1786. 31, this->_internal_top_level_listvalue_with_empty_struct(), output);
  1787. }
  1788. // .google.protobuf.testing.RepeatedValueWrapper repeated_value = 32;
  1789. if (this->has_repeated_value()) {
  1790. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1791. 32, this->_internal_repeated_value(), output);
  1792. }
  1793. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list = 33;
  1794. if (this->has_repeated_value_nested_list()) {
  1795. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1796. 33, this->_internal_repeated_value_nested_list(), output);
  1797. }
  1798. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list2 = 34;
  1799. if (this->has_repeated_value_nested_list2()) {
  1800. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1801. 34, this->_internal_repeated_value_nested_list2(), output);
  1802. }
  1803. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list3 = 35;
  1804. if (this->has_repeated_value_nested_list3()) {
  1805. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1806. 35, this->_internal_repeated_value_nested_list3(), output);
  1807. }
  1808. // .google.protobuf.testing.RepeatedListValueWrapper repeated_listvalue = 36;
  1809. if (this->has_repeated_listvalue()) {
  1810. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1811. 36, this->_internal_repeated_listvalue(), output);
  1812. }
  1813. // .google.protobuf.testing.MapOfStruct map_of_struct = 37;
  1814. if (this->has_map_of_struct()) {
  1815. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1816. 37, this->_internal_map_of_struct(), output);
  1817. }
  1818. // .google.protobuf.testing.MapOfStruct map_of_struct_value = 38;
  1819. if (this->has_map_of_struct_value()) {
  1820. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1821. 38, this->_internal_map_of_struct_value(), output);
  1822. }
  1823. // .google.protobuf.testing.MapOfStruct map_of_listvalue = 39;
  1824. if (this->has_map_of_listvalue()) {
  1825. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1826. 39, this->_internal_map_of_listvalue(), output);
  1827. }
  1828. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1829. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1830. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1831. }
  1832. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.StructTestCases)
  1833. }
  1834. ::google::protobuf::uint8* StructTestCases::InternalSerializeWithCachedSizesToArray(
  1835. bool deterministic, ::google::protobuf::uint8* target) const {
  1836. (void)deterministic; // Unused
  1837. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.StructTestCases)
  1838. ::google::protobuf::uint32 cached_has_bits = 0;
  1839. (void) cached_has_bits;
  1840. // .google.protobuf.testing.StructWrapper empty_value = 1;
  1841. if (this->has_empty_value()) {
  1842. target = ::google::protobuf::internal::WireFormatLite::
  1843. InternalWriteMessageToArray(
  1844. 1, this->_internal_empty_value(), deterministic, target);
  1845. }
  1846. // .google.protobuf.testing.StructWrapper empty_value2 = 2;
  1847. if (this->has_empty_value2()) {
  1848. target = ::google::protobuf::internal::WireFormatLite::
  1849. InternalWriteMessageToArray(
  1850. 2, this->_internal_empty_value2(), deterministic, target);
  1851. }
  1852. // .google.protobuf.testing.StructWrapper null_value = 3;
  1853. if (this->has_null_value()) {
  1854. target = ::google::protobuf::internal::WireFormatLite::
  1855. InternalWriteMessageToArray(
  1856. 3, this->_internal_null_value(), deterministic, target);
  1857. }
  1858. // .google.protobuf.testing.StructWrapper simple_struct = 4;
  1859. if (this->has_simple_struct()) {
  1860. target = ::google::protobuf::internal::WireFormatLite::
  1861. InternalWriteMessageToArray(
  1862. 4, this->_internal_simple_struct(), deterministic, target);
  1863. }
  1864. // .google.protobuf.testing.StructWrapper longer_struct = 5;
  1865. if (this->has_longer_struct()) {
  1866. target = ::google::protobuf::internal::WireFormatLite::
  1867. InternalWriteMessageToArray(
  1868. 5, this->_internal_longer_struct(), deterministic, target);
  1869. }
  1870. // .google.protobuf.testing.StructWrapper struct_with_nested_struct = 6;
  1871. if (this->has_struct_with_nested_struct()) {
  1872. target = ::google::protobuf::internal::WireFormatLite::
  1873. InternalWriteMessageToArray(
  1874. 6, this->_internal_struct_with_nested_struct(), deterministic, target);
  1875. }
  1876. // .google.protobuf.testing.StructWrapper struct_with_nested_list = 7;
  1877. if (this->has_struct_with_nested_list()) {
  1878. target = ::google::protobuf::internal::WireFormatLite::
  1879. InternalWriteMessageToArray(
  1880. 7, this->_internal_struct_with_nested_list(), deterministic, target);
  1881. }
  1882. // .google.protobuf.testing.StructWrapper struct_with_list_of_nulls = 8;
  1883. if (this->has_struct_with_list_of_nulls()) {
  1884. target = ::google::protobuf::internal::WireFormatLite::
  1885. InternalWriteMessageToArray(
  1886. 8, this->_internal_struct_with_list_of_nulls(), deterministic, target);
  1887. }
  1888. // .google.protobuf.testing.StructWrapper struct_with_list_of_lists = 9;
  1889. if (this->has_struct_with_list_of_lists()) {
  1890. target = ::google::protobuf::internal::WireFormatLite::
  1891. InternalWriteMessageToArray(
  1892. 9, this->_internal_struct_with_list_of_lists(), deterministic, target);
  1893. }
  1894. // .google.protobuf.testing.StructWrapper struct_with_list_of_structs = 10;
  1895. if (this->has_struct_with_list_of_structs()) {
  1896. target = ::google::protobuf::internal::WireFormatLite::
  1897. InternalWriteMessageToArray(
  1898. 10, this->_internal_struct_with_list_of_structs(), deterministic, target);
  1899. }
  1900. // .google.protobuf.testing.StructWrapper struct_with_empty_list = 11;
  1901. if (this->has_struct_with_empty_list()) {
  1902. target = ::google::protobuf::internal::WireFormatLite::
  1903. InternalWriteMessageToArray(
  1904. 11, this->_internal_struct_with_empty_list(), deterministic, target);
  1905. }
  1906. // .google.protobuf.testing.StructWrapper struct_with_list_with_empty_struct = 12;
  1907. if (this->has_struct_with_list_with_empty_struct()) {
  1908. target = ::google::protobuf::internal::WireFormatLite::
  1909. InternalWriteMessageToArray(
  1910. 12, this->_internal_struct_with_list_with_empty_struct(), deterministic, target);
  1911. }
  1912. // .google.protobuf.Struct top_level_struct = 13;
  1913. if (this->has_top_level_struct()) {
  1914. target = ::google::protobuf::internal::WireFormatLite::
  1915. InternalWriteMessageToArray(
  1916. 13, this->_internal_top_level_struct(), deterministic, target);
  1917. }
  1918. // .google.protobuf.Struct top_level_struct_with_empty_list = 14;
  1919. if (this->has_top_level_struct_with_empty_list()) {
  1920. target = ::google::protobuf::internal::WireFormatLite::
  1921. InternalWriteMessageToArray(
  1922. 14, this->_internal_top_level_struct_with_empty_list(), deterministic, target);
  1923. }
  1924. // .google.protobuf.Struct top_level_struct_with_list_with_empty_struct = 15;
  1925. if (this->has_top_level_struct_with_list_with_empty_struct()) {
  1926. target = ::google::protobuf::internal::WireFormatLite::
  1927. InternalWriteMessageToArray(
  1928. 15, this->_internal_top_level_struct_with_list_with_empty_struct(), deterministic, target);
  1929. }
  1930. // .google.protobuf.testing.ValueWrapper value_wrapper_simple = 16;
  1931. if (this->has_value_wrapper_simple()) {
  1932. target = ::google::protobuf::internal::WireFormatLite::
  1933. InternalWriteMessageToArray(
  1934. 16, this->_internal_value_wrapper_simple(), deterministic, target);
  1935. }
  1936. // .google.protobuf.testing.ValueWrapper value_wrapper_with_struct = 17;
  1937. if (this->has_value_wrapper_with_struct()) {
  1938. target = ::google::protobuf::internal::WireFormatLite::
  1939. InternalWriteMessageToArray(
  1940. 17, this->_internal_value_wrapper_with_struct(), deterministic, target);
  1941. }
  1942. // .google.protobuf.testing.ValueWrapper value_wrapper_with_list = 18;
  1943. if (this->has_value_wrapper_with_list()) {
  1944. target = ::google::protobuf::internal::WireFormatLite::
  1945. InternalWriteMessageToArray(
  1946. 18, this->_internal_value_wrapper_with_list(), deterministic, target);
  1947. }
  1948. // .google.protobuf.testing.ValueWrapper value_wrapper_with_empty_list = 19;
  1949. if (this->has_value_wrapper_with_empty_list()) {
  1950. target = ::google::protobuf::internal::WireFormatLite::
  1951. InternalWriteMessageToArray(
  1952. 19, this->_internal_value_wrapper_with_empty_list(), deterministic, target);
  1953. }
  1954. // .google.protobuf.testing.ValueWrapper value_wrapper_with_list_with_empty_struct = 20;
  1955. if (this->has_value_wrapper_with_list_with_empty_struct()) {
  1956. target = ::google::protobuf::internal::WireFormatLite::
  1957. InternalWriteMessageToArray(
  1958. 20, this->_internal_value_wrapper_with_list_with_empty_struct(), deterministic, target);
  1959. }
  1960. // .google.protobuf.testing.ListValueWrapper list_value_wrapper = 21;
  1961. if (this->has_list_value_wrapper()) {
  1962. target = ::google::protobuf::internal::WireFormatLite::
  1963. InternalWriteMessageToArray(
  1964. 21, this->_internal_list_value_wrapper(), deterministic, target);
  1965. }
  1966. // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_empty_list = 22;
  1967. if (this->has_list_value_wrapper_with_empty_list()) {
  1968. target = ::google::protobuf::internal::WireFormatLite::
  1969. InternalWriteMessageToArray(
  1970. 22, this->_internal_list_value_wrapper_with_empty_list(), deterministic, target);
  1971. }
  1972. // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_list_with_empty_struct = 23;
  1973. if (this->has_list_value_wrapper_with_list_with_empty_struct()) {
  1974. target = ::google::protobuf::internal::WireFormatLite::
  1975. InternalWriteMessageToArray(
  1976. 23, this->_internal_list_value_wrapper_with_list_with_empty_struct(), deterministic, target);
  1977. }
  1978. // .google.protobuf.Value top_level_value_simple = 24;
  1979. if (this->has_top_level_value_simple()) {
  1980. target = ::google::protobuf::internal::WireFormatLite::
  1981. InternalWriteMessageToArray(
  1982. 24, this->_internal_top_level_value_simple(), deterministic, target);
  1983. }
  1984. // .google.protobuf.Value top_level_value_with_struct = 25;
  1985. if (this->has_top_level_value_with_struct()) {
  1986. target = ::google::protobuf::internal::WireFormatLite::
  1987. InternalWriteMessageToArray(
  1988. 25, this->_internal_top_level_value_with_struct(), deterministic, target);
  1989. }
  1990. // .google.protobuf.Value top_level_value_with_list = 26;
  1991. if (this->has_top_level_value_with_list()) {
  1992. target = ::google::protobuf::internal::WireFormatLite::
  1993. InternalWriteMessageToArray(
  1994. 26, this->_internal_top_level_value_with_list(), deterministic, target);
  1995. }
  1996. // .google.protobuf.Value top_level_value_with_empty_list = 27;
  1997. if (this->has_top_level_value_with_empty_list()) {
  1998. target = ::google::protobuf::internal::WireFormatLite::
  1999. InternalWriteMessageToArray(
  2000. 27, this->_internal_top_level_value_with_empty_list(), deterministic, target);
  2001. }
  2002. // .google.protobuf.Value top_level_value_with_list_with_empty_struct = 28;
  2003. if (this->has_top_level_value_with_list_with_empty_struct()) {
  2004. target = ::google::protobuf::internal::WireFormatLite::
  2005. InternalWriteMessageToArray(
  2006. 28, this->_internal_top_level_value_with_list_with_empty_struct(), deterministic, target);
  2007. }
  2008. // .google.protobuf.ListValue top_level_listvalue = 29;
  2009. if (this->has_top_level_listvalue()) {
  2010. target = ::google::protobuf::internal::WireFormatLite::
  2011. InternalWriteMessageToArray(
  2012. 29, this->_internal_top_level_listvalue(), deterministic, target);
  2013. }
  2014. // .google.protobuf.ListValue top_level_empty_listvalue = 30;
  2015. if (this->has_top_level_empty_listvalue()) {
  2016. target = ::google::protobuf::internal::WireFormatLite::
  2017. InternalWriteMessageToArray(
  2018. 30, this->_internal_top_level_empty_listvalue(), deterministic, target);
  2019. }
  2020. // .google.protobuf.ListValue top_level_listvalue_with_empty_struct = 31;
  2021. if (this->has_top_level_listvalue_with_empty_struct()) {
  2022. target = ::google::protobuf::internal::WireFormatLite::
  2023. InternalWriteMessageToArray(
  2024. 31, this->_internal_top_level_listvalue_with_empty_struct(), deterministic, target);
  2025. }
  2026. // .google.protobuf.testing.RepeatedValueWrapper repeated_value = 32;
  2027. if (this->has_repeated_value()) {
  2028. target = ::google::protobuf::internal::WireFormatLite::
  2029. InternalWriteMessageToArray(
  2030. 32, this->_internal_repeated_value(), deterministic, target);
  2031. }
  2032. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list = 33;
  2033. if (this->has_repeated_value_nested_list()) {
  2034. target = ::google::protobuf::internal::WireFormatLite::
  2035. InternalWriteMessageToArray(
  2036. 33, this->_internal_repeated_value_nested_list(), deterministic, target);
  2037. }
  2038. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list2 = 34;
  2039. if (this->has_repeated_value_nested_list2()) {
  2040. target = ::google::protobuf::internal::WireFormatLite::
  2041. InternalWriteMessageToArray(
  2042. 34, this->_internal_repeated_value_nested_list2(), deterministic, target);
  2043. }
  2044. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list3 = 35;
  2045. if (this->has_repeated_value_nested_list3()) {
  2046. target = ::google::protobuf::internal::WireFormatLite::
  2047. InternalWriteMessageToArray(
  2048. 35, this->_internal_repeated_value_nested_list3(), deterministic, target);
  2049. }
  2050. // .google.protobuf.testing.RepeatedListValueWrapper repeated_listvalue = 36;
  2051. if (this->has_repeated_listvalue()) {
  2052. target = ::google::protobuf::internal::WireFormatLite::
  2053. InternalWriteMessageToArray(
  2054. 36, this->_internal_repeated_listvalue(), deterministic, target);
  2055. }
  2056. // .google.protobuf.testing.MapOfStruct map_of_struct = 37;
  2057. if (this->has_map_of_struct()) {
  2058. target = ::google::protobuf::internal::WireFormatLite::
  2059. InternalWriteMessageToArray(
  2060. 37, this->_internal_map_of_struct(), deterministic, target);
  2061. }
  2062. // .google.protobuf.testing.MapOfStruct map_of_struct_value = 38;
  2063. if (this->has_map_of_struct_value()) {
  2064. target = ::google::protobuf::internal::WireFormatLite::
  2065. InternalWriteMessageToArray(
  2066. 38, this->_internal_map_of_struct_value(), deterministic, target);
  2067. }
  2068. // .google.protobuf.testing.MapOfStruct map_of_listvalue = 39;
  2069. if (this->has_map_of_listvalue()) {
  2070. target = ::google::protobuf::internal::WireFormatLite::
  2071. InternalWriteMessageToArray(
  2072. 39, this->_internal_map_of_listvalue(), deterministic, target);
  2073. }
  2074. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2075. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2076. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2077. }
  2078. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.StructTestCases)
  2079. return target;
  2080. }
  2081. size_t StructTestCases::ByteSizeLong() const {
  2082. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.StructTestCases)
  2083. size_t total_size = 0;
  2084. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2085. total_size +=
  2086. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2087. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2088. }
  2089. // .google.protobuf.testing.StructWrapper empty_value = 1;
  2090. if (this->has_empty_value()) {
  2091. total_size += 1 +
  2092. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2093. *empty_value_);
  2094. }
  2095. // .google.protobuf.testing.StructWrapper empty_value2 = 2;
  2096. if (this->has_empty_value2()) {
  2097. total_size += 1 +
  2098. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2099. *empty_value2_);
  2100. }
  2101. // .google.protobuf.testing.StructWrapper null_value = 3;
  2102. if (this->has_null_value()) {
  2103. total_size += 1 +
  2104. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2105. *null_value_);
  2106. }
  2107. // .google.protobuf.testing.StructWrapper simple_struct = 4;
  2108. if (this->has_simple_struct()) {
  2109. total_size += 1 +
  2110. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2111. *simple_struct_);
  2112. }
  2113. // .google.protobuf.testing.StructWrapper longer_struct = 5;
  2114. if (this->has_longer_struct()) {
  2115. total_size += 1 +
  2116. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2117. *longer_struct_);
  2118. }
  2119. // .google.protobuf.testing.StructWrapper struct_with_nested_struct = 6;
  2120. if (this->has_struct_with_nested_struct()) {
  2121. total_size += 1 +
  2122. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2123. *struct_with_nested_struct_);
  2124. }
  2125. // .google.protobuf.testing.StructWrapper struct_with_nested_list = 7;
  2126. if (this->has_struct_with_nested_list()) {
  2127. total_size += 1 +
  2128. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2129. *struct_with_nested_list_);
  2130. }
  2131. // .google.protobuf.testing.StructWrapper struct_with_list_of_nulls = 8;
  2132. if (this->has_struct_with_list_of_nulls()) {
  2133. total_size += 1 +
  2134. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2135. *struct_with_list_of_nulls_);
  2136. }
  2137. // .google.protobuf.testing.StructWrapper struct_with_list_of_lists = 9;
  2138. if (this->has_struct_with_list_of_lists()) {
  2139. total_size += 1 +
  2140. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2141. *struct_with_list_of_lists_);
  2142. }
  2143. // .google.protobuf.testing.StructWrapper struct_with_list_of_structs = 10;
  2144. if (this->has_struct_with_list_of_structs()) {
  2145. total_size += 1 +
  2146. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2147. *struct_with_list_of_structs_);
  2148. }
  2149. // .google.protobuf.testing.StructWrapper struct_with_empty_list = 11;
  2150. if (this->has_struct_with_empty_list()) {
  2151. total_size += 1 +
  2152. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2153. *struct_with_empty_list_);
  2154. }
  2155. // .google.protobuf.testing.StructWrapper struct_with_list_with_empty_struct = 12;
  2156. if (this->has_struct_with_list_with_empty_struct()) {
  2157. total_size += 1 +
  2158. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2159. *struct_with_list_with_empty_struct_);
  2160. }
  2161. // .google.protobuf.Struct top_level_struct = 13;
  2162. if (this->has_top_level_struct()) {
  2163. total_size += 1 +
  2164. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2165. *top_level_struct_);
  2166. }
  2167. // .google.protobuf.Struct top_level_struct_with_empty_list = 14;
  2168. if (this->has_top_level_struct_with_empty_list()) {
  2169. total_size += 1 +
  2170. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2171. *top_level_struct_with_empty_list_);
  2172. }
  2173. // .google.protobuf.Struct top_level_struct_with_list_with_empty_struct = 15;
  2174. if (this->has_top_level_struct_with_list_with_empty_struct()) {
  2175. total_size += 1 +
  2176. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2177. *top_level_struct_with_list_with_empty_struct_);
  2178. }
  2179. // .google.protobuf.testing.ValueWrapper value_wrapper_simple = 16;
  2180. if (this->has_value_wrapper_simple()) {
  2181. total_size += 2 +
  2182. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2183. *value_wrapper_simple_);
  2184. }
  2185. // .google.protobuf.testing.ValueWrapper value_wrapper_with_struct = 17;
  2186. if (this->has_value_wrapper_with_struct()) {
  2187. total_size += 2 +
  2188. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2189. *value_wrapper_with_struct_);
  2190. }
  2191. // .google.protobuf.testing.ValueWrapper value_wrapper_with_list = 18;
  2192. if (this->has_value_wrapper_with_list()) {
  2193. total_size += 2 +
  2194. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2195. *value_wrapper_with_list_);
  2196. }
  2197. // .google.protobuf.testing.ValueWrapper value_wrapper_with_empty_list = 19;
  2198. if (this->has_value_wrapper_with_empty_list()) {
  2199. total_size += 2 +
  2200. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2201. *value_wrapper_with_empty_list_);
  2202. }
  2203. // .google.protobuf.testing.ValueWrapper value_wrapper_with_list_with_empty_struct = 20;
  2204. if (this->has_value_wrapper_with_list_with_empty_struct()) {
  2205. total_size += 2 +
  2206. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2207. *value_wrapper_with_list_with_empty_struct_);
  2208. }
  2209. // .google.protobuf.testing.ListValueWrapper list_value_wrapper = 21;
  2210. if (this->has_list_value_wrapper()) {
  2211. total_size += 2 +
  2212. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2213. *list_value_wrapper_);
  2214. }
  2215. // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_empty_list = 22;
  2216. if (this->has_list_value_wrapper_with_empty_list()) {
  2217. total_size += 2 +
  2218. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2219. *list_value_wrapper_with_empty_list_);
  2220. }
  2221. // .google.protobuf.testing.ListValueWrapper list_value_wrapper_with_list_with_empty_struct = 23;
  2222. if (this->has_list_value_wrapper_with_list_with_empty_struct()) {
  2223. total_size += 2 +
  2224. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2225. *list_value_wrapper_with_list_with_empty_struct_);
  2226. }
  2227. // .google.protobuf.Value top_level_value_simple = 24;
  2228. if (this->has_top_level_value_simple()) {
  2229. total_size += 2 +
  2230. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2231. *top_level_value_simple_);
  2232. }
  2233. // .google.protobuf.Value top_level_value_with_struct = 25;
  2234. if (this->has_top_level_value_with_struct()) {
  2235. total_size += 2 +
  2236. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2237. *top_level_value_with_struct_);
  2238. }
  2239. // .google.protobuf.Value top_level_value_with_list = 26;
  2240. if (this->has_top_level_value_with_list()) {
  2241. total_size += 2 +
  2242. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2243. *top_level_value_with_list_);
  2244. }
  2245. // .google.protobuf.Value top_level_value_with_empty_list = 27;
  2246. if (this->has_top_level_value_with_empty_list()) {
  2247. total_size += 2 +
  2248. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2249. *top_level_value_with_empty_list_);
  2250. }
  2251. // .google.protobuf.Value top_level_value_with_list_with_empty_struct = 28;
  2252. if (this->has_top_level_value_with_list_with_empty_struct()) {
  2253. total_size += 2 +
  2254. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2255. *top_level_value_with_list_with_empty_struct_);
  2256. }
  2257. // .google.protobuf.ListValue top_level_listvalue = 29;
  2258. if (this->has_top_level_listvalue()) {
  2259. total_size += 2 +
  2260. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2261. *top_level_listvalue_);
  2262. }
  2263. // .google.protobuf.ListValue top_level_empty_listvalue = 30;
  2264. if (this->has_top_level_empty_listvalue()) {
  2265. total_size += 2 +
  2266. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2267. *top_level_empty_listvalue_);
  2268. }
  2269. // .google.protobuf.ListValue top_level_listvalue_with_empty_struct = 31;
  2270. if (this->has_top_level_listvalue_with_empty_struct()) {
  2271. total_size += 2 +
  2272. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2273. *top_level_listvalue_with_empty_struct_);
  2274. }
  2275. // .google.protobuf.testing.RepeatedValueWrapper repeated_value = 32;
  2276. if (this->has_repeated_value()) {
  2277. total_size += 2 +
  2278. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2279. *repeated_value_);
  2280. }
  2281. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list = 33;
  2282. if (this->has_repeated_value_nested_list()) {
  2283. total_size += 2 +
  2284. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2285. *repeated_value_nested_list_);
  2286. }
  2287. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list2 = 34;
  2288. if (this->has_repeated_value_nested_list2()) {
  2289. total_size += 2 +
  2290. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2291. *repeated_value_nested_list2_);
  2292. }
  2293. // .google.protobuf.testing.RepeatedValueWrapper repeated_value_nested_list3 = 35;
  2294. if (this->has_repeated_value_nested_list3()) {
  2295. total_size += 2 +
  2296. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2297. *repeated_value_nested_list3_);
  2298. }
  2299. // .google.protobuf.testing.RepeatedListValueWrapper repeated_listvalue = 36;
  2300. if (this->has_repeated_listvalue()) {
  2301. total_size += 2 +
  2302. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2303. *repeated_listvalue_);
  2304. }
  2305. // .google.protobuf.testing.MapOfStruct map_of_struct = 37;
  2306. if (this->has_map_of_struct()) {
  2307. total_size += 2 +
  2308. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2309. *map_of_struct_);
  2310. }
  2311. // .google.protobuf.testing.MapOfStruct map_of_struct_value = 38;
  2312. if (this->has_map_of_struct_value()) {
  2313. total_size += 2 +
  2314. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2315. *map_of_struct_value_);
  2316. }
  2317. // .google.protobuf.testing.MapOfStruct map_of_listvalue = 39;
  2318. if (this->has_map_of_listvalue()) {
  2319. total_size += 2 +
  2320. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2321. *map_of_listvalue_);
  2322. }
  2323. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2324. SetCachedSize(cached_size);
  2325. return total_size;
  2326. }
  2327. void StructTestCases::MergeFrom(const ::google::protobuf::Message& from) {
  2328. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.StructTestCases)
  2329. GOOGLE_DCHECK_NE(&from, this);
  2330. const StructTestCases* source =
  2331. ::google::protobuf::internal::DynamicCastToGenerated<const StructTestCases>(
  2332. &from);
  2333. if (source == NULL) {
  2334. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.StructTestCases)
  2335. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2336. } else {
  2337. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.StructTestCases)
  2338. MergeFrom(*source);
  2339. }
  2340. }
  2341. void StructTestCases::MergeFrom(const StructTestCases& from) {
  2342. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.StructTestCases)
  2343. GOOGLE_DCHECK_NE(&from, this);
  2344. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2345. ::google::protobuf::uint32 cached_has_bits = 0;
  2346. (void) cached_has_bits;
  2347. if (from.has_empty_value()) {
  2348. mutable_empty_value()->::google::protobuf::testing::StructWrapper::MergeFrom(from.empty_value());
  2349. }
  2350. if (from.has_empty_value2()) {
  2351. mutable_empty_value2()->::google::protobuf::testing::StructWrapper::MergeFrom(from.empty_value2());
  2352. }
  2353. if (from.has_null_value()) {
  2354. mutable_null_value()->::google::protobuf::testing::StructWrapper::MergeFrom(from.null_value());
  2355. }
  2356. if (from.has_simple_struct()) {
  2357. mutable_simple_struct()->::google::protobuf::testing::StructWrapper::MergeFrom(from.simple_struct());
  2358. }
  2359. if (from.has_longer_struct()) {
  2360. mutable_longer_struct()->::google::protobuf::testing::StructWrapper::MergeFrom(from.longer_struct());
  2361. }
  2362. if (from.has_struct_with_nested_struct()) {
  2363. mutable_struct_with_nested_struct()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_nested_struct());
  2364. }
  2365. if (from.has_struct_with_nested_list()) {
  2366. mutable_struct_with_nested_list()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_nested_list());
  2367. }
  2368. if (from.has_struct_with_list_of_nulls()) {
  2369. mutable_struct_with_list_of_nulls()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_list_of_nulls());
  2370. }
  2371. if (from.has_struct_with_list_of_lists()) {
  2372. mutable_struct_with_list_of_lists()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_list_of_lists());
  2373. }
  2374. if (from.has_struct_with_list_of_structs()) {
  2375. mutable_struct_with_list_of_structs()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_list_of_structs());
  2376. }
  2377. if (from.has_struct_with_empty_list()) {
  2378. mutable_struct_with_empty_list()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_empty_list());
  2379. }
  2380. if (from.has_struct_with_list_with_empty_struct()) {
  2381. mutable_struct_with_list_with_empty_struct()->::google::protobuf::testing::StructWrapper::MergeFrom(from.struct_with_list_with_empty_struct());
  2382. }
  2383. if (from.has_top_level_struct()) {
  2384. mutable_top_level_struct()->::google::protobuf::Struct::MergeFrom(from.top_level_struct());
  2385. }
  2386. if (from.has_top_level_struct_with_empty_list()) {
  2387. mutable_top_level_struct_with_empty_list()->::google::protobuf::Struct::MergeFrom(from.top_level_struct_with_empty_list());
  2388. }
  2389. if (from.has_top_level_struct_with_list_with_empty_struct()) {
  2390. mutable_top_level_struct_with_list_with_empty_struct()->::google::protobuf::Struct::MergeFrom(from.top_level_struct_with_list_with_empty_struct());
  2391. }
  2392. if (from.has_value_wrapper_simple()) {
  2393. mutable_value_wrapper_simple()->::google::protobuf::testing::ValueWrapper::MergeFrom(from.value_wrapper_simple());
  2394. }
  2395. if (from.has_value_wrapper_with_struct()) {
  2396. mutable_value_wrapper_with_struct()->::google::protobuf::testing::ValueWrapper::MergeFrom(from.value_wrapper_with_struct());
  2397. }
  2398. if (from.has_value_wrapper_with_list()) {
  2399. mutable_value_wrapper_with_list()->::google::protobuf::testing::ValueWrapper::MergeFrom(from.value_wrapper_with_list());
  2400. }
  2401. if (from.has_value_wrapper_with_empty_list()) {
  2402. mutable_value_wrapper_with_empty_list()->::google::protobuf::testing::ValueWrapper::MergeFrom(from.value_wrapper_with_empty_list());
  2403. }
  2404. if (from.has_value_wrapper_with_list_with_empty_struct()) {
  2405. mutable_value_wrapper_with_list_with_empty_struct()->::google::protobuf::testing::ValueWrapper::MergeFrom(from.value_wrapper_with_list_with_empty_struct());
  2406. }
  2407. if (from.has_list_value_wrapper()) {
  2408. mutable_list_value_wrapper()->::google::protobuf::testing::ListValueWrapper::MergeFrom(from.list_value_wrapper());
  2409. }
  2410. if (from.has_list_value_wrapper_with_empty_list()) {
  2411. mutable_list_value_wrapper_with_empty_list()->::google::protobuf::testing::ListValueWrapper::MergeFrom(from.list_value_wrapper_with_empty_list());
  2412. }
  2413. if (from.has_list_value_wrapper_with_list_with_empty_struct()) {
  2414. mutable_list_value_wrapper_with_list_with_empty_struct()->::google::protobuf::testing::ListValueWrapper::MergeFrom(from.list_value_wrapper_with_list_with_empty_struct());
  2415. }
  2416. if (from.has_top_level_value_simple()) {
  2417. mutable_top_level_value_simple()->::google::protobuf::Value::MergeFrom(from.top_level_value_simple());
  2418. }
  2419. if (from.has_top_level_value_with_struct()) {
  2420. mutable_top_level_value_with_struct()->::google::protobuf::Value::MergeFrom(from.top_level_value_with_struct());
  2421. }
  2422. if (from.has_top_level_value_with_list()) {
  2423. mutable_top_level_value_with_list()->::google::protobuf::Value::MergeFrom(from.top_level_value_with_list());
  2424. }
  2425. if (from.has_top_level_value_with_empty_list()) {
  2426. mutable_top_level_value_with_empty_list()->::google::protobuf::Value::MergeFrom(from.top_level_value_with_empty_list());
  2427. }
  2428. if (from.has_top_level_value_with_list_with_empty_struct()) {
  2429. mutable_top_level_value_with_list_with_empty_struct()->::google::protobuf::Value::MergeFrom(from.top_level_value_with_list_with_empty_struct());
  2430. }
  2431. if (from.has_top_level_listvalue()) {
  2432. mutable_top_level_listvalue()->::google::protobuf::ListValue::MergeFrom(from.top_level_listvalue());
  2433. }
  2434. if (from.has_top_level_empty_listvalue()) {
  2435. mutable_top_level_empty_listvalue()->::google::protobuf::ListValue::MergeFrom(from.top_level_empty_listvalue());
  2436. }
  2437. if (from.has_top_level_listvalue_with_empty_struct()) {
  2438. mutable_top_level_listvalue_with_empty_struct()->::google::protobuf::ListValue::MergeFrom(from.top_level_listvalue_with_empty_struct());
  2439. }
  2440. if (from.has_repeated_value()) {
  2441. mutable_repeated_value()->::google::protobuf::testing::RepeatedValueWrapper::MergeFrom(from.repeated_value());
  2442. }
  2443. if (from.has_repeated_value_nested_list()) {
  2444. mutable_repeated_value_nested_list()->::google::protobuf::testing::RepeatedValueWrapper::MergeFrom(from.repeated_value_nested_list());
  2445. }
  2446. if (from.has_repeated_value_nested_list2()) {
  2447. mutable_repeated_value_nested_list2()->::google::protobuf::testing::RepeatedValueWrapper::MergeFrom(from.repeated_value_nested_list2());
  2448. }
  2449. if (from.has_repeated_value_nested_list3()) {
  2450. mutable_repeated_value_nested_list3()->::google::protobuf::testing::RepeatedValueWrapper::MergeFrom(from.repeated_value_nested_list3());
  2451. }
  2452. if (from.has_repeated_listvalue()) {
  2453. mutable_repeated_listvalue()->::google::protobuf::testing::RepeatedListValueWrapper::MergeFrom(from.repeated_listvalue());
  2454. }
  2455. if (from.has_map_of_struct()) {
  2456. mutable_map_of_struct()->::google::protobuf::testing::MapOfStruct::MergeFrom(from.map_of_struct());
  2457. }
  2458. if (from.has_map_of_struct_value()) {
  2459. mutable_map_of_struct_value()->::google::protobuf::testing::MapOfStruct::MergeFrom(from.map_of_struct_value());
  2460. }
  2461. if (from.has_map_of_listvalue()) {
  2462. mutable_map_of_listvalue()->::google::protobuf::testing::MapOfStruct::MergeFrom(from.map_of_listvalue());
  2463. }
  2464. }
  2465. void StructTestCases::CopyFrom(const ::google::protobuf::Message& from) {
  2466. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.StructTestCases)
  2467. if (&from == this) return;
  2468. Clear();
  2469. MergeFrom(from);
  2470. }
  2471. void StructTestCases::CopyFrom(const StructTestCases& from) {
  2472. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.StructTestCases)
  2473. if (&from == this) return;
  2474. Clear();
  2475. MergeFrom(from);
  2476. }
  2477. bool StructTestCases::IsInitialized() const {
  2478. return true;
  2479. }
  2480. void StructTestCases::Swap(StructTestCases* other) {
  2481. if (other == this) return;
  2482. InternalSwap(other);
  2483. }
  2484. void StructTestCases::InternalSwap(StructTestCases* other) {
  2485. using std::swap;
  2486. swap(empty_value_, other->empty_value_);
  2487. swap(empty_value2_, other->empty_value2_);
  2488. swap(null_value_, other->null_value_);
  2489. swap(simple_struct_, other->simple_struct_);
  2490. swap(longer_struct_, other->longer_struct_);
  2491. swap(struct_with_nested_struct_, other->struct_with_nested_struct_);
  2492. swap(struct_with_nested_list_, other->struct_with_nested_list_);
  2493. swap(struct_with_list_of_nulls_, other->struct_with_list_of_nulls_);
  2494. swap(struct_with_list_of_lists_, other->struct_with_list_of_lists_);
  2495. swap(struct_with_list_of_structs_, other->struct_with_list_of_structs_);
  2496. swap(struct_with_empty_list_, other->struct_with_empty_list_);
  2497. swap(struct_with_list_with_empty_struct_, other->struct_with_list_with_empty_struct_);
  2498. swap(top_level_struct_, other->top_level_struct_);
  2499. swap(top_level_struct_with_empty_list_, other->top_level_struct_with_empty_list_);
  2500. swap(top_level_struct_with_list_with_empty_struct_, other->top_level_struct_with_list_with_empty_struct_);
  2501. swap(value_wrapper_simple_, other->value_wrapper_simple_);
  2502. swap(value_wrapper_with_struct_, other->value_wrapper_with_struct_);
  2503. swap(value_wrapper_with_list_, other->value_wrapper_with_list_);
  2504. swap(value_wrapper_with_empty_list_, other->value_wrapper_with_empty_list_);
  2505. swap(value_wrapper_with_list_with_empty_struct_, other->value_wrapper_with_list_with_empty_struct_);
  2506. swap(list_value_wrapper_, other->list_value_wrapper_);
  2507. swap(list_value_wrapper_with_empty_list_, other->list_value_wrapper_with_empty_list_);
  2508. swap(list_value_wrapper_with_list_with_empty_struct_, other->list_value_wrapper_with_list_with_empty_struct_);
  2509. swap(top_level_value_simple_, other->top_level_value_simple_);
  2510. swap(top_level_value_with_struct_, other->top_level_value_with_struct_);
  2511. swap(top_level_value_with_list_, other->top_level_value_with_list_);
  2512. swap(top_level_value_with_empty_list_, other->top_level_value_with_empty_list_);
  2513. swap(top_level_value_with_list_with_empty_struct_, other->top_level_value_with_list_with_empty_struct_);
  2514. swap(top_level_listvalue_, other->top_level_listvalue_);
  2515. swap(top_level_empty_listvalue_, other->top_level_empty_listvalue_);
  2516. swap(top_level_listvalue_with_empty_struct_, other->top_level_listvalue_with_empty_struct_);
  2517. swap(repeated_value_, other->repeated_value_);
  2518. swap(repeated_value_nested_list_, other->repeated_value_nested_list_);
  2519. swap(repeated_value_nested_list2_, other->repeated_value_nested_list2_);
  2520. swap(repeated_value_nested_list3_, other->repeated_value_nested_list3_);
  2521. swap(repeated_listvalue_, other->repeated_listvalue_);
  2522. swap(map_of_struct_, other->map_of_struct_);
  2523. swap(map_of_struct_value_, other->map_of_struct_value_);
  2524. swap(map_of_listvalue_, other->map_of_listvalue_);
  2525. _internal_metadata_.Swap(&other->_internal_metadata_);
  2526. }
  2527. ::google::protobuf::Metadata StructTestCases::GetMetadata() const {
  2528. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  2529. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
  2530. }
  2531. // ===================================================================
  2532. void StructWrapper::InitAsDefaultInstance() {
  2533. ::google::protobuf::testing::_StructWrapper_default_instance_._instance.get_mutable()->struct__ = const_cast< ::google::protobuf::Struct*>(
  2534. ::google::protobuf::Struct::internal_default_instance());
  2535. }
  2536. void StructWrapper::clear_struct_() {
  2537. if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
  2538. delete struct__;
  2539. }
  2540. struct__ = NULL;
  2541. }
  2542. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2543. const int StructWrapper::kStructFieldNumber;
  2544. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2545. StructWrapper::StructWrapper()
  2546. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2547. ::google::protobuf::internal::InitSCC(
  2548. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructWrapper.base);
  2549. SharedCtor();
  2550. // @@protoc_insertion_point(constructor:google.protobuf.testing.StructWrapper)
  2551. }
  2552. StructWrapper::StructWrapper(const StructWrapper& from)
  2553. : ::google::protobuf::Message(),
  2554. _internal_metadata_(NULL) {
  2555. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2556. if (from.has_struct_()) {
  2557. struct__ = new ::google::protobuf::Struct(*from.struct__);
  2558. } else {
  2559. struct__ = NULL;
  2560. }
  2561. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.StructWrapper)
  2562. }
  2563. void StructWrapper::SharedCtor() {
  2564. struct__ = NULL;
  2565. }
  2566. StructWrapper::~StructWrapper() {
  2567. // @@protoc_insertion_point(destructor:google.protobuf.testing.StructWrapper)
  2568. SharedDtor();
  2569. }
  2570. void StructWrapper::SharedDtor() {
  2571. if (this != internal_default_instance()) delete struct__;
  2572. }
  2573. void StructWrapper::SetCachedSize(int size) const {
  2574. _cached_size_.Set(size);
  2575. }
  2576. const ::google::protobuf::Descriptor* StructWrapper::descriptor() {
  2577. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  2578. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2579. }
  2580. const StructWrapper& StructWrapper::default_instance() {
  2581. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructWrapper.base);
  2582. return *internal_default_instance();
  2583. }
  2584. void StructWrapper::Clear() {
  2585. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.StructWrapper)
  2586. ::google::protobuf::uint32 cached_has_bits = 0;
  2587. // Prevent compiler warnings about cached_has_bits being unused
  2588. (void) cached_has_bits;
  2589. if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
  2590. delete struct__;
  2591. }
  2592. struct__ = NULL;
  2593. _internal_metadata_.Clear();
  2594. }
  2595. bool StructWrapper::MergePartialFromCodedStream(
  2596. ::google::protobuf::io::CodedInputStream* input) {
  2597. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2598. ::google::protobuf::uint32 tag;
  2599. // @@protoc_insertion_point(parse_start:google.protobuf.testing.StructWrapper)
  2600. for (;;) {
  2601. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2602. tag = p.first;
  2603. if (!p.second) goto handle_unusual;
  2604. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2605. // .google.protobuf.Struct struct = 1;
  2606. case 1: {
  2607. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2608. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2609. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2610. input, mutable_struct_()));
  2611. } else {
  2612. goto handle_unusual;
  2613. }
  2614. break;
  2615. }
  2616. default: {
  2617. handle_unusual:
  2618. if (tag == 0) {
  2619. goto success;
  2620. }
  2621. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2622. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2623. break;
  2624. }
  2625. }
  2626. }
  2627. success:
  2628. // @@protoc_insertion_point(parse_success:google.protobuf.testing.StructWrapper)
  2629. return true;
  2630. failure:
  2631. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.StructWrapper)
  2632. return false;
  2633. #undef DO_
  2634. }
  2635. void StructWrapper::SerializeWithCachedSizes(
  2636. ::google::protobuf::io::CodedOutputStream* output) const {
  2637. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.StructWrapper)
  2638. ::google::protobuf::uint32 cached_has_bits = 0;
  2639. (void) cached_has_bits;
  2640. // .google.protobuf.Struct struct = 1;
  2641. if (this->has_struct_()) {
  2642. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2643. 1, this->_internal_struct_(), output);
  2644. }
  2645. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2646. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2647. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2648. }
  2649. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.StructWrapper)
  2650. }
  2651. ::google::protobuf::uint8* StructWrapper::InternalSerializeWithCachedSizesToArray(
  2652. bool deterministic, ::google::protobuf::uint8* target) const {
  2653. (void)deterministic; // Unused
  2654. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.StructWrapper)
  2655. ::google::protobuf::uint32 cached_has_bits = 0;
  2656. (void) cached_has_bits;
  2657. // .google.protobuf.Struct struct = 1;
  2658. if (this->has_struct_()) {
  2659. target = ::google::protobuf::internal::WireFormatLite::
  2660. InternalWriteMessageToArray(
  2661. 1, this->_internal_struct_(), deterministic, target);
  2662. }
  2663. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2664. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2665. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2666. }
  2667. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.StructWrapper)
  2668. return target;
  2669. }
  2670. size_t StructWrapper::ByteSizeLong() const {
  2671. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.StructWrapper)
  2672. size_t total_size = 0;
  2673. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2674. total_size +=
  2675. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2676. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2677. }
  2678. // .google.protobuf.Struct struct = 1;
  2679. if (this->has_struct_()) {
  2680. total_size += 1 +
  2681. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2682. *struct__);
  2683. }
  2684. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2685. SetCachedSize(cached_size);
  2686. return total_size;
  2687. }
  2688. void StructWrapper::MergeFrom(const ::google::protobuf::Message& from) {
  2689. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.StructWrapper)
  2690. GOOGLE_DCHECK_NE(&from, this);
  2691. const StructWrapper* source =
  2692. ::google::protobuf::internal::DynamicCastToGenerated<const StructWrapper>(
  2693. &from);
  2694. if (source == NULL) {
  2695. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.StructWrapper)
  2696. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2697. } else {
  2698. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.StructWrapper)
  2699. MergeFrom(*source);
  2700. }
  2701. }
  2702. void StructWrapper::MergeFrom(const StructWrapper& from) {
  2703. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.StructWrapper)
  2704. GOOGLE_DCHECK_NE(&from, this);
  2705. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2706. ::google::protobuf::uint32 cached_has_bits = 0;
  2707. (void) cached_has_bits;
  2708. if (from.has_struct_()) {
  2709. mutable_struct_()->::google::protobuf::Struct::MergeFrom(from.struct_());
  2710. }
  2711. }
  2712. void StructWrapper::CopyFrom(const ::google::protobuf::Message& from) {
  2713. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.StructWrapper)
  2714. if (&from == this) return;
  2715. Clear();
  2716. MergeFrom(from);
  2717. }
  2718. void StructWrapper::CopyFrom(const StructWrapper& from) {
  2719. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.StructWrapper)
  2720. if (&from == this) return;
  2721. Clear();
  2722. MergeFrom(from);
  2723. }
  2724. bool StructWrapper::IsInitialized() const {
  2725. return true;
  2726. }
  2727. void StructWrapper::Swap(StructWrapper* other) {
  2728. if (other == this) return;
  2729. InternalSwap(other);
  2730. }
  2731. void StructWrapper::InternalSwap(StructWrapper* other) {
  2732. using std::swap;
  2733. swap(struct__, other->struct__);
  2734. _internal_metadata_.Swap(&other->_internal_metadata_);
  2735. }
  2736. ::google::protobuf::Metadata StructWrapper::GetMetadata() const {
  2737. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  2738. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
  2739. }
  2740. // ===================================================================
  2741. void ValueWrapper::InitAsDefaultInstance() {
  2742. ::google::protobuf::testing::_ValueWrapper_default_instance_._instance.get_mutable()->value_ = const_cast< ::google::protobuf::Value*>(
  2743. ::google::protobuf::Value::internal_default_instance());
  2744. }
  2745. void ValueWrapper::clear_value() {
  2746. if (GetArenaNoVirtual() == NULL && value_ != NULL) {
  2747. delete value_;
  2748. }
  2749. value_ = NULL;
  2750. }
  2751. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2752. const int ValueWrapper::kValueFieldNumber;
  2753. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2754. ValueWrapper::ValueWrapper()
  2755. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2756. ::google::protobuf::internal::InitSCC(
  2757. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ValueWrapper.base);
  2758. SharedCtor();
  2759. // @@protoc_insertion_point(constructor:google.protobuf.testing.ValueWrapper)
  2760. }
  2761. ValueWrapper::ValueWrapper(const ValueWrapper& from)
  2762. : ::google::protobuf::Message(),
  2763. _internal_metadata_(NULL) {
  2764. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2765. if (from.has_value()) {
  2766. value_ = new ::google::protobuf::Value(*from.value_);
  2767. } else {
  2768. value_ = NULL;
  2769. }
  2770. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.ValueWrapper)
  2771. }
  2772. void ValueWrapper::SharedCtor() {
  2773. value_ = NULL;
  2774. }
  2775. ValueWrapper::~ValueWrapper() {
  2776. // @@protoc_insertion_point(destructor:google.protobuf.testing.ValueWrapper)
  2777. SharedDtor();
  2778. }
  2779. void ValueWrapper::SharedDtor() {
  2780. if (this != internal_default_instance()) delete value_;
  2781. }
  2782. void ValueWrapper::SetCachedSize(int size) const {
  2783. _cached_size_.Set(size);
  2784. }
  2785. const ::google::protobuf::Descriptor* ValueWrapper::descriptor() {
  2786. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  2787. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2788. }
  2789. const ValueWrapper& ValueWrapper::default_instance() {
  2790. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ValueWrapper.base);
  2791. return *internal_default_instance();
  2792. }
  2793. void ValueWrapper::Clear() {
  2794. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.ValueWrapper)
  2795. ::google::protobuf::uint32 cached_has_bits = 0;
  2796. // Prevent compiler warnings about cached_has_bits being unused
  2797. (void) cached_has_bits;
  2798. if (GetArenaNoVirtual() == NULL && value_ != NULL) {
  2799. delete value_;
  2800. }
  2801. value_ = NULL;
  2802. _internal_metadata_.Clear();
  2803. }
  2804. bool ValueWrapper::MergePartialFromCodedStream(
  2805. ::google::protobuf::io::CodedInputStream* input) {
  2806. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2807. ::google::protobuf::uint32 tag;
  2808. // @@protoc_insertion_point(parse_start:google.protobuf.testing.ValueWrapper)
  2809. for (;;) {
  2810. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2811. tag = p.first;
  2812. if (!p.second) goto handle_unusual;
  2813. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2814. // .google.protobuf.Value value = 1;
  2815. case 1: {
  2816. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2817. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2818. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2819. input, mutable_value()));
  2820. } else {
  2821. goto handle_unusual;
  2822. }
  2823. break;
  2824. }
  2825. default: {
  2826. handle_unusual:
  2827. if (tag == 0) {
  2828. goto success;
  2829. }
  2830. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2831. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2832. break;
  2833. }
  2834. }
  2835. }
  2836. success:
  2837. // @@protoc_insertion_point(parse_success:google.protobuf.testing.ValueWrapper)
  2838. return true;
  2839. failure:
  2840. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.ValueWrapper)
  2841. return false;
  2842. #undef DO_
  2843. }
  2844. void ValueWrapper::SerializeWithCachedSizes(
  2845. ::google::protobuf::io::CodedOutputStream* output) const {
  2846. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.ValueWrapper)
  2847. ::google::protobuf::uint32 cached_has_bits = 0;
  2848. (void) cached_has_bits;
  2849. // .google.protobuf.Value value = 1;
  2850. if (this->has_value()) {
  2851. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2852. 1, this->_internal_value(), output);
  2853. }
  2854. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2855. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2856. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2857. }
  2858. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.ValueWrapper)
  2859. }
  2860. ::google::protobuf::uint8* ValueWrapper::InternalSerializeWithCachedSizesToArray(
  2861. bool deterministic, ::google::protobuf::uint8* target) const {
  2862. (void)deterministic; // Unused
  2863. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.ValueWrapper)
  2864. ::google::protobuf::uint32 cached_has_bits = 0;
  2865. (void) cached_has_bits;
  2866. // .google.protobuf.Value value = 1;
  2867. if (this->has_value()) {
  2868. target = ::google::protobuf::internal::WireFormatLite::
  2869. InternalWriteMessageToArray(
  2870. 1, this->_internal_value(), deterministic, target);
  2871. }
  2872. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2873. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2874. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2875. }
  2876. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.ValueWrapper)
  2877. return target;
  2878. }
  2879. size_t ValueWrapper::ByteSizeLong() const {
  2880. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.ValueWrapper)
  2881. size_t total_size = 0;
  2882. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2883. total_size +=
  2884. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2885. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2886. }
  2887. // .google.protobuf.Value value = 1;
  2888. if (this->has_value()) {
  2889. total_size += 1 +
  2890. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2891. *value_);
  2892. }
  2893. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2894. SetCachedSize(cached_size);
  2895. return total_size;
  2896. }
  2897. void ValueWrapper::MergeFrom(const ::google::protobuf::Message& from) {
  2898. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.ValueWrapper)
  2899. GOOGLE_DCHECK_NE(&from, this);
  2900. const ValueWrapper* source =
  2901. ::google::protobuf::internal::DynamicCastToGenerated<const ValueWrapper>(
  2902. &from);
  2903. if (source == NULL) {
  2904. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.ValueWrapper)
  2905. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2906. } else {
  2907. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.ValueWrapper)
  2908. MergeFrom(*source);
  2909. }
  2910. }
  2911. void ValueWrapper::MergeFrom(const ValueWrapper& from) {
  2912. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.ValueWrapper)
  2913. GOOGLE_DCHECK_NE(&from, this);
  2914. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2915. ::google::protobuf::uint32 cached_has_bits = 0;
  2916. (void) cached_has_bits;
  2917. if (from.has_value()) {
  2918. mutable_value()->::google::protobuf::Value::MergeFrom(from.value());
  2919. }
  2920. }
  2921. void ValueWrapper::CopyFrom(const ::google::protobuf::Message& from) {
  2922. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.ValueWrapper)
  2923. if (&from == this) return;
  2924. Clear();
  2925. MergeFrom(from);
  2926. }
  2927. void ValueWrapper::CopyFrom(const ValueWrapper& from) {
  2928. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.ValueWrapper)
  2929. if (&from == this) return;
  2930. Clear();
  2931. MergeFrom(from);
  2932. }
  2933. bool ValueWrapper::IsInitialized() const {
  2934. return true;
  2935. }
  2936. void ValueWrapper::Swap(ValueWrapper* other) {
  2937. if (other == this) return;
  2938. InternalSwap(other);
  2939. }
  2940. void ValueWrapper::InternalSwap(ValueWrapper* other) {
  2941. using std::swap;
  2942. swap(value_, other->value_);
  2943. _internal_metadata_.Swap(&other->_internal_metadata_);
  2944. }
  2945. ::google::protobuf::Metadata ValueWrapper::GetMetadata() const {
  2946. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  2947. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
  2948. }
  2949. // ===================================================================
  2950. void RepeatedValueWrapper::InitAsDefaultInstance() {
  2951. }
  2952. void RepeatedValueWrapper::clear_values() {
  2953. values_.Clear();
  2954. }
  2955. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2956. const int RepeatedValueWrapper::kValuesFieldNumber;
  2957. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2958. RepeatedValueWrapper::RepeatedValueWrapper()
  2959. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2960. ::google::protobuf::internal::InitSCC(
  2961. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedValueWrapper.base);
  2962. SharedCtor();
  2963. // @@protoc_insertion_point(constructor:google.protobuf.testing.RepeatedValueWrapper)
  2964. }
  2965. RepeatedValueWrapper::RepeatedValueWrapper(const RepeatedValueWrapper& from)
  2966. : ::google::protobuf::Message(),
  2967. _internal_metadata_(NULL),
  2968. values_(from.values_) {
  2969. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2970. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.RepeatedValueWrapper)
  2971. }
  2972. void RepeatedValueWrapper::SharedCtor() {
  2973. }
  2974. RepeatedValueWrapper::~RepeatedValueWrapper() {
  2975. // @@protoc_insertion_point(destructor:google.protobuf.testing.RepeatedValueWrapper)
  2976. SharedDtor();
  2977. }
  2978. void RepeatedValueWrapper::SharedDtor() {
  2979. }
  2980. void RepeatedValueWrapper::SetCachedSize(int size) const {
  2981. _cached_size_.Set(size);
  2982. }
  2983. const ::google::protobuf::Descriptor* RepeatedValueWrapper::descriptor() {
  2984. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  2985. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2986. }
  2987. const RepeatedValueWrapper& RepeatedValueWrapper::default_instance() {
  2988. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedValueWrapper.base);
  2989. return *internal_default_instance();
  2990. }
  2991. void RepeatedValueWrapper::Clear() {
  2992. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.RepeatedValueWrapper)
  2993. ::google::protobuf::uint32 cached_has_bits = 0;
  2994. // Prevent compiler warnings about cached_has_bits being unused
  2995. (void) cached_has_bits;
  2996. values_.Clear();
  2997. _internal_metadata_.Clear();
  2998. }
  2999. bool RepeatedValueWrapper::MergePartialFromCodedStream(
  3000. ::google::protobuf::io::CodedInputStream* input) {
  3001. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3002. ::google::protobuf::uint32 tag;
  3003. // @@protoc_insertion_point(parse_start:google.protobuf.testing.RepeatedValueWrapper)
  3004. for (;;) {
  3005. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3006. tag = p.first;
  3007. if (!p.second) goto handle_unusual;
  3008. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3009. // repeated .google.protobuf.Value values = 1;
  3010. case 1: {
  3011. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3012. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3013. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3014. input, add_values()));
  3015. } else {
  3016. goto handle_unusual;
  3017. }
  3018. break;
  3019. }
  3020. default: {
  3021. handle_unusual:
  3022. if (tag == 0) {
  3023. goto success;
  3024. }
  3025. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3026. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3027. break;
  3028. }
  3029. }
  3030. }
  3031. success:
  3032. // @@protoc_insertion_point(parse_success:google.protobuf.testing.RepeatedValueWrapper)
  3033. return true;
  3034. failure:
  3035. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.RepeatedValueWrapper)
  3036. return false;
  3037. #undef DO_
  3038. }
  3039. void RepeatedValueWrapper::SerializeWithCachedSizes(
  3040. ::google::protobuf::io::CodedOutputStream* output) const {
  3041. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.RepeatedValueWrapper)
  3042. ::google::protobuf::uint32 cached_has_bits = 0;
  3043. (void) cached_has_bits;
  3044. // repeated .google.protobuf.Value values = 1;
  3045. for (unsigned int i = 0,
  3046. n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
  3047. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3048. 1,
  3049. this->values(static_cast<int>(i)),
  3050. output);
  3051. }
  3052. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3053. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3054. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3055. }
  3056. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.RepeatedValueWrapper)
  3057. }
  3058. ::google::protobuf::uint8* RepeatedValueWrapper::InternalSerializeWithCachedSizesToArray(
  3059. bool deterministic, ::google::protobuf::uint8* target) const {
  3060. (void)deterministic; // Unused
  3061. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.RepeatedValueWrapper)
  3062. ::google::protobuf::uint32 cached_has_bits = 0;
  3063. (void) cached_has_bits;
  3064. // repeated .google.protobuf.Value values = 1;
  3065. for (unsigned int i = 0,
  3066. n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
  3067. target = ::google::protobuf::internal::WireFormatLite::
  3068. InternalWriteMessageToArray(
  3069. 1, this->values(static_cast<int>(i)), deterministic, target);
  3070. }
  3071. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3072. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3073. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3074. }
  3075. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.RepeatedValueWrapper)
  3076. return target;
  3077. }
  3078. size_t RepeatedValueWrapper::ByteSizeLong() const {
  3079. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.RepeatedValueWrapper)
  3080. size_t total_size = 0;
  3081. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3082. total_size +=
  3083. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3084. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3085. }
  3086. // repeated .google.protobuf.Value values = 1;
  3087. {
  3088. unsigned int count = static_cast<unsigned int>(this->values_size());
  3089. total_size += 1UL * count;
  3090. for (unsigned int i = 0; i < count; i++) {
  3091. total_size +=
  3092. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3093. this->values(static_cast<int>(i)));
  3094. }
  3095. }
  3096. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3097. SetCachedSize(cached_size);
  3098. return total_size;
  3099. }
  3100. void RepeatedValueWrapper::MergeFrom(const ::google::protobuf::Message& from) {
  3101. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.RepeatedValueWrapper)
  3102. GOOGLE_DCHECK_NE(&from, this);
  3103. const RepeatedValueWrapper* source =
  3104. ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedValueWrapper>(
  3105. &from);
  3106. if (source == NULL) {
  3107. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.RepeatedValueWrapper)
  3108. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3109. } else {
  3110. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.RepeatedValueWrapper)
  3111. MergeFrom(*source);
  3112. }
  3113. }
  3114. void RepeatedValueWrapper::MergeFrom(const RepeatedValueWrapper& from) {
  3115. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.RepeatedValueWrapper)
  3116. GOOGLE_DCHECK_NE(&from, this);
  3117. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3118. ::google::protobuf::uint32 cached_has_bits = 0;
  3119. (void) cached_has_bits;
  3120. values_.MergeFrom(from.values_);
  3121. }
  3122. void RepeatedValueWrapper::CopyFrom(const ::google::protobuf::Message& from) {
  3123. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.RepeatedValueWrapper)
  3124. if (&from == this) return;
  3125. Clear();
  3126. MergeFrom(from);
  3127. }
  3128. void RepeatedValueWrapper::CopyFrom(const RepeatedValueWrapper& from) {
  3129. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.RepeatedValueWrapper)
  3130. if (&from == this) return;
  3131. Clear();
  3132. MergeFrom(from);
  3133. }
  3134. bool RepeatedValueWrapper::IsInitialized() const {
  3135. return true;
  3136. }
  3137. void RepeatedValueWrapper::Swap(RepeatedValueWrapper* other) {
  3138. if (other == this) return;
  3139. InternalSwap(other);
  3140. }
  3141. void RepeatedValueWrapper::InternalSwap(RepeatedValueWrapper* other) {
  3142. using std::swap;
  3143. CastToBase(&values_)->InternalSwap(CastToBase(&other->values_));
  3144. _internal_metadata_.Swap(&other->_internal_metadata_);
  3145. }
  3146. ::google::protobuf::Metadata RepeatedValueWrapper::GetMetadata() const {
  3147. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  3148. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
  3149. }
  3150. // ===================================================================
  3151. void ListValueWrapper::InitAsDefaultInstance() {
  3152. ::google::protobuf::testing::_ListValueWrapper_default_instance_._instance.get_mutable()->shopping_list_ = const_cast< ::google::protobuf::ListValue*>(
  3153. ::google::protobuf::ListValue::internal_default_instance());
  3154. }
  3155. void ListValueWrapper::clear_shopping_list() {
  3156. if (GetArenaNoVirtual() == NULL && shopping_list_ != NULL) {
  3157. delete shopping_list_;
  3158. }
  3159. shopping_list_ = NULL;
  3160. }
  3161. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3162. const int ListValueWrapper::kShoppingListFieldNumber;
  3163. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3164. ListValueWrapper::ListValueWrapper()
  3165. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3166. ::google::protobuf::internal::InitSCC(
  3167. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ListValueWrapper.base);
  3168. SharedCtor();
  3169. // @@protoc_insertion_point(constructor:google.protobuf.testing.ListValueWrapper)
  3170. }
  3171. ListValueWrapper::ListValueWrapper(const ListValueWrapper& from)
  3172. : ::google::protobuf::Message(),
  3173. _internal_metadata_(NULL) {
  3174. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3175. if (from.has_shopping_list()) {
  3176. shopping_list_ = new ::google::protobuf::ListValue(*from.shopping_list_);
  3177. } else {
  3178. shopping_list_ = NULL;
  3179. }
  3180. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.ListValueWrapper)
  3181. }
  3182. void ListValueWrapper::SharedCtor() {
  3183. shopping_list_ = NULL;
  3184. }
  3185. ListValueWrapper::~ListValueWrapper() {
  3186. // @@protoc_insertion_point(destructor:google.protobuf.testing.ListValueWrapper)
  3187. SharedDtor();
  3188. }
  3189. void ListValueWrapper::SharedDtor() {
  3190. if (this != internal_default_instance()) delete shopping_list_;
  3191. }
  3192. void ListValueWrapper::SetCachedSize(int size) const {
  3193. _cached_size_.Set(size);
  3194. }
  3195. const ::google::protobuf::Descriptor* ListValueWrapper::descriptor() {
  3196. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  3197. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3198. }
  3199. const ListValueWrapper& ListValueWrapper::default_instance() {
  3200. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_ListValueWrapper.base);
  3201. return *internal_default_instance();
  3202. }
  3203. void ListValueWrapper::Clear() {
  3204. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.ListValueWrapper)
  3205. ::google::protobuf::uint32 cached_has_bits = 0;
  3206. // Prevent compiler warnings about cached_has_bits being unused
  3207. (void) cached_has_bits;
  3208. if (GetArenaNoVirtual() == NULL && shopping_list_ != NULL) {
  3209. delete shopping_list_;
  3210. }
  3211. shopping_list_ = NULL;
  3212. _internal_metadata_.Clear();
  3213. }
  3214. bool ListValueWrapper::MergePartialFromCodedStream(
  3215. ::google::protobuf::io::CodedInputStream* input) {
  3216. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3217. ::google::protobuf::uint32 tag;
  3218. // @@protoc_insertion_point(parse_start:google.protobuf.testing.ListValueWrapper)
  3219. for (;;) {
  3220. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3221. tag = p.first;
  3222. if (!p.second) goto handle_unusual;
  3223. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3224. // .google.protobuf.ListValue shopping_list = 1;
  3225. case 1: {
  3226. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3227. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3228. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3229. input, mutable_shopping_list()));
  3230. } else {
  3231. goto handle_unusual;
  3232. }
  3233. break;
  3234. }
  3235. default: {
  3236. handle_unusual:
  3237. if (tag == 0) {
  3238. goto success;
  3239. }
  3240. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3241. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3242. break;
  3243. }
  3244. }
  3245. }
  3246. success:
  3247. // @@protoc_insertion_point(parse_success:google.protobuf.testing.ListValueWrapper)
  3248. return true;
  3249. failure:
  3250. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.ListValueWrapper)
  3251. return false;
  3252. #undef DO_
  3253. }
  3254. void ListValueWrapper::SerializeWithCachedSizes(
  3255. ::google::protobuf::io::CodedOutputStream* output) const {
  3256. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.ListValueWrapper)
  3257. ::google::protobuf::uint32 cached_has_bits = 0;
  3258. (void) cached_has_bits;
  3259. // .google.protobuf.ListValue shopping_list = 1;
  3260. if (this->has_shopping_list()) {
  3261. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3262. 1, this->_internal_shopping_list(), output);
  3263. }
  3264. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3265. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3266. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3267. }
  3268. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.ListValueWrapper)
  3269. }
  3270. ::google::protobuf::uint8* ListValueWrapper::InternalSerializeWithCachedSizesToArray(
  3271. bool deterministic, ::google::protobuf::uint8* target) const {
  3272. (void)deterministic; // Unused
  3273. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.ListValueWrapper)
  3274. ::google::protobuf::uint32 cached_has_bits = 0;
  3275. (void) cached_has_bits;
  3276. // .google.protobuf.ListValue shopping_list = 1;
  3277. if (this->has_shopping_list()) {
  3278. target = ::google::protobuf::internal::WireFormatLite::
  3279. InternalWriteMessageToArray(
  3280. 1, this->_internal_shopping_list(), deterministic, target);
  3281. }
  3282. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3283. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3284. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3285. }
  3286. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.ListValueWrapper)
  3287. return target;
  3288. }
  3289. size_t ListValueWrapper::ByteSizeLong() const {
  3290. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.ListValueWrapper)
  3291. size_t total_size = 0;
  3292. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3293. total_size +=
  3294. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3295. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3296. }
  3297. // .google.protobuf.ListValue shopping_list = 1;
  3298. if (this->has_shopping_list()) {
  3299. total_size += 1 +
  3300. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3301. *shopping_list_);
  3302. }
  3303. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3304. SetCachedSize(cached_size);
  3305. return total_size;
  3306. }
  3307. void ListValueWrapper::MergeFrom(const ::google::protobuf::Message& from) {
  3308. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.ListValueWrapper)
  3309. GOOGLE_DCHECK_NE(&from, this);
  3310. const ListValueWrapper* source =
  3311. ::google::protobuf::internal::DynamicCastToGenerated<const ListValueWrapper>(
  3312. &from);
  3313. if (source == NULL) {
  3314. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.ListValueWrapper)
  3315. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3316. } else {
  3317. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.ListValueWrapper)
  3318. MergeFrom(*source);
  3319. }
  3320. }
  3321. void ListValueWrapper::MergeFrom(const ListValueWrapper& from) {
  3322. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.ListValueWrapper)
  3323. GOOGLE_DCHECK_NE(&from, this);
  3324. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3325. ::google::protobuf::uint32 cached_has_bits = 0;
  3326. (void) cached_has_bits;
  3327. if (from.has_shopping_list()) {
  3328. mutable_shopping_list()->::google::protobuf::ListValue::MergeFrom(from.shopping_list());
  3329. }
  3330. }
  3331. void ListValueWrapper::CopyFrom(const ::google::protobuf::Message& from) {
  3332. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.ListValueWrapper)
  3333. if (&from == this) return;
  3334. Clear();
  3335. MergeFrom(from);
  3336. }
  3337. void ListValueWrapper::CopyFrom(const ListValueWrapper& from) {
  3338. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.ListValueWrapper)
  3339. if (&from == this) return;
  3340. Clear();
  3341. MergeFrom(from);
  3342. }
  3343. bool ListValueWrapper::IsInitialized() const {
  3344. return true;
  3345. }
  3346. void ListValueWrapper::Swap(ListValueWrapper* other) {
  3347. if (other == this) return;
  3348. InternalSwap(other);
  3349. }
  3350. void ListValueWrapper::InternalSwap(ListValueWrapper* other) {
  3351. using std::swap;
  3352. swap(shopping_list_, other->shopping_list_);
  3353. _internal_metadata_.Swap(&other->_internal_metadata_);
  3354. }
  3355. ::google::protobuf::Metadata ListValueWrapper::GetMetadata() const {
  3356. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  3357. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
  3358. }
  3359. // ===================================================================
  3360. void RepeatedListValueWrapper::InitAsDefaultInstance() {
  3361. }
  3362. void RepeatedListValueWrapper::clear_dimensions() {
  3363. dimensions_.Clear();
  3364. }
  3365. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3366. const int RepeatedListValueWrapper::kDimensionsFieldNumber;
  3367. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3368. RepeatedListValueWrapper::RepeatedListValueWrapper()
  3369. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3370. ::google::protobuf::internal::InitSCC(
  3371. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedListValueWrapper.base);
  3372. SharedCtor();
  3373. // @@protoc_insertion_point(constructor:google.protobuf.testing.RepeatedListValueWrapper)
  3374. }
  3375. RepeatedListValueWrapper::RepeatedListValueWrapper(const RepeatedListValueWrapper& from)
  3376. : ::google::protobuf::Message(),
  3377. _internal_metadata_(NULL),
  3378. dimensions_(from.dimensions_) {
  3379. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3380. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.RepeatedListValueWrapper)
  3381. }
  3382. void RepeatedListValueWrapper::SharedCtor() {
  3383. }
  3384. RepeatedListValueWrapper::~RepeatedListValueWrapper() {
  3385. // @@protoc_insertion_point(destructor:google.protobuf.testing.RepeatedListValueWrapper)
  3386. SharedDtor();
  3387. }
  3388. void RepeatedListValueWrapper::SharedDtor() {
  3389. }
  3390. void RepeatedListValueWrapper::SetCachedSize(int size) const {
  3391. _cached_size_.Set(size);
  3392. }
  3393. const ::google::protobuf::Descriptor* RepeatedListValueWrapper::descriptor() {
  3394. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  3395. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3396. }
  3397. const RepeatedListValueWrapper& RepeatedListValueWrapper::default_instance() {
  3398. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_RepeatedListValueWrapper.base);
  3399. return *internal_default_instance();
  3400. }
  3401. void RepeatedListValueWrapper::Clear() {
  3402. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.RepeatedListValueWrapper)
  3403. ::google::protobuf::uint32 cached_has_bits = 0;
  3404. // Prevent compiler warnings about cached_has_bits being unused
  3405. (void) cached_has_bits;
  3406. dimensions_.Clear();
  3407. _internal_metadata_.Clear();
  3408. }
  3409. bool RepeatedListValueWrapper::MergePartialFromCodedStream(
  3410. ::google::protobuf::io::CodedInputStream* input) {
  3411. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3412. ::google::protobuf::uint32 tag;
  3413. // @@protoc_insertion_point(parse_start:google.protobuf.testing.RepeatedListValueWrapper)
  3414. for (;;) {
  3415. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3416. tag = p.first;
  3417. if (!p.second) goto handle_unusual;
  3418. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3419. // repeated .google.protobuf.ListValue dimensions = 1;
  3420. case 1: {
  3421. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3422. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3423. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3424. input, add_dimensions()));
  3425. } else {
  3426. goto handle_unusual;
  3427. }
  3428. break;
  3429. }
  3430. default: {
  3431. handle_unusual:
  3432. if (tag == 0) {
  3433. goto success;
  3434. }
  3435. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3436. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3437. break;
  3438. }
  3439. }
  3440. }
  3441. success:
  3442. // @@protoc_insertion_point(parse_success:google.protobuf.testing.RepeatedListValueWrapper)
  3443. return true;
  3444. failure:
  3445. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.RepeatedListValueWrapper)
  3446. return false;
  3447. #undef DO_
  3448. }
  3449. void RepeatedListValueWrapper::SerializeWithCachedSizes(
  3450. ::google::protobuf::io::CodedOutputStream* output) const {
  3451. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.RepeatedListValueWrapper)
  3452. ::google::protobuf::uint32 cached_has_bits = 0;
  3453. (void) cached_has_bits;
  3454. // repeated .google.protobuf.ListValue dimensions = 1;
  3455. for (unsigned int i = 0,
  3456. n = static_cast<unsigned int>(this->dimensions_size()); i < n; i++) {
  3457. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3458. 1,
  3459. this->dimensions(static_cast<int>(i)),
  3460. output);
  3461. }
  3462. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3463. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3464. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3465. }
  3466. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.RepeatedListValueWrapper)
  3467. }
  3468. ::google::protobuf::uint8* RepeatedListValueWrapper::InternalSerializeWithCachedSizesToArray(
  3469. bool deterministic, ::google::protobuf::uint8* target) const {
  3470. (void)deterministic; // Unused
  3471. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.RepeatedListValueWrapper)
  3472. ::google::protobuf::uint32 cached_has_bits = 0;
  3473. (void) cached_has_bits;
  3474. // repeated .google.protobuf.ListValue dimensions = 1;
  3475. for (unsigned int i = 0,
  3476. n = static_cast<unsigned int>(this->dimensions_size()); i < n; i++) {
  3477. target = ::google::protobuf::internal::WireFormatLite::
  3478. InternalWriteMessageToArray(
  3479. 1, this->dimensions(static_cast<int>(i)), deterministic, target);
  3480. }
  3481. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3482. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3483. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3484. }
  3485. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.RepeatedListValueWrapper)
  3486. return target;
  3487. }
  3488. size_t RepeatedListValueWrapper::ByteSizeLong() const {
  3489. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.RepeatedListValueWrapper)
  3490. size_t total_size = 0;
  3491. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3492. total_size +=
  3493. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3494. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3495. }
  3496. // repeated .google.protobuf.ListValue dimensions = 1;
  3497. {
  3498. unsigned int count = static_cast<unsigned int>(this->dimensions_size());
  3499. total_size += 1UL * count;
  3500. for (unsigned int i = 0; i < count; i++) {
  3501. total_size +=
  3502. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3503. this->dimensions(static_cast<int>(i)));
  3504. }
  3505. }
  3506. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3507. SetCachedSize(cached_size);
  3508. return total_size;
  3509. }
  3510. void RepeatedListValueWrapper::MergeFrom(const ::google::protobuf::Message& from) {
  3511. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.RepeatedListValueWrapper)
  3512. GOOGLE_DCHECK_NE(&from, this);
  3513. const RepeatedListValueWrapper* source =
  3514. ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedListValueWrapper>(
  3515. &from);
  3516. if (source == NULL) {
  3517. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.RepeatedListValueWrapper)
  3518. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3519. } else {
  3520. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.RepeatedListValueWrapper)
  3521. MergeFrom(*source);
  3522. }
  3523. }
  3524. void RepeatedListValueWrapper::MergeFrom(const RepeatedListValueWrapper& from) {
  3525. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.RepeatedListValueWrapper)
  3526. GOOGLE_DCHECK_NE(&from, this);
  3527. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3528. ::google::protobuf::uint32 cached_has_bits = 0;
  3529. (void) cached_has_bits;
  3530. dimensions_.MergeFrom(from.dimensions_);
  3531. }
  3532. void RepeatedListValueWrapper::CopyFrom(const ::google::protobuf::Message& from) {
  3533. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.RepeatedListValueWrapper)
  3534. if (&from == this) return;
  3535. Clear();
  3536. MergeFrom(from);
  3537. }
  3538. void RepeatedListValueWrapper::CopyFrom(const RepeatedListValueWrapper& from) {
  3539. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.RepeatedListValueWrapper)
  3540. if (&from == this) return;
  3541. Clear();
  3542. MergeFrom(from);
  3543. }
  3544. bool RepeatedListValueWrapper::IsInitialized() const {
  3545. return true;
  3546. }
  3547. void RepeatedListValueWrapper::Swap(RepeatedListValueWrapper* other) {
  3548. if (other == this) return;
  3549. InternalSwap(other);
  3550. }
  3551. void RepeatedListValueWrapper::InternalSwap(RepeatedListValueWrapper* other) {
  3552. using std::swap;
  3553. CastToBase(&dimensions_)->InternalSwap(CastToBase(&other->dimensions_));
  3554. _internal_metadata_.Swap(&other->_internal_metadata_);
  3555. }
  3556. ::google::protobuf::Metadata RepeatedListValueWrapper::GetMetadata() const {
  3557. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  3558. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
  3559. }
  3560. // ===================================================================
  3561. MapOfStruct_StructMapEntry_DoNotUse::MapOfStruct_StructMapEntry_DoNotUse() {}
  3562. MapOfStruct_StructMapEntry_DoNotUse::MapOfStruct_StructMapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  3563. void MapOfStruct_StructMapEntry_DoNotUse::MergeFrom(const MapOfStruct_StructMapEntry_DoNotUse& other) {
  3564. MergeFromInternal(other);
  3565. }
  3566. ::google::protobuf::Metadata MapOfStruct_StructMapEntry_DoNotUse::GetMetadata() const {
  3567. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  3568. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[6];
  3569. }
  3570. void MapOfStruct_StructMapEntry_DoNotUse::MergeFrom(
  3571. const ::google::protobuf::Message& other) {
  3572. ::google::protobuf::Message::MergeFrom(other);
  3573. }
  3574. // ===================================================================
  3575. MapOfStruct_ValueMapEntry_DoNotUse::MapOfStruct_ValueMapEntry_DoNotUse() {}
  3576. MapOfStruct_ValueMapEntry_DoNotUse::MapOfStruct_ValueMapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  3577. void MapOfStruct_ValueMapEntry_DoNotUse::MergeFrom(const MapOfStruct_ValueMapEntry_DoNotUse& other) {
  3578. MergeFromInternal(other);
  3579. }
  3580. ::google::protobuf::Metadata MapOfStruct_ValueMapEntry_DoNotUse::GetMetadata() const {
  3581. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  3582. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[7];
  3583. }
  3584. void MapOfStruct_ValueMapEntry_DoNotUse::MergeFrom(
  3585. const ::google::protobuf::Message& other) {
  3586. ::google::protobuf::Message::MergeFrom(other);
  3587. }
  3588. // ===================================================================
  3589. MapOfStruct_ListvalueMapEntry_DoNotUse::MapOfStruct_ListvalueMapEntry_DoNotUse() {}
  3590. MapOfStruct_ListvalueMapEntry_DoNotUse::MapOfStruct_ListvalueMapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  3591. void MapOfStruct_ListvalueMapEntry_DoNotUse::MergeFrom(const MapOfStruct_ListvalueMapEntry_DoNotUse& other) {
  3592. MergeFromInternal(other);
  3593. }
  3594. ::google::protobuf::Metadata MapOfStruct_ListvalueMapEntry_DoNotUse::GetMetadata() const {
  3595. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  3596. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[8];
  3597. }
  3598. void MapOfStruct_ListvalueMapEntry_DoNotUse::MergeFrom(
  3599. const ::google::protobuf::Message& other) {
  3600. ::google::protobuf::Message::MergeFrom(other);
  3601. }
  3602. // ===================================================================
  3603. void MapOfStruct::InitAsDefaultInstance() {
  3604. }
  3605. void MapOfStruct::clear_struct_map() {
  3606. struct_map_.Clear();
  3607. }
  3608. void MapOfStruct::clear_value_map() {
  3609. value_map_.Clear();
  3610. }
  3611. void MapOfStruct::clear_listvalue_map() {
  3612. listvalue_map_.Clear();
  3613. }
  3614. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3615. const int MapOfStruct::kStructMapFieldNumber;
  3616. const int MapOfStruct::kValueMapFieldNumber;
  3617. const int MapOfStruct::kListvalueMapFieldNumber;
  3618. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3619. MapOfStruct::MapOfStruct()
  3620. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3621. ::google::protobuf::internal::InitSCC(
  3622. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct.base);
  3623. SharedCtor();
  3624. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapOfStruct)
  3625. }
  3626. MapOfStruct::MapOfStruct(const MapOfStruct& from)
  3627. : ::google::protobuf::Message(),
  3628. _internal_metadata_(NULL) {
  3629. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3630. struct_map_.MergeFrom(from.struct_map_);
  3631. value_map_.MergeFrom(from.value_map_);
  3632. listvalue_map_.MergeFrom(from.listvalue_map_);
  3633. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapOfStruct)
  3634. }
  3635. void MapOfStruct::SharedCtor() {
  3636. }
  3637. MapOfStruct::~MapOfStruct() {
  3638. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapOfStruct)
  3639. SharedDtor();
  3640. }
  3641. void MapOfStruct::SharedDtor() {
  3642. }
  3643. void MapOfStruct::SetCachedSize(int size) const {
  3644. _cached_size_.Set(size);
  3645. }
  3646. const ::google::protobuf::Descriptor* MapOfStruct::descriptor() {
  3647. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  3648. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3649. }
  3650. const MapOfStruct& MapOfStruct::default_instance() {
  3651. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_MapOfStruct.base);
  3652. return *internal_default_instance();
  3653. }
  3654. void MapOfStruct::Clear() {
  3655. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapOfStruct)
  3656. ::google::protobuf::uint32 cached_has_bits = 0;
  3657. // Prevent compiler warnings about cached_has_bits being unused
  3658. (void) cached_has_bits;
  3659. struct_map_.Clear();
  3660. value_map_.Clear();
  3661. listvalue_map_.Clear();
  3662. _internal_metadata_.Clear();
  3663. }
  3664. bool MapOfStruct::MergePartialFromCodedStream(
  3665. ::google::protobuf::io::CodedInputStream* input) {
  3666. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3667. ::google::protobuf::uint32 tag;
  3668. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapOfStruct)
  3669. for (;;) {
  3670. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3671. tag = p.first;
  3672. if (!p.second) goto handle_unusual;
  3673. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3674. // map<string, .google.protobuf.Struct> struct_map = 1;
  3675. case 1: {
  3676. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3677. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3678. MapOfStruct_StructMapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  3679. MapOfStruct_StructMapEntry_DoNotUse,
  3680. ::std::string, ::google::protobuf::Struct,
  3681. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  3682. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  3683. 0 >,
  3684. ::google::protobuf::Map< ::std::string, ::google::protobuf::Struct > > parser(&struct_map_);
  3685. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  3686. input, &parser));
  3687. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3688. parser.key().data(), static_cast<int>(parser.key().length()),
  3689. ::google::protobuf::internal::WireFormatLite::PARSE,
  3690. "google.protobuf.testing.MapOfStruct.StructMapEntry.key"));
  3691. } else {
  3692. goto handle_unusual;
  3693. }
  3694. break;
  3695. }
  3696. // map<string, .google.protobuf.Value> value_map = 2;
  3697. case 2: {
  3698. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3699. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  3700. MapOfStruct_ValueMapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  3701. MapOfStruct_ValueMapEntry_DoNotUse,
  3702. ::std::string, ::google::protobuf::Value,
  3703. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  3704. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  3705. 0 >,
  3706. ::google::protobuf::Map< ::std::string, ::google::protobuf::Value > > parser(&value_map_);
  3707. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  3708. input, &parser));
  3709. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3710. parser.key().data(), static_cast<int>(parser.key().length()),
  3711. ::google::protobuf::internal::WireFormatLite::PARSE,
  3712. "google.protobuf.testing.MapOfStruct.ValueMapEntry.key"));
  3713. } else {
  3714. goto handle_unusual;
  3715. }
  3716. break;
  3717. }
  3718. // map<string, .google.protobuf.ListValue> listvalue_map = 3;
  3719. case 3: {
  3720. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3721. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  3722. MapOfStruct_ListvalueMapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  3723. MapOfStruct_ListvalueMapEntry_DoNotUse,
  3724. ::std::string, ::google::protobuf::ListValue,
  3725. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  3726. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  3727. 0 >,
  3728. ::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue > > parser(&listvalue_map_);
  3729. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  3730. input, &parser));
  3731. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3732. parser.key().data(), static_cast<int>(parser.key().length()),
  3733. ::google::protobuf::internal::WireFormatLite::PARSE,
  3734. "google.protobuf.testing.MapOfStruct.ListvalueMapEntry.key"));
  3735. } else {
  3736. goto handle_unusual;
  3737. }
  3738. break;
  3739. }
  3740. default: {
  3741. handle_unusual:
  3742. if (tag == 0) {
  3743. goto success;
  3744. }
  3745. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3746. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3747. break;
  3748. }
  3749. }
  3750. }
  3751. success:
  3752. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapOfStruct)
  3753. return true;
  3754. failure:
  3755. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapOfStruct)
  3756. return false;
  3757. #undef DO_
  3758. }
  3759. void MapOfStruct::SerializeWithCachedSizes(
  3760. ::google::protobuf::io::CodedOutputStream* output) const {
  3761. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapOfStruct)
  3762. ::google::protobuf::uint32 cached_has_bits = 0;
  3763. (void) cached_has_bits;
  3764. // map<string, .google.protobuf.Struct> struct_map = 1;
  3765. if (!this->struct_map().empty()) {
  3766. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_pointer
  3767. ConstPtr;
  3768. typedef ConstPtr SortItem;
  3769. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  3770. struct Utf8Check {
  3771. static void Check(ConstPtr p) {
  3772. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3773. p->first.data(), static_cast<int>(p->first.length()),
  3774. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3775. "google.protobuf.testing.MapOfStruct.StructMapEntry.key");
  3776. }
  3777. };
  3778. if (output->IsSerializationDeterministic() &&
  3779. this->struct_map().size() > 1) {
  3780. ::std::unique_ptr<SortItem[]> items(
  3781. new SortItem[this->struct_map().size()]);
  3782. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::size_type size_type;
  3783. size_type n = 0;
  3784. for (::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_iterator
  3785. it = this->struct_map().begin();
  3786. it != this->struct_map().end(); ++it, ++n) {
  3787. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3788. }
  3789. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3790. ::std::unique_ptr<MapOfStruct_StructMapEntry_DoNotUse> entry;
  3791. for (size_type i = 0; i < n; i++) {
  3792. entry.reset(struct_map_.NewEntryWrapper(
  3793. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  3794. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3795. 1, *entry, output);
  3796. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  3797. }
  3798. } else {
  3799. ::std::unique_ptr<MapOfStruct_StructMapEntry_DoNotUse> entry;
  3800. for (::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_iterator
  3801. it = this->struct_map().begin();
  3802. it != this->struct_map().end(); ++it) {
  3803. entry.reset(struct_map_.NewEntryWrapper(
  3804. it->first, it->second));
  3805. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3806. 1, *entry, output);
  3807. Utf8Check::Check(&*it);
  3808. }
  3809. }
  3810. }
  3811. // map<string, .google.protobuf.Value> value_map = 2;
  3812. if (!this->value_map().empty()) {
  3813. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_pointer
  3814. ConstPtr;
  3815. typedef ConstPtr SortItem;
  3816. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  3817. struct Utf8Check {
  3818. static void Check(ConstPtr p) {
  3819. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3820. p->first.data(), static_cast<int>(p->first.length()),
  3821. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3822. "google.protobuf.testing.MapOfStruct.ValueMapEntry.key");
  3823. }
  3824. };
  3825. if (output->IsSerializationDeterministic() &&
  3826. this->value_map().size() > 1) {
  3827. ::std::unique_ptr<SortItem[]> items(
  3828. new SortItem[this->value_map().size()]);
  3829. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type;
  3830. size_type n = 0;
  3831. for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
  3832. it = this->value_map().begin();
  3833. it != this->value_map().end(); ++it, ++n) {
  3834. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3835. }
  3836. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3837. ::std::unique_ptr<MapOfStruct_ValueMapEntry_DoNotUse> entry;
  3838. for (size_type i = 0; i < n; i++) {
  3839. entry.reset(value_map_.NewEntryWrapper(
  3840. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  3841. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3842. 2, *entry, output);
  3843. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  3844. }
  3845. } else {
  3846. ::std::unique_ptr<MapOfStruct_ValueMapEntry_DoNotUse> entry;
  3847. for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
  3848. it = this->value_map().begin();
  3849. it != this->value_map().end(); ++it) {
  3850. entry.reset(value_map_.NewEntryWrapper(
  3851. it->first, it->second));
  3852. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3853. 2, *entry, output);
  3854. Utf8Check::Check(&*it);
  3855. }
  3856. }
  3857. }
  3858. // map<string, .google.protobuf.ListValue> listvalue_map = 3;
  3859. if (!this->listvalue_map().empty()) {
  3860. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_pointer
  3861. ConstPtr;
  3862. typedef ConstPtr SortItem;
  3863. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  3864. struct Utf8Check {
  3865. static void Check(ConstPtr p) {
  3866. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3867. p->first.data(), static_cast<int>(p->first.length()),
  3868. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3869. "google.protobuf.testing.MapOfStruct.ListvalueMapEntry.key");
  3870. }
  3871. };
  3872. if (output->IsSerializationDeterministic() &&
  3873. this->listvalue_map().size() > 1) {
  3874. ::std::unique_ptr<SortItem[]> items(
  3875. new SortItem[this->listvalue_map().size()]);
  3876. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::size_type size_type;
  3877. size_type n = 0;
  3878. for (::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_iterator
  3879. it = this->listvalue_map().begin();
  3880. it != this->listvalue_map().end(); ++it, ++n) {
  3881. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3882. }
  3883. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3884. ::std::unique_ptr<MapOfStruct_ListvalueMapEntry_DoNotUse> entry;
  3885. for (size_type i = 0; i < n; i++) {
  3886. entry.reset(listvalue_map_.NewEntryWrapper(
  3887. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  3888. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3889. 3, *entry, output);
  3890. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  3891. }
  3892. } else {
  3893. ::std::unique_ptr<MapOfStruct_ListvalueMapEntry_DoNotUse> entry;
  3894. for (::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_iterator
  3895. it = this->listvalue_map().begin();
  3896. it != this->listvalue_map().end(); ++it) {
  3897. entry.reset(listvalue_map_.NewEntryWrapper(
  3898. it->first, it->second));
  3899. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3900. 3, *entry, output);
  3901. Utf8Check::Check(&*it);
  3902. }
  3903. }
  3904. }
  3905. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3906. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3907. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3908. }
  3909. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapOfStruct)
  3910. }
  3911. ::google::protobuf::uint8* MapOfStruct::InternalSerializeWithCachedSizesToArray(
  3912. bool deterministic, ::google::protobuf::uint8* target) const {
  3913. (void)deterministic; // Unused
  3914. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapOfStruct)
  3915. ::google::protobuf::uint32 cached_has_bits = 0;
  3916. (void) cached_has_bits;
  3917. // map<string, .google.protobuf.Struct> struct_map = 1;
  3918. if (!this->struct_map().empty()) {
  3919. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_pointer
  3920. ConstPtr;
  3921. typedef ConstPtr SortItem;
  3922. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  3923. struct Utf8Check {
  3924. static void Check(ConstPtr p) {
  3925. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3926. p->first.data(), static_cast<int>(p->first.length()),
  3927. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3928. "google.protobuf.testing.MapOfStruct.StructMapEntry.key");
  3929. }
  3930. };
  3931. if (deterministic &&
  3932. this->struct_map().size() > 1) {
  3933. ::std::unique_ptr<SortItem[]> items(
  3934. new SortItem[this->struct_map().size()]);
  3935. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::size_type size_type;
  3936. size_type n = 0;
  3937. for (::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_iterator
  3938. it = this->struct_map().begin();
  3939. it != this->struct_map().end(); ++it, ++n) {
  3940. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3941. }
  3942. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3943. ::std::unique_ptr<MapOfStruct_StructMapEntry_DoNotUse> entry;
  3944. for (size_type i = 0; i < n; i++) {
  3945. entry.reset(struct_map_.NewEntryWrapper(
  3946. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  3947. target = ::google::protobuf::internal::WireFormatLite::
  3948. InternalWriteMessageNoVirtualToArray(
  3949. 1, *entry, deterministic, target);
  3950. ;
  3951. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  3952. }
  3953. } else {
  3954. ::std::unique_ptr<MapOfStruct_StructMapEntry_DoNotUse> entry;
  3955. for (::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_iterator
  3956. it = this->struct_map().begin();
  3957. it != this->struct_map().end(); ++it) {
  3958. entry.reset(struct_map_.NewEntryWrapper(
  3959. it->first, it->second));
  3960. target = ::google::protobuf::internal::WireFormatLite::
  3961. InternalWriteMessageNoVirtualToArray(
  3962. 1, *entry, deterministic, target);
  3963. ;
  3964. Utf8Check::Check(&*it);
  3965. }
  3966. }
  3967. }
  3968. // map<string, .google.protobuf.Value> value_map = 2;
  3969. if (!this->value_map().empty()) {
  3970. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_pointer
  3971. ConstPtr;
  3972. typedef ConstPtr SortItem;
  3973. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  3974. struct Utf8Check {
  3975. static void Check(ConstPtr p) {
  3976. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3977. p->first.data(), static_cast<int>(p->first.length()),
  3978. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3979. "google.protobuf.testing.MapOfStruct.ValueMapEntry.key");
  3980. }
  3981. };
  3982. if (deterministic &&
  3983. this->value_map().size() > 1) {
  3984. ::std::unique_ptr<SortItem[]> items(
  3985. new SortItem[this->value_map().size()]);
  3986. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type;
  3987. size_type n = 0;
  3988. for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
  3989. it = this->value_map().begin();
  3990. it != this->value_map().end(); ++it, ++n) {
  3991. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3992. }
  3993. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3994. ::std::unique_ptr<MapOfStruct_ValueMapEntry_DoNotUse> entry;
  3995. for (size_type i = 0; i < n; i++) {
  3996. entry.reset(value_map_.NewEntryWrapper(
  3997. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  3998. target = ::google::protobuf::internal::WireFormatLite::
  3999. InternalWriteMessageNoVirtualToArray(
  4000. 2, *entry, deterministic, target);
  4001. ;
  4002. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  4003. }
  4004. } else {
  4005. ::std::unique_ptr<MapOfStruct_ValueMapEntry_DoNotUse> entry;
  4006. for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
  4007. it = this->value_map().begin();
  4008. it != this->value_map().end(); ++it) {
  4009. entry.reset(value_map_.NewEntryWrapper(
  4010. it->first, it->second));
  4011. target = ::google::protobuf::internal::WireFormatLite::
  4012. InternalWriteMessageNoVirtualToArray(
  4013. 2, *entry, deterministic, target);
  4014. ;
  4015. Utf8Check::Check(&*it);
  4016. }
  4017. }
  4018. }
  4019. // map<string, .google.protobuf.ListValue> listvalue_map = 3;
  4020. if (!this->listvalue_map().empty()) {
  4021. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_pointer
  4022. ConstPtr;
  4023. typedef ConstPtr SortItem;
  4024. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  4025. struct Utf8Check {
  4026. static void Check(ConstPtr p) {
  4027. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4028. p->first.data(), static_cast<int>(p->first.length()),
  4029. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4030. "google.protobuf.testing.MapOfStruct.ListvalueMapEntry.key");
  4031. }
  4032. };
  4033. if (deterministic &&
  4034. this->listvalue_map().size() > 1) {
  4035. ::std::unique_ptr<SortItem[]> items(
  4036. new SortItem[this->listvalue_map().size()]);
  4037. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::size_type size_type;
  4038. size_type n = 0;
  4039. for (::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_iterator
  4040. it = this->listvalue_map().begin();
  4041. it != this->listvalue_map().end(); ++it, ++n) {
  4042. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  4043. }
  4044. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  4045. ::std::unique_ptr<MapOfStruct_ListvalueMapEntry_DoNotUse> entry;
  4046. for (size_type i = 0; i < n; i++) {
  4047. entry.reset(listvalue_map_.NewEntryWrapper(
  4048. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  4049. target = ::google::protobuf::internal::WireFormatLite::
  4050. InternalWriteMessageNoVirtualToArray(
  4051. 3, *entry, deterministic, target);
  4052. ;
  4053. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  4054. }
  4055. } else {
  4056. ::std::unique_ptr<MapOfStruct_ListvalueMapEntry_DoNotUse> entry;
  4057. for (::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_iterator
  4058. it = this->listvalue_map().begin();
  4059. it != this->listvalue_map().end(); ++it) {
  4060. entry.reset(listvalue_map_.NewEntryWrapper(
  4061. it->first, it->second));
  4062. target = ::google::protobuf::internal::WireFormatLite::
  4063. InternalWriteMessageNoVirtualToArray(
  4064. 3, *entry, deterministic, target);
  4065. ;
  4066. Utf8Check::Check(&*it);
  4067. }
  4068. }
  4069. }
  4070. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4071. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4072. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4073. }
  4074. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapOfStruct)
  4075. return target;
  4076. }
  4077. size_t MapOfStruct::ByteSizeLong() const {
  4078. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapOfStruct)
  4079. size_t total_size = 0;
  4080. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4081. total_size +=
  4082. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4083. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4084. }
  4085. // map<string, .google.protobuf.Struct> struct_map = 1;
  4086. total_size += 1 *
  4087. ::google::protobuf::internal::FromIntSize(this->struct_map_size());
  4088. {
  4089. ::std::unique_ptr<MapOfStruct_StructMapEntry_DoNotUse> entry;
  4090. for (::google::protobuf::Map< ::std::string, ::google::protobuf::Struct >::const_iterator
  4091. it = this->struct_map().begin();
  4092. it != this->struct_map().end(); ++it) {
  4093. entry.reset(struct_map_.NewEntryWrapper(it->first, it->second));
  4094. total_size += ::google::protobuf::internal::WireFormatLite::
  4095. MessageSizeNoVirtual(*entry);
  4096. }
  4097. }
  4098. // map<string, .google.protobuf.Value> value_map = 2;
  4099. total_size += 1 *
  4100. ::google::protobuf::internal::FromIntSize(this->value_map_size());
  4101. {
  4102. ::std::unique_ptr<MapOfStruct_ValueMapEntry_DoNotUse> entry;
  4103. for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
  4104. it = this->value_map().begin();
  4105. it != this->value_map().end(); ++it) {
  4106. entry.reset(value_map_.NewEntryWrapper(it->first, it->second));
  4107. total_size += ::google::protobuf::internal::WireFormatLite::
  4108. MessageSizeNoVirtual(*entry);
  4109. }
  4110. }
  4111. // map<string, .google.protobuf.ListValue> listvalue_map = 3;
  4112. total_size += 1 *
  4113. ::google::protobuf::internal::FromIntSize(this->listvalue_map_size());
  4114. {
  4115. ::std::unique_ptr<MapOfStruct_ListvalueMapEntry_DoNotUse> entry;
  4116. for (::google::protobuf::Map< ::std::string, ::google::protobuf::ListValue >::const_iterator
  4117. it = this->listvalue_map().begin();
  4118. it != this->listvalue_map().end(); ++it) {
  4119. entry.reset(listvalue_map_.NewEntryWrapper(it->first, it->second));
  4120. total_size += ::google::protobuf::internal::WireFormatLite::
  4121. MessageSizeNoVirtual(*entry);
  4122. }
  4123. }
  4124. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4125. SetCachedSize(cached_size);
  4126. return total_size;
  4127. }
  4128. void MapOfStruct::MergeFrom(const ::google::protobuf::Message& from) {
  4129. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapOfStruct)
  4130. GOOGLE_DCHECK_NE(&from, this);
  4131. const MapOfStruct* source =
  4132. ::google::protobuf::internal::DynamicCastToGenerated<const MapOfStruct>(
  4133. &from);
  4134. if (source == NULL) {
  4135. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapOfStruct)
  4136. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4137. } else {
  4138. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapOfStruct)
  4139. MergeFrom(*source);
  4140. }
  4141. }
  4142. void MapOfStruct::MergeFrom(const MapOfStruct& from) {
  4143. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapOfStruct)
  4144. GOOGLE_DCHECK_NE(&from, this);
  4145. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4146. ::google::protobuf::uint32 cached_has_bits = 0;
  4147. (void) cached_has_bits;
  4148. struct_map_.MergeFrom(from.struct_map_);
  4149. value_map_.MergeFrom(from.value_map_);
  4150. listvalue_map_.MergeFrom(from.listvalue_map_);
  4151. }
  4152. void MapOfStruct::CopyFrom(const ::google::protobuf::Message& from) {
  4153. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapOfStruct)
  4154. if (&from == this) return;
  4155. Clear();
  4156. MergeFrom(from);
  4157. }
  4158. void MapOfStruct::CopyFrom(const MapOfStruct& from) {
  4159. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapOfStruct)
  4160. if (&from == this) return;
  4161. Clear();
  4162. MergeFrom(from);
  4163. }
  4164. bool MapOfStruct::IsInitialized() const {
  4165. return true;
  4166. }
  4167. void MapOfStruct::Swap(MapOfStruct* other) {
  4168. if (other == this) return;
  4169. InternalSwap(other);
  4170. }
  4171. void MapOfStruct::InternalSwap(MapOfStruct* other) {
  4172. using std::swap;
  4173. struct_map_.Swap(&other->struct_map_);
  4174. value_map_.Swap(&other->value_map_);
  4175. listvalue_map_.Swap(&other->listvalue_map_);
  4176. _internal_metadata_.Swap(&other->_internal_metadata_);
  4177. }
  4178. ::google::protobuf::Metadata MapOfStruct::GetMetadata() const {
  4179. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  4180. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
  4181. }
  4182. // ===================================================================
  4183. void Dummy::InitAsDefaultInstance() {
  4184. }
  4185. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4186. const int Dummy::kTextFieldNumber;
  4187. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4188. Dummy::Dummy()
  4189. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4190. ::google::protobuf::internal::InitSCC(
  4191. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_Dummy.base);
  4192. SharedCtor();
  4193. // @@protoc_insertion_point(constructor:google.protobuf.testing.Dummy)
  4194. }
  4195. Dummy::Dummy(const Dummy& from)
  4196. : ::google::protobuf::Message(),
  4197. _internal_metadata_(NULL) {
  4198. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4199. text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4200. if (from.text().size() > 0) {
  4201. text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.text_);
  4202. }
  4203. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Dummy)
  4204. }
  4205. void Dummy::SharedCtor() {
  4206. text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4207. }
  4208. Dummy::~Dummy() {
  4209. // @@protoc_insertion_point(destructor:google.protobuf.testing.Dummy)
  4210. SharedDtor();
  4211. }
  4212. void Dummy::SharedDtor() {
  4213. text_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4214. }
  4215. void Dummy::SetCachedSize(int size) const {
  4216. _cached_size_.Set(size);
  4217. }
  4218. const ::google::protobuf::Descriptor* Dummy::descriptor() {
  4219. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  4220. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4221. }
  4222. const Dummy& Dummy::default_instance() {
  4223. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_Dummy.base);
  4224. return *internal_default_instance();
  4225. }
  4226. void Dummy::Clear() {
  4227. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.Dummy)
  4228. ::google::protobuf::uint32 cached_has_bits = 0;
  4229. // Prevent compiler warnings about cached_has_bits being unused
  4230. (void) cached_has_bits;
  4231. text_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4232. _internal_metadata_.Clear();
  4233. }
  4234. bool Dummy::MergePartialFromCodedStream(
  4235. ::google::protobuf::io::CodedInputStream* input) {
  4236. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4237. ::google::protobuf::uint32 tag;
  4238. // @@protoc_insertion_point(parse_start:google.protobuf.testing.Dummy)
  4239. for (;;) {
  4240. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4241. tag = p.first;
  4242. if (!p.second) goto handle_unusual;
  4243. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4244. // string text = 1;
  4245. case 1: {
  4246. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4247. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4248. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4249. input, this->mutable_text()));
  4250. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4251. this->text().data(), static_cast<int>(this->text().length()),
  4252. ::google::protobuf::internal::WireFormatLite::PARSE,
  4253. "google.protobuf.testing.Dummy.text"));
  4254. } else {
  4255. goto handle_unusual;
  4256. }
  4257. break;
  4258. }
  4259. default: {
  4260. handle_unusual:
  4261. if (tag == 0) {
  4262. goto success;
  4263. }
  4264. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4265. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4266. break;
  4267. }
  4268. }
  4269. }
  4270. success:
  4271. // @@protoc_insertion_point(parse_success:google.protobuf.testing.Dummy)
  4272. return true;
  4273. failure:
  4274. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Dummy)
  4275. return false;
  4276. #undef DO_
  4277. }
  4278. void Dummy::SerializeWithCachedSizes(
  4279. ::google::protobuf::io::CodedOutputStream* output) const {
  4280. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.Dummy)
  4281. ::google::protobuf::uint32 cached_has_bits = 0;
  4282. (void) cached_has_bits;
  4283. // string text = 1;
  4284. if (this->text().size() > 0) {
  4285. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4286. this->text().data(), static_cast<int>(this->text().length()),
  4287. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4288. "google.protobuf.testing.Dummy.text");
  4289. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  4290. 1, this->text(), output);
  4291. }
  4292. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4293. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4294. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4295. }
  4296. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.Dummy)
  4297. }
  4298. ::google::protobuf::uint8* Dummy::InternalSerializeWithCachedSizesToArray(
  4299. bool deterministic, ::google::protobuf::uint8* target) const {
  4300. (void)deterministic; // Unused
  4301. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.Dummy)
  4302. ::google::protobuf::uint32 cached_has_bits = 0;
  4303. (void) cached_has_bits;
  4304. // string text = 1;
  4305. if (this->text().size() > 0) {
  4306. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4307. this->text().data(), static_cast<int>(this->text().length()),
  4308. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4309. "google.protobuf.testing.Dummy.text");
  4310. target =
  4311. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  4312. 1, this->text(), target);
  4313. }
  4314. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4315. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4316. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4317. }
  4318. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.Dummy)
  4319. return target;
  4320. }
  4321. size_t Dummy::ByteSizeLong() const {
  4322. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Dummy)
  4323. size_t total_size = 0;
  4324. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4325. total_size +=
  4326. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4327. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4328. }
  4329. // string text = 1;
  4330. if (this->text().size() > 0) {
  4331. total_size += 1 +
  4332. ::google::protobuf::internal::WireFormatLite::StringSize(
  4333. this->text());
  4334. }
  4335. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4336. SetCachedSize(cached_size);
  4337. return total_size;
  4338. }
  4339. void Dummy::MergeFrom(const ::google::protobuf::Message& from) {
  4340. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.Dummy)
  4341. GOOGLE_DCHECK_NE(&from, this);
  4342. const Dummy* source =
  4343. ::google::protobuf::internal::DynamicCastToGenerated<const Dummy>(
  4344. &from);
  4345. if (source == NULL) {
  4346. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.Dummy)
  4347. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4348. } else {
  4349. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.Dummy)
  4350. MergeFrom(*source);
  4351. }
  4352. }
  4353. void Dummy::MergeFrom(const Dummy& from) {
  4354. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.Dummy)
  4355. GOOGLE_DCHECK_NE(&from, this);
  4356. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4357. ::google::protobuf::uint32 cached_has_bits = 0;
  4358. (void) cached_has_bits;
  4359. if (from.text().size() > 0) {
  4360. text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.text_);
  4361. }
  4362. }
  4363. void Dummy::CopyFrom(const ::google::protobuf::Message& from) {
  4364. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.Dummy)
  4365. if (&from == this) return;
  4366. Clear();
  4367. MergeFrom(from);
  4368. }
  4369. void Dummy::CopyFrom(const Dummy& from) {
  4370. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.Dummy)
  4371. if (&from == this) return;
  4372. Clear();
  4373. MergeFrom(from);
  4374. }
  4375. bool Dummy::IsInitialized() const {
  4376. return true;
  4377. }
  4378. void Dummy::Swap(Dummy* other) {
  4379. if (other == this) return;
  4380. InternalSwap(other);
  4381. }
  4382. void Dummy::InternalSwap(Dummy* other) {
  4383. using std::swap;
  4384. text_.Swap(&other->text_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  4385. GetArenaNoVirtual());
  4386. _internal_metadata_.Swap(&other->_internal_metadata_);
  4387. }
  4388. ::google::protobuf::Metadata Dummy::GetMetadata() const {
  4389. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  4390. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
  4391. }
  4392. // ===================================================================
  4393. void StructType::InitAsDefaultInstance() {
  4394. ::google::protobuf::testing::_StructType_default_instance_._instance.get_mutable()->object_ = const_cast< ::google::protobuf::Struct*>(
  4395. ::google::protobuf::Struct::internal_default_instance());
  4396. }
  4397. void StructType::clear_object() {
  4398. if (GetArenaNoVirtual() == NULL && object_ != NULL) {
  4399. delete object_;
  4400. }
  4401. object_ = NULL;
  4402. }
  4403. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4404. const int StructType::kObjectFieldNumber;
  4405. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4406. StructType::StructType()
  4407. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4408. ::google::protobuf::internal::InitSCC(
  4409. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructType.base);
  4410. SharedCtor();
  4411. // @@protoc_insertion_point(constructor:google.protobuf.testing.StructType)
  4412. }
  4413. StructType::StructType(const StructType& from)
  4414. : ::google::protobuf::Message(),
  4415. _internal_metadata_(NULL) {
  4416. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4417. if (from.has_object()) {
  4418. object_ = new ::google::protobuf::Struct(*from.object_);
  4419. } else {
  4420. object_ = NULL;
  4421. }
  4422. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.StructType)
  4423. }
  4424. void StructType::SharedCtor() {
  4425. object_ = NULL;
  4426. }
  4427. StructType::~StructType() {
  4428. // @@protoc_insertion_point(destructor:google.protobuf.testing.StructType)
  4429. SharedDtor();
  4430. }
  4431. void StructType::SharedDtor() {
  4432. if (this != internal_default_instance()) delete object_;
  4433. }
  4434. void StructType::SetCachedSize(int size) const {
  4435. _cached_size_.Set(size);
  4436. }
  4437. const ::google::protobuf::Descriptor* StructType::descriptor() {
  4438. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  4439. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4440. }
  4441. const StructType& StructType::default_instance() {
  4442. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::scc_info_StructType.base);
  4443. return *internal_default_instance();
  4444. }
  4445. void StructType::Clear() {
  4446. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.StructType)
  4447. ::google::protobuf::uint32 cached_has_bits = 0;
  4448. // Prevent compiler warnings about cached_has_bits being unused
  4449. (void) cached_has_bits;
  4450. if (GetArenaNoVirtual() == NULL && object_ != NULL) {
  4451. delete object_;
  4452. }
  4453. object_ = NULL;
  4454. _internal_metadata_.Clear();
  4455. }
  4456. bool StructType::MergePartialFromCodedStream(
  4457. ::google::protobuf::io::CodedInputStream* input) {
  4458. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4459. ::google::protobuf::uint32 tag;
  4460. // @@protoc_insertion_point(parse_start:google.protobuf.testing.StructType)
  4461. for (;;) {
  4462. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4463. tag = p.first;
  4464. if (!p.second) goto handle_unusual;
  4465. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4466. // .google.protobuf.Struct object = 1;
  4467. case 1: {
  4468. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4469. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4470. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4471. input, mutable_object()));
  4472. } else {
  4473. goto handle_unusual;
  4474. }
  4475. break;
  4476. }
  4477. default: {
  4478. handle_unusual:
  4479. if (tag == 0) {
  4480. goto success;
  4481. }
  4482. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4483. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4484. break;
  4485. }
  4486. }
  4487. }
  4488. success:
  4489. // @@protoc_insertion_point(parse_success:google.protobuf.testing.StructType)
  4490. return true;
  4491. failure:
  4492. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.StructType)
  4493. return false;
  4494. #undef DO_
  4495. }
  4496. void StructType::SerializeWithCachedSizes(
  4497. ::google::protobuf::io::CodedOutputStream* output) const {
  4498. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.StructType)
  4499. ::google::protobuf::uint32 cached_has_bits = 0;
  4500. (void) cached_has_bits;
  4501. // .google.protobuf.Struct object = 1;
  4502. if (this->has_object()) {
  4503. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4504. 1, this->_internal_object(), output);
  4505. }
  4506. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4507. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4508. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4509. }
  4510. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.StructType)
  4511. }
  4512. ::google::protobuf::uint8* StructType::InternalSerializeWithCachedSizesToArray(
  4513. bool deterministic, ::google::protobuf::uint8* target) const {
  4514. (void)deterministic; // Unused
  4515. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.StructType)
  4516. ::google::protobuf::uint32 cached_has_bits = 0;
  4517. (void) cached_has_bits;
  4518. // .google.protobuf.Struct object = 1;
  4519. if (this->has_object()) {
  4520. target = ::google::protobuf::internal::WireFormatLite::
  4521. InternalWriteMessageToArray(
  4522. 1, this->_internal_object(), deterministic, target);
  4523. }
  4524. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4525. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4526. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4527. }
  4528. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.StructType)
  4529. return target;
  4530. }
  4531. size_t StructType::ByteSizeLong() const {
  4532. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.StructType)
  4533. size_t total_size = 0;
  4534. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4535. total_size +=
  4536. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4537. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4538. }
  4539. // .google.protobuf.Struct object = 1;
  4540. if (this->has_object()) {
  4541. total_size += 1 +
  4542. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4543. *object_);
  4544. }
  4545. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4546. SetCachedSize(cached_size);
  4547. return total_size;
  4548. }
  4549. void StructType::MergeFrom(const ::google::protobuf::Message& from) {
  4550. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.StructType)
  4551. GOOGLE_DCHECK_NE(&from, this);
  4552. const StructType* source =
  4553. ::google::protobuf::internal::DynamicCastToGenerated<const StructType>(
  4554. &from);
  4555. if (source == NULL) {
  4556. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.StructType)
  4557. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4558. } else {
  4559. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.StructType)
  4560. MergeFrom(*source);
  4561. }
  4562. }
  4563. void StructType::MergeFrom(const StructType& from) {
  4564. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.StructType)
  4565. GOOGLE_DCHECK_NE(&from, this);
  4566. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4567. ::google::protobuf::uint32 cached_has_bits = 0;
  4568. (void) cached_has_bits;
  4569. if (from.has_object()) {
  4570. mutable_object()->::google::protobuf::Struct::MergeFrom(from.object());
  4571. }
  4572. }
  4573. void StructType::CopyFrom(const ::google::protobuf::Message& from) {
  4574. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.StructType)
  4575. if (&from == this) return;
  4576. Clear();
  4577. MergeFrom(from);
  4578. }
  4579. void StructType::CopyFrom(const StructType& from) {
  4580. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.StructType)
  4581. if (&from == this) return;
  4582. Clear();
  4583. MergeFrom(from);
  4584. }
  4585. bool StructType::IsInitialized() const {
  4586. return true;
  4587. }
  4588. void StructType::Swap(StructType* other) {
  4589. if (other == this) return;
  4590. InternalSwap(other);
  4591. }
  4592. void StructType::InternalSwap(StructType* other) {
  4593. using std::swap;
  4594. swap(object_, other->object_);
  4595. _internal_metadata_.Swap(&other->_internal_metadata_);
  4596. }
  4597. ::google::protobuf::Metadata StructType::GetMetadata() const {
  4598. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
  4599. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
  4600. }
  4601. // @@protoc_insertion_point(namespace_scope)
  4602. } // namespace testing
  4603. } // namespace protobuf
  4604. } // namespace google
  4605. namespace google {
  4606. namespace protobuf {
  4607. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StructTestCases* Arena::CreateMaybeMessage< ::google::protobuf::testing::StructTestCases >(Arena* arena) {
  4608. return Arena::CreateInternal< ::google::protobuf::testing::StructTestCases >(arena);
  4609. }
  4610. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StructWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::StructWrapper >(Arena* arena) {
  4611. return Arena::CreateInternal< ::google::protobuf::testing::StructWrapper >(arena);
  4612. }
  4613. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::ValueWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::ValueWrapper >(Arena* arena) {
  4614. return Arena::CreateInternal< ::google::protobuf::testing::ValueWrapper >(arena);
  4615. }
  4616. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::RepeatedValueWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::RepeatedValueWrapper >(Arena* arena) {
  4617. return Arena::CreateInternal< ::google::protobuf::testing::RepeatedValueWrapper >(arena);
  4618. }
  4619. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::ListValueWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::ListValueWrapper >(Arena* arena) {
  4620. return Arena::CreateInternal< ::google::protobuf::testing::ListValueWrapper >(arena);
  4621. }
  4622. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::RepeatedListValueWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::RepeatedListValueWrapper >(Arena* arena) {
  4623. return Arena::CreateInternal< ::google::protobuf::testing::RepeatedListValueWrapper >(arena);
  4624. }
  4625. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse >(Arena* arena) {
  4626. return Arena::CreateInternal< ::google::protobuf::testing::MapOfStruct_StructMapEntry_DoNotUse >(arena);
  4627. }
  4628. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse >(Arena* arena) {
  4629. return Arena::CreateInternal< ::google::protobuf::testing::MapOfStruct_ValueMapEntry_DoNotUse >(arena);
  4630. }
  4631. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse >(Arena* arena) {
  4632. return Arena::CreateInternal< ::google::protobuf::testing::MapOfStruct_ListvalueMapEntry_DoNotUse >(arena);
  4633. }
  4634. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOfStruct* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOfStruct >(Arena* arena) {
  4635. return Arena::CreateInternal< ::google::protobuf::testing::MapOfStruct >(arena);
  4636. }
  4637. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Dummy* Arena::CreateMaybeMessage< ::google::protobuf::testing::Dummy >(Arena* arena) {
  4638. return Arena::CreateInternal< ::google::protobuf::testing::Dummy >(arena);
  4639. }
  4640. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StructType* Arena::CreateMaybeMessage< ::google::protobuf::testing::StructType >(Arena* arena) {
  4641. return Arena::CreateInternal< ::google::protobuf::testing::StructType >(arena);
  4642. }
  4643. } // namespace protobuf
  4644. } // namespace google
  4645. // @@protoc_insertion_point(global_scope)