| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/protobuf/util/internal/testdata/oneofs.proto
- #include <google/protobuf/util/internal/testdata/oneofs.pb.h>
- #include <algorithm>
- #include <google/protobuf/stubs/common.h>
- #include <google/protobuf/stubs/port.h>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/wire_format_lite_inl.h>
- #include <google/protobuf/descriptor.h>
- #include <google/protobuf/generated_message_reflection.h>
- #include <google/protobuf/reflection_ops.h>
- #include <google/protobuf/wire_format.h>
- // This is a temporary google only hack
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- #include "third_party/protobuf/version.h"
- #endif
- // @@protoc_insertion_point(includes)
- namespace protobuf_google_2fprotobuf_2fany_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fany_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Any;
- } // namespace protobuf_google_2fprotobuf_2fany_2eproto
- namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue;
- } // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
- namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2ftimestamp_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp;
- } // namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto
- namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Data;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MoreData;
- } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto
- namespace google {
- namespace protobuf {
- namespace testing {
- namespace oneofs {
- class OneOfsRequestDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<OneOfsRequest>
- _instance;
- ::google::protobuf::internal::ArenaStringPtr str_data_;
- ::google::protobuf::int32 int_data_;
- const ::google::protobuf::testing::oneofs::Data* message_data_;
- const ::google::protobuf::testing::oneofs::MoreData* more_data_;
- const ::google::protobuf::Struct* struct_data_;
- const ::google::protobuf::Value* value_data_;
- const ::google::protobuf::ListValue* list_value_data_;
- const ::google::protobuf::Timestamp* ts_data_;
- } _OneOfsRequest_default_instance_;
- class RequestWithSimpleOneofDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<RequestWithSimpleOneof>
- _instance;
- ::google::protobuf::internal::ArenaStringPtr str_data_;
- ::google::protobuf::int32 int_data_;
- const ::google::protobuf::testing::oneofs::Data* message_data_;
- const ::google::protobuf::testing::oneofs::MoreData* more_data_;
- } _RequestWithSimpleOneof_default_instance_;
- class DataDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Data>
- _instance;
- } _Data_default_instance_;
- class MoreDataDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<MoreData>
- _instance;
- } _MoreData_default_instance_;
- class ResponseDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Response>
- _instance;
- } _Response_default_instance_;
- } // namespace oneofs
- } // namespace testing
- } // namespace protobuf
- } // namespace google
- namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto {
- static void InitDefaultsOneOfsRequest() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_;
- new (ptr) ::google::protobuf::testing::oneofs::OneOfsRequest();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::oneofs::OneOfsRequest::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<5> scc_info_OneOfsRequest =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 5, InitDefaultsOneOfsRequest}, {
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Data.base,
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_MoreData.base,
- &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,
- &protobuf_google_2fprotobuf_2ftimestamp_2eproto::scc_info_Timestamp.base,
- &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};
- static void InitDefaultsRequestWithSimpleOneof() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_;
- new (ptr) ::google::protobuf::testing::oneofs::RequestWithSimpleOneof();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::oneofs::RequestWithSimpleOneof::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<2> scc_info_RequestWithSimpleOneof =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsRequestWithSimpleOneof}, {
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Data.base,
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_MoreData.base,}};
- static void InitDefaultsData() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::oneofs::_Data_default_instance_;
- new (ptr) ::google::protobuf::testing::oneofs::Data();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::oneofs::Data::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_Data =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsData}, {}};
- static void InitDefaultsMoreData() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::oneofs::_MoreData_default_instance_;
- new (ptr) ::google::protobuf::testing::oneofs::MoreData();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::oneofs::MoreData::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_MoreData =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMoreData}, {}};
- static void InitDefaultsResponse() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::oneofs::_Response_default_instance_;
- new (ptr) ::google::protobuf::testing::oneofs::Response();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::oneofs::Response::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_Response =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsResponse}, {}};
- void InitDefaults() {
- ::google::protobuf::internal::InitSCC(&scc_info_OneOfsRequest.base);
- ::google::protobuf::internal::InitSCC(&scc_info_RequestWithSimpleOneof.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Data.base);
- ::google::protobuf::internal::InitSCC(&scc_info_MoreData.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Response.base);
- }
- ::google::protobuf::Metadata file_level_metadata[5];
- const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::OneOfsRequest, _internal_metadata_),
- ~0u, // no _extensions_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::OneOfsRequest, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::OneOfsRequest, value_),
- offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, str_data_),
- offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, int_data_),
- offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, message_data_),
- offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, more_data_),
- offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, struct_data_),
- offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, value_data_),
- offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, list_value_data_),
- offsetof(::google::protobuf::testing::oneofs::OneOfsRequestDefaultTypeInternal, ts_data_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::OneOfsRequest, any_data_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::OneOfsRequest, data_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::RequestWithSimpleOneof, _internal_metadata_),
- ~0u, // no _extensions_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::RequestWithSimpleOneof, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::RequestWithSimpleOneof, value_),
- offsetof(::google::protobuf::testing::oneofs::RequestWithSimpleOneofDefaultTypeInternal, str_data_),
- offsetof(::google::protobuf::testing::oneofs::RequestWithSimpleOneofDefaultTypeInternal, int_data_),
- offsetof(::google::protobuf::testing::oneofs::RequestWithSimpleOneofDefaultTypeInternal, message_data_),
- offsetof(::google::protobuf::testing::oneofs::RequestWithSimpleOneofDefaultTypeInternal, more_data_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::RequestWithSimpleOneof, data_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::Data, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::Data, data_value_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::MoreData, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::MoreData, str_value_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::Response, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::oneofs::Response, value_),
- };
- static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::google::protobuf::testing::oneofs::OneOfsRequest)},
- { 16, -1, sizeof(::google::protobuf::testing::oneofs::RequestWithSimpleOneof)},
- { 27, -1, sizeof(::google::protobuf::testing::oneofs::Data)},
- { 33, -1, sizeof(::google::protobuf::testing::oneofs::MoreData)},
- { 39, -1, sizeof(::google::protobuf::testing::oneofs::Response)},
- };
- static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::oneofs::_Data_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::oneofs::_MoreData_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::oneofs::_Response_default_instance_),
- };
- void protobuf_AssignDescriptors() {
- AddDescriptors();
- AssignDescriptors(
- "google/protobuf/util/internal/testdata/oneofs.proto", schemas, file_default_instances, TableStruct::offsets,
- file_level_metadata, NULL, NULL);
- }
- void protobuf_AssignDescriptorsOnce() {
- static ::google::protobuf::internal::once_flag once;
- ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
- }
- void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
- void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5);
- }
- void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n3google/protobuf/util/internal/testdata"
- "/oneofs.proto\022\036google.protobuf.testing.o"
- "neofs\032\031google/protobuf/any.proto\032\034google"
- "/protobuf/struct.proto\032\037google/protobuf/"
- "timestamp.proto\"\267\003\n\rOneOfsRequest\022\r\n\005val"
- "ue\030\001 \001(\t\022\022\n\010str_data\030\002 \001(\tH\000\022\022\n\010int_data"
- "\030\003 \001(\005H\000\022<\n\014message_data\030\004 \001(\0132$.google."
- "protobuf.testing.oneofs.DataH\000\022=\n\tmore_d"
- "ata\030\005 \001(\0132(.google.protobuf.testing.oneo"
- "fs.MoreDataH\000\022.\n\013struct_data\030\006 \001(\0132\027.goo"
- "gle.protobuf.StructH\000\022,\n\nvalue_data\030\007 \001("
- "\0132\026.google.protobuf.ValueH\000\0225\n\017list_valu"
- "e_data\030\010 \001(\0132\032.google.protobuf.ListValue"
- "H\000\022-\n\007ts_data\030\t \001(\0132\032.google.protobuf.Ti"
- "mestampH\000\022&\n\010any_data\030\023 \001(\0132\024.google.pro"
- "tobuf.AnyB\006\n\004data\"\324\001\n\026RequestWithSimpleO"
- "neof\022\r\n\005value\030\001 \001(\t\022\022\n\010str_data\030\002 \001(\tH\000\022"
- "\022\n\010int_data\030\003 \001(\005H\000\022<\n\014message_data\030\004 \001("
- "\0132$.google.protobuf.testing.oneofs.DataH"
- "\000\022=\n\tmore_data\030\005 \001(\0132(.google.protobuf.t"
- "esting.oneofs.MoreDataH\000B\006\n\004data\"\032\n\004Data"
- "\022\022\n\ndata_value\030\001 \001(\005\"\035\n\010MoreData\022\021\n\tstr_"
- "value\030\001 \001(\t\"\031\n\010Response\022\r\n\005value\030\001 \001(\tb\006"
- "proto3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 926);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/util/internal/testdata/oneofs.proto", &protobuf_RegisterTypes);
- ::protobuf_google_2fprotobuf_2fany_2eproto::AddDescriptors();
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::AddDescriptors();
- ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
- }
- void AddDescriptors() {
- static ::google::protobuf::internal::once_flag once;
- ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
- }
- // Force AddDescriptors() to be called at dynamic initialization time.
- struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
- } static_descriptor_initializer;
- } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto
- namespace google {
- namespace protobuf {
- namespace testing {
- namespace oneofs {
- // ===================================================================
- void OneOfsRequest::InitAsDefaultInstance() {
- ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.str_data_.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.int_data_ = 0;
- ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.message_data_ = const_cast< ::google::protobuf::testing::oneofs::Data*>(
- ::google::protobuf::testing::oneofs::Data::internal_default_instance());
- ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.more_data_ = const_cast< ::google::protobuf::testing::oneofs::MoreData*>(
- ::google::protobuf::testing::oneofs::MoreData::internal_default_instance());
- ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.struct_data_ = const_cast< ::google::protobuf::Struct*>(
- ::google::protobuf::Struct::internal_default_instance());
- ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.value_data_ = const_cast< ::google::protobuf::Value*>(
- ::google::protobuf::Value::internal_default_instance());
- ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.list_value_data_ = const_cast< ::google::protobuf::ListValue*>(
- ::google::protobuf::ListValue::internal_default_instance());
- ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_.ts_data_ = const_cast< ::google::protobuf::Timestamp*>(
- ::google::protobuf::Timestamp::internal_default_instance());
- ::google::protobuf::testing::oneofs::_OneOfsRequest_default_instance_._instance.get_mutable()->any_data_ = const_cast< ::google::protobuf::Any*>(
- ::google::protobuf::Any::internal_default_instance());
- }
- void OneOfsRequest::set_allocated_message_data(::google::protobuf::testing::oneofs::Data* message_data) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_data();
- if (message_data) {
- ::google::protobuf::Arena* submessage_arena = NULL;
- if (message_arena != submessage_arena) {
- message_data = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, message_data, submessage_arena);
- }
- set_has_message_data();
- data_.message_data_ = message_data;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.message_data)
- }
- void OneOfsRequest::set_allocated_more_data(::google::protobuf::testing::oneofs::MoreData* more_data) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_data();
- if (more_data) {
- ::google::protobuf::Arena* submessage_arena = NULL;
- if (message_arena != submessage_arena) {
- more_data = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, more_data, submessage_arena);
- }
- set_has_more_data();
- data_.more_data_ = more_data;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.more_data)
- }
- void OneOfsRequest::set_allocated_struct_data(::google::protobuf::Struct* struct_data) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_data();
- if (struct_data) {
- ::google::protobuf::Arena* submessage_arena =
- reinterpret_cast<::google::protobuf::MessageLite*>(struct_data)->GetArena();
- if (message_arena != submessage_arena) {
- struct_data = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, struct_data, submessage_arena);
- }
- set_has_struct_data();
- data_.struct_data_ = struct_data;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.struct_data)
- }
- void OneOfsRequest::clear_struct_data() {
- if (has_struct_data()) {
- delete data_.struct_data_;
- clear_has_data();
- }
- }
- void OneOfsRequest::set_allocated_value_data(::google::protobuf::Value* value_data) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_data();
- if (value_data) {
- ::google::protobuf::Arena* submessage_arena =
- reinterpret_cast<::google::protobuf::MessageLite*>(value_data)->GetArena();
- if (message_arena != submessage_arena) {
- value_data = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, value_data, submessage_arena);
- }
- set_has_value_data();
- data_.value_data_ = value_data;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.value_data)
- }
- void OneOfsRequest::clear_value_data() {
- if (has_value_data()) {
- delete data_.value_data_;
- clear_has_data();
- }
- }
- void OneOfsRequest::set_allocated_list_value_data(::google::protobuf::ListValue* list_value_data) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_data();
- if (list_value_data) {
- ::google::protobuf::Arena* submessage_arena =
- reinterpret_cast<::google::protobuf::MessageLite*>(list_value_data)->GetArena();
- if (message_arena != submessage_arena) {
- list_value_data = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, list_value_data, submessage_arena);
- }
- set_has_list_value_data();
- data_.list_value_data_ = list_value_data;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.list_value_data)
- }
- void OneOfsRequest::clear_list_value_data() {
- if (has_list_value_data()) {
- delete data_.list_value_data_;
- clear_has_data();
- }
- }
- void OneOfsRequest::set_allocated_ts_data(::google::protobuf::Timestamp* ts_data) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_data();
- if (ts_data) {
- ::google::protobuf::Arena* submessage_arena =
- reinterpret_cast<::google::protobuf::MessageLite*>(ts_data)->GetArena();
- if (message_arena != submessage_arena) {
- ts_data = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, ts_data, submessage_arena);
- }
- set_has_ts_data();
- data_.ts_data_ = ts_data;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.ts_data)
- }
- void OneOfsRequest::clear_ts_data() {
- if (has_ts_data()) {
- delete data_.ts_data_;
- clear_has_data();
- }
- }
- void OneOfsRequest::clear_any_data() {
- if (GetArenaNoVirtual() == NULL && any_data_ != NULL) {
- delete any_data_;
- }
- any_data_ = NULL;
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int OneOfsRequest::kValueFieldNumber;
- const int OneOfsRequest::kStrDataFieldNumber;
- const int OneOfsRequest::kIntDataFieldNumber;
- const int OneOfsRequest::kMessageDataFieldNumber;
- const int OneOfsRequest::kMoreDataFieldNumber;
- const int OneOfsRequest::kStructDataFieldNumber;
- const int OneOfsRequest::kValueDataFieldNumber;
- const int OneOfsRequest::kListValueDataFieldNumber;
- const int OneOfsRequest::kTsDataFieldNumber;
- const int OneOfsRequest::kAnyDataFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- OneOfsRequest::OneOfsRequest()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_OneOfsRequest.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.oneofs.OneOfsRequest)
- }
- OneOfsRequest::OneOfsRequest(const OneOfsRequest& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.value().size() > 0) {
- value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
- }
- if (from.has_any_data()) {
- any_data_ = new ::google::protobuf::Any(*from.any_data_);
- } else {
- any_data_ = NULL;
- }
- clear_has_data();
- switch (from.data_case()) {
- case kStrData: {
- set_str_data(from.str_data());
- break;
- }
- case kIntData: {
- set_int_data(from.int_data());
- break;
- }
- case kMessageData: {
- mutable_message_data()->::google::protobuf::testing::oneofs::Data::MergeFrom(from.message_data());
- break;
- }
- case kMoreData: {
- mutable_more_data()->::google::protobuf::testing::oneofs::MoreData::MergeFrom(from.more_data());
- break;
- }
- case kStructData: {
- mutable_struct_data()->::google::protobuf::Struct::MergeFrom(from.struct_data());
- break;
- }
- case kValueData: {
- mutable_value_data()->::google::protobuf::Value::MergeFrom(from.value_data());
- break;
- }
- case kListValueData: {
- mutable_list_value_data()->::google::protobuf::ListValue::MergeFrom(from.list_value_data());
- break;
- }
- case kTsData: {
- mutable_ts_data()->::google::protobuf::Timestamp::MergeFrom(from.ts_data());
- break;
- }
- case DATA_NOT_SET: {
- break;
- }
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.oneofs.OneOfsRequest)
- }
- void OneOfsRequest::SharedCtor() {
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- any_data_ = NULL;
- clear_has_data();
- }
- OneOfsRequest::~OneOfsRequest() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.oneofs.OneOfsRequest)
- SharedDtor();
- }
- void OneOfsRequest::SharedDtor() {
- value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete any_data_;
- if (has_data()) {
- clear_data();
- }
- }
- void OneOfsRequest::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* OneOfsRequest::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const OneOfsRequest& OneOfsRequest::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_OneOfsRequest.base);
- return *internal_default_instance();
- }
- void OneOfsRequest::clear_data() {
- // @@protoc_insertion_point(one_of_clear_start:google.protobuf.testing.oneofs.OneOfsRequest)
- switch (data_case()) {
- case kStrData: {
- data_.str_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- break;
- }
- case kIntData: {
- // No need to clear
- break;
- }
- case kMessageData: {
- delete data_.message_data_;
- break;
- }
- case kMoreData: {
- delete data_.more_data_;
- break;
- }
- case kStructData: {
- delete data_.struct_data_;
- break;
- }
- case kValueData: {
- delete data_.value_data_;
- break;
- }
- case kListValueData: {
- delete data_.list_value_data_;
- break;
- }
- case kTsData: {
- delete data_.ts_data_;
- break;
- }
- case DATA_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = DATA_NOT_SET;
- }
- void OneOfsRequest::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.oneofs.OneOfsRequest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (GetArenaNoVirtual() == NULL && any_data_ != NULL) {
- delete any_data_;
- }
- any_data_ = NULL;
- clear_data();
- _internal_metadata_.Clear();
- }
- bool OneOfsRequest::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.oneofs.OneOfsRequest)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_value()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.oneofs.OneOfsRequest.value"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string str_data = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_str_data()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str_data().data(), static_cast<int>(this->str_data().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.oneofs.OneOfsRequest.str_data"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // int32 int_data = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
- clear_data();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &data_.int_data_)));
- set_has_int_data();
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.oneofs.Data message_data = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_message_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.oneofs.MoreData more_data = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_more_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Struct struct_data = 6;
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_struct_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Value value_data = 7;
- case 7: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_value_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.ListValue list_value_data = 8;
- case 8: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_list_value_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Timestamp ts_data = 9;
- case 9: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_ts_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Any any_data = 19;
- case 19: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.oneofs.OneOfsRequest)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.oneofs.OneOfsRequest)
- return false;
- #undef DO_
- }
- void OneOfsRequest::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.oneofs.OneOfsRequest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string value = 1;
- if (this->value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.OneOfsRequest.value");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->value(), output);
- }
- // string str_data = 2;
- if (has_str_data()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str_data().data(), static_cast<int>(this->str_data().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.OneOfsRequest.str_data");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->str_data(), output);
- }
- // int32 int_data = 3;
- if (has_int_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->int_data(), output);
- }
- // .google.protobuf.testing.oneofs.Data message_data = 4;
- if (has_message_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, this->_internal_message_data(), output);
- }
- // .google.protobuf.testing.oneofs.MoreData more_data = 5;
- if (has_more_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, this->_internal_more_data(), output);
- }
- // .google.protobuf.Struct struct_data = 6;
- if (has_struct_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 6, this->_internal_struct_data(), output);
- }
- // .google.protobuf.Value value_data = 7;
- if (has_value_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 7, this->_internal_value_data(), output);
- }
- // .google.protobuf.ListValue list_value_data = 8;
- if (has_list_value_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 8, this->_internal_list_value_data(), output);
- }
- // .google.protobuf.Timestamp ts_data = 9;
- if (has_ts_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 9, this->_internal_ts_data(), output);
- }
- // .google.protobuf.Any any_data = 19;
- if (this->has_any_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 19, this->_internal_any_data(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.oneofs.OneOfsRequest)
- }
- ::google::protobuf::uint8* OneOfsRequest::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.oneofs.OneOfsRequest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string value = 1;
- if (this->value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.OneOfsRequest.value");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->value(), target);
- }
- // string str_data = 2;
- if (has_str_data()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str_data().data(), static_cast<int>(this->str_data().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.OneOfsRequest.str_data");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->str_data(), target);
- }
- // int32 int_data = 3;
- if (has_int_data()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->int_data(), target);
- }
- // .google.protobuf.testing.oneofs.Data message_data = 4;
- if (has_message_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 4, this->_internal_message_data(), deterministic, target);
- }
- // .google.protobuf.testing.oneofs.MoreData more_data = 5;
- if (has_more_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 5, this->_internal_more_data(), deterministic, target);
- }
- // .google.protobuf.Struct struct_data = 6;
- if (has_struct_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 6, this->_internal_struct_data(), deterministic, target);
- }
- // .google.protobuf.Value value_data = 7;
- if (has_value_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 7, this->_internal_value_data(), deterministic, target);
- }
- // .google.protobuf.ListValue list_value_data = 8;
- if (has_list_value_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 8, this->_internal_list_value_data(), deterministic, target);
- }
- // .google.protobuf.Timestamp ts_data = 9;
- if (has_ts_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 9, this->_internal_ts_data(), deterministic, target);
- }
- // .google.protobuf.Any any_data = 19;
- if (this->has_any_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 19, this->_internal_any_data(), deterministic, target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.oneofs.OneOfsRequest)
- return target;
- }
- size_t OneOfsRequest::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.oneofs.OneOfsRequest)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // string value = 1;
- if (this->value().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->value());
- }
- // .google.protobuf.Any any_data = 19;
- if (this->has_any_data()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_data_);
- }
- switch (data_case()) {
- // string str_data = 2;
- case kStrData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->str_data());
- break;
- }
- // int32 int_data = 3;
- case kIntData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->int_data());
- break;
- }
- // .google.protobuf.testing.oneofs.Data message_data = 4;
- case kMessageData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *data_.message_data_);
- break;
- }
- // .google.protobuf.testing.oneofs.MoreData more_data = 5;
- case kMoreData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *data_.more_data_);
- break;
- }
- // .google.protobuf.Struct struct_data = 6;
- case kStructData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *data_.struct_data_);
- break;
- }
- // .google.protobuf.Value value_data = 7;
- case kValueData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *data_.value_data_);
- break;
- }
- // .google.protobuf.ListValue list_value_data = 8;
- case kListValueData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *data_.list_value_data_);
- break;
- }
- // .google.protobuf.Timestamp ts_data = 9;
- case kTsData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *data_.ts_data_);
- break;
- }
- case DATA_NOT_SET: {
- break;
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void OneOfsRequest::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.oneofs.OneOfsRequest)
- GOOGLE_DCHECK_NE(&from, this);
- const OneOfsRequest* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const OneOfsRequest>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.oneofs.OneOfsRequest)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.oneofs.OneOfsRequest)
- MergeFrom(*source);
- }
- }
- void OneOfsRequest::MergeFrom(const OneOfsRequest& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.oneofs.OneOfsRequest)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.value().size() > 0) {
- value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
- }
- if (from.has_any_data()) {
- mutable_any_data()->::google::protobuf::Any::MergeFrom(from.any_data());
- }
- switch (from.data_case()) {
- case kStrData: {
- set_str_data(from.str_data());
- break;
- }
- case kIntData: {
- set_int_data(from.int_data());
- break;
- }
- case kMessageData: {
- mutable_message_data()->::google::protobuf::testing::oneofs::Data::MergeFrom(from.message_data());
- break;
- }
- case kMoreData: {
- mutable_more_data()->::google::protobuf::testing::oneofs::MoreData::MergeFrom(from.more_data());
- break;
- }
- case kStructData: {
- mutable_struct_data()->::google::protobuf::Struct::MergeFrom(from.struct_data());
- break;
- }
- case kValueData: {
- mutable_value_data()->::google::protobuf::Value::MergeFrom(from.value_data());
- break;
- }
- case kListValueData: {
- mutable_list_value_data()->::google::protobuf::ListValue::MergeFrom(from.list_value_data());
- break;
- }
- case kTsData: {
- mutable_ts_data()->::google::protobuf::Timestamp::MergeFrom(from.ts_data());
- break;
- }
- case DATA_NOT_SET: {
- break;
- }
- }
- }
- void OneOfsRequest::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.oneofs.OneOfsRequest)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void OneOfsRequest::CopyFrom(const OneOfsRequest& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.oneofs.OneOfsRequest)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool OneOfsRequest::IsInitialized() const {
- return true;
- }
- void OneOfsRequest::Swap(OneOfsRequest* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void OneOfsRequest::InternalSwap(OneOfsRequest* other) {
- using std::swap;
- value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(any_data_, other->any_data_);
- swap(data_, other->data_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata OneOfsRequest::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void RequestWithSimpleOneof::InitAsDefaultInstance() {
- ::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_.str_data_.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_.int_data_ = 0;
- ::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_.message_data_ = const_cast< ::google::protobuf::testing::oneofs::Data*>(
- ::google::protobuf::testing::oneofs::Data::internal_default_instance());
- ::google::protobuf::testing::oneofs::_RequestWithSimpleOneof_default_instance_.more_data_ = const_cast< ::google::protobuf::testing::oneofs::MoreData*>(
- ::google::protobuf::testing::oneofs::MoreData::internal_default_instance());
- }
- void RequestWithSimpleOneof::set_allocated_message_data(::google::protobuf::testing::oneofs::Data* message_data) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_data();
- if (message_data) {
- ::google::protobuf::Arena* submessage_arena = NULL;
- if (message_arena != submessage_arena) {
- message_data = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, message_data, submessage_arena);
- }
- set_has_message_data();
- data_.message_data_ = message_data;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.RequestWithSimpleOneof.message_data)
- }
- void RequestWithSimpleOneof::set_allocated_more_data(::google::protobuf::testing::oneofs::MoreData* more_data) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_data();
- if (more_data) {
- ::google::protobuf::Arena* submessage_arena = NULL;
- if (message_arena != submessage_arena) {
- more_data = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, more_data, submessage_arena);
- }
- set_has_more_data();
- data_.more_data_ = more_data;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.RequestWithSimpleOneof.more_data)
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int RequestWithSimpleOneof::kValueFieldNumber;
- const int RequestWithSimpleOneof::kStrDataFieldNumber;
- const int RequestWithSimpleOneof::kIntDataFieldNumber;
- const int RequestWithSimpleOneof::kMessageDataFieldNumber;
- const int RequestWithSimpleOneof::kMoreDataFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- RequestWithSimpleOneof::RequestWithSimpleOneof()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_RequestWithSimpleOneof.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- }
- RequestWithSimpleOneof::RequestWithSimpleOneof(const RequestWithSimpleOneof& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.value().size() > 0) {
- value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
- }
- clear_has_data();
- switch (from.data_case()) {
- case kStrData: {
- set_str_data(from.str_data());
- break;
- }
- case kIntData: {
- set_int_data(from.int_data());
- break;
- }
- case kMessageData: {
- mutable_message_data()->::google::protobuf::testing::oneofs::Data::MergeFrom(from.message_data());
- break;
- }
- case kMoreData: {
- mutable_more_data()->::google::protobuf::testing::oneofs::MoreData::MergeFrom(from.more_data());
- break;
- }
- case DATA_NOT_SET: {
- break;
- }
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- }
- void RequestWithSimpleOneof::SharedCtor() {
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_data();
- }
- RequestWithSimpleOneof::~RequestWithSimpleOneof() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- SharedDtor();
- }
- void RequestWithSimpleOneof::SharedDtor() {
- value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (has_data()) {
- clear_data();
- }
- }
- void RequestWithSimpleOneof::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* RequestWithSimpleOneof::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const RequestWithSimpleOneof& RequestWithSimpleOneof::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_RequestWithSimpleOneof.base);
- return *internal_default_instance();
- }
- void RequestWithSimpleOneof::clear_data() {
- // @@protoc_insertion_point(one_of_clear_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- switch (data_case()) {
- case kStrData: {
- data_.str_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- break;
- }
- case kIntData: {
- // No need to clear
- break;
- }
- case kMessageData: {
- delete data_.message_data_;
- break;
- }
- case kMoreData: {
- delete data_.more_data_;
- break;
- }
- case DATA_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = DATA_NOT_SET;
- }
- void RequestWithSimpleOneof::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_data();
- _internal_metadata_.Clear();
- }
- bool RequestWithSimpleOneof::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_value()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.oneofs.RequestWithSimpleOneof.value"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string str_data = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_str_data()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str_data().data(), static_cast<int>(this->str_data().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // int32 int_data = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
- clear_data();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &data_.int_data_)));
- set_has_int_data();
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.oneofs.Data message_data = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_message_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.oneofs.MoreData more_data = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_more_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- return false;
- #undef DO_
- }
- void RequestWithSimpleOneof::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string value = 1;
- if (this->value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.RequestWithSimpleOneof.value");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->value(), output);
- }
- // string str_data = 2;
- if (has_str_data()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str_data().data(), static_cast<int>(this->str_data().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->str_data(), output);
- }
- // int32 int_data = 3;
- if (has_int_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->int_data(), output);
- }
- // .google.protobuf.testing.oneofs.Data message_data = 4;
- if (has_message_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, this->_internal_message_data(), output);
- }
- // .google.protobuf.testing.oneofs.MoreData more_data = 5;
- if (has_more_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, this->_internal_more_data(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- }
- ::google::protobuf::uint8* RequestWithSimpleOneof::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string value = 1;
- if (this->value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.RequestWithSimpleOneof.value");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->value(), target);
- }
- // string str_data = 2;
- if (has_str_data()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str_data().data(), static_cast<int>(this->str_data().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->str_data(), target);
- }
- // int32 int_data = 3;
- if (has_int_data()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->int_data(), target);
- }
- // .google.protobuf.testing.oneofs.Data message_data = 4;
- if (has_message_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 4, this->_internal_message_data(), deterministic, target);
- }
- // .google.protobuf.testing.oneofs.MoreData more_data = 5;
- if (has_more_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 5, this->_internal_more_data(), deterministic, target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- return target;
- }
- size_t RequestWithSimpleOneof::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // string value = 1;
- if (this->value().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->value());
- }
- switch (data_case()) {
- // string str_data = 2;
- case kStrData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->str_data());
- break;
- }
- // int32 int_data = 3;
- case kIntData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->int_data());
- break;
- }
- // .google.protobuf.testing.oneofs.Data message_data = 4;
- case kMessageData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *data_.message_data_);
- break;
- }
- // .google.protobuf.testing.oneofs.MoreData more_data = 5;
- case kMoreData: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *data_.more_data_);
- break;
- }
- case DATA_NOT_SET: {
- break;
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void RequestWithSimpleOneof::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- GOOGLE_DCHECK_NE(&from, this);
- const RequestWithSimpleOneof* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const RequestWithSimpleOneof>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- MergeFrom(*source);
- }
- }
- void RequestWithSimpleOneof::MergeFrom(const RequestWithSimpleOneof& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.value().size() > 0) {
- value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
- }
- switch (from.data_case()) {
- case kStrData: {
- set_str_data(from.str_data());
- break;
- }
- case kIntData: {
- set_int_data(from.int_data());
- break;
- }
- case kMessageData: {
- mutable_message_data()->::google::protobuf::testing::oneofs::Data::MergeFrom(from.message_data());
- break;
- }
- case kMoreData: {
- mutable_more_data()->::google::protobuf::testing::oneofs::MoreData::MergeFrom(from.more_data());
- break;
- }
- case DATA_NOT_SET: {
- break;
- }
- }
- }
- void RequestWithSimpleOneof::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void RequestWithSimpleOneof::CopyFrom(const RequestWithSimpleOneof& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.oneofs.RequestWithSimpleOneof)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool RequestWithSimpleOneof::IsInitialized() const {
- return true;
- }
- void RequestWithSimpleOneof::Swap(RequestWithSimpleOneof* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void RequestWithSimpleOneof::InternalSwap(RequestWithSimpleOneof* other) {
- using std::swap;
- value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(data_, other->data_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata RequestWithSimpleOneof::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void Data::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int Data::kDataValueFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- Data::Data()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Data.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.oneofs.Data)
- }
- Data::Data(const Data& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- data_value_ = from.data_value_;
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.oneofs.Data)
- }
- void Data::SharedCtor() {
- data_value_ = 0;
- }
- Data::~Data() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.oneofs.Data)
- SharedDtor();
- }
- void Data::SharedDtor() {
- }
- void Data::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* Data::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const Data& Data::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Data.base);
- return *internal_default_instance();
- }
- void Data::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.oneofs.Data)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- data_value_ = 0;
- _internal_metadata_.Clear();
- }
- bool Data::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.oneofs.Data)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // int32 data_value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &data_value_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.oneofs.Data)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.oneofs.Data)
- return false;
- #undef DO_
- }
- void Data::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.oneofs.Data)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 data_value = 1;
- if (this->data_value() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->data_value(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.oneofs.Data)
- }
- ::google::protobuf::uint8* Data::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.oneofs.Data)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 data_value = 1;
- if (this->data_value() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->data_value(), target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.oneofs.Data)
- return target;
- }
- size_t Data::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.oneofs.Data)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // int32 data_value = 1;
- if (this->data_value() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->data_value());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void Data::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.oneofs.Data)
- GOOGLE_DCHECK_NE(&from, this);
- const Data* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Data>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.oneofs.Data)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.oneofs.Data)
- MergeFrom(*source);
- }
- }
- void Data::MergeFrom(const Data& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.oneofs.Data)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.data_value() != 0) {
- set_data_value(from.data_value());
- }
- }
- void Data::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.oneofs.Data)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void Data::CopyFrom(const Data& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.oneofs.Data)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool Data::IsInitialized() const {
- return true;
- }
- void Data::Swap(Data* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void Data::InternalSwap(Data* other) {
- using std::swap;
- swap(data_value_, other->data_value_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata Data::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void MoreData::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int MoreData::kStrValueFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- MoreData::MoreData()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_MoreData.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.oneofs.MoreData)
- }
- MoreData::MoreData(const MoreData& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- str_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.str_value().size() > 0) {
- str_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_value_);
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.oneofs.MoreData)
- }
- void MoreData::SharedCtor() {
- str_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- MoreData::~MoreData() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.oneofs.MoreData)
- SharedDtor();
- }
- void MoreData::SharedDtor() {
- str_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- void MoreData::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* MoreData::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const MoreData& MoreData::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_MoreData.base);
- return *internal_default_instance();
- }
- void MoreData::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.oneofs.MoreData)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- str_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _internal_metadata_.Clear();
- }
- bool MoreData::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.oneofs.MoreData)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string str_value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_str_value()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str_value().data(), static_cast<int>(this->str_value().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.oneofs.MoreData.str_value"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.oneofs.MoreData)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.oneofs.MoreData)
- return false;
- #undef DO_
- }
- void MoreData::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.oneofs.MoreData)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string str_value = 1;
- if (this->str_value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str_value().data(), static_cast<int>(this->str_value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.MoreData.str_value");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->str_value(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.oneofs.MoreData)
- }
- ::google::protobuf::uint8* MoreData::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.oneofs.MoreData)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string str_value = 1;
- if (this->str_value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str_value().data(), static_cast<int>(this->str_value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.MoreData.str_value");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->str_value(), target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.oneofs.MoreData)
- return target;
- }
- size_t MoreData::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.oneofs.MoreData)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // string str_value = 1;
- if (this->str_value().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->str_value());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void MoreData::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.oneofs.MoreData)
- GOOGLE_DCHECK_NE(&from, this);
- const MoreData* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const MoreData>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.oneofs.MoreData)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.oneofs.MoreData)
- MergeFrom(*source);
- }
- }
- void MoreData::MergeFrom(const MoreData& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.oneofs.MoreData)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.str_value().size() > 0) {
- str_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_value_);
- }
- }
- void MoreData::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.oneofs.MoreData)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void MoreData::CopyFrom(const MoreData& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.oneofs.MoreData)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool MoreData::IsInitialized() const {
- return true;
- }
- void MoreData::Swap(MoreData* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void MoreData::InternalSwap(MoreData* other) {
- using std::swap;
- str_value_.Swap(&other->str_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata MoreData::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void Response::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int Response::kValueFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- Response::Response()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Response.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.oneofs.Response)
- }
- Response::Response(const Response& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.value().size() > 0) {
- value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.oneofs.Response)
- }
- void Response::SharedCtor() {
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- Response::~Response() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.oneofs.Response)
- SharedDtor();
- }
- void Response::SharedDtor() {
- value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- void Response::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* Response::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const Response& Response::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::scc_info_Response.base);
- return *internal_default_instance();
- }
- void Response::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.oneofs.Response)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _internal_metadata_.Clear();
- }
- bool Response::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.oneofs.Response)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_value()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.oneofs.Response.value"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.oneofs.Response)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.oneofs.Response)
- return false;
- #undef DO_
- }
- void Response::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.oneofs.Response)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string value = 1;
- if (this->value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.Response.value");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->value(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.oneofs.Response)
- }
- ::google::protobuf::uint8* Response::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.oneofs.Response)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string value = 1;
- if (this->value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.oneofs.Response.value");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->value(), target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.oneofs.Response)
- return target;
- }
- size_t Response::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.oneofs.Response)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // string value = 1;
- if (this->value().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->value());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void Response::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.oneofs.Response)
- GOOGLE_DCHECK_NE(&from, this);
- const Response* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Response>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.oneofs.Response)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.oneofs.Response)
- MergeFrom(*source);
- }
- }
- void Response::MergeFrom(const Response& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.oneofs.Response)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.value().size() > 0) {
- value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
- }
- }
- void Response::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.oneofs.Response)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void Response::CopyFrom(const Response& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.oneofs.Response)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool Response::IsInitialized() const {
- return true;
- }
- void Response::Swap(Response* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void Response::InternalSwap(Response* other) {
- using std::swap;
- value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata Response::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace oneofs
- } // namespace testing
- } // namespace protobuf
- } // namespace google
- namespace google {
- namespace protobuf {
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::oneofs::OneOfsRequest* Arena::CreateMaybeMessage< ::google::protobuf::testing::oneofs::OneOfsRequest >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::oneofs::OneOfsRequest >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::oneofs::RequestWithSimpleOneof* Arena::CreateMaybeMessage< ::google::protobuf::testing::oneofs::RequestWithSimpleOneof >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::oneofs::RequestWithSimpleOneof >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::oneofs::Data* Arena::CreateMaybeMessage< ::google::protobuf::testing::oneofs::Data >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::oneofs::Data >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::oneofs::MoreData* Arena::CreateMaybeMessage< ::google::protobuf::testing::oneofs::MoreData >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::oneofs::MoreData >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::oneofs::Response* Arena::CreateMaybeMessage< ::google::protobuf::testing::oneofs::Response >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::oneofs::Response >(arena);
- }
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
|