anys.pb.cc 154 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/util/internal/testdata/anys.proto
  3. #include <google/protobuf/util/internal/testdata/anys.pb.h>
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. namespace protobuf_google_2fprotobuf_2fany_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fany_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Any;
  20. } // namespace protobuf_google_2fprotobuf_2fany_2eproto
  21. namespace protobuf_google_2fprotobuf_2fduration_2eproto {
  22. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fduration_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Duration;
  23. } // namespace protobuf_google_2fprotobuf_2fduration_2eproto
  24. namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
  25. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue;
  26. } // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
  27. namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto {
  28. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2ftimestamp_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp;
  29. } // namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto
  30. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto {
  31. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Data_MapDataEntry_DoNotUse;
  32. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_AnyWrapper;
  33. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto ::google::protobuf::internal::SCCInfo<4> scc_info_Data;
  34. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto
  35. namespace protobuf_google_2fprotobuf_2fwrappers_2eproto {
  36. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_DoubleValue;
  37. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Int32Value;
  38. } // namespace protobuf_google_2fprotobuf_2fwrappers_2eproto
  39. namespace google {
  40. namespace protobuf {
  41. namespace testing {
  42. class AnyTestCasesDefaultTypeInternal {
  43. public:
  44. ::google::protobuf::internal::ExplicitlyConstructed<AnyTestCases>
  45. _instance;
  46. } _AnyTestCases_default_instance_;
  47. class AnyWrapperDefaultTypeInternal {
  48. public:
  49. ::google::protobuf::internal::ExplicitlyConstructed<AnyWrapper>
  50. _instance;
  51. } _AnyWrapper_default_instance_;
  52. class ImportsDefaultTypeInternal {
  53. public:
  54. ::google::protobuf::internal::ExplicitlyConstructed<Imports>
  55. _instance;
  56. } _Imports_default_instance_;
  57. class Data_MapDataEntry_DoNotUseDefaultTypeInternal {
  58. public:
  59. ::google::protobuf::internal::ExplicitlyConstructed<Data_MapDataEntry_DoNotUse>
  60. _instance;
  61. } _Data_MapDataEntry_DoNotUse_default_instance_;
  62. class DataDefaultTypeInternal {
  63. public:
  64. ::google::protobuf::internal::ExplicitlyConstructed<Data>
  65. _instance;
  66. } _Data_default_instance_;
  67. class AnyInDefaultTypeInternal {
  68. public:
  69. ::google::protobuf::internal::ExplicitlyConstructed<AnyIn>
  70. _instance;
  71. } _AnyIn_default_instance_;
  72. class AnyOutDefaultTypeInternal {
  73. public:
  74. ::google::protobuf::internal::ExplicitlyConstructed<AnyOut>
  75. _instance;
  76. } _AnyOut_default_instance_;
  77. class AnyMDefaultTypeInternal {
  78. public:
  79. ::google::protobuf::internal::ExplicitlyConstructed<AnyM>
  80. _instance;
  81. } _AnyM_default_instance_;
  82. } // namespace testing
  83. } // namespace protobuf
  84. } // namespace google
  85. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto {
  86. static void InitDefaultsAnyTestCases() {
  87. GOOGLE_PROTOBUF_VERIFY_VERSION;
  88. {
  89. void* ptr = &::google::protobuf::testing::_AnyTestCases_default_instance_;
  90. new (ptr) ::google::protobuf::testing::AnyTestCases();
  91. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  92. }
  93. ::google::protobuf::testing::AnyTestCases::InitAsDefaultInstance();
  94. }
  95. ::google::protobuf::internal::SCCInfo<2> scc_info_AnyTestCases =
  96. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsAnyTestCases}, {
  97. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyWrapper.base,
  98. &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};
  99. static void InitDefaultsAnyWrapper() {
  100. GOOGLE_PROTOBUF_VERIFY_VERSION;
  101. {
  102. void* ptr = &::google::protobuf::testing::_AnyWrapper_default_instance_;
  103. new (ptr) ::google::protobuf::testing::AnyWrapper();
  104. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  105. }
  106. ::google::protobuf::testing::AnyWrapper::InitAsDefaultInstance();
  107. }
  108. ::google::protobuf::internal::SCCInfo<1> scc_info_AnyWrapper =
  109. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAnyWrapper}, {
  110. &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};
  111. static void InitDefaultsImports() {
  112. GOOGLE_PROTOBUF_VERIFY_VERSION;
  113. {
  114. void* ptr = &::google::protobuf::testing::_Imports_default_instance_;
  115. new (ptr) ::google::protobuf::testing::Imports();
  116. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  117. }
  118. ::google::protobuf::testing::Imports::InitAsDefaultInstance();
  119. }
  120. ::google::protobuf::internal::SCCInfo<6> scc_info_Imports =
  121. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsImports}, {
  122. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_DoubleValue.base,
  123. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,
  124. &protobuf_google_2fprotobuf_2ftimestamp_2eproto::scc_info_Timestamp.base,
  125. &protobuf_google_2fprotobuf_2fduration_2eproto::scc_info_Duration.base,
  126. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_Int32Value.base,
  127. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data.base,}};
  128. static void InitDefaultsData_MapDataEntry_DoNotUse() {
  129. GOOGLE_PROTOBUF_VERIFY_VERSION;
  130. {
  131. void* ptr = &::google::protobuf::testing::_Data_MapDataEntry_DoNotUse_default_instance_;
  132. new (ptr) ::google::protobuf::testing::Data_MapDataEntry_DoNotUse();
  133. }
  134. ::google::protobuf::testing::Data_MapDataEntry_DoNotUse::InitAsDefaultInstance();
  135. }
  136. ::google::protobuf::internal::SCCInfo<0> scc_info_Data_MapDataEntry_DoNotUse =
  137. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsData_MapDataEntry_DoNotUse}, {}};
  138. static void InitDefaultsData() {
  139. GOOGLE_PROTOBUF_VERIFY_VERSION;
  140. {
  141. void* ptr = &::google::protobuf::testing::_Data_default_instance_;
  142. new (ptr) ::google::protobuf::testing::Data();
  143. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  144. }
  145. ::google::protobuf::testing::Data::InitAsDefaultInstance();
  146. }
  147. ::google::protobuf::internal::SCCInfo<4> scc_info_Data =
  148. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsData}, {
  149. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_Int32Value.base,
  150. &protobuf_google_2fprotobuf_2ftimestamp_2eproto::scc_info_Timestamp.base,
  151. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data_MapDataEntry_DoNotUse.base,
  152. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
  153. static void InitDefaultsAnyIn() {
  154. GOOGLE_PROTOBUF_VERIFY_VERSION;
  155. {
  156. void* ptr = &::google::protobuf::testing::_AnyIn_default_instance_;
  157. new (ptr) ::google::protobuf::testing::AnyIn();
  158. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  159. }
  160. ::google::protobuf::testing::AnyIn::InitAsDefaultInstance();
  161. }
  162. ::google::protobuf::internal::SCCInfo<1> scc_info_AnyIn =
  163. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAnyIn}, {
  164. &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};
  165. static void InitDefaultsAnyOut() {
  166. GOOGLE_PROTOBUF_VERIFY_VERSION;
  167. {
  168. void* ptr = &::google::protobuf::testing::_AnyOut_default_instance_;
  169. new (ptr) ::google::protobuf::testing::AnyOut();
  170. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  171. }
  172. ::google::protobuf::testing::AnyOut::InitAsDefaultInstance();
  173. }
  174. ::google::protobuf::internal::SCCInfo<1> scc_info_AnyOut =
  175. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAnyOut}, {
  176. &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};
  177. static void InitDefaultsAnyM() {
  178. GOOGLE_PROTOBUF_VERIFY_VERSION;
  179. {
  180. void* ptr = &::google::protobuf::testing::_AnyM_default_instance_;
  181. new (ptr) ::google::protobuf::testing::AnyM();
  182. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  183. }
  184. ::google::protobuf::testing::AnyM::InitAsDefaultInstance();
  185. }
  186. ::google::protobuf::internal::SCCInfo<0> scc_info_AnyM =
  187. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAnyM}, {}};
  188. void InitDefaults() {
  189. ::google::protobuf::internal::InitSCC(&scc_info_AnyTestCases.base);
  190. ::google::protobuf::internal::InitSCC(&scc_info_AnyWrapper.base);
  191. ::google::protobuf::internal::InitSCC(&scc_info_Imports.base);
  192. ::google::protobuf::internal::InitSCC(&scc_info_Data_MapDataEntry_DoNotUse.base);
  193. ::google::protobuf::internal::InitSCC(&scc_info_Data.base);
  194. ::google::protobuf::internal::InitSCC(&scc_info_AnyIn.base);
  195. ::google::protobuf::internal::InitSCC(&scc_info_AnyOut.base);
  196. ::google::protobuf::internal::InitSCC(&scc_info_AnyM.base);
  197. }
  198. ::google::protobuf::Metadata file_level_metadata[8];
  199. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  200. ~0u, // no _has_bits_
  201. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, _internal_metadata_),
  202. ~0u, // no _extensions_
  203. ~0u, // no _oneof_case_
  204. ~0u, // no _weak_field_map_
  205. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, empty_any_),
  206. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, type_only_any_),
  207. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, wrapper_any_),
  208. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_timestamp_value_),
  209. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_duration_value_),
  210. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_struct_value_),
  211. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, recursive_any_),
  212. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_value_),
  213. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_nested_message_),
  214. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_with_wrapper_type_),
  215. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_with_timestamp_),
  216. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_containing_map_),
  217. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_containing_struct_),
  218. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_containing_repeated_message_),
  219. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, recursive_any_with_type_field_at_end_),
  220. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, top_level_any_),
  221. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, top_level_any_with_type_field_at_end_),
  222. ~0u, // no _has_bits_
  223. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyWrapper, _internal_metadata_),
  224. ~0u, // no _extensions_
  225. ~0u, // no _oneof_case_
  226. ~0u, // no _weak_field_map_
  227. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyWrapper, any_),
  228. ~0u, // no _has_bits_
  229. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, _internal_metadata_),
  230. ~0u, // no _extensions_
  231. ~0u, // no _oneof_case_
  232. ~0u, // no _weak_field_map_
  233. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, dbl_),
  234. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, struct__),
  235. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, timestamp_),
  236. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, duration_),
  237. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, i32_),
  238. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, data_),
  239. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, _has_bits_),
  240. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, _internal_metadata_),
  241. ~0u, // no _extensions_
  242. ~0u, // no _oneof_case_
  243. ~0u, // no _weak_field_map_
  244. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, key_),
  245. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, value_),
  246. 0,
  247. 1,
  248. ~0u, // no _has_bits_
  249. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, _internal_metadata_),
  250. ~0u, // no _extensions_
  251. ~0u, // no _oneof_case_
  252. ~0u, // no _weak_field_map_
  253. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, attr_),
  254. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, str_),
  255. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, msgs_),
  256. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, nested_data_),
  257. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, int_wrapper_),
  258. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, time_),
  259. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, map_data_),
  260. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, struct_data_),
  261. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, repeated_data_),
  262. ~0u, // no _has_bits_
  263. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyIn, _internal_metadata_),
  264. ~0u, // no _extensions_
  265. ~0u, // no _oneof_case_
  266. ~0u, // no _weak_field_map_
  267. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyIn, something_),
  268. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyIn, any_),
  269. ~0u, // no _has_bits_
  270. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyOut, _internal_metadata_),
  271. ~0u, // no _extensions_
  272. ~0u, // no _oneof_case_
  273. ~0u, // no _weak_field_map_
  274. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyOut, any_),
  275. ~0u, // no _has_bits_
  276. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyM, _internal_metadata_),
  277. ~0u, // no _extensions_
  278. ~0u, // no _oneof_case_
  279. ~0u, // no _weak_field_map_
  280. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyM, foo_),
  281. };
  282. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  283. { 0, -1, sizeof(::google::protobuf::testing::AnyTestCases)},
  284. { 22, -1, sizeof(::google::protobuf::testing::AnyWrapper)},
  285. { 28, -1, sizeof(::google::protobuf::testing::Imports)},
  286. { 39, 46, sizeof(::google::protobuf::testing::Data_MapDataEntry_DoNotUse)},
  287. { 48, -1, sizeof(::google::protobuf::testing::Data)},
  288. { 62, -1, sizeof(::google::protobuf::testing::AnyIn)},
  289. { 69, -1, sizeof(::google::protobuf::testing::AnyOut)},
  290. { 75, -1, sizeof(::google::protobuf::testing::AnyM)},
  291. };
  292. static ::google::protobuf::Message const * const file_default_instances[] = {
  293. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyTestCases_default_instance_),
  294. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyWrapper_default_instance_),
  295. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Imports_default_instance_),
  296. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Data_MapDataEntry_DoNotUse_default_instance_),
  297. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Data_default_instance_),
  298. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyIn_default_instance_),
  299. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyOut_default_instance_),
  300. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyM_default_instance_),
  301. };
  302. void protobuf_AssignDescriptors() {
  303. AddDescriptors();
  304. AssignDescriptors(
  305. "google/protobuf/util/internal/testdata/anys.proto", schemas, file_default_instances, TableStruct::offsets,
  306. file_level_metadata, NULL, NULL);
  307. }
  308. void protobuf_AssignDescriptorsOnce() {
  309. static ::google::protobuf::internal::once_flag once;
  310. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  311. }
  312. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  313. void protobuf_RegisterTypes(const ::std::string&) {
  314. protobuf_AssignDescriptorsOnce();
  315. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 8);
  316. }
  317. void AddDescriptorsImpl() {
  318. InitDefaults();
  319. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  320. "\n1google/protobuf/util/internal/testdata"
  321. "/anys.proto\022\027google.protobuf.testing\032\031go"
  322. "ogle/protobuf/any.proto\032\034google/protobuf"
  323. "/struct.proto\032\037google/protobuf/timestamp"
  324. ".proto\032\036google/protobuf/duration.proto\032\036"
  325. "google/protobuf/wrappers.proto\"\261\t\n\014AnyTe"
  326. "stCases\0226\n\tempty_any\030\001 \001(\0132#.google.prot"
  327. "obuf.testing.AnyWrapper\022:\n\rtype_only_any"
  328. "\030\002 \001(\0132#.google.protobuf.testing.AnyWrap"
  329. "per\0228\n\013wrapper_any\030\003 \001(\0132#.google.protob"
  330. "uf.testing.AnyWrapper\022E\n\030any_with_timest"
  331. "amp_value\030\004 \001(\0132#.google.protobuf.testin"
  332. "g.AnyWrapper\022D\n\027any_with_duration_value\030"
  333. "\005 \001(\0132#.google.protobuf.testing.AnyWrapp"
  334. "er\022B\n\025any_with_struct_value\030\006 \001(\0132#.goog"
  335. "le.protobuf.testing.AnyWrapper\022:\n\rrecurs"
  336. "ive_any\030\007 \001(\0132#.google.protobuf.testing."
  337. "AnyWrapper\022C\n\026any_with_message_value\030\010 \001"
  338. "(\0132#.google.protobuf.testing.AnyWrapper\022"
  339. "D\n\027any_with_nested_message\030\t \001(\0132#.googl"
  340. "e.protobuf.testing.AnyWrapper\022O\n\"any_wit"
  341. "h_message_with_wrapper_type\030\n \001(\0132#.goog"
  342. "le.protobuf.testing.AnyWrapper\022L\n\037any_wi"
  343. "th_message_with_timestamp\030\013 \001(\0132#.google"
  344. ".protobuf.testing.AnyWrapper\022L\n\037any_with"
  345. "_message_containing_map\030\014 \001(\0132#.google.p"
  346. "rotobuf.testing.AnyWrapper\022O\n\"any_with_m"
  347. "essage_containing_struct\030\r \001(\0132#.google."
  348. "protobuf.testing.AnyWrapper\022Y\n,any_with_"
  349. "message_containing_repeated_message\030\016 \001("
  350. "\0132#.google.protobuf.testing.AnyWrapper\022Q"
  351. "\n$recursive_any_with_type_field_at_end\030\017"
  352. " \001(\0132#.google.protobuf.testing.AnyWrappe"
  353. "r\022+\n\rtop_level_any\0302 \001(\0132\024.google.protob"
  354. "uf.Any\022B\n$top_level_any_with_type_field_"
  355. "at_end\0303 \001(\0132\024.google.protobuf.Any\"/\n\nAn"
  356. "yWrapper\022!\n\003any\030\001 \001(\0132\024.google.protobuf."
  357. "Any\"\220\002\n\007Imports\022)\n\003dbl\030\001 \001(\0132\034.google.pr"
  358. "otobuf.DoubleValue\022\'\n\006struct\030\002 \001(\0132\027.goo"
  359. "gle.protobuf.Struct\022-\n\ttimestamp\030\003 \001(\0132\032"
  360. ".google.protobuf.Timestamp\022+\n\010duration\030\004"
  361. " \001(\0132\031.google.protobuf.Duration\022(\n\003i32\030\005"
  362. " \001(\0132\033.google.protobuf.Int32Value\022+\n\004dat"
  363. "a\030d \001(\0132\035.google.protobuf.testing.Data\"\221"
  364. "\003\n\004Data\022\014\n\004attr\030\001 \001(\005\022\013\n\003str\030\002 \001(\t\022\014\n\004ms"
  365. "gs\030\003 \003(\t\0222\n\013nested_data\030\004 \001(\0132\035.google.p"
  366. "rotobuf.testing.Data\0220\n\013int_wrapper\030\005 \001("
  367. "\0132\033.google.protobuf.Int32Value\022(\n\004time\030\006"
  368. " \001(\0132\032.google.protobuf.Timestamp\022<\n\010map_"
  369. "data\030\007 \003(\0132*.google.protobuf.testing.Dat"
  370. "a.MapDataEntry\022,\n\013struct_data\030\010 \001(\0132\027.go"
  371. "ogle.protobuf.Struct\0224\n\rrepeated_data\030\t "
  372. "\003(\0132\035.google.protobuf.testing.Data\032.\n\014Ma"
  373. "pDataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002"
  374. "8\001\"=\n\005AnyIn\022\021\n\tsomething\030\001 \001(\t\022!\n\003any\030\002 "
  375. "\001(\0132\024.google.protobuf.Any\"+\n\006AnyOut\022!\n\003a"
  376. "ny\030\001 \001(\0132\024.google.protobuf.Any\"\023\n\004AnyM\022\013"
  377. "\n\003foo\030\001 \001(\t2\263\001\n\016AnyTestService\022T\n\004Call\022%"
  378. ".google.protobuf.testing.AnyTestCases\032%."
  379. "google.protobuf.testing.AnyTestCases\022K\n\005"
  380. "Call1\022 .google.protobuf.testing.Imports\032"
  381. " .google.protobuf.testing.Importsb\006proto"
  382. "3"
  383. };
  384. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  385. descriptor, 2481);
  386. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  387. "google/protobuf/util/internal/testdata/anys.proto", &protobuf_RegisterTypes);
  388. ::protobuf_google_2fprotobuf_2fany_2eproto::AddDescriptors();
  389. ::protobuf_google_2fprotobuf_2fstruct_2eproto::AddDescriptors();
  390. ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
  391. ::protobuf_google_2fprotobuf_2fduration_2eproto::AddDescriptors();
  392. ::protobuf_google_2fprotobuf_2fwrappers_2eproto::AddDescriptors();
  393. }
  394. void AddDescriptors() {
  395. static ::google::protobuf::internal::once_flag once;
  396. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  397. }
  398. // Force AddDescriptors() to be called at dynamic initialization time.
  399. struct StaticDescriptorInitializer {
  400. StaticDescriptorInitializer() {
  401. AddDescriptors();
  402. }
  403. } static_descriptor_initializer;
  404. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto
  405. namespace google {
  406. namespace protobuf {
  407. namespace testing {
  408. // ===================================================================
  409. void AnyTestCases::InitAsDefaultInstance() {
  410. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->empty_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  411. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  412. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->type_only_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  413. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  414. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->wrapper_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  415. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  416. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_timestamp_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  417. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  418. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_duration_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  419. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  420. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_struct_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  421. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  422. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->recursive_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  423. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  424. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  425. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  426. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_nested_message_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  427. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  428. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_with_wrapper_type_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  429. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  430. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_with_timestamp_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  431. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  432. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_containing_map_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  433. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  434. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_containing_struct_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  435. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  436. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_containing_repeated_message_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  437. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  438. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->recursive_any_with_type_field_at_end_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
  439. ::google::protobuf::testing::AnyWrapper::internal_default_instance());
  440. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->top_level_any_ = const_cast< ::google::protobuf::Any*>(
  441. ::google::protobuf::Any::internal_default_instance());
  442. ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->top_level_any_with_type_field_at_end_ = const_cast< ::google::protobuf::Any*>(
  443. ::google::protobuf::Any::internal_default_instance());
  444. }
  445. void AnyTestCases::clear_top_level_any() {
  446. if (GetArenaNoVirtual() == NULL && top_level_any_ != NULL) {
  447. delete top_level_any_;
  448. }
  449. top_level_any_ = NULL;
  450. }
  451. void AnyTestCases::clear_top_level_any_with_type_field_at_end() {
  452. if (GetArenaNoVirtual() == NULL && top_level_any_with_type_field_at_end_ != NULL) {
  453. delete top_level_any_with_type_field_at_end_;
  454. }
  455. top_level_any_with_type_field_at_end_ = NULL;
  456. }
  457. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  458. const int AnyTestCases::kEmptyAnyFieldNumber;
  459. const int AnyTestCases::kTypeOnlyAnyFieldNumber;
  460. const int AnyTestCases::kWrapperAnyFieldNumber;
  461. const int AnyTestCases::kAnyWithTimestampValueFieldNumber;
  462. const int AnyTestCases::kAnyWithDurationValueFieldNumber;
  463. const int AnyTestCases::kAnyWithStructValueFieldNumber;
  464. const int AnyTestCases::kRecursiveAnyFieldNumber;
  465. const int AnyTestCases::kAnyWithMessageValueFieldNumber;
  466. const int AnyTestCases::kAnyWithNestedMessageFieldNumber;
  467. const int AnyTestCases::kAnyWithMessageWithWrapperTypeFieldNumber;
  468. const int AnyTestCases::kAnyWithMessageWithTimestampFieldNumber;
  469. const int AnyTestCases::kAnyWithMessageContainingMapFieldNumber;
  470. const int AnyTestCases::kAnyWithMessageContainingStructFieldNumber;
  471. const int AnyTestCases::kAnyWithMessageContainingRepeatedMessageFieldNumber;
  472. const int AnyTestCases::kRecursiveAnyWithTypeFieldAtEndFieldNumber;
  473. const int AnyTestCases::kTopLevelAnyFieldNumber;
  474. const int AnyTestCases::kTopLevelAnyWithTypeFieldAtEndFieldNumber;
  475. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  476. AnyTestCases::AnyTestCases()
  477. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  478. ::google::protobuf::internal::InitSCC(
  479. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyTestCases.base);
  480. SharedCtor();
  481. // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyTestCases)
  482. }
  483. AnyTestCases::AnyTestCases(const AnyTestCases& from)
  484. : ::google::protobuf::Message(),
  485. _internal_metadata_(NULL) {
  486. _internal_metadata_.MergeFrom(from._internal_metadata_);
  487. if (from.has_empty_any()) {
  488. empty_any_ = new ::google::protobuf::testing::AnyWrapper(*from.empty_any_);
  489. } else {
  490. empty_any_ = NULL;
  491. }
  492. if (from.has_type_only_any()) {
  493. type_only_any_ = new ::google::protobuf::testing::AnyWrapper(*from.type_only_any_);
  494. } else {
  495. type_only_any_ = NULL;
  496. }
  497. if (from.has_wrapper_any()) {
  498. wrapper_any_ = new ::google::protobuf::testing::AnyWrapper(*from.wrapper_any_);
  499. } else {
  500. wrapper_any_ = NULL;
  501. }
  502. if (from.has_any_with_timestamp_value()) {
  503. any_with_timestamp_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_timestamp_value_);
  504. } else {
  505. any_with_timestamp_value_ = NULL;
  506. }
  507. if (from.has_any_with_duration_value()) {
  508. any_with_duration_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_duration_value_);
  509. } else {
  510. any_with_duration_value_ = NULL;
  511. }
  512. if (from.has_any_with_struct_value()) {
  513. any_with_struct_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_struct_value_);
  514. } else {
  515. any_with_struct_value_ = NULL;
  516. }
  517. if (from.has_recursive_any()) {
  518. recursive_any_ = new ::google::protobuf::testing::AnyWrapper(*from.recursive_any_);
  519. } else {
  520. recursive_any_ = NULL;
  521. }
  522. if (from.has_any_with_message_value()) {
  523. any_with_message_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_value_);
  524. } else {
  525. any_with_message_value_ = NULL;
  526. }
  527. if (from.has_any_with_nested_message()) {
  528. any_with_nested_message_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_nested_message_);
  529. } else {
  530. any_with_nested_message_ = NULL;
  531. }
  532. if (from.has_any_with_message_with_wrapper_type()) {
  533. any_with_message_with_wrapper_type_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_with_wrapper_type_);
  534. } else {
  535. any_with_message_with_wrapper_type_ = NULL;
  536. }
  537. if (from.has_any_with_message_with_timestamp()) {
  538. any_with_message_with_timestamp_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_with_timestamp_);
  539. } else {
  540. any_with_message_with_timestamp_ = NULL;
  541. }
  542. if (from.has_any_with_message_containing_map()) {
  543. any_with_message_containing_map_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_containing_map_);
  544. } else {
  545. any_with_message_containing_map_ = NULL;
  546. }
  547. if (from.has_any_with_message_containing_struct()) {
  548. any_with_message_containing_struct_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_containing_struct_);
  549. } else {
  550. any_with_message_containing_struct_ = NULL;
  551. }
  552. if (from.has_any_with_message_containing_repeated_message()) {
  553. any_with_message_containing_repeated_message_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_containing_repeated_message_);
  554. } else {
  555. any_with_message_containing_repeated_message_ = NULL;
  556. }
  557. if (from.has_recursive_any_with_type_field_at_end()) {
  558. recursive_any_with_type_field_at_end_ = new ::google::protobuf::testing::AnyWrapper(*from.recursive_any_with_type_field_at_end_);
  559. } else {
  560. recursive_any_with_type_field_at_end_ = NULL;
  561. }
  562. if (from.has_top_level_any()) {
  563. top_level_any_ = new ::google::protobuf::Any(*from.top_level_any_);
  564. } else {
  565. top_level_any_ = NULL;
  566. }
  567. if (from.has_top_level_any_with_type_field_at_end()) {
  568. top_level_any_with_type_field_at_end_ = new ::google::protobuf::Any(*from.top_level_any_with_type_field_at_end_);
  569. } else {
  570. top_level_any_with_type_field_at_end_ = NULL;
  571. }
  572. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyTestCases)
  573. }
  574. void AnyTestCases::SharedCtor() {
  575. ::memset(&empty_any_, 0, static_cast<size_t>(
  576. reinterpret_cast<char*>(&top_level_any_with_type_field_at_end_) -
  577. reinterpret_cast<char*>(&empty_any_)) + sizeof(top_level_any_with_type_field_at_end_));
  578. }
  579. AnyTestCases::~AnyTestCases() {
  580. // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyTestCases)
  581. SharedDtor();
  582. }
  583. void AnyTestCases::SharedDtor() {
  584. if (this != internal_default_instance()) delete empty_any_;
  585. if (this != internal_default_instance()) delete type_only_any_;
  586. if (this != internal_default_instance()) delete wrapper_any_;
  587. if (this != internal_default_instance()) delete any_with_timestamp_value_;
  588. if (this != internal_default_instance()) delete any_with_duration_value_;
  589. if (this != internal_default_instance()) delete any_with_struct_value_;
  590. if (this != internal_default_instance()) delete recursive_any_;
  591. if (this != internal_default_instance()) delete any_with_message_value_;
  592. if (this != internal_default_instance()) delete any_with_nested_message_;
  593. if (this != internal_default_instance()) delete any_with_message_with_wrapper_type_;
  594. if (this != internal_default_instance()) delete any_with_message_with_timestamp_;
  595. if (this != internal_default_instance()) delete any_with_message_containing_map_;
  596. if (this != internal_default_instance()) delete any_with_message_containing_struct_;
  597. if (this != internal_default_instance()) delete any_with_message_containing_repeated_message_;
  598. if (this != internal_default_instance()) delete recursive_any_with_type_field_at_end_;
  599. if (this != internal_default_instance()) delete top_level_any_;
  600. if (this != internal_default_instance()) delete top_level_any_with_type_field_at_end_;
  601. }
  602. void AnyTestCases::SetCachedSize(int size) const {
  603. _cached_size_.Set(size);
  604. }
  605. const ::google::protobuf::Descriptor* AnyTestCases::descriptor() {
  606. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  607. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  608. }
  609. const AnyTestCases& AnyTestCases::default_instance() {
  610. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyTestCases.base);
  611. return *internal_default_instance();
  612. }
  613. void AnyTestCases::Clear() {
  614. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyTestCases)
  615. ::google::protobuf::uint32 cached_has_bits = 0;
  616. // Prevent compiler warnings about cached_has_bits being unused
  617. (void) cached_has_bits;
  618. if (GetArenaNoVirtual() == NULL && empty_any_ != NULL) {
  619. delete empty_any_;
  620. }
  621. empty_any_ = NULL;
  622. if (GetArenaNoVirtual() == NULL && type_only_any_ != NULL) {
  623. delete type_only_any_;
  624. }
  625. type_only_any_ = NULL;
  626. if (GetArenaNoVirtual() == NULL && wrapper_any_ != NULL) {
  627. delete wrapper_any_;
  628. }
  629. wrapper_any_ = NULL;
  630. if (GetArenaNoVirtual() == NULL && any_with_timestamp_value_ != NULL) {
  631. delete any_with_timestamp_value_;
  632. }
  633. any_with_timestamp_value_ = NULL;
  634. if (GetArenaNoVirtual() == NULL && any_with_duration_value_ != NULL) {
  635. delete any_with_duration_value_;
  636. }
  637. any_with_duration_value_ = NULL;
  638. if (GetArenaNoVirtual() == NULL && any_with_struct_value_ != NULL) {
  639. delete any_with_struct_value_;
  640. }
  641. any_with_struct_value_ = NULL;
  642. if (GetArenaNoVirtual() == NULL && recursive_any_ != NULL) {
  643. delete recursive_any_;
  644. }
  645. recursive_any_ = NULL;
  646. if (GetArenaNoVirtual() == NULL && any_with_message_value_ != NULL) {
  647. delete any_with_message_value_;
  648. }
  649. any_with_message_value_ = NULL;
  650. if (GetArenaNoVirtual() == NULL && any_with_nested_message_ != NULL) {
  651. delete any_with_nested_message_;
  652. }
  653. any_with_nested_message_ = NULL;
  654. if (GetArenaNoVirtual() == NULL && any_with_message_with_wrapper_type_ != NULL) {
  655. delete any_with_message_with_wrapper_type_;
  656. }
  657. any_with_message_with_wrapper_type_ = NULL;
  658. if (GetArenaNoVirtual() == NULL && any_with_message_with_timestamp_ != NULL) {
  659. delete any_with_message_with_timestamp_;
  660. }
  661. any_with_message_with_timestamp_ = NULL;
  662. if (GetArenaNoVirtual() == NULL && any_with_message_containing_map_ != NULL) {
  663. delete any_with_message_containing_map_;
  664. }
  665. any_with_message_containing_map_ = NULL;
  666. if (GetArenaNoVirtual() == NULL && any_with_message_containing_struct_ != NULL) {
  667. delete any_with_message_containing_struct_;
  668. }
  669. any_with_message_containing_struct_ = NULL;
  670. if (GetArenaNoVirtual() == NULL && any_with_message_containing_repeated_message_ != NULL) {
  671. delete any_with_message_containing_repeated_message_;
  672. }
  673. any_with_message_containing_repeated_message_ = NULL;
  674. if (GetArenaNoVirtual() == NULL && recursive_any_with_type_field_at_end_ != NULL) {
  675. delete recursive_any_with_type_field_at_end_;
  676. }
  677. recursive_any_with_type_field_at_end_ = NULL;
  678. if (GetArenaNoVirtual() == NULL && top_level_any_ != NULL) {
  679. delete top_level_any_;
  680. }
  681. top_level_any_ = NULL;
  682. if (GetArenaNoVirtual() == NULL && top_level_any_with_type_field_at_end_ != NULL) {
  683. delete top_level_any_with_type_field_at_end_;
  684. }
  685. top_level_any_with_type_field_at_end_ = NULL;
  686. _internal_metadata_.Clear();
  687. }
  688. bool AnyTestCases::MergePartialFromCodedStream(
  689. ::google::protobuf::io::CodedInputStream* input) {
  690. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  691. ::google::protobuf::uint32 tag;
  692. // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyTestCases)
  693. for (;;) {
  694. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  695. tag = p.first;
  696. if (!p.second) goto handle_unusual;
  697. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  698. // .google.protobuf.testing.AnyWrapper empty_any = 1;
  699. case 1: {
  700. if (static_cast< ::google::protobuf::uint8>(tag) ==
  701. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  702. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  703. input, mutable_empty_any()));
  704. } else {
  705. goto handle_unusual;
  706. }
  707. break;
  708. }
  709. // .google.protobuf.testing.AnyWrapper type_only_any = 2;
  710. case 2: {
  711. if (static_cast< ::google::protobuf::uint8>(tag) ==
  712. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  713. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  714. input, mutable_type_only_any()));
  715. } else {
  716. goto handle_unusual;
  717. }
  718. break;
  719. }
  720. // .google.protobuf.testing.AnyWrapper wrapper_any = 3;
  721. case 3: {
  722. if (static_cast< ::google::protobuf::uint8>(tag) ==
  723. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  724. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  725. input, mutable_wrapper_any()));
  726. } else {
  727. goto handle_unusual;
  728. }
  729. break;
  730. }
  731. // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 4;
  732. case 4: {
  733. if (static_cast< ::google::protobuf::uint8>(tag) ==
  734. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  735. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  736. input, mutable_any_with_timestamp_value()));
  737. } else {
  738. goto handle_unusual;
  739. }
  740. break;
  741. }
  742. // .google.protobuf.testing.AnyWrapper any_with_duration_value = 5;
  743. case 5: {
  744. if (static_cast< ::google::protobuf::uint8>(tag) ==
  745. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  746. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  747. input, mutable_any_with_duration_value()));
  748. } else {
  749. goto handle_unusual;
  750. }
  751. break;
  752. }
  753. // .google.protobuf.testing.AnyWrapper any_with_struct_value = 6;
  754. case 6: {
  755. if (static_cast< ::google::protobuf::uint8>(tag) ==
  756. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  757. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  758. input, mutable_any_with_struct_value()));
  759. } else {
  760. goto handle_unusual;
  761. }
  762. break;
  763. }
  764. // .google.protobuf.testing.AnyWrapper recursive_any = 7;
  765. case 7: {
  766. if (static_cast< ::google::protobuf::uint8>(tag) ==
  767. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  768. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  769. input, mutable_recursive_any()));
  770. } else {
  771. goto handle_unusual;
  772. }
  773. break;
  774. }
  775. // .google.protobuf.testing.AnyWrapper any_with_message_value = 8;
  776. case 8: {
  777. if (static_cast< ::google::protobuf::uint8>(tag) ==
  778. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  779. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  780. input, mutable_any_with_message_value()));
  781. } else {
  782. goto handle_unusual;
  783. }
  784. break;
  785. }
  786. // .google.protobuf.testing.AnyWrapper any_with_nested_message = 9;
  787. case 9: {
  788. if (static_cast< ::google::protobuf::uint8>(tag) ==
  789. static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
  790. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  791. input, mutable_any_with_nested_message()));
  792. } else {
  793. goto handle_unusual;
  794. }
  795. break;
  796. }
  797. // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 10;
  798. case 10: {
  799. if (static_cast< ::google::protobuf::uint8>(tag) ==
  800. static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
  801. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  802. input, mutable_any_with_message_with_wrapper_type()));
  803. } else {
  804. goto handle_unusual;
  805. }
  806. break;
  807. }
  808. // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 11;
  809. case 11: {
  810. if (static_cast< ::google::protobuf::uint8>(tag) ==
  811. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  812. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  813. input, mutable_any_with_message_with_timestamp()));
  814. } else {
  815. goto handle_unusual;
  816. }
  817. break;
  818. }
  819. // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 12;
  820. case 12: {
  821. if (static_cast< ::google::protobuf::uint8>(tag) ==
  822. static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
  823. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  824. input, mutable_any_with_message_containing_map()));
  825. } else {
  826. goto handle_unusual;
  827. }
  828. break;
  829. }
  830. // .google.protobuf.testing.AnyWrapper any_with_message_containing_struct = 13;
  831. case 13: {
  832. if (static_cast< ::google::protobuf::uint8>(tag) ==
  833. static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
  834. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  835. input, mutable_any_with_message_containing_struct()));
  836. } else {
  837. goto handle_unusual;
  838. }
  839. break;
  840. }
  841. // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 14;
  842. case 14: {
  843. if (static_cast< ::google::protobuf::uint8>(tag) ==
  844. static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
  845. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  846. input, mutable_any_with_message_containing_repeated_message()));
  847. } else {
  848. goto handle_unusual;
  849. }
  850. break;
  851. }
  852. // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 15;
  853. case 15: {
  854. if (static_cast< ::google::protobuf::uint8>(tag) ==
  855. static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
  856. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  857. input, mutable_recursive_any_with_type_field_at_end()));
  858. } else {
  859. goto handle_unusual;
  860. }
  861. break;
  862. }
  863. // .google.protobuf.Any top_level_any = 50;
  864. case 50: {
  865. if (static_cast< ::google::protobuf::uint8>(tag) ==
  866. static_cast< ::google::protobuf::uint8>(146u /* 402 & 0xFF */)) {
  867. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  868. input, mutable_top_level_any()));
  869. } else {
  870. goto handle_unusual;
  871. }
  872. break;
  873. }
  874. // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
  875. case 51: {
  876. if (static_cast< ::google::protobuf::uint8>(tag) ==
  877. static_cast< ::google::protobuf::uint8>(154u /* 410 & 0xFF */)) {
  878. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  879. input, mutable_top_level_any_with_type_field_at_end()));
  880. } else {
  881. goto handle_unusual;
  882. }
  883. break;
  884. }
  885. default: {
  886. handle_unusual:
  887. if (tag == 0) {
  888. goto success;
  889. }
  890. DO_(::google::protobuf::internal::WireFormat::SkipField(
  891. input, tag, _internal_metadata_.mutable_unknown_fields()));
  892. break;
  893. }
  894. }
  895. }
  896. success:
  897. // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyTestCases)
  898. return true;
  899. failure:
  900. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyTestCases)
  901. return false;
  902. #undef DO_
  903. }
  904. void AnyTestCases::SerializeWithCachedSizes(
  905. ::google::protobuf::io::CodedOutputStream* output) const {
  906. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyTestCases)
  907. ::google::protobuf::uint32 cached_has_bits = 0;
  908. (void) cached_has_bits;
  909. // .google.protobuf.testing.AnyWrapper empty_any = 1;
  910. if (this->has_empty_any()) {
  911. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  912. 1, this->_internal_empty_any(), output);
  913. }
  914. // .google.protobuf.testing.AnyWrapper type_only_any = 2;
  915. if (this->has_type_only_any()) {
  916. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  917. 2, this->_internal_type_only_any(), output);
  918. }
  919. // .google.protobuf.testing.AnyWrapper wrapper_any = 3;
  920. if (this->has_wrapper_any()) {
  921. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  922. 3, this->_internal_wrapper_any(), output);
  923. }
  924. // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 4;
  925. if (this->has_any_with_timestamp_value()) {
  926. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  927. 4, this->_internal_any_with_timestamp_value(), output);
  928. }
  929. // .google.protobuf.testing.AnyWrapper any_with_duration_value = 5;
  930. if (this->has_any_with_duration_value()) {
  931. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  932. 5, this->_internal_any_with_duration_value(), output);
  933. }
  934. // .google.protobuf.testing.AnyWrapper any_with_struct_value = 6;
  935. if (this->has_any_with_struct_value()) {
  936. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  937. 6, this->_internal_any_with_struct_value(), output);
  938. }
  939. // .google.protobuf.testing.AnyWrapper recursive_any = 7;
  940. if (this->has_recursive_any()) {
  941. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  942. 7, this->_internal_recursive_any(), output);
  943. }
  944. // .google.protobuf.testing.AnyWrapper any_with_message_value = 8;
  945. if (this->has_any_with_message_value()) {
  946. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  947. 8, this->_internal_any_with_message_value(), output);
  948. }
  949. // .google.protobuf.testing.AnyWrapper any_with_nested_message = 9;
  950. if (this->has_any_with_nested_message()) {
  951. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  952. 9, this->_internal_any_with_nested_message(), output);
  953. }
  954. // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 10;
  955. if (this->has_any_with_message_with_wrapper_type()) {
  956. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  957. 10, this->_internal_any_with_message_with_wrapper_type(), output);
  958. }
  959. // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 11;
  960. if (this->has_any_with_message_with_timestamp()) {
  961. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  962. 11, this->_internal_any_with_message_with_timestamp(), output);
  963. }
  964. // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 12;
  965. if (this->has_any_with_message_containing_map()) {
  966. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  967. 12, this->_internal_any_with_message_containing_map(), output);
  968. }
  969. // .google.protobuf.testing.AnyWrapper any_with_message_containing_struct = 13;
  970. if (this->has_any_with_message_containing_struct()) {
  971. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  972. 13, this->_internal_any_with_message_containing_struct(), output);
  973. }
  974. // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 14;
  975. if (this->has_any_with_message_containing_repeated_message()) {
  976. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  977. 14, this->_internal_any_with_message_containing_repeated_message(), output);
  978. }
  979. // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 15;
  980. if (this->has_recursive_any_with_type_field_at_end()) {
  981. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  982. 15, this->_internal_recursive_any_with_type_field_at_end(), output);
  983. }
  984. // .google.protobuf.Any top_level_any = 50;
  985. if (this->has_top_level_any()) {
  986. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  987. 50, this->_internal_top_level_any(), output);
  988. }
  989. // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
  990. if (this->has_top_level_any_with_type_field_at_end()) {
  991. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  992. 51, this->_internal_top_level_any_with_type_field_at_end(), output);
  993. }
  994. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  995. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  996. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  997. }
  998. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyTestCases)
  999. }
  1000. ::google::protobuf::uint8* AnyTestCases::InternalSerializeWithCachedSizesToArray(
  1001. bool deterministic, ::google::protobuf::uint8* target) const {
  1002. (void)deterministic; // Unused
  1003. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyTestCases)
  1004. ::google::protobuf::uint32 cached_has_bits = 0;
  1005. (void) cached_has_bits;
  1006. // .google.protobuf.testing.AnyWrapper empty_any = 1;
  1007. if (this->has_empty_any()) {
  1008. target = ::google::protobuf::internal::WireFormatLite::
  1009. InternalWriteMessageToArray(
  1010. 1, this->_internal_empty_any(), deterministic, target);
  1011. }
  1012. // .google.protobuf.testing.AnyWrapper type_only_any = 2;
  1013. if (this->has_type_only_any()) {
  1014. target = ::google::protobuf::internal::WireFormatLite::
  1015. InternalWriteMessageToArray(
  1016. 2, this->_internal_type_only_any(), deterministic, target);
  1017. }
  1018. // .google.protobuf.testing.AnyWrapper wrapper_any = 3;
  1019. if (this->has_wrapper_any()) {
  1020. target = ::google::protobuf::internal::WireFormatLite::
  1021. InternalWriteMessageToArray(
  1022. 3, this->_internal_wrapper_any(), deterministic, target);
  1023. }
  1024. // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 4;
  1025. if (this->has_any_with_timestamp_value()) {
  1026. target = ::google::protobuf::internal::WireFormatLite::
  1027. InternalWriteMessageToArray(
  1028. 4, this->_internal_any_with_timestamp_value(), deterministic, target);
  1029. }
  1030. // .google.protobuf.testing.AnyWrapper any_with_duration_value = 5;
  1031. if (this->has_any_with_duration_value()) {
  1032. target = ::google::protobuf::internal::WireFormatLite::
  1033. InternalWriteMessageToArray(
  1034. 5, this->_internal_any_with_duration_value(), deterministic, target);
  1035. }
  1036. // .google.protobuf.testing.AnyWrapper any_with_struct_value = 6;
  1037. if (this->has_any_with_struct_value()) {
  1038. target = ::google::protobuf::internal::WireFormatLite::
  1039. InternalWriteMessageToArray(
  1040. 6, this->_internal_any_with_struct_value(), deterministic, target);
  1041. }
  1042. // .google.protobuf.testing.AnyWrapper recursive_any = 7;
  1043. if (this->has_recursive_any()) {
  1044. target = ::google::protobuf::internal::WireFormatLite::
  1045. InternalWriteMessageToArray(
  1046. 7, this->_internal_recursive_any(), deterministic, target);
  1047. }
  1048. // .google.protobuf.testing.AnyWrapper any_with_message_value = 8;
  1049. if (this->has_any_with_message_value()) {
  1050. target = ::google::protobuf::internal::WireFormatLite::
  1051. InternalWriteMessageToArray(
  1052. 8, this->_internal_any_with_message_value(), deterministic, target);
  1053. }
  1054. // .google.protobuf.testing.AnyWrapper any_with_nested_message = 9;
  1055. if (this->has_any_with_nested_message()) {
  1056. target = ::google::protobuf::internal::WireFormatLite::
  1057. InternalWriteMessageToArray(
  1058. 9, this->_internal_any_with_nested_message(), deterministic, target);
  1059. }
  1060. // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 10;
  1061. if (this->has_any_with_message_with_wrapper_type()) {
  1062. target = ::google::protobuf::internal::WireFormatLite::
  1063. InternalWriteMessageToArray(
  1064. 10, this->_internal_any_with_message_with_wrapper_type(), deterministic, target);
  1065. }
  1066. // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 11;
  1067. if (this->has_any_with_message_with_timestamp()) {
  1068. target = ::google::protobuf::internal::WireFormatLite::
  1069. InternalWriteMessageToArray(
  1070. 11, this->_internal_any_with_message_with_timestamp(), deterministic, target);
  1071. }
  1072. // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 12;
  1073. if (this->has_any_with_message_containing_map()) {
  1074. target = ::google::protobuf::internal::WireFormatLite::
  1075. InternalWriteMessageToArray(
  1076. 12, this->_internal_any_with_message_containing_map(), deterministic, target);
  1077. }
  1078. // .google.protobuf.testing.AnyWrapper any_with_message_containing_struct = 13;
  1079. if (this->has_any_with_message_containing_struct()) {
  1080. target = ::google::protobuf::internal::WireFormatLite::
  1081. InternalWriteMessageToArray(
  1082. 13, this->_internal_any_with_message_containing_struct(), deterministic, target);
  1083. }
  1084. // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 14;
  1085. if (this->has_any_with_message_containing_repeated_message()) {
  1086. target = ::google::protobuf::internal::WireFormatLite::
  1087. InternalWriteMessageToArray(
  1088. 14, this->_internal_any_with_message_containing_repeated_message(), deterministic, target);
  1089. }
  1090. // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 15;
  1091. if (this->has_recursive_any_with_type_field_at_end()) {
  1092. target = ::google::protobuf::internal::WireFormatLite::
  1093. InternalWriteMessageToArray(
  1094. 15, this->_internal_recursive_any_with_type_field_at_end(), deterministic, target);
  1095. }
  1096. // .google.protobuf.Any top_level_any = 50;
  1097. if (this->has_top_level_any()) {
  1098. target = ::google::protobuf::internal::WireFormatLite::
  1099. InternalWriteMessageToArray(
  1100. 50, this->_internal_top_level_any(), deterministic, target);
  1101. }
  1102. // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
  1103. if (this->has_top_level_any_with_type_field_at_end()) {
  1104. target = ::google::protobuf::internal::WireFormatLite::
  1105. InternalWriteMessageToArray(
  1106. 51, this->_internal_top_level_any_with_type_field_at_end(), deterministic, target);
  1107. }
  1108. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1109. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1110. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1111. }
  1112. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyTestCases)
  1113. return target;
  1114. }
  1115. size_t AnyTestCases::ByteSizeLong() const {
  1116. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyTestCases)
  1117. size_t total_size = 0;
  1118. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1119. total_size +=
  1120. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1121. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1122. }
  1123. // .google.protobuf.testing.AnyWrapper empty_any = 1;
  1124. if (this->has_empty_any()) {
  1125. total_size += 1 +
  1126. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1127. *empty_any_);
  1128. }
  1129. // .google.protobuf.testing.AnyWrapper type_only_any = 2;
  1130. if (this->has_type_only_any()) {
  1131. total_size += 1 +
  1132. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1133. *type_only_any_);
  1134. }
  1135. // .google.protobuf.testing.AnyWrapper wrapper_any = 3;
  1136. if (this->has_wrapper_any()) {
  1137. total_size += 1 +
  1138. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1139. *wrapper_any_);
  1140. }
  1141. // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 4;
  1142. if (this->has_any_with_timestamp_value()) {
  1143. total_size += 1 +
  1144. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1145. *any_with_timestamp_value_);
  1146. }
  1147. // .google.protobuf.testing.AnyWrapper any_with_duration_value = 5;
  1148. if (this->has_any_with_duration_value()) {
  1149. total_size += 1 +
  1150. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1151. *any_with_duration_value_);
  1152. }
  1153. // .google.protobuf.testing.AnyWrapper any_with_struct_value = 6;
  1154. if (this->has_any_with_struct_value()) {
  1155. total_size += 1 +
  1156. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1157. *any_with_struct_value_);
  1158. }
  1159. // .google.protobuf.testing.AnyWrapper recursive_any = 7;
  1160. if (this->has_recursive_any()) {
  1161. total_size += 1 +
  1162. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1163. *recursive_any_);
  1164. }
  1165. // .google.protobuf.testing.AnyWrapper any_with_message_value = 8;
  1166. if (this->has_any_with_message_value()) {
  1167. total_size += 1 +
  1168. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1169. *any_with_message_value_);
  1170. }
  1171. // .google.protobuf.testing.AnyWrapper any_with_nested_message = 9;
  1172. if (this->has_any_with_nested_message()) {
  1173. total_size += 1 +
  1174. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1175. *any_with_nested_message_);
  1176. }
  1177. // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 10;
  1178. if (this->has_any_with_message_with_wrapper_type()) {
  1179. total_size += 1 +
  1180. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1181. *any_with_message_with_wrapper_type_);
  1182. }
  1183. // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 11;
  1184. if (this->has_any_with_message_with_timestamp()) {
  1185. total_size += 1 +
  1186. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1187. *any_with_message_with_timestamp_);
  1188. }
  1189. // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 12;
  1190. if (this->has_any_with_message_containing_map()) {
  1191. total_size += 1 +
  1192. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1193. *any_with_message_containing_map_);
  1194. }
  1195. // .google.protobuf.testing.AnyWrapper any_with_message_containing_struct = 13;
  1196. if (this->has_any_with_message_containing_struct()) {
  1197. total_size += 1 +
  1198. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1199. *any_with_message_containing_struct_);
  1200. }
  1201. // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 14;
  1202. if (this->has_any_with_message_containing_repeated_message()) {
  1203. total_size += 1 +
  1204. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1205. *any_with_message_containing_repeated_message_);
  1206. }
  1207. // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 15;
  1208. if (this->has_recursive_any_with_type_field_at_end()) {
  1209. total_size += 1 +
  1210. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1211. *recursive_any_with_type_field_at_end_);
  1212. }
  1213. // .google.protobuf.Any top_level_any = 50;
  1214. if (this->has_top_level_any()) {
  1215. total_size += 2 +
  1216. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1217. *top_level_any_);
  1218. }
  1219. // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
  1220. if (this->has_top_level_any_with_type_field_at_end()) {
  1221. total_size += 2 +
  1222. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1223. *top_level_any_with_type_field_at_end_);
  1224. }
  1225. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1226. SetCachedSize(cached_size);
  1227. return total_size;
  1228. }
  1229. void AnyTestCases::MergeFrom(const ::google::protobuf::Message& from) {
  1230. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyTestCases)
  1231. GOOGLE_DCHECK_NE(&from, this);
  1232. const AnyTestCases* source =
  1233. ::google::protobuf::internal::DynamicCastToGenerated<const AnyTestCases>(
  1234. &from);
  1235. if (source == NULL) {
  1236. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyTestCases)
  1237. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1238. } else {
  1239. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyTestCases)
  1240. MergeFrom(*source);
  1241. }
  1242. }
  1243. void AnyTestCases::MergeFrom(const AnyTestCases& from) {
  1244. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyTestCases)
  1245. GOOGLE_DCHECK_NE(&from, this);
  1246. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1247. ::google::protobuf::uint32 cached_has_bits = 0;
  1248. (void) cached_has_bits;
  1249. if (from.has_empty_any()) {
  1250. mutable_empty_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.empty_any());
  1251. }
  1252. if (from.has_type_only_any()) {
  1253. mutable_type_only_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.type_only_any());
  1254. }
  1255. if (from.has_wrapper_any()) {
  1256. mutable_wrapper_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.wrapper_any());
  1257. }
  1258. if (from.has_any_with_timestamp_value()) {
  1259. mutable_any_with_timestamp_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_timestamp_value());
  1260. }
  1261. if (from.has_any_with_duration_value()) {
  1262. mutable_any_with_duration_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_duration_value());
  1263. }
  1264. if (from.has_any_with_struct_value()) {
  1265. mutable_any_with_struct_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_struct_value());
  1266. }
  1267. if (from.has_recursive_any()) {
  1268. mutable_recursive_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.recursive_any());
  1269. }
  1270. if (from.has_any_with_message_value()) {
  1271. mutable_any_with_message_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_value());
  1272. }
  1273. if (from.has_any_with_nested_message()) {
  1274. mutable_any_with_nested_message()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_nested_message());
  1275. }
  1276. if (from.has_any_with_message_with_wrapper_type()) {
  1277. mutable_any_with_message_with_wrapper_type()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_with_wrapper_type());
  1278. }
  1279. if (from.has_any_with_message_with_timestamp()) {
  1280. mutable_any_with_message_with_timestamp()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_with_timestamp());
  1281. }
  1282. if (from.has_any_with_message_containing_map()) {
  1283. mutable_any_with_message_containing_map()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_containing_map());
  1284. }
  1285. if (from.has_any_with_message_containing_struct()) {
  1286. mutable_any_with_message_containing_struct()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_containing_struct());
  1287. }
  1288. if (from.has_any_with_message_containing_repeated_message()) {
  1289. mutable_any_with_message_containing_repeated_message()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_containing_repeated_message());
  1290. }
  1291. if (from.has_recursive_any_with_type_field_at_end()) {
  1292. mutable_recursive_any_with_type_field_at_end()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.recursive_any_with_type_field_at_end());
  1293. }
  1294. if (from.has_top_level_any()) {
  1295. mutable_top_level_any()->::google::protobuf::Any::MergeFrom(from.top_level_any());
  1296. }
  1297. if (from.has_top_level_any_with_type_field_at_end()) {
  1298. mutable_top_level_any_with_type_field_at_end()->::google::protobuf::Any::MergeFrom(from.top_level_any_with_type_field_at_end());
  1299. }
  1300. }
  1301. void AnyTestCases::CopyFrom(const ::google::protobuf::Message& from) {
  1302. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyTestCases)
  1303. if (&from == this) return;
  1304. Clear();
  1305. MergeFrom(from);
  1306. }
  1307. void AnyTestCases::CopyFrom(const AnyTestCases& from) {
  1308. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyTestCases)
  1309. if (&from == this) return;
  1310. Clear();
  1311. MergeFrom(from);
  1312. }
  1313. bool AnyTestCases::IsInitialized() const {
  1314. return true;
  1315. }
  1316. void AnyTestCases::Swap(AnyTestCases* other) {
  1317. if (other == this) return;
  1318. InternalSwap(other);
  1319. }
  1320. void AnyTestCases::InternalSwap(AnyTestCases* other) {
  1321. using std::swap;
  1322. swap(empty_any_, other->empty_any_);
  1323. swap(type_only_any_, other->type_only_any_);
  1324. swap(wrapper_any_, other->wrapper_any_);
  1325. swap(any_with_timestamp_value_, other->any_with_timestamp_value_);
  1326. swap(any_with_duration_value_, other->any_with_duration_value_);
  1327. swap(any_with_struct_value_, other->any_with_struct_value_);
  1328. swap(recursive_any_, other->recursive_any_);
  1329. swap(any_with_message_value_, other->any_with_message_value_);
  1330. swap(any_with_nested_message_, other->any_with_nested_message_);
  1331. swap(any_with_message_with_wrapper_type_, other->any_with_message_with_wrapper_type_);
  1332. swap(any_with_message_with_timestamp_, other->any_with_message_with_timestamp_);
  1333. swap(any_with_message_containing_map_, other->any_with_message_containing_map_);
  1334. swap(any_with_message_containing_struct_, other->any_with_message_containing_struct_);
  1335. swap(any_with_message_containing_repeated_message_, other->any_with_message_containing_repeated_message_);
  1336. swap(recursive_any_with_type_field_at_end_, other->recursive_any_with_type_field_at_end_);
  1337. swap(top_level_any_, other->top_level_any_);
  1338. swap(top_level_any_with_type_field_at_end_, other->top_level_any_with_type_field_at_end_);
  1339. _internal_metadata_.Swap(&other->_internal_metadata_);
  1340. }
  1341. ::google::protobuf::Metadata AnyTestCases::GetMetadata() const {
  1342. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  1343. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
  1344. }
  1345. // ===================================================================
  1346. void AnyWrapper::InitAsDefaultInstance() {
  1347. ::google::protobuf::testing::_AnyWrapper_default_instance_._instance.get_mutable()->any_ = const_cast< ::google::protobuf::Any*>(
  1348. ::google::protobuf::Any::internal_default_instance());
  1349. }
  1350. void AnyWrapper::clear_any() {
  1351. if (GetArenaNoVirtual() == NULL && any_ != NULL) {
  1352. delete any_;
  1353. }
  1354. any_ = NULL;
  1355. }
  1356. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1357. const int AnyWrapper::kAnyFieldNumber;
  1358. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1359. AnyWrapper::AnyWrapper()
  1360. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1361. ::google::protobuf::internal::InitSCC(
  1362. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyWrapper.base);
  1363. SharedCtor();
  1364. // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyWrapper)
  1365. }
  1366. AnyWrapper::AnyWrapper(const AnyWrapper& from)
  1367. : ::google::protobuf::Message(),
  1368. _internal_metadata_(NULL) {
  1369. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1370. if (from.has_any()) {
  1371. any_ = new ::google::protobuf::Any(*from.any_);
  1372. } else {
  1373. any_ = NULL;
  1374. }
  1375. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyWrapper)
  1376. }
  1377. void AnyWrapper::SharedCtor() {
  1378. any_ = NULL;
  1379. }
  1380. AnyWrapper::~AnyWrapper() {
  1381. // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyWrapper)
  1382. SharedDtor();
  1383. }
  1384. void AnyWrapper::SharedDtor() {
  1385. if (this != internal_default_instance()) delete any_;
  1386. }
  1387. void AnyWrapper::SetCachedSize(int size) const {
  1388. _cached_size_.Set(size);
  1389. }
  1390. const ::google::protobuf::Descriptor* AnyWrapper::descriptor() {
  1391. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  1392. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1393. }
  1394. const AnyWrapper& AnyWrapper::default_instance() {
  1395. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyWrapper.base);
  1396. return *internal_default_instance();
  1397. }
  1398. void AnyWrapper::Clear() {
  1399. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyWrapper)
  1400. ::google::protobuf::uint32 cached_has_bits = 0;
  1401. // Prevent compiler warnings about cached_has_bits being unused
  1402. (void) cached_has_bits;
  1403. if (GetArenaNoVirtual() == NULL && any_ != NULL) {
  1404. delete any_;
  1405. }
  1406. any_ = NULL;
  1407. _internal_metadata_.Clear();
  1408. }
  1409. bool AnyWrapper::MergePartialFromCodedStream(
  1410. ::google::protobuf::io::CodedInputStream* input) {
  1411. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1412. ::google::protobuf::uint32 tag;
  1413. // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyWrapper)
  1414. for (;;) {
  1415. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1416. tag = p.first;
  1417. if (!p.second) goto handle_unusual;
  1418. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1419. // .google.protobuf.Any any = 1;
  1420. case 1: {
  1421. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1422. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1423. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1424. input, mutable_any()));
  1425. } else {
  1426. goto handle_unusual;
  1427. }
  1428. break;
  1429. }
  1430. default: {
  1431. handle_unusual:
  1432. if (tag == 0) {
  1433. goto success;
  1434. }
  1435. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1436. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1437. break;
  1438. }
  1439. }
  1440. }
  1441. success:
  1442. // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyWrapper)
  1443. return true;
  1444. failure:
  1445. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyWrapper)
  1446. return false;
  1447. #undef DO_
  1448. }
  1449. void AnyWrapper::SerializeWithCachedSizes(
  1450. ::google::protobuf::io::CodedOutputStream* output) const {
  1451. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyWrapper)
  1452. ::google::protobuf::uint32 cached_has_bits = 0;
  1453. (void) cached_has_bits;
  1454. // .google.protobuf.Any any = 1;
  1455. if (this->has_any()) {
  1456. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1457. 1, this->_internal_any(), output);
  1458. }
  1459. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1460. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1461. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1462. }
  1463. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyWrapper)
  1464. }
  1465. ::google::protobuf::uint8* AnyWrapper::InternalSerializeWithCachedSizesToArray(
  1466. bool deterministic, ::google::protobuf::uint8* target) const {
  1467. (void)deterministic; // Unused
  1468. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyWrapper)
  1469. ::google::protobuf::uint32 cached_has_bits = 0;
  1470. (void) cached_has_bits;
  1471. // .google.protobuf.Any any = 1;
  1472. if (this->has_any()) {
  1473. target = ::google::protobuf::internal::WireFormatLite::
  1474. InternalWriteMessageToArray(
  1475. 1, this->_internal_any(), deterministic, target);
  1476. }
  1477. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1478. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1479. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1480. }
  1481. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyWrapper)
  1482. return target;
  1483. }
  1484. size_t AnyWrapper::ByteSizeLong() const {
  1485. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyWrapper)
  1486. size_t total_size = 0;
  1487. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1488. total_size +=
  1489. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1490. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1491. }
  1492. // .google.protobuf.Any any = 1;
  1493. if (this->has_any()) {
  1494. total_size += 1 +
  1495. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1496. *any_);
  1497. }
  1498. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1499. SetCachedSize(cached_size);
  1500. return total_size;
  1501. }
  1502. void AnyWrapper::MergeFrom(const ::google::protobuf::Message& from) {
  1503. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyWrapper)
  1504. GOOGLE_DCHECK_NE(&from, this);
  1505. const AnyWrapper* source =
  1506. ::google::protobuf::internal::DynamicCastToGenerated<const AnyWrapper>(
  1507. &from);
  1508. if (source == NULL) {
  1509. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyWrapper)
  1510. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1511. } else {
  1512. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyWrapper)
  1513. MergeFrom(*source);
  1514. }
  1515. }
  1516. void AnyWrapper::MergeFrom(const AnyWrapper& from) {
  1517. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyWrapper)
  1518. GOOGLE_DCHECK_NE(&from, this);
  1519. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1520. ::google::protobuf::uint32 cached_has_bits = 0;
  1521. (void) cached_has_bits;
  1522. if (from.has_any()) {
  1523. mutable_any()->::google::protobuf::Any::MergeFrom(from.any());
  1524. }
  1525. }
  1526. void AnyWrapper::CopyFrom(const ::google::protobuf::Message& from) {
  1527. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyWrapper)
  1528. if (&from == this) return;
  1529. Clear();
  1530. MergeFrom(from);
  1531. }
  1532. void AnyWrapper::CopyFrom(const AnyWrapper& from) {
  1533. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyWrapper)
  1534. if (&from == this) return;
  1535. Clear();
  1536. MergeFrom(from);
  1537. }
  1538. bool AnyWrapper::IsInitialized() const {
  1539. return true;
  1540. }
  1541. void AnyWrapper::Swap(AnyWrapper* other) {
  1542. if (other == this) return;
  1543. InternalSwap(other);
  1544. }
  1545. void AnyWrapper::InternalSwap(AnyWrapper* other) {
  1546. using std::swap;
  1547. swap(any_, other->any_);
  1548. _internal_metadata_.Swap(&other->_internal_metadata_);
  1549. }
  1550. ::google::protobuf::Metadata AnyWrapper::GetMetadata() const {
  1551. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  1552. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
  1553. }
  1554. // ===================================================================
  1555. void Imports::InitAsDefaultInstance() {
  1556. ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->dbl_ = const_cast< ::google::protobuf::DoubleValue*>(
  1557. ::google::protobuf::DoubleValue::internal_default_instance());
  1558. ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->struct__ = const_cast< ::google::protobuf::Struct*>(
  1559. ::google::protobuf::Struct::internal_default_instance());
  1560. ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->timestamp_ = const_cast< ::google::protobuf::Timestamp*>(
  1561. ::google::protobuf::Timestamp::internal_default_instance());
  1562. ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->duration_ = const_cast< ::google::protobuf::Duration*>(
  1563. ::google::protobuf::Duration::internal_default_instance());
  1564. ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->i32_ = const_cast< ::google::protobuf::Int32Value*>(
  1565. ::google::protobuf::Int32Value::internal_default_instance());
  1566. ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->data_ = const_cast< ::google::protobuf::testing::Data*>(
  1567. ::google::protobuf::testing::Data::internal_default_instance());
  1568. }
  1569. void Imports::clear_dbl() {
  1570. if (GetArenaNoVirtual() == NULL && dbl_ != NULL) {
  1571. delete dbl_;
  1572. }
  1573. dbl_ = NULL;
  1574. }
  1575. void Imports::clear_struct_() {
  1576. if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
  1577. delete struct__;
  1578. }
  1579. struct__ = NULL;
  1580. }
  1581. void Imports::clear_timestamp() {
  1582. if (GetArenaNoVirtual() == NULL && timestamp_ != NULL) {
  1583. delete timestamp_;
  1584. }
  1585. timestamp_ = NULL;
  1586. }
  1587. void Imports::clear_duration() {
  1588. if (GetArenaNoVirtual() == NULL && duration_ != NULL) {
  1589. delete duration_;
  1590. }
  1591. duration_ = NULL;
  1592. }
  1593. void Imports::clear_i32() {
  1594. if (GetArenaNoVirtual() == NULL && i32_ != NULL) {
  1595. delete i32_;
  1596. }
  1597. i32_ = NULL;
  1598. }
  1599. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1600. const int Imports::kDblFieldNumber;
  1601. const int Imports::kStructFieldNumber;
  1602. const int Imports::kTimestampFieldNumber;
  1603. const int Imports::kDurationFieldNumber;
  1604. const int Imports::kI32FieldNumber;
  1605. const int Imports::kDataFieldNumber;
  1606. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1607. Imports::Imports()
  1608. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1609. ::google::protobuf::internal::InitSCC(
  1610. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Imports.base);
  1611. SharedCtor();
  1612. // @@protoc_insertion_point(constructor:google.protobuf.testing.Imports)
  1613. }
  1614. Imports::Imports(const Imports& from)
  1615. : ::google::protobuf::Message(),
  1616. _internal_metadata_(NULL) {
  1617. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1618. if (from.has_dbl()) {
  1619. dbl_ = new ::google::protobuf::DoubleValue(*from.dbl_);
  1620. } else {
  1621. dbl_ = NULL;
  1622. }
  1623. if (from.has_struct_()) {
  1624. struct__ = new ::google::protobuf::Struct(*from.struct__);
  1625. } else {
  1626. struct__ = NULL;
  1627. }
  1628. if (from.has_timestamp()) {
  1629. timestamp_ = new ::google::protobuf::Timestamp(*from.timestamp_);
  1630. } else {
  1631. timestamp_ = NULL;
  1632. }
  1633. if (from.has_duration()) {
  1634. duration_ = new ::google::protobuf::Duration(*from.duration_);
  1635. } else {
  1636. duration_ = NULL;
  1637. }
  1638. if (from.has_i32()) {
  1639. i32_ = new ::google::protobuf::Int32Value(*from.i32_);
  1640. } else {
  1641. i32_ = NULL;
  1642. }
  1643. if (from.has_data()) {
  1644. data_ = new ::google::protobuf::testing::Data(*from.data_);
  1645. } else {
  1646. data_ = NULL;
  1647. }
  1648. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Imports)
  1649. }
  1650. void Imports::SharedCtor() {
  1651. ::memset(&dbl_, 0, static_cast<size_t>(
  1652. reinterpret_cast<char*>(&data_) -
  1653. reinterpret_cast<char*>(&dbl_)) + sizeof(data_));
  1654. }
  1655. Imports::~Imports() {
  1656. // @@protoc_insertion_point(destructor:google.protobuf.testing.Imports)
  1657. SharedDtor();
  1658. }
  1659. void Imports::SharedDtor() {
  1660. if (this != internal_default_instance()) delete dbl_;
  1661. if (this != internal_default_instance()) delete struct__;
  1662. if (this != internal_default_instance()) delete timestamp_;
  1663. if (this != internal_default_instance()) delete duration_;
  1664. if (this != internal_default_instance()) delete i32_;
  1665. if (this != internal_default_instance()) delete data_;
  1666. }
  1667. void Imports::SetCachedSize(int size) const {
  1668. _cached_size_.Set(size);
  1669. }
  1670. const ::google::protobuf::Descriptor* Imports::descriptor() {
  1671. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  1672. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1673. }
  1674. const Imports& Imports::default_instance() {
  1675. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Imports.base);
  1676. return *internal_default_instance();
  1677. }
  1678. void Imports::Clear() {
  1679. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.Imports)
  1680. ::google::protobuf::uint32 cached_has_bits = 0;
  1681. // Prevent compiler warnings about cached_has_bits being unused
  1682. (void) cached_has_bits;
  1683. if (GetArenaNoVirtual() == NULL && dbl_ != NULL) {
  1684. delete dbl_;
  1685. }
  1686. dbl_ = NULL;
  1687. if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
  1688. delete struct__;
  1689. }
  1690. struct__ = NULL;
  1691. if (GetArenaNoVirtual() == NULL && timestamp_ != NULL) {
  1692. delete timestamp_;
  1693. }
  1694. timestamp_ = NULL;
  1695. if (GetArenaNoVirtual() == NULL && duration_ != NULL) {
  1696. delete duration_;
  1697. }
  1698. duration_ = NULL;
  1699. if (GetArenaNoVirtual() == NULL && i32_ != NULL) {
  1700. delete i32_;
  1701. }
  1702. i32_ = NULL;
  1703. if (GetArenaNoVirtual() == NULL && data_ != NULL) {
  1704. delete data_;
  1705. }
  1706. data_ = NULL;
  1707. _internal_metadata_.Clear();
  1708. }
  1709. bool Imports::MergePartialFromCodedStream(
  1710. ::google::protobuf::io::CodedInputStream* input) {
  1711. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1712. ::google::protobuf::uint32 tag;
  1713. // @@protoc_insertion_point(parse_start:google.protobuf.testing.Imports)
  1714. for (;;) {
  1715. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  1716. tag = p.first;
  1717. if (!p.second) goto handle_unusual;
  1718. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1719. // .google.protobuf.DoubleValue dbl = 1;
  1720. case 1: {
  1721. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1722. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1723. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1724. input, mutable_dbl()));
  1725. } else {
  1726. goto handle_unusual;
  1727. }
  1728. break;
  1729. }
  1730. // .google.protobuf.Struct struct = 2;
  1731. case 2: {
  1732. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1733. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1734. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1735. input, mutable_struct_()));
  1736. } else {
  1737. goto handle_unusual;
  1738. }
  1739. break;
  1740. }
  1741. // .google.protobuf.Timestamp timestamp = 3;
  1742. case 3: {
  1743. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1744. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1745. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1746. input, mutable_timestamp()));
  1747. } else {
  1748. goto handle_unusual;
  1749. }
  1750. break;
  1751. }
  1752. // .google.protobuf.Duration duration = 4;
  1753. case 4: {
  1754. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1755. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1756. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1757. input, mutable_duration()));
  1758. } else {
  1759. goto handle_unusual;
  1760. }
  1761. break;
  1762. }
  1763. // .google.protobuf.Int32Value i32 = 5;
  1764. case 5: {
  1765. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1766. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  1767. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1768. input, mutable_i32()));
  1769. } else {
  1770. goto handle_unusual;
  1771. }
  1772. break;
  1773. }
  1774. // .google.protobuf.testing.Data data = 100;
  1775. case 100: {
  1776. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1777. static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) {
  1778. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1779. input, mutable_data()));
  1780. } else {
  1781. goto handle_unusual;
  1782. }
  1783. break;
  1784. }
  1785. default: {
  1786. handle_unusual:
  1787. if (tag == 0) {
  1788. goto success;
  1789. }
  1790. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1791. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1792. break;
  1793. }
  1794. }
  1795. }
  1796. success:
  1797. // @@protoc_insertion_point(parse_success:google.protobuf.testing.Imports)
  1798. return true;
  1799. failure:
  1800. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Imports)
  1801. return false;
  1802. #undef DO_
  1803. }
  1804. void Imports::SerializeWithCachedSizes(
  1805. ::google::protobuf::io::CodedOutputStream* output) const {
  1806. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.Imports)
  1807. ::google::protobuf::uint32 cached_has_bits = 0;
  1808. (void) cached_has_bits;
  1809. // .google.protobuf.DoubleValue dbl = 1;
  1810. if (this->has_dbl()) {
  1811. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1812. 1, this->_internal_dbl(), output);
  1813. }
  1814. // .google.protobuf.Struct struct = 2;
  1815. if (this->has_struct_()) {
  1816. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1817. 2, this->_internal_struct_(), output);
  1818. }
  1819. // .google.protobuf.Timestamp timestamp = 3;
  1820. if (this->has_timestamp()) {
  1821. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1822. 3, this->_internal_timestamp(), output);
  1823. }
  1824. // .google.protobuf.Duration duration = 4;
  1825. if (this->has_duration()) {
  1826. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1827. 4, this->_internal_duration(), output);
  1828. }
  1829. // .google.protobuf.Int32Value i32 = 5;
  1830. if (this->has_i32()) {
  1831. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1832. 5, this->_internal_i32(), output);
  1833. }
  1834. // .google.protobuf.testing.Data data = 100;
  1835. if (this->has_data()) {
  1836. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1837. 100, this->_internal_data(), output);
  1838. }
  1839. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1840. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1841. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1842. }
  1843. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.Imports)
  1844. }
  1845. ::google::protobuf::uint8* Imports::InternalSerializeWithCachedSizesToArray(
  1846. bool deterministic, ::google::protobuf::uint8* target) const {
  1847. (void)deterministic; // Unused
  1848. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.Imports)
  1849. ::google::protobuf::uint32 cached_has_bits = 0;
  1850. (void) cached_has_bits;
  1851. // .google.protobuf.DoubleValue dbl = 1;
  1852. if (this->has_dbl()) {
  1853. target = ::google::protobuf::internal::WireFormatLite::
  1854. InternalWriteMessageToArray(
  1855. 1, this->_internal_dbl(), deterministic, target);
  1856. }
  1857. // .google.protobuf.Struct struct = 2;
  1858. if (this->has_struct_()) {
  1859. target = ::google::protobuf::internal::WireFormatLite::
  1860. InternalWriteMessageToArray(
  1861. 2, this->_internal_struct_(), deterministic, target);
  1862. }
  1863. // .google.protobuf.Timestamp timestamp = 3;
  1864. if (this->has_timestamp()) {
  1865. target = ::google::protobuf::internal::WireFormatLite::
  1866. InternalWriteMessageToArray(
  1867. 3, this->_internal_timestamp(), deterministic, target);
  1868. }
  1869. // .google.protobuf.Duration duration = 4;
  1870. if (this->has_duration()) {
  1871. target = ::google::protobuf::internal::WireFormatLite::
  1872. InternalWriteMessageToArray(
  1873. 4, this->_internal_duration(), deterministic, target);
  1874. }
  1875. // .google.protobuf.Int32Value i32 = 5;
  1876. if (this->has_i32()) {
  1877. target = ::google::protobuf::internal::WireFormatLite::
  1878. InternalWriteMessageToArray(
  1879. 5, this->_internal_i32(), deterministic, target);
  1880. }
  1881. // .google.protobuf.testing.Data data = 100;
  1882. if (this->has_data()) {
  1883. target = ::google::protobuf::internal::WireFormatLite::
  1884. InternalWriteMessageToArray(
  1885. 100, this->_internal_data(), deterministic, target);
  1886. }
  1887. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1888. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1889. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1890. }
  1891. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.Imports)
  1892. return target;
  1893. }
  1894. size_t Imports::ByteSizeLong() const {
  1895. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Imports)
  1896. size_t total_size = 0;
  1897. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1898. total_size +=
  1899. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1900. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1901. }
  1902. // .google.protobuf.DoubleValue dbl = 1;
  1903. if (this->has_dbl()) {
  1904. total_size += 1 +
  1905. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1906. *dbl_);
  1907. }
  1908. // .google.protobuf.Struct struct = 2;
  1909. if (this->has_struct_()) {
  1910. total_size += 1 +
  1911. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1912. *struct__);
  1913. }
  1914. // .google.protobuf.Timestamp timestamp = 3;
  1915. if (this->has_timestamp()) {
  1916. total_size += 1 +
  1917. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1918. *timestamp_);
  1919. }
  1920. // .google.protobuf.Duration duration = 4;
  1921. if (this->has_duration()) {
  1922. total_size += 1 +
  1923. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1924. *duration_);
  1925. }
  1926. // .google.protobuf.Int32Value i32 = 5;
  1927. if (this->has_i32()) {
  1928. total_size += 1 +
  1929. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1930. *i32_);
  1931. }
  1932. // .google.protobuf.testing.Data data = 100;
  1933. if (this->has_data()) {
  1934. total_size += 2 +
  1935. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1936. *data_);
  1937. }
  1938. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1939. SetCachedSize(cached_size);
  1940. return total_size;
  1941. }
  1942. void Imports::MergeFrom(const ::google::protobuf::Message& from) {
  1943. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.Imports)
  1944. GOOGLE_DCHECK_NE(&from, this);
  1945. const Imports* source =
  1946. ::google::protobuf::internal::DynamicCastToGenerated<const Imports>(
  1947. &from);
  1948. if (source == NULL) {
  1949. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.Imports)
  1950. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1951. } else {
  1952. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.Imports)
  1953. MergeFrom(*source);
  1954. }
  1955. }
  1956. void Imports::MergeFrom(const Imports& from) {
  1957. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.Imports)
  1958. GOOGLE_DCHECK_NE(&from, this);
  1959. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1960. ::google::protobuf::uint32 cached_has_bits = 0;
  1961. (void) cached_has_bits;
  1962. if (from.has_dbl()) {
  1963. mutable_dbl()->::google::protobuf::DoubleValue::MergeFrom(from.dbl());
  1964. }
  1965. if (from.has_struct_()) {
  1966. mutable_struct_()->::google::protobuf::Struct::MergeFrom(from.struct_());
  1967. }
  1968. if (from.has_timestamp()) {
  1969. mutable_timestamp()->::google::protobuf::Timestamp::MergeFrom(from.timestamp());
  1970. }
  1971. if (from.has_duration()) {
  1972. mutable_duration()->::google::protobuf::Duration::MergeFrom(from.duration());
  1973. }
  1974. if (from.has_i32()) {
  1975. mutable_i32()->::google::protobuf::Int32Value::MergeFrom(from.i32());
  1976. }
  1977. if (from.has_data()) {
  1978. mutable_data()->::google::protobuf::testing::Data::MergeFrom(from.data());
  1979. }
  1980. }
  1981. void Imports::CopyFrom(const ::google::protobuf::Message& from) {
  1982. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.Imports)
  1983. if (&from == this) return;
  1984. Clear();
  1985. MergeFrom(from);
  1986. }
  1987. void Imports::CopyFrom(const Imports& from) {
  1988. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.Imports)
  1989. if (&from == this) return;
  1990. Clear();
  1991. MergeFrom(from);
  1992. }
  1993. bool Imports::IsInitialized() const {
  1994. return true;
  1995. }
  1996. void Imports::Swap(Imports* other) {
  1997. if (other == this) return;
  1998. InternalSwap(other);
  1999. }
  2000. void Imports::InternalSwap(Imports* other) {
  2001. using std::swap;
  2002. swap(dbl_, other->dbl_);
  2003. swap(struct__, other->struct__);
  2004. swap(timestamp_, other->timestamp_);
  2005. swap(duration_, other->duration_);
  2006. swap(i32_, other->i32_);
  2007. swap(data_, other->data_);
  2008. _internal_metadata_.Swap(&other->_internal_metadata_);
  2009. }
  2010. ::google::protobuf::Metadata Imports::GetMetadata() const {
  2011. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  2012. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
  2013. }
  2014. // ===================================================================
  2015. Data_MapDataEntry_DoNotUse::Data_MapDataEntry_DoNotUse() {}
  2016. Data_MapDataEntry_DoNotUse::Data_MapDataEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2017. void Data_MapDataEntry_DoNotUse::MergeFrom(const Data_MapDataEntry_DoNotUse& other) {
  2018. MergeFromInternal(other);
  2019. }
  2020. ::google::protobuf::Metadata Data_MapDataEntry_DoNotUse::GetMetadata() const {
  2021. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  2022. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[3];
  2023. }
  2024. void Data_MapDataEntry_DoNotUse::MergeFrom(
  2025. const ::google::protobuf::Message& other) {
  2026. ::google::protobuf::Message::MergeFrom(other);
  2027. }
  2028. // ===================================================================
  2029. void Data::InitAsDefaultInstance() {
  2030. ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->nested_data_ = const_cast< ::google::protobuf::testing::Data*>(
  2031. ::google::protobuf::testing::Data::internal_default_instance());
  2032. ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->int_wrapper_ = const_cast< ::google::protobuf::Int32Value*>(
  2033. ::google::protobuf::Int32Value::internal_default_instance());
  2034. ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->time_ = const_cast< ::google::protobuf::Timestamp*>(
  2035. ::google::protobuf::Timestamp::internal_default_instance());
  2036. ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->struct_data_ = const_cast< ::google::protobuf::Struct*>(
  2037. ::google::protobuf::Struct::internal_default_instance());
  2038. }
  2039. void Data::clear_int_wrapper() {
  2040. if (GetArenaNoVirtual() == NULL && int_wrapper_ != NULL) {
  2041. delete int_wrapper_;
  2042. }
  2043. int_wrapper_ = NULL;
  2044. }
  2045. void Data::clear_time() {
  2046. if (GetArenaNoVirtual() == NULL && time_ != NULL) {
  2047. delete time_;
  2048. }
  2049. time_ = NULL;
  2050. }
  2051. void Data::clear_struct_data() {
  2052. if (GetArenaNoVirtual() == NULL && struct_data_ != NULL) {
  2053. delete struct_data_;
  2054. }
  2055. struct_data_ = NULL;
  2056. }
  2057. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2058. const int Data::kAttrFieldNumber;
  2059. const int Data::kStrFieldNumber;
  2060. const int Data::kMsgsFieldNumber;
  2061. const int Data::kNestedDataFieldNumber;
  2062. const int Data::kIntWrapperFieldNumber;
  2063. const int Data::kTimeFieldNumber;
  2064. const int Data::kMapDataFieldNumber;
  2065. const int Data::kStructDataFieldNumber;
  2066. const int Data::kRepeatedDataFieldNumber;
  2067. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2068. Data::Data()
  2069. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2070. ::google::protobuf::internal::InitSCC(
  2071. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data.base);
  2072. SharedCtor();
  2073. // @@protoc_insertion_point(constructor:google.protobuf.testing.Data)
  2074. }
  2075. Data::Data(const Data& from)
  2076. : ::google::protobuf::Message(),
  2077. _internal_metadata_(NULL),
  2078. msgs_(from.msgs_),
  2079. repeated_data_(from.repeated_data_) {
  2080. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2081. map_data_.MergeFrom(from.map_data_);
  2082. str_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2083. if (from.str().size() > 0) {
  2084. str_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_);
  2085. }
  2086. if (from.has_nested_data()) {
  2087. nested_data_ = new ::google::protobuf::testing::Data(*from.nested_data_);
  2088. } else {
  2089. nested_data_ = NULL;
  2090. }
  2091. if (from.has_int_wrapper()) {
  2092. int_wrapper_ = new ::google::protobuf::Int32Value(*from.int_wrapper_);
  2093. } else {
  2094. int_wrapper_ = NULL;
  2095. }
  2096. if (from.has_time()) {
  2097. time_ = new ::google::protobuf::Timestamp(*from.time_);
  2098. } else {
  2099. time_ = NULL;
  2100. }
  2101. if (from.has_struct_data()) {
  2102. struct_data_ = new ::google::protobuf::Struct(*from.struct_data_);
  2103. } else {
  2104. struct_data_ = NULL;
  2105. }
  2106. attr_ = from.attr_;
  2107. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Data)
  2108. }
  2109. void Data::SharedCtor() {
  2110. str_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2111. ::memset(&nested_data_, 0, static_cast<size_t>(
  2112. reinterpret_cast<char*>(&attr_) -
  2113. reinterpret_cast<char*>(&nested_data_)) + sizeof(attr_));
  2114. }
  2115. Data::~Data() {
  2116. // @@protoc_insertion_point(destructor:google.protobuf.testing.Data)
  2117. SharedDtor();
  2118. }
  2119. void Data::SharedDtor() {
  2120. str_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2121. if (this != internal_default_instance()) delete nested_data_;
  2122. if (this != internal_default_instance()) delete int_wrapper_;
  2123. if (this != internal_default_instance()) delete time_;
  2124. if (this != internal_default_instance()) delete struct_data_;
  2125. }
  2126. void Data::SetCachedSize(int size) const {
  2127. _cached_size_.Set(size);
  2128. }
  2129. const ::google::protobuf::Descriptor* Data::descriptor() {
  2130. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  2131. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2132. }
  2133. const Data& Data::default_instance() {
  2134. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data.base);
  2135. return *internal_default_instance();
  2136. }
  2137. void Data::Clear() {
  2138. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.Data)
  2139. ::google::protobuf::uint32 cached_has_bits = 0;
  2140. // Prevent compiler warnings about cached_has_bits being unused
  2141. (void) cached_has_bits;
  2142. msgs_.Clear();
  2143. map_data_.Clear();
  2144. repeated_data_.Clear();
  2145. str_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2146. if (GetArenaNoVirtual() == NULL && nested_data_ != NULL) {
  2147. delete nested_data_;
  2148. }
  2149. nested_data_ = NULL;
  2150. if (GetArenaNoVirtual() == NULL && int_wrapper_ != NULL) {
  2151. delete int_wrapper_;
  2152. }
  2153. int_wrapper_ = NULL;
  2154. if (GetArenaNoVirtual() == NULL && time_ != NULL) {
  2155. delete time_;
  2156. }
  2157. time_ = NULL;
  2158. if (GetArenaNoVirtual() == NULL && struct_data_ != NULL) {
  2159. delete struct_data_;
  2160. }
  2161. struct_data_ = NULL;
  2162. attr_ = 0;
  2163. _internal_metadata_.Clear();
  2164. }
  2165. bool Data::MergePartialFromCodedStream(
  2166. ::google::protobuf::io::CodedInputStream* input) {
  2167. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2168. ::google::protobuf::uint32 tag;
  2169. // @@protoc_insertion_point(parse_start:google.protobuf.testing.Data)
  2170. for (;;) {
  2171. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2172. tag = p.first;
  2173. if (!p.second) goto handle_unusual;
  2174. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2175. // int32 attr = 1;
  2176. case 1: {
  2177. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2178. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  2179. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2180. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2181. input, &attr_)));
  2182. } else {
  2183. goto handle_unusual;
  2184. }
  2185. break;
  2186. }
  2187. // string str = 2;
  2188. case 2: {
  2189. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2190. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  2191. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2192. input, this->mutable_str()));
  2193. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2194. this->str().data(), static_cast<int>(this->str().length()),
  2195. ::google::protobuf::internal::WireFormatLite::PARSE,
  2196. "google.protobuf.testing.Data.str"));
  2197. } else {
  2198. goto handle_unusual;
  2199. }
  2200. break;
  2201. }
  2202. // repeated string msgs = 3;
  2203. case 3: {
  2204. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2205. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  2206. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2207. input, this->add_msgs()));
  2208. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2209. this->msgs(this->msgs_size() - 1).data(),
  2210. static_cast<int>(this->msgs(this->msgs_size() - 1).length()),
  2211. ::google::protobuf::internal::WireFormatLite::PARSE,
  2212. "google.protobuf.testing.Data.msgs"));
  2213. } else {
  2214. goto handle_unusual;
  2215. }
  2216. break;
  2217. }
  2218. // .google.protobuf.testing.Data nested_data = 4;
  2219. case 4: {
  2220. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2221. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  2222. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2223. input, mutable_nested_data()));
  2224. } else {
  2225. goto handle_unusual;
  2226. }
  2227. break;
  2228. }
  2229. // .google.protobuf.Int32Value int_wrapper = 5;
  2230. case 5: {
  2231. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2232. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  2233. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2234. input, mutable_int_wrapper()));
  2235. } else {
  2236. goto handle_unusual;
  2237. }
  2238. break;
  2239. }
  2240. // .google.protobuf.Timestamp time = 6;
  2241. case 6: {
  2242. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2243. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  2244. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2245. input, mutable_time()));
  2246. } else {
  2247. goto handle_unusual;
  2248. }
  2249. break;
  2250. }
  2251. // map<string, string> map_data = 7;
  2252. case 7: {
  2253. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2254. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  2255. Data_MapDataEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2256. Data_MapDataEntry_DoNotUse,
  2257. ::std::string, ::std::string,
  2258. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  2259. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  2260. 0 >,
  2261. ::google::protobuf::Map< ::std::string, ::std::string > > parser(&map_data_);
  2262. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2263. input, &parser));
  2264. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2265. parser.key().data(), static_cast<int>(parser.key().length()),
  2266. ::google::protobuf::internal::WireFormatLite::PARSE,
  2267. "google.protobuf.testing.Data.MapDataEntry.key"));
  2268. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2269. parser.value().data(), static_cast<int>(parser.value().length()),
  2270. ::google::protobuf::internal::WireFormatLite::PARSE,
  2271. "google.protobuf.testing.Data.MapDataEntry.value"));
  2272. } else {
  2273. goto handle_unusual;
  2274. }
  2275. break;
  2276. }
  2277. // .google.protobuf.Struct struct_data = 8;
  2278. case 8: {
  2279. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2280. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  2281. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2282. input, mutable_struct_data()));
  2283. } else {
  2284. goto handle_unusual;
  2285. }
  2286. break;
  2287. }
  2288. // repeated .google.protobuf.testing.Data repeated_data = 9;
  2289. case 9: {
  2290. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2291. static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
  2292. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2293. input, add_repeated_data()));
  2294. } else {
  2295. goto handle_unusual;
  2296. }
  2297. break;
  2298. }
  2299. default: {
  2300. handle_unusual:
  2301. if (tag == 0) {
  2302. goto success;
  2303. }
  2304. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2305. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2306. break;
  2307. }
  2308. }
  2309. }
  2310. success:
  2311. // @@protoc_insertion_point(parse_success:google.protobuf.testing.Data)
  2312. return true;
  2313. failure:
  2314. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Data)
  2315. return false;
  2316. #undef DO_
  2317. }
  2318. void Data::SerializeWithCachedSizes(
  2319. ::google::protobuf::io::CodedOutputStream* output) const {
  2320. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.Data)
  2321. ::google::protobuf::uint32 cached_has_bits = 0;
  2322. (void) cached_has_bits;
  2323. // int32 attr = 1;
  2324. if (this->attr() != 0) {
  2325. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->attr(), output);
  2326. }
  2327. // string str = 2;
  2328. if (this->str().size() > 0) {
  2329. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2330. this->str().data(), static_cast<int>(this->str().length()),
  2331. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2332. "google.protobuf.testing.Data.str");
  2333. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2334. 2, this->str(), output);
  2335. }
  2336. // repeated string msgs = 3;
  2337. for (int i = 0, n = this->msgs_size(); i < n; i++) {
  2338. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2339. this->msgs(i).data(), static_cast<int>(this->msgs(i).length()),
  2340. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2341. "google.protobuf.testing.Data.msgs");
  2342. ::google::protobuf::internal::WireFormatLite::WriteString(
  2343. 3, this->msgs(i), output);
  2344. }
  2345. // .google.protobuf.testing.Data nested_data = 4;
  2346. if (this->has_nested_data()) {
  2347. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2348. 4, this->_internal_nested_data(), output);
  2349. }
  2350. // .google.protobuf.Int32Value int_wrapper = 5;
  2351. if (this->has_int_wrapper()) {
  2352. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2353. 5, this->_internal_int_wrapper(), output);
  2354. }
  2355. // .google.protobuf.Timestamp time = 6;
  2356. if (this->has_time()) {
  2357. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2358. 6, this->_internal_time(), output);
  2359. }
  2360. // map<string, string> map_data = 7;
  2361. if (!this->map_data().empty()) {
  2362. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  2363. ConstPtr;
  2364. typedef ConstPtr SortItem;
  2365. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  2366. struct Utf8Check {
  2367. static void Check(ConstPtr p) {
  2368. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2369. p->first.data(), static_cast<int>(p->first.length()),
  2370. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2371. "google.protobuf.testing.Data.MapDataEntry.key");
  2372. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2373. p->second.data(), static_cast<int>(p->second.length()),
  2374. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2375. "google.protobuf.testing.Data.MapDataEntry.value");
  2376. }
  2377. };
  2378. if (output->IsSerializationDeterministic() &&
  2379. this->map_data().size() > 1) {
  2380. ::std::unique_ptr<SortItem[]> items(
  2381. new SortItem[this->map_data().size()]);
  2382. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  2383. size_type n = 0;
  2384. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  2385. it = this->map_data().begin();
  2386. it != this->map_data().end(); ++it, ++n) {
  2387. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2388. }
  2389. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2390. ::std::unique_ptr<Data_MapDataEntry_DoNotUse> entry;
  2391. for (size_type i = 0; i < n; i++) {
  2392. entry.reset(map_data_.NewEntryWrapper(
  2393. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  2394. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2395. 7, *entry, output);
  2396. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  2397. }
  2398. } else {
  2399. ::std::unique_ptr<Data_MapDataEntry_DoNotUse> entry;
  2400. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  2401. it = this->map_data().begin();
  2402. it != this->map_data().end(); ++it) {
  2403. entry.reset(map_data_.NewEntryWrapper(
  2404. it->first, it->second));
  2405. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2406. 7, *entry, output);
  2407. Utf8Check::Check(&*it);
  2408. }
  2409. }
  2410. }
  2411. // .google.protobuf.Struct struct_data = 8;
  2412. if (this->has_struct_data()) {
  2413. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2414. 8, this->_internal_struct_data(), output);
  2415. }
  2416. // repeated .google.protobuf.testing.Data repeated_data = 9;
  2417. for (unsigned int i = 0,
  2418. n = static_cast<unsigned int>(this->repeated_data_size()); i < n; i++) {
  2419. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2420. 9,
  2421. this->repeated_data(static_cast<int>(i)),
  2422. output);
  2423. }
  2424. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2425. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2426. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2427. }
  2428. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.Data)
  2429. }
  2430. ::google::protobuf::uint8* Data::InternalSerializeWithCachedSizesToArray(
  2431. bool deterministic, ::google::protobuf::uint8* target) const {
  2432. (void)deterministic; // Unused
  2433. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.Data)
  2434. ::google::protobuf::uint32 cached_has_bits = 0;
  2435. (void) cached_has_bits;
  2436. // int32 attr = 1;
  2437. if (this->attr() != 0) {
  2438. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->attr(), target);
  2439. }
  2440. // string str = 2;
  2441. if (this->str().size() > 0) {
  2442. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2443. this->str().data(), static_cast<int>(this->str().length()),
  2444. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2445. "google.protobuf.testing.Data.str");
  2446. target =
  2447. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2448. 2, this->str(), target);
  2449. }
  2450. // repeated string msgs = 3;
  2451. for (int i = 0, n = this->msgs_size(); i < n; i++) {
  2452. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2453. this->msgs(i).data(), static_cast<int>(this->msgs(i).length()),
  2454. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2455. "google.protobuf.testing.Data.msgs");
  2456. target = ::google::protobuf::internal::WireFormatLite::
  2457. WriteStringToArray(3, this->msgs(i), target);
  2458. }
  2459. // .google.protobuf.testing.Data nested_data = 4;
  2460. if (this->has_nested_data()) {
  2461. target = ::google::protobuf::internal::WireFormatLite::
  2462. InternalWriteMessageToArray(
  2463. 4, this->_internal_nested_data(), deterministic, target);
  2464. }
  2465. // .google.protobuf.Int32Value int_wrapper = 5;
  2466. if (this->has_int_wrapper()) {
  2467. target = ::google::protobuf::internal::WireFormatLite::
  2468. InternalWriteMessageToArray(
  2469. 5, this->_internal_int_wrapper(), deterministic, target);
  2470. }
  2471. // .google.protobuf.Timestamp time = 6;
  2472. if (this->has_time()) {
  2473. target = ::google::protobuf::internal::WireFormatLite::
  2474. InternalWriteMessageToArray(
  2475. 6, this->_internal_time(), deterministic, target);
  2476. }
  2477. // map<string, string> map_data = 7;
  2478. if (!this->map_data().empty()) {
  2479. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  2480. ConstPtr;
  2481. typedef ConstPtr SortItem;
  2482. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  2483. struct Utf8Check {
  2484. static void Check(ConstPtr p) {
  2485. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2486. p->first.data(), static_cast<int>(p->first.length()),
  2487. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2488. "google.protobuf.testing.Data.MapDataEntry.key");
  2489. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2490. p->second.data(), static_cast<int>(p->second.length()),
  2491. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2492. "google.protobuf.testing.Data.MapDataEntry.value");
  2493. }
  2494. };
  2495. if (deterministic &&
  2496. this->map_data().size() > 1) {
  2497. ::std::unique_ptr<SortItem[]> items(
  2498. new SortItem[this->map_data().size()]);
  2499. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  2500. size_type n = 0;
  2501. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  2502. it = this->map_data().begin();
  2503. it != this->map_data().end(); ++it, ++n) {
  2504. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2505. }
  2506. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2507. ::std::unique_ptr<Data_MapDataEntry_DoNotUse> entry;
  2508. for (size_type i = 0; i < n; i++) {
  2509. entry.reset(map_data_.NewEntryWrapper(
  2510. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  2511. target = ::google::protobuf::internal::WireFormatLite::
  2512. InternalWriteMessageNoVirtualToArray(
  2513. 7, *entry, deterministic, target);
  2514. ;
  2515. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  2516. }
  2517. } else {
  2518. ::std::unique_ptr<Data_MapDataEntry_DoNotUse> entry;
  2519. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  2520. it = this->map_data().begin();
  2521. it != this->map_data().end(); ++it) {
  2522. entry.reset(map_data_.NewEntryWrapper(
  2523. it->first, it->second));
  2524. target = ::google::protobuf::internal::WireFormatLite::
  2525. InternalWriteMessageNoVirtualToArray(
  2526. 7, *entry, deterministic, target);
  2527. ;
  2528. Utf8Check::Check(&*it);
  2529. }
  2530. }
  2531. }
  2532. // .google.protobuf.Struct struct_data = 8;
  2533. if (this->has_struct_data()) {
  2534. target = ::google::protobuf::internal::WireFormatLite::
  2535. InternalWriteMessageToArray(
  2536. 8, this->_internal_struct_data(), deterministic, target);
  2537. }
  2538. // repeated .google.protobuf.testing.Data repeated_data = 9;
  2539. for (unsigned int i = 0,
  2540. n = static_cast<unsigned int>(this->repeated_data_size()); i < n; i++) {
  2541. target = ::google::protobuf::internal::WireFormatLite::
  2542. InternalWriteMessageToArray(
  2543. 9, this->repeated_data(static_cast<int>(i)), deterministic, target);
  2544. }
  2545. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2546. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2547. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2548. }
  2549. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.Data)
  2550. return target;
  2551. }
  2552. size_t Data::ByteSizeLong() const {
  2553. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Data)
  2554. size_t total_size = 0;
  2555. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2556. total_size +=
  2557. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2558. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2559. }
  2560. // repeated string msgs = 3;
  2561. total_size += 1 *
  2562. ::google::protobuf::internal::FromIntSize(this->msgs_size());
  2563. for (int i = 0, n = this->msgs_size(); i < n; i++) {
  2564. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  2565. this->msgs(i));
  2566. }
  2567. // map<string, string> map_data = 7;
  2568. total_size += 1 *
  2569. ::google::protobuf::internal::FromIntSize(this->map_data_size());
  2570. {
  2571. ::std::unique_ptr<Data_MapDataEntry_DoNotUse> entry;
  2572. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  2573. it = this->map_data().begin();
  2574. it != this->map_data().end(); ++it) {
  2575. entry.reset(map_data_.NewEntryWrapper(it->first, it->second));
  2576. total_size += ::google::protobuf::internal::WireFormatLite::
  2577. MessageSizeNoVirtual(*entry);
  2578. }
  2579. }
  2580. // repeated .google.protobuf.testing.Data repeated_data = 9;
  2581. {
  2582. unsigned int count = static_cast<unsigned int>(this->repeated_data_size());
  2583. total_size += 1UL * count;
  2584. for (unsigned int i = 0; i < count; i++) {
  2585. total_size +=
  2586. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2587. this->repeated_data(static_cast<int>(i)));
  2588. }
  2589. }
  2590. // string str = 2;
  2591. if (this->str().size() > 0) {
  2592. total_size += 1 +
  2593. ::google::protobuf::internal::WireFormatLite::StringSize(
  2594. this->str());
  2595. }
  2596. // .google.protobuf.testing.Data nested_data = 4;
  2597. if (this->has_nested_data()) {
  2598. total_size += 1 +
  2599. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2600. *nested_data_);
  2601. }
  2602. // .google.protobuf.Int32Value int_wrapper = 5;
  2603. if (this->has_int_wrapper()) {
  2604. total_size += 1 +
  2605. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2606. *int_wrapper_);
  2607. }
  2608. // .google.protobuf.Timestamp time = 6;
  2609. if (this->has_time()) {
  2610. total_size += 1 +
  2611. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2612. *time_);
  2613. }
  2614. // .google.protobuf.Struct struct_data = 8;
  2615. if (this->has_struct_data()) {
  2616. total_size += 1 +
  2617. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2618. *struct_data_);
  2619. }
  2620. // int32 attr = 1;
  2621. if (this->attr() != 0) {
  2622. total_size += 1 +
  2623. ::google::protobuf::internal::WireFormatLite::Int32Size(
  2624. this->attr());
  2625. }
  2626. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2627. SetCachedSize(cached_size);
  2628. return total_size;
  2629. }
  2630. void Data::MergeFrom(const ::google::protobuf::Message& from) {
  2631. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.Data)
  2632. GOOGLE_DCHECK_NE(&from, this);
  2633. const Data* source =
  2634. ::google::protobuf::internal::DynamicCastToGenerated<const Data>(
  2635. &from);
  2636. if (source == NULL) {
  2637. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.Data)
  2638. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2639. } else {
  2640. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.Data)
  2641. MergeFrom(*source);
  2642. }
  2643. }
  2644. void Data::MergeFrom(const Data& from) {
  2645. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.Data)
  2646. GOOGLE_DCHECK_NE(&from, this);
  2647. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2648. ::google::protobuf::uint32 cached_has_bits = 0;
  2649. (void) cached_has_bits;
  2650. msgs_.MergeFrom(from.msgs_);
  2651. map_data_.MergeFrom(from.map_data_);
  2652. repeated_data_.MergeFrom(from.repeated_data_);
  2653. if (from.str().size() > 0) {
  2654. str_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_);
  2655. }
  2656. if (from.has_nested_data()) {
  2657. mutable_nested_data()->::google::protobuf::testing::Data::MergeFrom(from.nested_data());
  2658. }
  2659. if (from.has_int_wrapper()) {
  2660. mutable_int_wrapper()->::google::protobuf::Int32Value::MergeFrom(from.int_wrapper());
  2661. }
  2662. if (from.has_time()) {
  2663. mutable_time()->::google::protobuf::Timestamp::MergeFrom(from.time());
  2664. }
  2665. if (from.has_struct_data()) {
  2666. mutable_struct_data()->::google::protobuf::Struct::MergeFrom(from.struct_data());
  2667. }
  2668. if (from.attr() != 0) {
  2669. set_attr(from.attr());
  2670. }
  2671. }
  2672. void Data::CopyFrom(const ::google::protobuf::Message& from) {
  2673. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.Data)
  2674. if (&from == this) return;
  2675. Clear();
  2676. MergeFrom(from);
  2677. }
  2678. void Data::CopyFrom(const Data& from) {
  2679. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.Data)
  2680. if (&from == this) return;
  2681. Clear();
  2682. MergeFrom(from);
  2683. }
  2684. bool Data::IsInitialized() const {
  2685. return true;
  2686. }
  2687. void Data::Swap(Data* other) {
  2688. if (other == this) return;
  2689. InternalSwap(other);
  2690. }
  2691. void Data::InternalSwap(Data* other) {
  2692. using std::swap;
  2693. msgs_.InternalSwap(CastToBase(&other->msgs_));
  2694. map_data_.Swap(&other->map_data_);
  2695. CastToBase(&repeated_data_)->InternalSwap(CastToBase(&other->repeated_data_));
  2696. str_.Swap(&other->str_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  2697. GetArenaNoVirtual());
  2698. swap(nested_data_, other->nested_data_);
  2699. swap(int_wrapper_, other->int_wrapper_);
  2700. swap(time_, other->time_);
  2701. swap(struct_data_, other->struct_data_);
  2702. swap(attr_, other->attr_);
  2703. _internal_metadata_.Swap(&other->_internal_metadata_);
  2704. }
  2705. ::google::protobuf::Metadata Data::GetMetadata() const {
  2706. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  2707. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
  2708. }
  2709. // ===================================================================
  2710. void AnyIn::InitAsDefaultInstance() {
  2711. ::google::protobuf::testing::_AnyIn_default_instance_._instance.get_mutable()->any_ = const_cast< ::google::protobuf::Any*>(
  2712. ::google::protobuf::Any::internal_default_instance());
  2713. }
  2714. void AnyIn::clear_any() {
  2715. if (GetArenaNoVirtual() == NULL && any_ != NULL) {
  2716. delete any_;
  2717. }
  2718. any_ = NULL;
  2719. }
  2720. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2721. const int AnyIn::kSomethingFieldNumber;
  2722. const int AnyIn::kAnyFieldNumber;
  2723. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2724. AnyIn::AnyIn()
  2725. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2726. ::google::protobuf::internal::InitSCC(
  2727. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyIn.base);
  2728. SharedCtor();
  2729. // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyIn)
  2730. }
  2731. AnyIn::AnyIn(const AnyIn& from)
  2732. : ::google::protobuf::Message(),
  2733. _internal_metadata_(NULL) {
  2734. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2735. something_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2736. if (from.something().size() > 0) {
  2737. something_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.something_);
  2738. }
  2739. if (from.has_any()) {
  2740. any_ = new ::google::protobuf::Any(*from.any_);
  2741. } else {
  2742. any_ = NULL;
  2743. }
  2744. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyIn)
  2745. }
  2746. void AnyIn::SharedCtor() {
  2747. something_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2748. any_ = NULL;
  2749. }
  2750. AnyIn::~AnyIn() {
  2751. // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyIn)
  2752. SharedDtor();
  2753. }
  2754. void AnyIn::SharedDtor() {
  2755. something_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2756. if (this != internal_default_instance()) delete any_;
  2757. }
  2758. void AnyIn::SetCachedSize(int size) const {
  2759. _cached_size_.Set(size);
  2760. }
  2761. const ::google::protobuf::Descriptor* AnyIn::descriptor() {
  2762. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  2763. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2764. }
  2765. const AnyIn& AnyIn::default_instance() {
  2766. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyIn.base);
  2767. return *internal_default_instance();
  2768. }
  2769. void AnyIn::Clear() {
  2770. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyIn)
  2771. ::google::protobuf::uint32 cached_has_bits = 0;
  2772. // Prevent compiler warnings about cached_has_bits being unused
  2773. (void) cached_has_bits;
  2774. something_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2775. if (GetArenaNoVirtual() == NULL && any_ != NULL) {
  2776. delete any_;
  2777. }
  2778. any_ = NULL;
  2779. _internal_metadata_.Clear();
  2780. }
  2781. bool AnyIn::MergePartialFromCodedStream(
  2782. ::google::protobuf::io::CodedInputStream* input) {
  2783. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2784. ::google::protobuf::uint32 tag;
  2785. // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyIn)
  2786. for (;;) {
  2787. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2788. tag = p.first;
  2789. if (!p.second) goto handle_unusual;
  2790. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2791. // string something = 1;
  2792. case 1: {
  2793. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2794. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2795. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2796. input, this->mutable_something()));
  2797. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2798. this->something().data(), static_cast<int>(this->something().length()),
  2799. ::google::protobuf::internal::WireFormatLite::PARSE,
  2800. "google.protobuf.testing.AnyIn.something"));
  2801. } else {
  2802. goto handle_unusual;
  2803. }
  2804. break;
  2805. }
  2806. // .google.protobuf.Any any = 2;
  2807. case 2: {
  2808. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2809. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  2810. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2811. input, mutable_any()));
  2812. } else {
  2813. goto handle_unusual;
  2814. }
  2815. break;
  2816. }
  2817. default: {
  2818. handle_unusual:
  2819. if (tag == 0) {
  2820. goto success;
  2821. }
  2822. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2823. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2824. break;
  2825. }
  2826. }
  2827. }
  2828. success:
  2829. // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyIn)
  2830. return true;
  2831. failure:
  2832. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyIn)
  2833. return false;
  2834. #undef DO_
  2835. }
  2836. void AnyIn::SerializeWithCachedSizes(
  2837. ::google::protobuf::io::CodedOutputStream* output) const {
  2838. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyIn)
  2839. ::google::protobuf::uint32 cached_has_bits = 0;
  2840. (void) cached_has_bits;
  2841. // string something = 1;
  2842. if (this->something().size() > 0) {
  2843. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2844. this->something().data(), static_cast<int>(this->something().length()),
  2845. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2846. "google.protobuf.testing.AnyIn.something");
  2847. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2848. 1, this->something(), output);
  2849. }
  2850. // .google.protobuf.Any any = 2;
  2851. if (this->has_any()) {
  2852. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2853. 2, this->_internal_any(), output);
  2854. }
  2855. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2856. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2857. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2858. }
  2859. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyIn)
  2860. }
  2861. ::google::protobuf::uint8* AnyIn::InternalSerializeWithCachedSizesToArray(
  2862. bool deterministic, ::google::protobuf::uint8* target) const {
  2863. (void)deterministic; // Unused
  2864. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyIn)
  2865. ::google::protobuf::uint32 cached_has_bits = 0;
  2866. (void) cached_has_bits;
  2867. // string something = 1;
  2868. if (this->something().size() > 0) {
  2869. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2870. this->something().data(), static_cast<int>(this->something().length()),
  2871. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2872. "google.protobuf.testing.AnyIn.something");
  2873. target =
  2874. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2875. 1, this->something(), target);
  2876. }
  2877. // .google.protobuf.Any any = 2;
  2878. if (this->has_any()) {
  2879. target = ::google::protobuf::internal::WireFormatLite::
  2880. InternalWriteMessageToArray(
  2881. 2, this->_internal_any(), deterministic, target);
  2882. }
  2883. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2884. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2885. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2886. }
  2887. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyIn)
  2888. return target;
  2889. }
  2890. size_t AnyIn::ByteSizeLong() const {
  2891. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyIn)
  2892. size_t total_size = 0;
  2893. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2894. total_size +=
  2895. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2896. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2897. }
  2898. // string something = 1;
  2899. if (this->something().size() > 0) {
  2900. total_size += 1 +
  2901. ::google::protobuf::internal::WireFormatLite::StringSize(
  2902. this->something());
  2903. }
  2904. // .google.protobuf.Any any = 2;
  2905. if (this->has_any()) {
  2906. total_size += 1 +
  2907. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2908. *any_);
  2909. }
  2910. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2911. SetCachedSize(cached_size);
  2912. return total_size;
  2913. }
  2914. void AnyIn::MergeFrom(const ::google::protobuf::Message& from) {
  2915. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyIn)
  2916. GOOGLE_DCHECK_NE(&from, this);
  2917. const AnyIn* source =
  2918. ::google::protobuf::internal::DynamicCastToGenerated<const AnyIn>(
  2919. &from);
  2920. if (source == NULL) {
  2921. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyIn)
  2922. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2923. } else {
  2924. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyIn)
  2925. MergeFrom(*source);
  2926. }
  2927. }
  2928. void AnyIn::MergeFrom(const AnyIn& from) {
  2929. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyIn)
  2930. GOOGLE_DCHECK_NE(&from, this);
  2931. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2932. ::google::protobuf::uint32 cached_has_bits = 0;
  2933. (void) cached_has_bits;
  2934. if (from.something().size() > 0) {
  2935. something_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.something_);
  2936. }
  2937. if (from.has_any()) {
  2938. mutable_any()->::google::protobuf::Any::MergeFrom(from.any());
  2939. }
  2940. }
  2941. void AnyIn::CopyFrom(const ::google::protobuf::Message& from) {
  2942. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyIn)
  2943. if (&from == this) return;
  2944. Clear();
  2945. MergeFrom(from);
  2946. }
  2947. void AnyIn::CopyFrom(const AnyIn& from) {
  2948. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyIn)
  2949. if (&from == this) return;
  2950. Clear();
  2951. MergeFrom(from);
  2952. }
  2953. bool AnyIn::IsInitialized() const {
  2954. return true;
  2955. }
  2956. void AnyIn::Swap(AnyIn* other) {
  2957. if (other == this) return;
  2958. InternalSwap(other);
  2959. }
  2960. void AnyIn::InternalSwap(AnyIn* other) {
  2961. using std::swap;
  2962. something_.Swap(&other->something_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  2963. GetArenaNoVirtual());
  2964. swap(any_, other->any_);
  2965. _internal_metadata_.Swap(&other->_internal_metadata_);
  2966. }
  2967. ::google::protobuf::Metadata AnyIn::GetMetadata() const {
  2968. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  2969. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
  2970. }
  2971. // ===================================================================
  2972. void AnyOut::InitAsDefaultInstance() {
  2973. ::google::protobuf::testing::_AnyOut_default_instance_._instance.get_mutable()->any_ = const_cast< ::google::protobuf::Any*>(
  2974. ::google::protobuf::Any::internal_default_instance());
  2975. }
  2976. void AnyOut::clear_any() {
  2977. if (GetArenaNoVirtual() == NULL && any_ != NULL) {
  2978. delete any_;
  2979. }
  2980. any_ = NULL;
  2981. }
  2982. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2983. const int AnyOut::kAnyFieldNumber;
  2984. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2985. AnyOut::AnyOut()
  2986. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2987. ::google::protobuf::internal::InitSCC(
  2988. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyOut.base);
  2989. SharedCtor();
  2990. // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyOut)
  2991. }
  2992. AnyOut::AnyOut(const AnyOut& from)
  2993. : ::google::protobuf::Message(),
  2994. _internal_metadata_(NULL) {
  2995. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2996. if (from.has_any()) {
  2997. any_ = new ::google::protobuf::Any(*from.any_);
  2998. } else {
  2999. any_ = NULL;
  3000. }
  3001. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyOut)
  3002. }
  3003. void AnyOut::SharedCtor() {
  3004. any_ = NULL;
  3005. }
  3006. AnyOut::~AnyOut() {
  3007. // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyOut)
  3008. SharedDtor();
  3009. }
  3010. void AnyOut::SharedDtor() {
  3011. if (this != internal_default_instance()) delete any_;
  3012. }
  3013. void AnyOut::SetCachedSize(int size) const {
  3014. _cached_size_.Set(size);
  3015. }
  3016. const ::google::protobuf::Descriptor* AnyOut::descriptor() {
  3017. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  3018. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3019. }
  3020. const AnyOut& AnyOut::default_instance() {
  3021. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyOut.base);
  3022. return *internal_default_instance();
  3023. }
  3024. void AnyOut::Clear() {
  3025. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyOut)
  3026. ::google::protobuf::uint32 cached_has_bits = 0;
  3027. // Prevent compiler warnings about cached_has_bits being unused
  3028. (void) cached_has_bits;
  3029. if (GetArenaNoVirtual() == NULL && any_ != NULL) {
  3030. delete any_;
  3031. }
  3032. any_ = NULL;
  3033. _internal_metadata_.Clear();
  3034. }
  3035. bool AnyOut::MergePartialFromCodedStream(
  3036. ::google::protobuf::io::CodedInputStream* input) {
  3037. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3038. ::google::protobuf::uint32 tag;
  3039. // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyOut)
  3040. for (;;) {
  3041. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3042. tag = p.first;
  3043. if (!p.second) goto handle_unusual;
  3044. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3045. // .google.protobuf.Any any = 1;
  3046. case 1: {
  3047. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3048. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3049. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3050. input, mutable_any()));
  3051. } else {
  3052. goto handle_unusual;
  3053. }
  3054. break;
  3055. }
  3056. default: {
  3057. handle_unusual:
  3058. if (tag == 0) {
  3059. goto success;
  3060. }
  3061. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3062. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3063. break;
  3064. }
  3065. }
  3066. }
  3067. success:
  3068. // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyOut)
  3069. return true;
  3070. failure:
  3071. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyOut)
  3072. return false;
  3073. #undef DO_
  3074. }
  3075. void AnyOut::SerializeWithCachedSizes(
  3076. ::google::protobuf::io::CodedOutputStream* output) const {
  3077. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyOut)
  3078. ::google::protobuf::uint32 cached_has_bits = 0;
  3079. (void) cached_has_bits;
  3080. // .google.protobuf.Any any = 1;
  3081. if (this->has_any()) {
  3082. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3083. 1, this->_internal_any(), output);
  3084. }
  3085. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3086. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3087. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3088. }
  3089. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyOut)
  3090. }
  3091. ::google::protobuf::uint8* AnyOut::InternalSerializeWithCachedSizesToArray(
  3092. bool deterministic, ::google::protobuf::uint8* target) const {
  3093. (void)deterministic; // Unused
  3094. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyOut)
  3095. ::google::protobuf::uint32 cached_has_bits = 0;
  3096. (void) cached_has_bits;
  3097. // .google.protobuf.Any any = 1;
  3098. if (this->has_any()) {
  3099. target = ::google::protobuf::internal::WireFormatLite::
  3100. InternalWriteMessageToArray(
  3101. 1, this->_internal_any(), deterministic, target);
  3102. }
  3103. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3104. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3105. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3106. }
  3107. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyOut)
  3108. return target;
  3109. }
  3110. size_t AnyOut::ByteSizeLong() const {
  3111. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyOut)
  3112. size_t total_size = 0;
  3113. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3114. total_size +=
  3115. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3116. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3117. }
  3118. // .google.protobuf.Any any = 1;
  3119. if (this->has_any()) {
  3120. total_size += 1 +
  3121. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3122. *any_);
  3123. }
  3124. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3125. SetCachedSize(cached_size);
  3126. return total_size;
  3127. }
  3128. void AnyOut::MergeFrom(const ::google::protobuf::Message& from) {
  3129. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyOut)
  3130. GOOGLE_DCHECK_NE(&from, this);
  3131. const AnyOut* source =
  3132. ::google::protobuf::internal::DynamicCastToGenerated<const AnyOut>(
  3133. &from);
  3134. if (source == NULL) {
  3135. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyOut)
  3136. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3137. } else {
  3138. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyOut)
  3139. MergeFrom(*source);
  3140. }
  3141. }
  3142. void AnyOut::MergeFrom(const AnyOut& from) {
  3143. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyOut)
  3144. GOOGLE_DCHECK_NE(&from, this);
  3145. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3146. ::google::protobuf::uint32 cached_has_bits = 0;
  3147. (void) cached_has_bits;
  3148. if (from.has_any()) {
  3149. mutable_any()->::google::protobuf::Any::MergeFrom(from.any());
  3150. }
  3151. }
  3152. void AnyOut::CopyFrom(const ::google::protobuf::Message& from) {
  3153. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyOut)
  3154. if (&from == this) return;
  3155. Clear();
  3156. MergeFrom(from);
  3157. }
  3158. void AnyOut::CopyFrom(const AnyOut& from) {
  3159. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyOut)
  3160. if (&from == this) return;
  3161. Clear();
  3162. MergeFrom(from);
  3163. }
  3164. bool AnyOut::IsInitialized() const {
  3165. return true;
  3166. }
  3167. void AnyOut::Swap(AnyOut* other) {
  3168. if (other == this) return;
  3169. InternalSwap(other);
  3170. }
  3171. void AnyOut::InternalSwap(AnyOut* other) {
  3172. using std::swap;
  3173. swap(any_, other->any_);
  3174. _internal_metadata_.Swap(&other->_internal_metadata_);
  3175. }
  3176. ::google::protobuf::Metadata AnyOut::GetMetadata() const {
  3177. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  3178. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
  3179. }
  3180. // ===================================================================
  3181. void AnyM::InitAsDefaultInstance() {
  3182. }
  3183. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3184. const int AnyM::kFooFieldNumber;
  3185. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3186. AnyM::AnyM()
  3187. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3188. ::google::protobuf::internal::InitSCC(
  3189. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyM.base);
  3190. SharedCtor();
  3191. // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyM)
  3192. }
  3193. AnyM::AnyM(const AnyM& from)
  3194. : ::google::protobuf::Message(),
  3195. _internal_metadata_(NULL) {
  3196. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3197. foo_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3198. if (from.foo().size() > 0) {
  3199. foo_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.foo_);
  3200. }
  3201. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyM)
  3202. }
  3203. void AnyM::SharedCtor() {
  3204. foo_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3205. }
  3206. AnyM::~AnyM() {
  3207. // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyM)
  3208. SharedDtor();
  3209. }
  3210. void AnyM::SharedDtor() {
  3211. foo_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3212. }
  3213. void AnyM::SetCachedSize(int size) const {
  3214. _cached_size_.Set(size);
  3215. }
  3216. const ::google::protobuf::Descriptor* AnyM::descriptor() {
  3217. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  3218. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3219. }
  3220. const AnyM& AnyM::default_instance() {
  3221. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyM.base);
  3222. return *internal_default_instance();
  3223. }
  3224. void AnyM::Clear() {
  3225. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyM)
  3226. ::google::protobuf::uint32 cached_has_bits = 0;
  3227. // Prevent compiler warnings about cached_has_bits being unused
  3228. (void) cached_has_bits;
  3229. foo_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3230. _internal_metadata_.Clear();
  3231. }
  3232. bool AnyM::MergePartialFromCodedStream(
  3233. ::google::protobuf::io::CodedInputStream* input) {
  3234. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3235. ::google::protobuf::uint32 tag;
  3236. // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyM)
  3237. for (;;) {
  3238. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3239. tag = p.first;
  3240. if (!p.second) goto handle_unusual;
  3241. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3242. // string foo = 1;
  3243. case 1: {
  3244. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3245. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3246. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  3247. input, this->mutable_foo()));
  3248. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3249. this->foo().data(), static_cast<int>(this->foo().length()),
  3250. ::google::protobuf::internal::WireFormatLite::PARSE,
  3251. "google.protobuf.testing.AnyM.foo"));
  3252. } else {
  3253. goto handle_unusual;
  3254. }
  3255. break;
  3256. }
  3257. default: {
  3258. handle_unusual:
  3259. if (tag == 0) {
  3260. goto success;
  3261. }
  3262. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3263. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3264. break;
  3265. }
  3266. }
  3267. }
  3268. success:
  3269. // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyM)
  3270. return true;
  3271. failure:
  3272. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyM)
  3273. return false;
  3274. #undef DO_
  3275. }
  3276. void AnyM::SerializeWithCachedSizes(
  3277. ::google::protobuf::io::CodedOutputStream* output) const {
  3278. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyM)
  3279. ::google::protobuf::uint32 cached_has_bits = 0;
  3280. (void) cached_has_bits;
  3281. // string foo = 1;
  3282. if (this->foo().size() > 0) {
  3283. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3284. this->foo().data(), static_cast<int>(this->foo().length()),
  3285. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3286. "google.protobuf.testing.AnyM.foo");
  3287. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3288. 1, this->foo(), output);
  3289. }
  3290. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3291. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3292. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3293. }
  3294. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyM)
  3295. }
  3296. ::google::protobuf::uint8* AnyM::InternalSerializeWithCachedSizesToArray(
  3297. bool deterministic, ::google::protobuf::uint8* target) const {
  3298. (void)deterministic; // Unused
  3299. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyM)
  3300. ::google::protobuf::uint32 cached_has_bits = 0;
  3301. (void) cached_has_bits;
  3302. // string foo = 1;
  3303. if (this->foo().size() > 0) {
  3304. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3305. this->foo().data(), static_cast<int>(this->foo().length()),
  3306. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3307. "google.protobuf.testing.AnyM.foo");
  3308. target =
  3309. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  3310. 1, this->foo(), target);
  3311. }
  3312. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3313. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3314. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3315. }
  3316. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyM)
  3317. return target;
  3318. }
  3319. size_t AnyM::ByteSizeLong() const {
  3320. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyM)
  3321. size_t total_size = 0;
  3322. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3323. total_size +=
  3324. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3325. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3326. }
  3327. // string foo = 1;
  3328. if (this->foo().size() > 0) {
  3329. total_size += 1 +
  3330. ::google::protobuf::internal::WireFormatLite::StringSize(
  3331. this->foo());
  3332. }
  3333. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3334. SetCachedSize(cached_size);
  3335. return total_size;
  3336. }
  3337. void AnyM::MergeFrom(const ::google::protobuf::Message& from) {
  3338. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyM)
  3339. GOOGLE_DCHECK_NE(&from, this);
  3340. const AnyM* source =
  3341. ::google::protobuf::internal::DynamicCastToGenerated<const AnyM>(
  3342. &from);
  3343. if (source == NULL) {
  3344. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyM)
  3345. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3346. } else {
  3347. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyM)
  3348. MergeFrom(*source);
  3349. }
  3350. }
  3351. void AnyM::MergeFrom(const AnyM& from) {
  3352. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyM)
  3353. GOOGLE_DCHECK_NE(&from, this);
  3354. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3355. ::google::protobuf::uint32 cached_has_bits = 0;
  3356. (void) cached_has_bits;
  3357. if (from.foo().size() > 0) {
  3358. foo_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.foo_);
  3359. }
  3360. }
  3361. void AnyM::CopyFrom(const ::google::protobuf::Message& from) {
  3362. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyM)
  3363. if (&from == this) return;
  3364. Clear();
  3365. MergeFrom(from);
  3366. }
  3367. void AnyM::CopyFrom(const AnyM& from) {
  3368. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyM)
  3369. if (&from == this) return;
  3370. Clear();
  3371. MergeFrom(from);
  3372. }
  3373. bool AnyM::IsInitialized() const {
  3374. return true;
  3375. }
  3376. void AnyM::Swap(AnyM* other) {
  3377. if (other == this) return;
  3378. InternalSwap(other);
  3379. }
  3380. void AnyM::InternalSwap(AnyM* other) {
  3381. using std::swap;
  3382. foo_.Swap(&other->foo_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  3383. GetArenaNoVirtual());
  3384. _internal_metadata_.Swap(&other->_internal_metadata_);
  3385. }
  3386. ::google::protobuf::Metadata AnyM::GetMetadata() const {
  3387. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
  3388. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
  3389. }
  3390. // @@protoc_insertion_point(namespace_scope)
  3391. } // namespace testing
  3392. } // namespace protobuf
  3393. } // namespace google
  3394. namespace google {
  3395. namespace protobuf {
  3396. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyTestCases* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyTestCases >(Arena* arena) {
  3397. return Arena::CreateInternal< ::google::protobuf::testing::AnyTestCases >(arena);
  3398. }
  3399. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyWrapper >(Arena* arena) {
  3400. return Arena::CreateInternal< ::google::protobuf::testing::AnyWrapper >(arena);
  3401. }
  3402. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Imports* Arena::CreateMaybeMessage< ::google::protobuf::testing::Imports >(Arena* arena) {
  3403. return Arena::CreateInternal< ::google::protobuf::testing::Imports >(arena);
  3404. }
  3405. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Data_MapDataEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::Data_MapDataEntry_DoNotUse >(Arena* arena) {
  3406. return Arena::CreateInternal< ::google::protobuf::testing::Data_MapDataEntry_DoNotUse >(arena);
  3407. }
  3408. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Data* Arena::CreateMaybeMessage< ::google::protobuf::testing::Data >(Arena* arena) {
  3409. return Arena::CreateInternal< ::google::protobuf::testing::Data >(arena);
  3410. }
  3411. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyIn* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyIn >(Arena* arena) {
  3412. return Arena::CreateInternal< ::google::protobuf::testing::AnyIn >(arena);
  3413. }
  3414. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyOut* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyOut >(Arena* arena) {
  3415. return Arena::CreateInternal< ::google::protobuf::testing::AnyOut >(arena);
  3416. }
  3417. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyM* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyM >(Arena* arena) {
  3418. return Arena::CreateInternal< ::google::protobuf::testing::AnyM >(arena);
  3419. }
  3420. } // namespace protobuf
  3421. } // namespace google
  3422. // @@protoc_insertion_point(global_scope)