oneofs.pb.cc 93 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/util/internal/testdata/oneofs.proto
  3. #include <google/protobuf/util/internal/testdata/oneofs.pb.h>
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. namespace protobuf_google_2fprotobuf_2fany_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fany_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Any;
  20. } // namespace protobuf_google_2fprotobuf_2fany_2eproto
  21. namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
  22. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue;
  23. } // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
  24. namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto {
  25. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2ftimestamp_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp;
  26. } // namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto
  27. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto {
  28. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Data;
  29. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MoreData;
  30. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto
  31. namespace google {
  32. namespace protobuf {
  33. namespace testing {
  34. namespace oneofs {
  35. class OneOfsRequestDefaultTypeInternal {
  36. public:
  37. ::google::protobuf::internal::ExplicitlyConstructed<OneOfsRequest>
  38. _instance;
  39. ::google::protobuf::internal::ArenaStringPtr str_data_;
  40. ::google::protobuf::int32 int_data_;
  41. const ::google::protobuf::testing::oneofs::Data* message_data_;
  42. const ::google::protobuf::testing::oneofs::MoreData* more_data_;
  43. const ::google::protobuf::Struct* struct_data_;
  44. const ::google::protobuf::Value* value_data_;
  45. const ::google::protobuf::ListValue* list_value_data_;
  46. const ::google::protobuf::Timestamp* ts_data_;
  47. } _OneOfsRequest_default_instance_;
  48. class RequestWithSimpleOneofDefaultTypeInternal {
  49. public:
  50. ::google::protobuf::internal::ExplicitlyConstructed<RequestWithSimpleOneof>
  51. _instance;
  52. ::google::protobuf::internal::ArenaStringPtr str_data_;
  53. ::google::protobuf::int32 int_data_;
  54. const ::google::protobuf::testing::oneofs::Data* message_data_;
  55. const ::google::protobuf::testing::oneofs::MoreData* more_data_;
  56. } _RequestWithSimpleOneof_default_instance_;
  57. class DataDefaultTypeInternal {
  58. public:
  59. ::google::protobuf::internal::ExplicitlyConstructed<Data>
  60. _instance;
  61. } _Data_default_instance_;
  62. class MoreDataDefaultTypeInternal {
  63. public:
  64. ::google::protobuf::internal::ExplicitlyConstructed<MoreData>
  65. _instance;
  66. } _MoreData_default_instance_;
  67. class ResponseDefaultTypeInternal {
  68. public:
  69. ::google::protobuf::internal::ExplicitlyConstructed<Response>
  70. _instance;
  71. } _Response_default_instance_;
  72. } // namespace oneofs
  73. } // namespace testing
  74. } // namespace protobuf
  75. } // namespace google
  76. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto {
  77. static void InitDefaultsOneOfsRequest() {
  78. GOOGLE_PROTOBUF_VERIFY_VERSION;
  79. {
  80. void* ptr = &::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_;
  81. new (ptr) ::google::protobuf::testing::oneofs::OneOfsRequest();
  82. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  83. }
  84. ::google::protobuf::testing::oneofs::OneOfsRequest::InitAsDefaultInstance();
  85. }
  86. ::google::protobuf::internal::SCCInfo<5> scc_info_OneOfsRequest =
  87. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 5, InitDefaultsOneOfsRequest}, {
  88. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Data.base,
  89. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_MoreData.base,
  90. &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,
  91. &protobuf_google_2fprotobuf_2ftimestamp_2eproto::scc_info_Timestamp.base,
  92. &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};
  93. static void InitDefaultsRequestWithSimpleOneof() {
  94. GOOGLE_PROTOBUF_VERIFY_VERSION;
  95. {
  96. void* ptr = &::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_;
  97. new (ptr) ::google::protobuf::testing::oneofs::RequestWithSimpleOneof();
  98. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  99. }
  100. ::google::protobuf::testing::oneofs::RequestWithSimpleOneof::InitAsDefaultInstance();
  101. }
  102. ::google::protobuf::internal::SCCInfo<2> scc_info_RequestWithSimpleOneof =
  103. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsRequestWithSimpleOneof}, {
  104. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Data.base,
  105. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_MoreData.base,}};
  106. static void InitDefaultsData() {
  107. GOOGLE_PROTOBUF_VERIFY_VERSION;
  108. {
  109. void* ptr = &::google::protobuf::testing::oneofs::_Data_default_instance_;
  110. new (ptr) ::google::protobuf::testing::oneofs::Data();
  111. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  112. }
  113. ::google::protobuf::testing::oneofs::Data::InitAsDefaultInstance();
  114. }
  115. ::google::protobuf::internal::SCCInfo<0> scc_info_Data =
  116. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsData}, {}};
  117. static void InitDefaultsMoreData() {
  118. GOOGLE_PROTOBUF_VERIFY_VERSION;
  119. {
  120. void* ptr = &::google::protobuf::testing::oneofs::_MoreData_default_instance_;
  121. new (ptr) ::google::protobuf::testing::oneofs::MoreData();
  122. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  123. }
  124. ::google::protobuf::testing::oneofs::MoreData::InitAsDefaultInstance();
  125. }
  126. ::google::protobuf::internal::SCCInfo<0> scc_info_MoreData =
  127. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMoreData}, {}};
  128. static void InitDefaultsResponse() {
  129. GOOGLE_PROTOBUF_VERIFY_VERSION;
  130. {
  131. void* ptr = &::google::protobuf::testing::oneofs::_Response_default_instance_;
  132. new (ptr) ::google::protobuf::testing::oneofs::Response();
  133. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  134. }
  135. ::google::protobuf::testing::oneofs::Response::InitAsDefaultInstance();
  136. }
  137. ::google::protobuf::internal::SCCInfo<0> scc_info_Response =
  138. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsResponse}, {}};
  139. void InitDefaults() {
  140. ::google::protobuf::internal::InitSCC(&scc_info_OneOfsRequest.base);
  141. ::google::protobuf::internal::InitSCC(&scc_info_RequestWithSimpleOneof.base);
  142. ::google::protobuf::internal::InitSCC(&scc_info_Data.base);
  143. ::google::protobuf::internal::InitSCC(&scc_info_MoreData.base);
  144. ::google::protobuf::internal::InitSCC(&scc_info_Response.base);
  145. }
  146. ::google::protobuf::Metadata file_level_metadata[5];
  147. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  148. ~0u, // no _has_bits_
  149. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::OneOfsRequest, _internal_metadata_),
  150. ~0u, // no _extensions_
  151. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::OneOfsRequest, _oneof_case_[0]),
  152. ~0u, // no _weak_field_map_
  153. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::OneOfsRequest, value_),
  154. offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, str_data_),
  155. offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, int_data_),
  156. offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, message_data_),
  157. offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, more_data_),
  158. offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, struct_data_),
  159. offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, value_data_),
  160. offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, list_value_data_),
  161. offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, ts_data_),
  162. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::OneOfsRequest, any_data_),
  163. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::OneOfsRequest, data_),
  164. ~0u, // no _has_bits_
  165. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::RequestWithSimpleOneof, _internal_metadata_),
  166. ~0u, // no _extensions_
  167. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::RequestWithSimpleOneof, _oneof_case_[0]),
  168. ~0u, // no _weak_field_map_
  169. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::RequestWithSimpleOneof, value_),
  170. offsetof(::google::protobuf::testing::oneofs::RequestWithSimpleOneofDefaultTypeInternal, str_data_),
  171. offsetof(::google::protobuf::testing::oneofs::RequestWithSimpleOneofDefaultTypeInternal, int_data_),
  172. offsetof(::google::protobuf::testing::oneofs::RequestWithSimpleOneofDefaultTypeInternal, message_data_),
  173. offsetof(::google::protobuf::testing::oneofs::RequestWithSimpleOneofDefaultTypeInternal, more_data_),
  174. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::RequestWithSimpleOneof, data_),
  175. ~0u, // no _has_bits_
  176. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::Data, _internal_metadata_),
  177. ~0u, // no _extensions_
  178. ~0u, // no _oneof_case_
  179. ~0u, // no _weak_field_map_
  180. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::Data, data_value_),
  181. ~0u, // no _has_bits_
  182. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::MoreData, _internal_metadata_),
  183. ~0u, // no _extensions_
  184. ~0u, // no _oneof_case_
  185. ~0u, // no _weak_field_map_
  186. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::MoreData, str_value_),
  187. ~0u, // no _has_bits_
  188. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::Response, _internal_metadata_),
  189. ~0u, // no _extensions_
  190. ~0u, // no _oneof_case_
  191. ~0u, // no _weak_field_map_
  192. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::Response, value_),
  193. };
  194. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  195. { 0, -1, sizeof(::google::protobuf::testing::oneofs::OneOfsRequest)},
  196. { 16, -1, sizeof(::google::protobuf::testing::oneofs::RequestWithSimpleOneof)},
  197. { 27, -1, sizeof(::google::protobuf::testing::oneofs::Data)},
  198. { 33, -1, sizeof(::google::protobuf::testing::oneofs::MoreData)},
  199. { 39, -1, sizeof(::google::protobuf::testing::oneofs::Response)},
  200. };
  201. static ::google::protobuf::Message const * const file_default_instances[] = {
  202. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_),
  203. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_),
  204. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::oneofs::_Data_default_instance_),
  205. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::oneofs::_MoreData_default_instance_),
  206. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::oneofs::_Response_default_instance_),
  207. };
  208. void protobuf_AssignDescriptors() {
  209. AddDescriptors();
  210. AssignDescriptors(
  211. "google/protobuf/util/internal/testdata/oneofs.proto", schemas, file_default_instances, TableStruct::offsets,
  212. file_level_metadata, NULL, NULL);
  213. }
  214. void protobuf_AssignDescriptorsOnce() {
  215. static ::google::protobuf::internal::once_flag once;
  216. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  217. }
  218. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  219. void protobuf_RegisterTypes(const ::std::string&) {
  220. protobuf_AssignDescriptorsOnce();
  221. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5);
  222. }
  223. void AddDescriptorsImpl() {
  224. InitDefaults();
  225. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  226. "\n3google/protobuf/util/internal/testdata"
  227. "/oneofs.proto\022\036google.protobuf.testing.o"
  228. "neofs\032\031google/protobuf/any.proto\032\034google"
  229. "/protobuf/struct.proto\032\037google/protobuf/"
  230. "timestamp.proto\"\267\003\n\rOneOfsRequest\022\r\n\005val"
  231. "ue\030\001 \001(\t\022\022\n\010str_data\030\002 \001(\tH\000\022\022\n\010int_data"
  232. "\030\003 \001(\005H\000\022<\n\014message_data\030\004 \001(\0132$.google."
  233. "protobuf.testing.oneofs.DataH\000\022=\n\tmore_d"
  234. "ata\030\005 \001(\0132(.google.protobuf.testing.oneo"
  235. "fs.MoreDataH\000\022.\n\013struct_data\030\006 \001(\0132\027.goo"
  236. "gle.protobuf.StructH\000\022,\n\nvalue_data\030\007 \001("
  237. "\0132\026.google.protobuf.ValueH\000\0225\n\017list_valu"
  238. "e_data\030\010 \001(\0132\032.google.protobuf.ListValue"
  239. "H\000\022-\n\007ts_data\030\t \001(\0132\032.google.protobuf.Ti"
  240. "mestampH\000\022&\n\010any_data\030\023 \001(\0132\024.google.pro"
  241. "tobuf.AnyB\006\n\004data\"\324\001\n\026RequestWithSimpleO"
  242. "neof\022\r\n\005value\030\001 \001(\t\022\022\n\010str_data\030\002 \001(\tH\000\022"
  243. "\022\n\010int_data\030\003 \001(\005H\000\022<\n\014message_data\030\004 \001("
  244. "\0132$.google.protobuf.testing.oneofs.DataH"
  245. "\000\022=\n\tmore_data\030\005 \001(\0132(.google.protobuf.t"
  246. "esting.oneofs.MoreDataH\000B\006\n\004data\"\032\n\004Data"
  247. "\022\022\n\ndata_value\030\001 \001(\005\"\035\n\010MoreData\022\021\n\tstr_"
  248. "value\030\001 \001(\t\"\031\n\010Response\022\r\n\005value\030\001 \001(\tb\006"
  249. "proto3"
  250. };
  251. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  252. descriptor, 926);
  253. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  254. "google/protobuf/util/internal/testdata/oneofs.proto", &protobuf_RegisterTypes);
  255. ::protobuf_google_2fprotobuf_2fany_2eproto::AddDescriptors();
  256. ::protobuf_google_2fprotobuf_2fstruct_2eproto::AddDescriptors();
  257. ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
  258. }
  259. void AddDescriptors() {
  260. static ::google::protobuf::internal::once_flag once;
  261. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  262. }
  263. // Force AddDescriptors() to be called at dynamic initialization time.
  264. struct StaticDescriptorInitializer {
  265. StaticDescriptorInitializer() {
  266. AddDescriptors();
  267. }
  268. } static_descriptor_initializer;
  269. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto
  270. namespace google {
  271. namespace protobuf {
  272. namespace testing {
  273. namespace oneofs {
  274. // ===================================================================
  275. void OneOfsRequest::InitAsDefaultInstance() {
  276. ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.str_data_.UnsafeSetDefault(
  277. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  278. ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.int_data_ = 0;
  279. ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.message_data_ = const_cast< ::google::protobuf::testing::oneofs::Data*>(
  280. ::google::protobuf::testing::oneofs::Data::internal_default_instance());
  281. ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.more_data_ = const_cast< ::google::protobuf::testing::oneofs::MoreData*>(
  282. ::google::protobuf::testing::oneofs::MoreData::internal_default_instance());
  283. ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.struct_data_ = const_cast< ::google::protobuf::Struct*>(
  284. ::google::protobuf::Struct::internal_default_instance());
  285. ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.value_data_ = const_cast< ::google::protobuf::Value*>(
  286. ::google::protobuf::Value::internal_default_instance());
  287. ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.list_value_data_ = const_cast< ::google::protobuf::ListValue*>(
  288. ::google::protobuf::ListValue::internal_default_instance());
  289. ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.ts_data_ = const_cast< ::google::protobuf::Timestamp*>(
  290. ::google::protobuf::Timestamp::internal_default_instance());
  291. ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_._instance.get_mutable()->any_data_ = const_cast< ::google::protobuf::Any*>(
  292. ::google::protobuf::Any::internal_default_instance());
  293. }
  294. void OneOfsRequest::set_allocated_message_data(::google::protobuf::testing::oneofs::Data* message_data) {
  295. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  296. clear_data();
  297. if (message_data) {
  298. ::google::protobuf::Arena* submessage_arena = NULL;
  299. if (message_arena != submessage_arena) {
  300. message_data = ::google::protobuf::internal::GetOwnedMessage(
  301. message_arena, message_data, submessage_arena);
  302. }
  303. set_has_message_data();
  304. data_.message_data_ = message_data;
  305. }
  306. // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.message_data)
  307. }
  308. void OneOfsRequest::set_allocated_more_data(::google::protobuf::testing::oneofs::MoreData* more_data) {
  309. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  310. clear_data();
  311. if (more_data) {
  312. ::google::protobuf::Arena* submessage_arena = NULL;
  313. if (message_arena != submessage_arena) {
  314. more_data = ::google::protobuf::internal::GetOwnedMessage(
  315. message_arena, more_data, submessage_arena);
  316. }
  317. set_has_more_data();
  318. data_.more_data_ = more_data;
  319. }
  320. // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.more_data)
  321. }
  322. void OneOfsRequest::set_allocated_struct_data(::google::protobuf::Struct* struct_data) {
  323. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  324. clear_data();
  325. if (struct_data) {
  326. ::google::protobuf::Arena* submessage_arena =
  327. reinterpret_cast<::google::protobuf::MessageLite*>(struct_data)->GetArena();
  328. if (message_arena != submessage_arena) {
  329. struct_data = ::google::protobuf::internal::GetOwnedMessage(
  330. message_arena, struct_data, submessage_arena);
  331. }
  332. set_has_struct_data();
  333. data_.struct_data_ = struct_data;
  334. }
  335. // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.struct_data)
  336. }
  337. void OneOfsRequest::clear_struct_data() {
  338. if (has_struct_data()) {
  339. delete data_.struct_data_;
  340. clear_has_data();
  341. }
  342. }
  343. void OneOfsRequest::set_allocated_value_data(::google::protobuf::Value* value_data) {
  344. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  345. clear_data();
  346. if (value_data) {
  347. ::google::protobuf::Arena* submessage_arena =
  348. reinterpret_cast<::google::protobuf::MessageLite*>(value_data)->GetArena();
  349. if (message_arena != submessage_arena) {
  350. value_data = ::google::protobuf::internal::GetOwnedMessage(
  351. message_arena, value_data, submessage_arena);
  352. }
  353. set_has_value_data();
  354. data_.value_data_ = value_data;
  355. }
  356. // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.value_data)
  357. }
  358. void OneOfsRequest::clear_value_data() {
  359. if (has_value_data()) {
  360. delete data_.value_data_;
  361. clear_has_data();
  362. }
  363. }
  364. void OneOfsRequest::set_allocated_list_value_data(::google::protobuf::ListValue* list_value_data) {
  365. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  366. clear_data();
  367. if (list_value_data) {
  368. ::google::protobuf::Arena* submessage_arena =
  369. reinterpret_cast<::google::protobuf::MessageLite*>(list_value_data)->GetArena();
  370. if (message_arena != submessage_arena) {
  371. list_value_data = ::google::protobuf::internal::GetOwnedMessage(
  372. message_arena, list_value_data, submessage_arena);
  373. }
  374. set_has_list_value_data();
  375. data_.list_value_data_ = list_value_data;
  376. }
  377. // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.list_value_data)
  378. }
  379. void OneOfsRequest::clear_list_value_data() {
  380. if (has_list_value_data()) {
  381. delete data_.list_value_data_;
  382. clear_has_data();
  383. }
  384. }
  385. void OneOfsRequest::set_allocated_ts_data(::google::protobuf::Timestamp* ts_data) {
  386. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  387. clear_data();
  388. if (ts_data) {
  389. ::google::protobuf::Arena* submessage_arena =
  390. reinterpret_cast<::google::protobuf::MessageLite*>(ts_data)->GetArena();
  391. if (message_arena != submessage_arena) {
  392. ts_data = ::google::protobuf::internal::GetOwnedMessage(
  393. message_arena, ts_data, submessage_arena);
  394. }
  395. set_has_ts_data();
  396. data_.ts_data_ = ts_data;
  397. }
  398. // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.ts_data)
  399. }
  400. void OneOfsRequest::clear_ts_data() {
  401. if (has_ts_data()) {
  402. delete data_.ts_data_;
  403. clear_has_data();
  404. }
  405. }
  406. void OneOfsRequest::clear_any_data() {
  407. if (GetArenaNoVirtual() == NULL && any_data_ != NULL) {
  408. delete any_data_;
  409. }
  410. any_data_ = NULL;
  411. }
  412. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  413. const int OneOfsRequest::kValueFieldNumber;
  414. const int OneOfsRequest::kStrDataFieldNumber;
  415. const int OneOfsRequest::kIntDataFieldNumber;
  416. const int OneOfsRequest::kMessageDataFieldNumber;
  417. const int OneOfsRequest::kMoreDataFieldNumber;
  418. const int OneOfsRequest::kStructDataFieldNumber;
  419. const int OneOfsRequest::kValueDataFieldNumber;
  420. const int OneOfsRequest::kListValueDataFieldNumber;
  421. const int OneOfsRequest::kTsDataFieldNumber;
  422. const int OneOfsRequest::kAnyDataFieldNumber;
  423. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  424. OneOfsRequest::OneOfsRequest()
  425. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  426. ::google::protobuf::internal::InitSCC(
  427. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_OneOfsRequest.base);
  428. SharedCtor();
  429. // @@protoc_insertion_point(constructor:google.protobuf.testing.oneofs.OneOfsRequest)
  430. }
  431. OneOfsRequest::OneOfsRequest(const OneOfsRequest& from)
  432. : ::google::protobuf::Message(),
  433. _internal_metadata_(NULL) {
  434. _internal_metadata_.MergeFrom(from._internal_metadata_);
  435. value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  436. if (from.value().size() > 0) {
  437. value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  438. }
  439. if (from.has_any_data()) {
  440. any_data_ = new ::google::protobuf::Any(*from.any_data_);
  441. } else {
  442. any_data_ = NULL;
  443. }
  444. clear_has_data();
  445. switch (from.data_case()) {
  446. case kStrData: {
  447. set_str_data(from.str_data());
  448. break;
  449. }
  450. case kIntData: {
  451. set_int_data(from.int_data());
  452. break;
  453. }
  454. case kMessageData: {
  455. mutable_message_data()->::google::protobuf::testing::oneofs::Data::MergeFrom(from.message_data());
  456. break;
  457. }
  458. case kMoreData: {
  459. mutable_more_data()->::google::protobuf::testing::oneofs::MoreData::MergeFrom(from.more_data());
  460. break;
  461. }
  462. case kStructData: {
  463. mutable_struct_data()->::google::protobuf::Struct::MergeFrom(from.struct_data());
  464. break;
  465. }
  466. case kValueData: {
  467. mutable_value_data()->::google::protobuf::Value::MergeFrom(from.value_data());
  468. break;
  469. }
  470. case kListValueData: {
  471. mutable_list_value_data()->::google::protobuf::ListValue::MergeFrom(from.list_value_data());
  472. break;
  473. }
  474. case kTsData: {
  475. mutable_ts_data()->::google::protobuf::Timestamp::MergeFrom(from.ts_data());
  476. break;
  477. }
  478. case DATA_NOT_SET: {
  479. break;
  480. }
  481. }
  482. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.oneofs.OneOfsRequest)
  483. }
  484. void OneOfsRequest::SharedCtor() {
  485. value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  486. any_data_ = NULL;
  487. clear_has_data();
  488. }
  489. OneOfsRequest::~OneOfsRequest() {
  490. // @@protoc_insertion_point(destructor:google.protobuf.testing.oneofs.OneOfsRequest)
  491. SharedDtor();
  492. }
  493. void OneOfsRequest::SharedDtor() {
  494. value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  495. if (this != internal_default_instance()) delete any_data_;
  496. if (has_data()) {
  497. clear_data();
  498. }
  499. }
  500. void OneOfsRequest::SetCachedSize(int size) const {
  501. _cached_size_.Set(size);
  502. }
  503. const ::google::protobuf::Descriptor* OneOfsRequest::descriptor() {
  504. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
  505. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  506. }
  507. const OneOfsRequest& OneOfsRequest::default_instance() {
  508. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_OneOfsRequest.base);
  509. return *internal_default_instance();
  510. }
  511. void OneOfsRequest::clear_data() {
  512. // @@protoc_insertion_point(one_of_clear_start:google.protobuf.testing.oneofs.OneOfsRequest)
  513. switch (data_case()) {
  514. case kStrData: {
  515. data_.str_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  516. break;
  517. }
  518. case kIntData: {
  519. // No need to clear
  520. break;
  521. }
  522. case kMessageData: {
  523. delete data_.message_data_;
  524. break;
  525. }
  526. case kMoreData: {
  527. delete data_.more_data_;
  528. break;
  529. }
  530. case kStructData: {
  531. delete data_.struct_data_;
  532. break;
  533. }
  534. case kValueData: {
  535. delete data_.value_data_;
  536. break;
  537. }
  538. case kListValueData: {
  539. delete data_.list_value_data_;
  540. break;
  541. }
  542. case kTsData: {
  543. delete data_.ts_data_;
  544. break;
  545. }
  546. case DATA_NOT_SET: {
  547. break;
  548. }
  549. }
  550. _oneof_case_[0] = DATA_NOT_SET;
  551. }
  552. void OneOfsRequest::Clear() {
  553. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.oneofs.OneOfsRequest)
  554. ::google::protobuf::uint32 cached_has_bits = 0;
  555. // Prevent compiler warnings about cached_has_bits being unused
  556. (void) cached_has_bits;
  557. value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  558. if (GetArenaNoVirtual() == NULL && any_data_ != NULL) {
  559. delete any_data_;
  560. }
  561. any_data_ = NULL;
  562. clear_data();
  563. _internal_metadata_.Clear();
  564. }
  565. bool OneOfsRequest::MergePartialFromCodedStream(
  566. ::google::protobuf::io::CodedInputStream* input) {
  567. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  568. ::google::protobuf::uint32 tag;
  569. // @@protoc_insertion_point(parse_start:google.protobuf.testing.oneofs.OneOfsRequest)
  570. for (;;) {
  571. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  572. tag = p.first;
  573. if (!p.second) goto handle_unusual;
  574. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  575. // string value = 1;
  576. case 1: {
  577. if (static_cast< ::google::protobuf::uint8>(tag) ==
  578. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  579. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  580. input, this->mutable_value()));
  581. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  582. this->value().data(), static_cast<int>(this->value().length()),
  583. ::google::protobuf::internal::WireFormatLite::PARSE,
  584. "google.protobuf.testing.oneofs.OneOfsRequest.value"));
  585. } else {
  586. goto handle_unusual;
  587. }
  588. break;
  589. }
  590. // string str_data = 2;
  591. case 2: {
  592. if (static_cast< ::google::protobuf::uint8>(tag) ==
  593. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  594. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  595. input, this->mutable_str_data()));
  596. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  597. this->str_data().data(), static_cast<int>(this->str_data().length()),
  598. ::google::protobuf::internal::WireFormatLite::PARSE,
  599. "google.protobuf.testing.oneofs.OneOfsRequest.str_data"));
  600. } else {
  601. goto handle_unusual;
  602. }
  603. break;
  604. }
  605. // int32 int_data = 3;
  606. case 3: {
  607. if (static_cast< ::google::protobuf::uint8>(tag) ==
  608. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  609. clear_data();
  610. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  611. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  612. input, &data_.int_data_)));
  613. set_has_int_data();
  614. } else {
  615. goto handle_unusual;
  616. }
  617. break;
  618. }
  619. // .google.protobuf.testing.oneofs.Data message_data = 4;
  620. case 4: {
  621. if (static_cast< ::google::protobuf::uint8>(tag) ==
  622. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  623. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  624. input, mutable_message_data()));
  625. } else {
  626. goto handle_unusual;
  627. }
  628. break;
  629. }
  630. // .google.protobuf.testing.oneofs.MoreData more_data = 5;
  631. case 5: {
  632. if (static_cast< ::google::protobuf::uint8>(tag) ==
  633. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  634. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  635. input, mutable_more_data()));
  636. } else {
  637. goto handle_unusual;
  638. }
  639. break;
  640. }
  641. // .google.protobuf.Struct struct_data = 6;
  642. case 6: {
  643. if (static_cast< ::google::protobuf::uint8>(tag) ==
  644. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  645. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  646. input, mutable_struct_data()));
  647. } else {
  648. goto handle_unusual;
  649. }
  650. break;
  651. }
  652. // .google.protobuf.Value value_data = 7;
  653. case 7: {
  654. if (static_cast< ::google::protobuf::uint8>(tag) ==
  655. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  656. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  657. input, mutable_value_data()));
  658. } else {
  659. goto handle_unusual;
  660. }
  661. break;
  662. }
  663. // .google.protobuf.ListValue list_value_data = 8;
  664. case 8: {
  665. if (static_cast< ::google::protobuf::uint8>(tag) ==
  666. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  667. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  668. input, mutable_list_value_data()));
  669. } else {
  670. goto handle_unusual;
  671. }
  672. break;
  673. }
  674. // .google.protobuf.Timestamp ts_data = 9;
  675. case 9: {
  676. if (static_cast< ::google::protobuf::uint8>(tag) ==
  677. static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
  678. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  679. input, mutable_ts_data()));
  680. } else {
  681. goto handle_unusual;
  682. }
  683. break;
  684. }
  685. // .google.protobuf.Any any_data = 19;
  686. case 19: {
  687. if (static_cast< ::google::protobuf::uint8>(tag) ==
  688. static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) {
  689. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  690. input, mutable_any_data()));
  691. } else {
  692. goto handle_unusual;
  693. }
  694. break;
  695. }
  696. default: {
  697. handle_unusual:
  698. if (tag == 0) {
  699. goto success;
  700. }
  701. DO_(::google::protobuf::internal::WireFormat::SkipField(
  702. input, tag, _internal_metadata_.mutable_unknown_fields()));
  703. break;
  704. }
  705. }
  706. }
  707. success:
  708. // @@protoc_insertion_point(parse_success:google.protobuf.testing.oneofs.OneOfsRequest)
  709. return true;
  710. failure:
  711. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.oneofs.OneOfsRequest)
  712. return false;
  713. #undef DO_
  714. }
  715. void OneOfsRequest::SerializeWithCachedSizes(
  716. ::google::protobuf::io::CodedOutputStream* output) const {
  717. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.oneofs.OneOfsRequest)
  718. ::google::protobuf::uint32 cached_has_bits = 0;
  719. (void) cached_has_bits;
  720. // string value = 1;
  721. if (this->value().size() > 0) {
  722. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  723. this->value().data(), static_cast<int>(this->value().length()),
  724. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  725. "google.protobuf.testing.oneofs.OneOfsRequest.value");
  726. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  727. 1, this->value(), output);
  728. }
  729. // string str_data = 2;
  730. if (has_str_data()) {
  731. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  732. this->str_data().data(), static_cast<int>(this->str_data().length()),
  733. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  734. "google.protobuf.testing.oneofs.OneOfsRequest.str_data");
  735. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  736. 2, this->str_data(), output);
  737. }
  738. // int32 int_data = 3;
  739. if (has_int_data()) {
  740. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->int_data(), output);
  741. }
  742. // .google.protobuf.testing.oneofs.Data message_data = 4;
  743. if (has_message_data()) {
  744. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  745. 4, this->_internal_message_data(), output);
  746. }
  747. // .google.protobuf.testing.oneofs.MoreData more_data = 5;
  748. if (has_more_data()) {
  749. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  750. 5, this->_internal_more_data(), output);
  751. }
  752. // .google.protobuf.Struct struct_data = 6;
  753. if (has_struct_data()) {
  754. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  755. 6, this->_internal_struct_data(), output);
  756. }
  757. // .google.protobuf.Value value_data = 7;
  758. if (has_value_data()) {
  759. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  760. 7, this->_internal_value_data(), output);
  761. }
  762. // .google.protobuf.ListValue list_value_data = 8;
  763. if (has_list_value_data()) {
  764. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  765. 8, this->_internal_list_value_data(), output);
  766. }
  767. // .google.protobuf.Timestamp ts_data = 9;
  768. if (has_ts_data()) {
  769. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  770. 9, this->_internal_ts_data(), output);
  771. }
  772. // .google.protobuf.Any any_data = 19;
  773. if (this->has_any_data()) {
  774. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  775. 19, this->_internal_any_data(), output);
  776. }
  777. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  778. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  779. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  780. }
  781. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.oneofs.OneOfsRequest)
  782. }
  783. ::google::protobuf::uint8* OneOfsRequest::InternalSerializeWithCachedSizesToArray(
  784. bool deterministic, ::google::protobuf::uint8* target) const {
  785. (void)deterministic; // Unused
  786. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.oneofs.OneOfsRequest)
  787. ::google::protobuf::uint32 cached_has_bits = 0;
  788. (void) cached_has_bits;
  789. // string value = 1;
  790. if (this->value().size() > 0) {
  791. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  792. this->value().data(), static_cast<int>(this->value().length()),
  793. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  794. "google.protobuf.testing.oneofs.OneOfsRequest.value");
  795. target =
  796. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  797. 1, this->value(), target);
  798. }
  799. // string str_data = 2;
  800. if (has_str_data()) {
  801. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  802. this->str_data().data(), static_cast<int>(this->str_data().length()),
  803. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  804. "google.protobuf.testing.oneofs.OneOfsRequest.str_data");
  805. target =
  806. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  807. 2, this->str_data(), target);
  808. }
  809. // int32 int_data = 3;
  810. if (has_int_data()) {
  811. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->int_data(), target);
  812. }
  813. // .google.protobuf.testing.oneofs.Data message_data = 4;
  814. if (has_message_data()) {
  815. target = ::google::protobuf::internal::WireFormatLite::
  816. InternalWriteMessageToArray(
  817. 4, this->_internal_message_data(), deterministic, target);
  818. }
  819. // .google.protobuf.testing.oneofs.MoreData more_data = 5;
  820. if (has_more_data()) {
  821. target = ::google::protobuf::internal::WireFormatLite::
  822. InternalWriteMessageToArray(
  823. 5, this->_internal_more_data(), deterministic, target);
  824. }
  825. // .google.protobuf.Struct struct_data = 6;
  826. if (has_struct_data()) {
  827. target = ::google::protobuf::internal::WireFormatLite::
  828. InternalWriteMessageToArray(
  829. 6, this->_internal_struct_data(), deterministic, target);
  830. }
  831. // .google.protobuf.Value value_data = 7;
  832. if (has_value_data()) {
  833. target = ::google::protobuf::internal::WireFormatLite::
  834. InternalWriteMessageToArray(
  835. 7, this->_internal_value_data(), deterministic, target);
  836. }
  837. // .google.protobuf.ListValue list_value_data = 8;
  838. if (has_list_value_data()) {
  839. target = ::google::protobuf::internal::WireFormatLite::
  840. InternalWriteMessageToArray(
  841. 8, this->_internal_list_value_data(), deterministic, target);
  842. }
  843. // .google.protobuf.Timestamp ts_data = 9;
  844. if (has_ts_data()) {
  845. target = ::google::protobuf::internal::WireFormatLite::
  846. InternalWriteMessageToArray(
  847. 9, this->_internal_ts_data(), deterministic, target);
  848. }
  849. // .google.protobuf.Any any_data = 19;
  850. if (this->has_any_data()) {
  851. target = ::google::protobuf::internal::WireFormatLite::
  852. InternalWriteMessageToArray(
  853. 19, this->_internal_any_data(), deterministic, target);
  854. }
  855. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  856. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  857. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  858. }
  859. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.oneofs.OneOfsRequest)
  860. return target;
  861. }
  862. size_t OneOfsRequest::ByteSizeLong() const {
  863. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.oneofs.OneOfsRequest)
  864. size_t total_size = 0;
  865. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  866. total_size +=
  867. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  868. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  869. }
  870. // string value = 1;
  871. if (this->value().size() > 0) {
  872. total_size += 1 +
  873. ::google::protobuf::internal::WireFormatLite::StringSize(
  874. this->value());
  875. }
  876. // .google.protobuf.Any any_data = 19;
  877. if (this->has_any_data()) {
  878. total_size += 2 +
  879. ::google::protobuf::internal::WireFormatLite::MessageSize(
  880. *any_data_);
  881. }
  882. switch (data_case()) {
  883. // string str_data = 2;
  884. case kStrData: {
  885. total_size += 1 +
  886. ::google::protobuf::internal::WireFormatLite::StringSize(
  887. this->str_data());
  888. break;
  889. }
  890. // int32 int_data = 3;
  891. case kIntData: {
  892. total_size += 1 +
  893. ::google::protobuf::internal::WireFormatLite::Int32Size(
  894. this->int_data());
  895. break;
  896. }
  897. // .google.protobuf.testing.oneofs.Data message_data = 4;
  898. case kMessageData: {
  899. total_size += 1 +
  900. ::google::protobuf::internal::WireFormatLite::MessageSize(
  901. *data_.message_data_);
  902. break;
  903. }
  904. // .google.protobuf.testing.oneofs.MoreData more_data = 5;
  905. case kMoreData: {
  906. total_size += 1 +
  907. ::google::protobuf::internal::WireFormatLite::MessageSize(
  908. *data_.more_data_);
  909. break;
  910. }
  911. // .google.protobuf.Struct struct_data = 6;
  912. case kStructData: {
  913. total_size += 1 +
  914. ::google::protobuf::internal::WireFormatLite::MessageSize(
  915. *data_.struct_data_);
  916. break;
  917. }
  918. // .google.protobuf.Value value_data = 7;
  919. case kValueData: {
  920. total_size += 1 +
  921. ::google::protobuf::internal::WireFormatLite::MessageSize(
  922. *data_.value_data_);
  923. break;
  924. }
  925. // .google.protobuf.ListValue list_value_data = 8;
  926. case kListValueData: {
  927. total_size += 1 +
  928. ::google::protobuf::internal::WireFormatLite::MessageSize(
  929. *data_.list_value_data_);
  930. break;
  931. }
  932. // .google.protobuf.Timestamp ts_data = 9;
  933. case kTsData: {
  934. total_size += 1 +
  935. ::google::protobuf::internal::WireFormatLite::MessageSize(
  936. *data_.ts_data_);
  937. break;
  938. }
  939. case DATA_NOT_SET: {
  940. break;
  941. }
  942. }
  943. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  944. SetCachedSize(cached_size);
  945. return total_size;
  946. }
  947. void OneOfsRequest::MergeFrom(const ::google::protobuf::Message& from) {
  948. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.oneofs.OneOfsRequest)
  949. GOOGLE_DCHECK_NE(&from, this);
  950. const OneOfsRequest* source =
  951. ::google::protobuf::internal::DynamicCastToGenerated<const OneOfsRequest>(
  952. &from);
  953. if (source == NULL) {
  954. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.oneofs.OneOfsRequest)
  955. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  956. } else {
  957. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.oneofs.OneOfsRequest)
  958. MergeFrom(*source);
  959. }
  960. }
  961. void OneOfsRequest::MergeFrom(const OneOfsRequest& from) {
  962. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.oneofs.OneOfsRequest)
  963. GOOGLE_DCHECK_NE(&from, this);
  964. _internal_metadata_.MergeFrom(from._internal_metadata_);
  965. ::google::protobuf::uint32 cached_has_bits = 0;
  966. (void) cached_has_bits;
  967. if (from.value().size() > 0) {
  968. value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  969. }
  970. if (from.has_any_data()) {
  971. mutable_any_data()->::google::protobuf::Any::MergeFrom(from.any_data());
  972. }
  973. switch (from.data_case()) {
  974. case kStrData: {
  975. set_str_data(from.str_data());
  976. break;
  977. }
  978. case kIntData: {
  979. set_int_data(from.int_data());
  980. break;
  981. }
  982. case kMessageData: {
  983. mutable_message_data()->::google::protobuf::testing::oneofs::Data::MergeFrom(from.message_data());
  984. break;
  985. }
  986. case kMoreData: {
  987. mutable_more_data()->::google::protobuf::testing::oneofs::MoreData::MergeFrom(from.more_data());
  988. break;
  989. }
  990. case kStructData: {
  991. mutable_struct_data()->::google::protobuf::Struct::MergeFrom(from.struct_data());
  992. break;
  993. }
  994. case kValueData: {
  995. mutable_value_data()->::google::protobuf::Value::MergeFrom(from.value_data());
  996. break;
  997. }
  998. case kListValueData: {
  999. mutable_list_value_data()->::google::protobuf::ListValue::MergeFrom(from.list_value_data());
  1000. break;
  1001. }
  1002. case kTsData: {
  1003. mutable_ts_data()->::google::protobuf::Timestamp::MergeFrom(from.ts_data());
  1004. break;
  1005. }
  1006. case DATA_NOT_SET: {
  1007. break;
  1008. }
  1009. }
  1010. }
  1011. void OneOfsRequest::CopyFrom(const ::google::protobuf::Message& from) {
  1012. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.oneofs.OneOfsRequest)
  1013. if (&from == this) return;
  1014. Clear();
  1015. MergeFrom(from);
  1016. }
  1017. void OneOfsRequest::CopyFrom(const OneOfsRequest& from) {
  1018. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.oneofs.OneOfsRequest)
  1019. if (&from == this) return;
  1020. Clear();
  1021. MergeFrom(from);
  1022. }
  1023. bool OneOfsRequest::IsInitialized() const {
  1024. return true;
  1025. }
  1026. void OneOfsRequest::Swap(OneOfsRequest* other) {
  1027. if (other == this) return;
  1028. InternalSwap(other);
  1029. }
  1030. void OneOfsRequest::InternalSwap(OneOfsRequest* other) {
  1031. using std::swap;
  1032. value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1033. GetArenaNoVirtual());
  1034. swap(any_data_, other->any_data_);
  1035. swap(data_, other->data_);
  1036. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1037. _internal_metadata_.Swap(&other->_internal_metadata_);
  1038. }
  1039. ::google::protobuf::Metadata OneOfsRequest::GetMetadata() const {
  1040. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
  1041. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages];
  1042. }
  1043. // ===================================================================
  1044. void RequestWithSimpleOneof::InitAsDefaultInstance() {
  1045. ::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_.str_data_.UnsafeSetDefault(
  1046. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1047. ::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_.int_data_ = 0;
  1048. ::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_.message_data_ = const_cast< ::google::protobuf::testing::oneofs::Data*>(
  1049. ::google::protobuf::testing::oneofs::Data::internal_default_instance());
  1050. ::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_.more_data_ = const_cast< ::google::protobuf::testing::oneofs::MoreData*>(
  1051. ::google::protobuf::testing::oneofs::MoreData::internal_default_instance());
  1052. }
  1053. void RequestWithSimpleOneof::set_allocated_message_data(::google::protobuf::testing::oneofs::Data* message_data) {
  1054. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1055. clear_data();
  1056. if (message_data) {
  1057. ::google::protobuf::Arena* submessage_arena = NULL;
  1058. if (message_arena != submessage_arena) {
  1059. message_data = ::google::protobuf::internal::GetOwnedMessage(
  1060. message_arena, message_data, submessage_arena);
  1061. }
  1062. set_has_message_data();
  1063. data_.message_data_ = message_data;
  1064. }
  1065. // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.RequestWithSimpleOneof.message_data)
  1066. }
  1067. void RequestWithSimpleOneof::set_allocated_more_data(::google::protobuf::testing::oneofs::MoreData* more_data) {
  1068. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1069. clear_data();
  1070. if (more_data) {
  1071. ::google::protobuf::Arena* submessage_arena = NULL;
  1072. if (message_arena != submessage_arena) {
  1073. more_data = ::google::protobuf::internal::GetOwnedMessage(
  1074. message_arena, more_data, submessage_arena);
  1075. }
  1076. set_has_more_data();
  1077. data_.more_data_ = more_data;
  1078. }
  1079. // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.RequestWithSimpleOneof.more_data)
  1080. }
  1081. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1082. const int RequestWithSimpleOneof::kValueFieldNumber;
  1083. const int RequestWithSimpleOneof::kStrDataFieldNumber;
  1084. const int RequestWithSimpleOneof::kIntDataFieldNumber;
  1085. const int RequestWithSimpleOneof::kMessageDataFieldNumber;
  1086. const int RequestWithSimpleOneof::kMoreDataFieldNumber;
  1087. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1088. RequestWithSimpleOneof::RequestWithSimpleOneof()
  1089. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1090. ::google::protobuf::internal::InitSCC(
  1091. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_RequestWithSimpleOneof.base);
  1092. SharedCtor();
  1093. // @@protoc_insertion_point(constructor:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1094. }
  1095. RequestWithSimpleOneof::RequestWithSimpleOneof(const RequestWithSimpleOneof& from)
  1096. : ::google::protobuf::Message(),
  1097. _internal_metadata_(NULL) {
  1098. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1099. value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1100. if (from.value().size() > 0) {
  1101. value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  1102. }
  1103. clear_has_data();
  1104. switch (from.data_case()) {
  1105. case kStrData: {
  1106. set_str_data(from.str_data());
  1107. break;
  1108. }
  1109. case kIntData: {
  1110. set_int_data(from.int_data());
  1111. break;
  1112. }
  1113. case kMessageData: {
  1114. mutable_message_data()->::google::protobuf::testing::oneofs::Data::MergeFrom(from.message_data());
  1115. break;
  1116. }
  1117. case kMoreData: {
  1118. mutable_more_data()->::google::protobuf::testing::oneofs::MoreData::MergeFrom(from.more_data());
  1119. break;
  1120. }
  1121. case DATA_NOT_SET: {
  1122. break;
  1123. }
  1124. }
  1125. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1126. }
  1127. void RequestWithSimpleOneof::SharedCtor() {
  1128. value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1129. clear_has_data();
  1130. }
  1131. RequestWithSimpleOneof::~RequestWithSimpleOneof() {
  1132. // @@protoc_insertion_point(destructor:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1133. SharedDtor();
  1134. }
  1135. void RequestWithSimpleOneof::SharedDtor() {
  1136. value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1137. if (has_data()) {
  1138. clear_data();
  1139. }
  1140. }
  1141. void RequestWithSimpleOneof::SetCachedSize(int size) const {
  1142. _cached_size_.Set(size);
  1143. }
  1144. const ::google::protobuf::Descriptor* RequestWithSimpleOneof::descriptor() {
  1145. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
  1146. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1147. }
  1148. const RequestWithSimpleOneof& RequestWithSimpleOneof::default_instance() {
  1149. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_RequestWithSimpleOneof.base);
  1150. return *internal_default_instance();
  1151. }
  1152. void RequestWithSimpleOneof::clear_data() {
  1153. // @@protoc_insertion_point(one_of_clear_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1154. switch (data_case()) {
  1155. case kStrData: {
  1156. data_.str_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1157. break;
  1158. }
  1159. case kIntData: {
  1160. // No need to clear
  1161. break;
  1162. }
  1163. case kMessageData: {
  1164. delete data_.message_data_;
  1165. break;
  1166. }
  1167. case kMoreData: {
  1168. delete data_.more_data_;
  1169. break;
  1170. }
  1171. case DATA_NOT_SET: {
  1172. break;
  1173. }
  1174. }
  1175. _oneof_case_[0] = DATA_NOT_SET;
  1176. }
  1177. void RequestWithSimpleOneof::Clear() {
  1178. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1179. ::google::protobuf::uint32 cached_has_bits = 0;
  1180. // Prevent compiler warnings about cached_has_bits being unused
  1181. (void) cached_has_bits;
  1182. value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1183. clear_data();
  1184. _internal_metadata_.Clear();
  1185. }
  1186. bool RequestWithSimpleOneof::MergePartialFromCodedStream(
  1187. ::google::protobuf::io::CodedInputStream* input) {
  1188. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1189. ::google::protobuf::uint32 tag;
  1190. // @@protoc_insertion_point(parse_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1191. for (;;) {
  1192. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1193. tag = p.first;
  1194. if (!p.second) goto handle_unusual;
  1195. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1196. // string value = 1;
  1197. case 1: {
  1198. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1199. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1200. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1201. input, this->mutable_value()));
  1202. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1203. this->value().data(), static_cast<int>(this->value().length()),
  1204. ::google::protobuf::internal::WireFormatLite::PARSE,
  1205. "google.protobuf.testing.oneofs.RequestWithSimpleOneof.value"));
  1206. } else {
  1207. goto handle_unusual;
  1208. }
  1209. break;
  1210. }
  1211. // string str_data = 2;
  1212. case 2: {
  1213. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1214. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1215. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1216. input, this->mutable_str_data()));
  1217. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1218. this->str_data().data(), static_cast<int>(this->str_data().length()),
  1219. ::google::protobuf::internal::WireFormatLite::PARSE,
  1220. "google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data"));
  1221. } else {
  1222. goto handle_unusual;
  1223. }
  1224. break;
  1225. }
  1226. // int32 int_data = 3;
  1227. case 3: {
  1228. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1229. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  1230. clear_data();
  1231. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1232. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  1233. input, &data_.int_data_)));
  1234. set_has_int_data();
  1235. } else {
  1236. goto handle_unusual;
  1237. }
  1238. break;
  1239. }
  1240. // .google.protobuf.testing.oneofs.Data message_data = 4;
  1241. case 4: {
  1242. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1243. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1244. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1245. input, mutable_message_data()));
  1246. } else {
  1247. goto handle_unusual;
  1248. }
  1249. break;
  1250. }
  1251. // .google.protobuf.testing.oneofs.MoreData more_data = 5;
  1252. case 5: {
  1253. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1254. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  1255. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1256. input, mutable_more_data()));
  1257. } else {
  1258. goto handle_unusual;
  1259. }
  1260. break;
  1261. }
  1262. default: {
  1263. handle_unusual:
  1264. if (tag == 0) {
  1265. goto success;
  1266. }
  1267. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1268. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1269. break;
  1270. }
  1271. }
  1272. }
  1273. success:
  1274. // @@protoc_insertion_point(parse_success:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1275. return true;
  1276. failure:
  1277. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1278. return false;
  1279. #undef DO_
  1280. }
  1281. void RequestWithSimpleOneof::SerializeWithCachedSizes(
  1282. ::google::protobuf::io::CodedOutputStream* output) const {
  1283. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1284. ::google::protobuf::uint32 cached_has_bits = 0;
  1285. (void) cached_has_bits;
  1286. // string value = 1;
  1287. if (this->value().size() > 0) {
  1288. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1289. this->value().data(), static_cast<int>(this->value().length()),
  1290. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1291. "google.protobuf.testing.oneofs.RequestWithSimpleOneof.value");
  1292. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1293. 1, this->value(), output);
  1294. }
  1295. // string str_data = 2;
  1296. if (has_str_data()) {
  1297. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1298. this->str_data().data(), static_cast<int>(this->str_data().length()),
  1299. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1300. "google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data");
  1301. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1302. 2, this->str_data(), output);
  1303. }
  1304. // int32 int_data = 3;
  1305. if (has_int_data()) {
  1306. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->int_data(), output);
  1307. }
  1308. // .google.protobuf.testing.oneofs.Data message_data = 4;
  1309. if (has_message_data()) {
  1310. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1311. 4, this->_internal_message_data(), output);
  1312. }
  1313. // .google.protobuf.testing.oneofs.MoreData more_data = 5;
  1314. if (has_more_data()) {
  1315. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1316. 5, this->_internal_more_data(), output);
  1317. }
  1318. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1319. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1320. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1321. }
  1322. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1323. }
  1324. ::google::protobuf::uint8* RequestWithSimpleOneof::InternalSerializeWithCachedSizesToArray(
  1325. bool deterministic, ::google::protobuf::uint8* target) const {
  1326. (void)deterministic; // Unused
  1327. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1328. ::google::protobuf::uint32 cached_has_bits = 0;
  1329. (void) cached_has_bits;
  1330. // string value = 1;
  1331. if (this->value().size() > 0) {
  1332. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1333. this->value().data(), static_cast<int>(this->value().length()),
  1334. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1335. "google.protobuf.testing.oneofs.RequestWithSimpleOneof.value");
  1336. target =
  1337. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1338. 1, this->value(), target);
  1339. }
  1340. // string str_data = 2;
  1341. if (has_str_data()) {
  1342. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1343. this->str_data().data(), static_cast<int>(this->str_data().length()),
  1344. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1345. "google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data");
  1346. target =
  1347. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1348. 2, this->str_data(), target);
  1349. }
  1350. // int32 int_data = 3;
  1351. if (has_int_data()) {
  1352. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->int_data(), target);
  1353. }
  1354. // .google.protobuf.testing.oneofs.Data message_data = 4;
  1355. if (has_message_data()) {
  1356. target = ::google::protobuf::internal::WireFormatLite::
  1357. InternalWriteMessageToArray(
  1358. 4, this->_internal_message_data(), deterministic, target);
  1359. }
  1360. // .google.protobuf.testing.oneofs.MoreData more_data = 5;
  1361. if (has_more_data()) {
  1362. target = ::google::protobuf::internal::WireFormatLite::
  1363. InternalWriteMessageToArray(
  1364. 5, this->_internal_more_data(), deterministic, target);
  1365. }
  1366. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1367. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1368. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1369. }
  1370. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1371. return target;
  1372. }
  1373. size_t RequestWithSimpleOneof::ByteSizeLong() const {
  1374. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1375. size_t total_size = 0;
  1376. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1377. total_size +=
  1378. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1379. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1380. }
  1381. // string value = 1;
  1382. if (this->value().size() > 0) {
  1383. total_size += 1 +
  1384. ::google::protobuf::internal::WireFormatLite::StringSize(
  1385. this->value());
  1386. }
  1387. switch (data_case()) {
  1388. // string str_data = 2;
  1389. case kStrData: {
  1390. total_size += 1 +
  1391. ::google::protobuf::internal::WireFormatLite::StringSize(
  1392. this->str_data());
  1393. break;
  1394. }
  1395. // int32 int_data = 3;
  1396. case kIntData: {
  1397. total_size += 1 +
  1398. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1399. this->int_data());
  1400. break;
  1401. }
  1402. // .google.protobuf.testing.oneofs.Data message_data = 4;
  1403. case kMessageData: {
  1404. total_size += 1 +
  1405. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1406. *data_.message_data_);
  1407. break;
  1408. }
  1409. // .google.protobuf.testing.oneofs.MoreData more_data = 5;
  1410. case kMoreData: {
  1411. total_size += 1 +
  1412. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1413. *data_.more_data_);
  1414. break;
  1415. }
  1416. case DATA_NOT_SET: {
  1417. break;
  1418. }
  1419. }
  1420. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1421. SetCachedSize(cached_size);
  1422. return total_size;
  1423. }
  1424. void RequestWithSimpleOneof::MergeFrom(const ::google::protobuf::Message& from) {
  1425. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1426. GOOGLE_DCHECK_NE(&from, this);
  1427. const RequestWithSimpleOneof* source =
  1428. ::google::protobuf::internal::DynamicCastToGenerated<const RequestWithSimpleOneof>(
  1429. &from);
  1430. if (source == NULL) {
  1431. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1432. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1433. } else {
  1434. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1435. MergeFrom(*source);
  1436. }
  1437. }
  1438. void RequestWithSimpleOneof::MergeFrom(const RequestWithSimpleOneof& from) {
  1439. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1440. GOOGLE_DCHECK_NE(&from, this);
  1441. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1442. ::google::protobuf::uint32 cached_has_bits = 0;
  1443. (void) cached_has_bits;
  1444. if (from.value().size() > 0) {
  1445. value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  1446. }
  1447. switch (from.data_case()) {
  1448. case kStrData: {
  1449. set_str_data(from.str_data());
  1450. break;
  1451. }
  1452. case kIntData: {
  1453. set_int_data(from.int_data());
  1454. break;
  1455. }
  1456. case kMessageData: {
  1457. mutable_message_data()->::google::protobuf::testing::oneofs::Data::MergeFrom(from.message_data());
  1458. break;
  1459. }
  1460. case kMoreData: {
  1461. mutable_more_data()->::google::protobuf::testing::oneofs::MoreData::MergeFrom(from.more_data());
  1462. break;
  1463. }
  1464. case DATA_NOT_SET: {
  1465. break;
  1466. }
  1467. }
  1468. }
  1469. void RequestWithSimpleOneof::CopyFrom(const ::google::protobuf::Message& from) {
  1470. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1471. if (&from == this) return;
  1472. Clear();
  1473. MergeFrom(from);
  1474. }
  1475. void RequestWithSimpleOneof::CopyFrom(const RequestWithSimpleOneof& from) {
  1476. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
  1477. if (&from == this) return;
  1478. Clear();
  1479. MergeFrom(from);
  1480. }
  1481. bool RequestWithSimpleOneof::IsInitialized() const {
  1482. return true;
  1483. }
  1484. void RequestWithSimpleOneof::Swap(RequestWithSimpleOneof* other) {
  1485. if (other == this) return;
  1486. InternalSwap(other);
  1487. }
  1488. void RequestWithSimpleOneof::InternalSwap(RequestWithSimpleOneof* other) {
  1489. using std::swap;
  1490. value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1491. GetArenaNoVirtual());
  1492. swap(data_, other->data_);
  1493. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1494. _internal_metadata_.Swap(&other->_internal_metadata_);
  1495. }
  1496. ::google::protobuf::Metadata RequestWithSimpleOneof::GetMetadata() const {
  1497. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
  1498. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages];
  1499. }
  1500. // ===================================================================
  1501. void Data::InitAsDefaultInstance() {
  1502. }
  1503. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1504. const int Data::kDataValueFieldNumber;
  1505. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1506. Data::Data()
  1507. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1508. ::google::protobuf::internal::InitSCC(
  1509. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Data.base);
  1510. SharedCtor();
  1511. // @@protoc_insertion_point(constructor:google.protobuf.testing.oneofs.Data)
  1512. }
  1513. Data::Data(const Data& from)
  1514. : ::google::protobuf::Message(),
  1515. _internal_metadata_(NULL) {
  1516. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1517. data_value_ = from.data_value_;
  1518. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.oneofs.Data)
  1519. }
  1520. void Data::SharedCtor() {
  1521. data_value_ = 0;
  1522. }
  1523. Data::~Data() {
  1524. // @@protoc_insertion_point(destructor:google.protobuf.testing.oneofs.Data)
  1525. SharedDtor();
  1526. }
  1527. void Data::SharedDtor() {
  1528. }
  1529. void Data::SetCachedSize(int size) const {
  1530. _cached_size_.Set(size);
  1531. }
  1532. const ::google::protobuf::Descriptor* Data::descriptor() {
  1533. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
  1534. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1535. }
  1536. const Data& Data::default_instance() {
  1537. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Data.base);
  1538. return *internal_default_instance();
  1539. }
  1540. void Data::Clear() {
  1541. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.oneofs.Data)
  1542. ::google::protobuf::uint32 cached_has_bits = 0;
  1543. // Prevent compiler warnings about cached_has_bits being unused
  1544. (void) cached_has_bits;
  1545. data_value_ = 0;
  1546. _internal_metadata_.Clear();
  1547. }
  1548. bool Data::MergePartialFromCodedStream(
  1549. ::google::protobuf::io::CodedInputStream* input) {
  1550. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1551. ::google::protobuf::uint32 tag;
  1552. // @@protoc_insertion_point(parse_start:google.protobuf.testing.oneofs.Data)
  1553. for (;;) {
  1554. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1555. tag = p.first;
  1556. if (!p.second) goto handle_unusual;
  1557. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1558. // int32 data_value = 1;
  1559. case 1: {
  1560. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1561. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1562. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1563. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  1564. input, &data_value_)));
  1565. } else {
  1566. goto handle_unusual;
  1567. }
  1568. break;
  1569. }
  1570. default: {
  1571. handle_unusual:
  1572. if (tag == 0) {
  1573. goto success;
  1574. }
  1575. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1576. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1577. break;
  1578. }
  1579. }
  1580. }
  1581. success:
  1582. // @@protoc_insertion_point(parse_success:google.protobuf.testing.oneofs.Data)
  1583. return true;
  1584. failure:
  1585. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.oneofs.Data)
  1586. return false;
  1587. #undef DO_
  1588. }
  1589. void Data::SerializeWithCachedSizes(
  1590. ::google::protobuf::io::CodedOutputStream* output) const {
  1591. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.oneofs.Data)
  1592. ::google::protobuf::uint32 cached_has_bits = 0;
  1593. (void) cached_has_bits;
  1594. // int32 data_value = 1;
  1595. if (this->data_value() != 0) {
  1596. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->data_value(), output);
  1597. }
  1598. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1599. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1600. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1601. }
  1602. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.oneofs.Data)
  1603. }
  1604. ::google::protobuf::uint8* Data::InternalSerializeWithCachedSizesToArray(
  1605. bool deterministic, ::google::protobuf::uint8* target) const {
  1606. (void)deterministic; // Unused
  1607. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.oneofs.Data)
  1608. ::google::protobuf::uint32 cached_has_bits = 0;
  1609. (void) cached_has_bits;
  1610. // int32 data_value = 1;
  1611. if (this->data_value() != 0) {
  1612. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->data_value(), target);
  1613. }
  1614. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1615. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1616. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1617. }
  1618. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.oneofs.Data)
  1619. return target;
  1620. }
  1621. size_t Data::ByteSizeLong() const {
  1622. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.oneofs.Data)
  1623. size_t total_size = 0;
  1624. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1625. total_size +=
  1626. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1627. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1628. }
  1629. // int32 data_value = 1;
  1630. if (this->data_value() != 0) {
  1631. total_size += 1 +
  1632. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1633. this->data_value());
  1634. }
  1635. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1636. SetCachedSize(cached_size);
  1637. return total_size;
  1638. }
  1639. void Data::MergeFrom(const ::google::protobuf::Message& from) {
  1640. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.oneofs.Data)
  1641. GOOGLE_DCHECK_NE(&from, this);
  1642. const Data* source =
  1643. ::google::protobuf::internal::DynamicCastToGenerated<const Data>(
  1644. &from);
  1645. if (source == NULL) {
  1646. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.oneofs.Data)
  1647. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1648. } else {
  1649. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.oneofs.Data)
  1650. MergeFrom(*source);
  1651. }
  1652. }
  1653. void Data::MergeFrom(const Data& from) {
  1654. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.oneofs.Data)
  1655. GOOGLE_DCHECK_NE(&from, this);
  1656. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1657. ::google::protobuf::uint32 cached_has_bits = 0;
  1658. (void) cached_has_bits;
  1659. if (from.data_value() != 0) {
  1660. set_data_value(from.data_value());
  1661. }
  1662. }
  1663. void Data::CopyFrom(const ::google::protobuf::Message& from) {
  1664. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.oneofs.Data)
  1665. if (&from == this) return;
  1666. Clear();
  1667. MergeFrom(from);
  1668. }
  1669. void Data::CopyFrom(const Data& from) {
  1670. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.oneofs.Data)
  1671. if (&from == this) return;
  1672. Clear();
  1673. MergeFrom(from);
  1674. }
  1675. bool Data::IsInitialized() const {
  1676. return true;
  1677. }
  1678. void Data::Swap(Data* other) {
  1679. if (other == this) return;
  1680. InternalSwap(other);
  1681. }
  1682. void Data::InternalSwap(Data* other) {
  1683. using std::swap;
  1684. swap(data_value_, other->data_value_);
  1685. _internal_metadata_.Swap(&other->_internal_metadata_);
  1686. }
  1687. ::google::protobuf::Metadata Data::GetMetadata() const {
  1688. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
  1689. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages];
  1690. }
  1691. // ===================================================================
  1692. void MoreData::InitAsDefaultInstance() {
  1693. }
  1694. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1695. const int MoreData::kStrValueFieldNumber;
  1696. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1697. MoreData::MoreData()
  1698. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1699. ::google::protobuf::internal::InitSCC(
  1700. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_MoreData.base);
  1701. SharedCtor();
  1702. // @@protoc_insertion_point(constructor:google.protobuf.testing.oneofs.MoreData)
  1703. }
  1704. MoreData::MoreData(const MoreData& from)
  1705. : ::google::protobuf::Message(),
  1706. _internal_metadata_(NULL) {
  1707. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1708. str_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1709. if (from.str_value().size() > 0) {
  1710. str_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_value_);
  1711. }
  1712. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.oneofs.MoreData)
  1713. }
  1714. void MoreData::SharedCtor() {
  1715. str_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1716. }
  1717. MoreData::~MoreData() {
  1718. // @@protoc_insertion_point(destructor:google.protobuf.testing.oneofs.MoreData)
  1719. SharedDtor();
  1720. }
  1721. void MoreData::SharedDtor() {
  1722. str_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1723. }
  1724. void MoreData::SetCachedSize(int size) const {
  1725. _cached_size_.Set(size);
  1726. }
  1727. const ::google::protobuf::Descriptor* MoreData::descriptor() {
  1728. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
  1729. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1730. }
  1731. const MoreData& MoreData::default_instance() {
  1732. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_MoreData.base);
  1733. return *internal_default_instance();
  1734. }
  1735. void MoreData::Clear() {
  1736. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.oneofs.MoreData)
  1737. ::google::protobuf::uint32 cached_has_bits = 0;
  1738. // Prevent compiler warnings about cached_has_bits being unused
  1739. (void) cached_has_bits;
  1740. str_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1741. _internal_metadata_.Clear();
  1742. }
  1743. bool MoreData::MergePartialFromCodedStream(
  1744. ::google::protobuf::io::CodedInputStream* input) {
  1745. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1746. ::google::protobuf::uint32 tag;
  1747. // @@protoc_insertion_point(parse_start:google.protobuf.testing.oneofs.MoreData)
  1748. for (;;) {
  1749. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1750. tag = p.first;
  1751. if (!p.second) goto handle_unusual;
  1752. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1753. // string str_value = 1;
  1754. case 1: {
  1755. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1756. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1757. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1758. input, this->mutable_str_value()));
  1759. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1760. this->str_value().data(), static_cast<int>(this->str_value().length()),
  1761. ::google::protobuf::internal::WireFormatLite::PARSE,
  1762. "google.protobuf.testing.oneofs.MoreData.str_value"));
  1763. } else {
  1764. goto handle_unusual;
  1765. }
  1766. break;
  1767. }
  1768. default: {
  1769. handle_unusual:
  1770. if (tag == 0) {
  1771. goto success;
  1772. }
  1773. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1774. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1775. break;
  1776. }
  1777. }
  1778. }
  1779. success:
  1780. // @@protoc_insertion_point(parse_success:google.protobuf.testing.oneofs.MoreData)
  1781. return true;
  1782. failure:
  1783. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.oneofs.MoreData)
  1784. return false;
  1785. #undef DO_
  1786. }
  1787. void MoreData::SerializeWithCachedSizes(
  1788. ::google::protobuf::io::CodedOutputStream* output) const {
  1789. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.oneofs.MoreData)
  1790. ::google::protobuf::uint32 cached_has_bits = 0;
  1791. (void) cached_has_bits;
  1792. // string str_value = 1;
  1793. if (this->str_value().size() > 0) {
  1794. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1795. this->str_value().data(), static_cast<int>(this->str_value().length()),
  1796. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1797. "google.protobuf.testing.oneofs.MoreData.str_value");
  1798. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1799. 1, this->str_value(), output);
  1800. }
  1801. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1802. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1803. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1804. }
  1805. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.oneofs.MoreData)
  1806. }
  1807. ::google::protobuf::uint8* MoreData::InternalSerializeWithCachedSizesToArray(
  1808. bool deterministic, ::google::protobuf::uint8* target) const {
  1809. (void)deterministic; // Unused
  1810. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.oneofs.MoreData)
  1811. ::google::protobuf::uint32 cached_has_bits = 0;
  1812. (void) cached_has_bits;
  1813. // string str_value = 1;
  1814. if (this->str_value().size() > 0) {
  1815. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1816. this->str_value().data(), static_cast<int>(this->str_value().length()),
  1817. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1818. "google.protobuf.testing.oneofs.MoreData.str_value");
  1819. target =
  1820. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1821. 1, this->str_value(), target);
  1822. }
  1823. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1824. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1825. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1826. }
  1827. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.oneofs.MoreData)
  1828. return target;
  1829. }
  1830. size_t MoreData::ByteSizeLong() const {
  1831. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.oneofs.MoreData)
  1832. size_t total_size = 0;
  1833. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1834. total_size +=
  1835. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1836. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1837. }
  1838. // string str_value = 1;
  1839. if (this->str_value().size() > 0) {
  1840. total_size += 1 +
  1841. ::google::protobuf::internal::WireFormatLite::StringSize(
  1842. this->str_value());
  1843. }
  1844. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1845. SetCachedSize(cached_size);
  1846. return total_size;
  1847. }
  1848. void MoreData::MergeFrom(const ::google::protobuf::Message& from) {
  1849. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.oneofs.MoreData)
  1850. GOOGLE_DCHECK_NE(&from, this);
  1851. const MoreData* source =
  1852. ::google::protobuf::internal::DynamicCastToGenerated<const MoreData>(
  1853. &from);
  1854. if (source == NULL) {
  1855. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.oneofs.MoreData)
  1856. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1857. } else {
  1858. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.oneofs.MoreData)
  1859. MergeFrom(*source);
  1860. }
  1861. }
  1862. void MoreData::MergeFrom(const MoreData& from) {
  1863. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.oneofs.MoreData)
  1864. GOOGLE_DCHECK_NE(&from, this);
  1865. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1866. ::google::protobuf::uint32 cached_has_bits = 0;
  1867. (void) cached_has_bits;
  1868. if (from.str_value().size() > 0) {
  1869. str_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_value_);
  1870. }
  1871. }
  1872. void MoreData::CopyFrom(const ::google::protobuf::Message& from) {
  1873. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.oneofs.MoreData)
  1874. if (&from == this) return;
  1875. Clear();
  1876. MergeFrom(from);
  1877. }
  1878. void MoreData::CopyFrom(const MoreData& from) {
  1879. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.oneofs.MoreData)
  1880. if (&from == this) return;
  1881. Clear();
  1882. MergeFrom(from);
  1883. }
  1884. bool MoreData::IsInitialized() const {
  1885. return true;
  1886. }
  1887. void MoreData::Swap(MoreData* other) {
  1888. if (other == this) return;
  1889. InternalSwap(other);
  1890. }
  1891. void MoreData::InternalSwap(MoreData* other) {
  1892. using std::swap;
  1893. str_value_.Swap(&other->str_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1894. GetArenaNoVirtual());
  1895. _internal_metadata_.Swap(&other->_internal_metadata_);
  1896. }
  1897. ::google::protobuf::Metadata MoreData::GetMetadata() const {
  1898. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
  1899. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages];
  1900. }
  1901. // ===================================================================
  1902. void Response::InitAsDefaultInstance() {
  1903. }
  1904. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1905. const int Response::kValueFieldNumber;
  1906. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1907. Response::Response()
  1908. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1909. ::google::protobuf::internal::InitSCC(
  1910. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Response.base);
  1911. SharedCtor();
  1912. // @@protoc_insertion_point(constructor:google.protobuf.testing.oneofs.Response)
  1913. }
  1914. Response::Response(const Response& from)
  1915. : ::google::protobuf::Message(),
  1916. _internal_metadata_(NULL) {
  1917. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1918. value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1919. if (from.value().size() > 0) {
  1920. value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  1921. }
  1922. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.oneofs.Response)
  1923. }
  1924. void Response::SharedCtor() {
  1925. value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1926. }
  1927. Response::~Response() {
  1928. // @@protoc_insertion_point(destructor:google.protobuf.testing.oneofs.Response)
  1929. SharedDtor();
  1930. }
  1931. void Response::SharedDtor() {
  1932. value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1933. }
  1934. void Response::SetCachedSize(int size) const {
  1935. _cached_size_.Set(size);
  1936. }
  1937. const ::google::protobuf::Descriptor* Response::descriptor() {
  1938. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
  1939. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1940. }
  1941. const Response& Response::default_instance() {
  1942. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Response.base);
  1943. return *internal_default_instance();
  1944. }
  1945. void Response::Clear() {
  1946. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.oneofs.Response)
  1947. ::google::protobuf::uint32 cached_has_bits = 0;
  1948. // Prevent compiler warnings about cached_has_bits being unused
  1949. (void) cached_has_bits;
  1950. value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1951. _internal_metadata_.Clear();
  1952. }
  1953. bool Response::MergePartialFromCodedStream(
  1954. ::google::protobuf::io::CodedInputStream* input) {
  1955. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1956. ::google::protobuf::uint32 tag;
  1957. // @@protoc_insertion_point(parse_start:google.protobuf.testing.oneofs.Response)
  1958. for (;;) {
  1959. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1960. tag = p.first;
  1961. if (!p.second) goto handle_unusual;
  1962. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1963. // string value = 1;
  1964. case 1: {
  1965. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1966. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1967. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1968. input, this->mutable_value()));
  1969. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1970. this->value().data(), static_cast<int>(this->value().length()),
  1971. ::google::protobuf::internal::WireFormatLite::PARSE,
  1972. "google.protobuf.testing.oneofs.Response.value"));
  1973. } else {
  1974. goto handle_unusual;
  1975. }
  1976. break;
  1977. }
  1978. default: {
  1979. handle_unusual:
  1980. if (tag == 0) {
  1981. goto success;
  1982. }
  1983. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1984. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1985. break;
  1986. }
  1987. }
  1988. }
  1989. success:
  1990. // @@protoc_insertion_point(parse_success:google.protobuf.testing.oneofs.Response)
  1991. return true;
  1992. failure:
  1993. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.oneofs.Response)
  1994. return false;
  1995. #undef DO_
  1996. }
  1997. void Response::SerializeWithCachedSizes(
  1998. ::google::protobuf::io::CodedOutputStream* output) const {
  1999. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.oneofs.Response)
  2000. ::google::protobuf::uint32 cached_has_bits = 0;
  2001. (void) cached_has_bits;
  2002. // string value = 1;
  2003. if (this->value().size() > 0) {
  2004. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2005. this->value().data(), static_cast<int>(this->value().length()),
  2006. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2007. "google.protobuf.testing.oneofs.Response.value");
  2008. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2009. 1, this->value(), output);
  2010. }
  2011. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2012. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2013. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2014. }
  2015. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.oneofs.Response)
  2016. }
  2017. ::google::protobuf::uint8* Response::InternalSerializeWithCachedSizesToArray(
  2018. bool deterministic, ::google::protobuf::uint8* target) const {
  2019. (void)deterministic; // Unused
  2020. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.oneofs.Response)
  2021. ::google::protobuf::uint32 cached_has_bits = 0;
  2022. (void) cached_has_bits;
  2023. // string value = 1;
  2024. if (this->value().size() > 0) {
  2025. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2026. this->value().data(), static_cast<int>(this->value().length()),
  2027. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2028. "google.protobuf.testing.oneofs.Response.value");
  2029. target =
  2030. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2031. 1, this->value(), target);
  2032. }
  2033. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2034. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2035. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2036. }
  2037. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.oneofs.Response)
  2038. return target;
  2039. }
  2040. size_t Response::ByteSizeLong() const {
  2041. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.oneofs.Response)
  2042. size_t total_size = 0;
  2043. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2044. total_size +=
  2045. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2046. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2047. }
  2048. // string value = 1;
  2049. if (this->value().size() > 0) {
  2050. total_size += 1 +
  2051. ::google::protobuf::internal::WireFormatLite::StringSize(
  2052. this->value());
  2053. }
  2054. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2055. SetCachedSize(cached_size);
  2056. return total_size;
  2057. }
  2058. void Response::MergeFrom(const ::google::protobuf::Message& from) {
  2059. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.oneofs.Response)
  2060. GOOGLE_DCHECK_NE(&from, this);
  2061. const Response* source =
  2062. ::google::protobuf::internal::DynamicCastToGenerated<const Response>(
  2063. &from);
  2064. if (source == NULL) {
  2065. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.oneofs.Response)
  2066. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2067. } else {
  2068. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.oneofs.Response)
  2069. MergeFrom(*source);
  2070. }
  2071. }
  2072. void Response::MergeFrom(const Response& from) {
  2073. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.oneofs.Response)
  2074. GOOGLE_DCHECK_NE(&from, this);
  2075. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2076. ::google::protobuf::uint32 cached_has_bits = 0;
  2077. (void) cached_has_bits;
  2078. if (from.value().size() > 0) {
  2079. value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  2080. }
  2081. }
  2082. void Response::CopyFrom(const ::google::protobuf::Message& from) {
  2083. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.oneofs.Response)
  2084. if (&from == this) return;
  2085. Clear();
  2086. MergeFrom(from);
  2087. }
  2088. void Response::CopyFrom(const Response& from) {
  2089. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.oneofs.Response)
  2090. if (&from == this) return;
  2091. Clear();
  2092. MergeFrom(from);
  2093. }
  2094. bool Response::IsInitialized() const {
  2095. return true;
  2096. }
  2097. void Response::Swap(Response* other) {
  2098. if (other == this) return;
  2099. InternalSwap(other);
  2100. }
  2101. void Response::InternalSwap(Response* other) {
  2102. using std::swap;
  2103. value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  2104. GetArenaNoVirtual());
  2105. _internal_metadata_.Swap(&other->_internal_metadata_);
  2106. }
  2107. ::google::protobuf::Metadata Response::GetMetadata() const {
  2108. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
  2109. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages];
  2110. }
  2111. // @@protoc_insertion_point(namespace_scope)
  2112. } // namespace oneofs
  2113. } // namespace testing
  2114. } // namespace protobuf
  2115. } // namespace google
  2116. namespace google {
  2117. namespace protobuf {
  2118. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::oneofs::OneOfsRequest* Arena::CreateMaybeMessage< ::google::protobuf::testing::oneofs::OneOfsRequest >(Arena* arena) {
  2119. return Arena::CreateInternal< ::google::protobuf::testing::oneofs::OneOfsRequest >(arena);
  2120. }
  2121. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::oneofs::RequestWithSimpleOneof* Arena::CreateMaybeMessage< ::google::protobuf::testing::oneofs::RequestWithSimpleOneof >(Arena* arena) {
  2122. return Arena::CreateInternal< ::google::protobuf::testing::oneofs::RequestWithSimpleOneof >(arena);
  2123. }
  2124. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::oneofs::Data* Arena::CreateMaybeMessage< ::google::protobuf::testing::oneofs::Data >(Arena* arena) {
  2125. return Arena::CreateInternal< ::google::protobuf::testing::oneofs::Data >(arena);
  2126. }
  2127. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::oneofs::MoreData* Arena::CreateMaybeMessage< ::google::protobuf::testing::oneofs::MoreData >(Arena* arena) {
  2128. return Arena::CreateInternal< ::google::protobuf::testing::oneofs::MoreData >(arena);
  2129. }
  2130. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::oneofs::Response* Arena::CreateMaybeMessage< ::google::protobuf::testing::oneofs::Response >(Arena* arena) {
  2131. return Arena::CreateInternal< ::google::protobuf::testing::oneofs::Response >(arena);
  2132. }
  2133. } // namespace protobuf
  2134. } // namespace google
  2135. // @@protoc_insertion_point(global_scope)