// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/util/internal/testdata/oneofs.proto #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto #define PROTOBUF_INCLUDED_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto #include #include #if GOOGLE_PROTOBUF_VERSION < 3006001 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif #if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif #include #include #include #include #include #include #include #include #include // IWYU pragma: export #include // IWYU pragma: export #include #include #include #include // @@protoc_insertion_point(includes) #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto { // Internal implementation detail -- do not use these members. struct TableStruct { static const ::google::protobuf::internal::ParseTableField entries[]; static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[5]; static const ::google::protobuf::internal::FieldMetadata field_metadata[]; static const ::google::protobuf::internal::SerializationTable serialization_table[]; static const ::google::protobuf::uint32 offsets[]; }; void AddDescriptors(); } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto namespace google { namespace protobuf { namespace testing { namespace oneofs { class Data; class DataDefaultTypeInternal; extern DataDefaultTypeInternal _Data_default_instance_; class MoreData; class MoreDataDefaultTypeInternal; extern MoreDataDefaultTypeInternal _MoreData_default_instance_; class OneOfsRequest; class OneOfsRequestDefaultTypeInternal; extern OneOfsRequestDefaultTypeInternal _OneOfsRequest_default_instance_; class RequestWithSimpleOneof; class RequestWithSimpleOneofDefaultTypeInternal; extern RequestWithSimpleOneofDefaultTypeInternal _RequestWithSimpleOneof_default_instance_; class Response; class ResponseDefaultTypeInternal; extern ResponseDefaultTypeInternal _Response_default_instance_; } // namespace oneofs } // namespace testing } // namespace protobuf } // namespace google namespace google { namespace protobuf { template<> ::google::protobuf::testing::oneofs::Data* Arena::CreateMaybeMessage<::google::protobuf::testing::oneofs::Data>(Arena*); template<> ::google::protobuf::testing::oneofs::MoreData* Arena::CreateMaybeMessage<::google::protobuf::testing::oneofs::MoreData>(Arena*); template<> ::google::protobuf::testing::oneofs::OneOfsRequest* Arena::CreateMaybeMessage<::google::protobuf::testing::oneofs::OneOfsRequest>(Arena*); template<> ::google::protobuf::testing::oneofs::RequestWithSimpleOneof* Arena::CreateMaybeMessage<::google::protobuf::testing::oneofs::RequestWithSimpleOneof>(Arena*); template<> ::google::protobuf::testing::oneofs::Response* Arena::CreateMaybeMessage<::google::protobuf::testing::oneofs::Response>(Arena*); } // namespace protobuf } // namespace google namespace google { namespace protobuf { namespace testing { namespace oneofs { // =================================================================== class OneOfsRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.testing.oneofs.OneOfsRequest) */ { public: OneOfsRequest(); virtual ~OneOfsRequest(); OneOfsRequest(const OneOfsRequest& from); inline OneOfsRequest& operator=(const OneOfsRequest& from) { CopyFrom(from); return *this; } #if LANG_CXX11 OneOfsRequest(OneOfsRequest&& from) noexcept : OneOfsRequest() { *this = ::std::move(from); } inline OneOfsRequest& operator=(OneOfsRequest&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif static const ::google::protobuf::Descriptor* descriptor(); static const OneOfsRequest& default_instance(); enum DataCase { kStrData = 2, kIntData = 3, kMessageData = 4, kMoreData = 5, kStructData = 6, kValueData = 7, kListValueData = 8, kTsData = 9, DATA_NOT_SET = 0, }; static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const OneOfsRequest* internal_default_instance() { return reinterpret_cast( &_OneOfsRequest_default_instance_); } static constexpr int kIndexInFileMessages = 0; void Swap(OneOfsRequest* other); friend void swap(OneOfsRequest& a, OneOfsRequest& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline OneOfsRequest* New() const final { return CreateMaybeMessage(NULL); } OneOfsRequest* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const OneOfsRequest& from); void MergeFrom(const OneOfsRequest& from); void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(OneOfsRequest* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // string value = 1; void clear_value(); static const int kValueFieldNumber = 1; const ::std::string& value() const; void set_value(const ::std::string& value); #if LANG_CXX11 void set_value(::std::string&& value); #endif void set_value(const char* value); void set_value(const char* value, size_t size); ::std::string* mutable_value(); ::std::string* release_value(); void set_allocated_value(::std::string* value); // .google.protobuf.Any any_data = 19; bool has_any_data() const; void clear_any_data(); static const int kAnyDataFieldNumber = 19; private: const ::google::protobuf::Any& _internal_any_data() const; public: const ::google::protobuf::Any& any_data() const; ::google::protobuf::Any* release_any_data(); ::google::protobuf::Any* mutable_any_data(); void set_allocated_any_data(::google::protobuf::Any* any_data); // string str_data = 2; private: bool has_str_data() const; public: void clear_str_data(); static const int kStrDataFieldNumber = 2; const ::std::string& str_data() const; void set_str_data(const ::std::string& value); #if LANG_CXX11 void set_str_data(::std::string&& value); #endif void set_str_data(const char* value); void set_str_data(const char* value, size_t size); ::std::string* mutable_str_data(); ::std::string* release_str_data(); void set_allocated_str_data(::std::string* str_data); // int32 int_data = 3; private: bool has_int_data() const; public: void clear_int_data(); static const int kIntDataFieldNumber = 3; ::google::protobuf::int32 int_data() const; void set_int_data(::google::protobuf::int32 value); // .google.protobuf.testing.oneofs.Data message_data = 4; bool has_message_data() const; void clear_message_data(); static const int kMessageDataFieldNumber = 4; private: const ::google::protobuf::testing::oneofs::Data& _internal_message_data() const; public: const ::google::protobuf::testing::oneofs::Data& message_data() const; ::google::protobuf::testing::oneofs::Data* release_message_data(); ::google::protobuf::testing::oneofs::Data* mutable_message_data(); void set_allocated_message_data(::google::protobuf::testing::oneofs::Data* message_data); // .google.protobuf.testing.oneofs.MoreData more_data = 5; bool has_more_data() const; void clear_more_data(); static const int kMoreDataFieldNumber = 5; private: const ::google::protobuf::testing::oneofs::MoreData& _internal_more_data() const; public: const ::google::protobuf::testing::oneofs::MoreData& more_data() const; ::google::protobuf::testing::oneofs::MoreData* release_more_data(); ::google::protobuf::testing::oneofs::MoreData* mutable_more_data(); void set_allocated_more_data(::google::protobuf::testing::oneofs::MoreData* more_data); // .google.protobuf.Struct struct_data = 6; bool has_struct_data() const; void clear_struct_data(); static const int kStructDataFieldNumber = 6; private: const ::google::protobuf::Struct& _internal_struct_data() const; public: const ::google::protobuf::Struct& struct_data() const; ::google::protobuf::Struct* release_struct_data(); ::google::protobuf::Struct* mutable_struct_data(); void set_allocated_struct_data(::google::protobuf::Struct* struct_data); // .google.protobuf.Value value_data = 7; bool has_value_data() const; void clear_value_data(); static const int kValueDataFieldNumber = 7; private: const ::google::protobuf::Value& _internal_value_data() const; public: const ::google::protobuf::Value& value_data() const; ::google::protobuf::Value* release_value_data(); ::google::protobuf::Value* mutable_value_data(); void set_allocated_value_data(::google::protobuf::Value* value_data); // .google.protobuf.ListValue list_value_data = 8; bool has_list_value_data() const; void clear_list_value_data(); static const int kListValueDataFieldNumber = 8; private: const ::google::protobuf::ListValue& _internal_list_value_data() const; public: const ::google::protobuf::ListValue& list_value_data() const; ::google::protobuf::ListValue* release_list_value_data(); ::google::protobuf::ListValue* mutable_list_value_data(); void set_allocated_list_value_data(::google::protobuf::ListValue* list_value_data); // .google.protobuf.Timestamp ts_data = 9; bool has_ts_data() const; void clear_ts_data(); static const int kTsDataFieldNumber = 9; private: const ::google::protobuf::Timestamp& _internal_ts_data() const; public: const ::google::protobuf::Timestamp& ts_data() const; ::google::protobuf::Timestamp* release_ts_data(); ::google::protobuf::Timestamp* mutable_ts_data(); void set_allocated_ts_data(::google::protobuf::Timestamp* ts_data); void clear_data(); DataCase data_case() const; // @@protoc_insertion_point(class_scope:google.protobuf.testing.oneofs.OneOfsRequest) private: void set_has_str_data(); void set_has_int_data(); void set_has_message_data(); void set_has_more_data(); void set_has_struct_data(); void set_has_value_data(); void set_has_list_value_data(); void set_has_ts_data(); inline bool has_data() const; inline void clear_has_data(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr value_; ::google::protobuf::Any* any_data_; union DataUnion { DataUnion() {} ::google::protobuf::internal::ArenaStringPtr str_data_; ::google::protobuf::int32 int_data_; ::google::protobuf::testing::oneofs::Data* message_data_; ::google::protobuf::testing::oneofs::MoreData* more_data_; ::google::protobuf::Struct* struct_data_; ::google::protobuf::Value* value_data_; ::google::protobuf::ListValue* list_value_data_; ::google::protobuf::Timestamp* ts_data_; } data_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; friend struct ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::TableStruct; }; // ------------------------------------------------------------------- class RequestWithSimpleOneof : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.testing.oneofs.RequestWithSimpleOneof) */ { public: RequestWithSimpleOneof(); virtual ~RequestWithSimpleOneof(); RequestWithSimpleOneof(const RequestWithSimpleOneof& from); inline RequestWithSimpleOneof& operator=(const RequestWithSimpleOneof& from) { CopyFrom(from); return *this; } #if LANG_CXX11 RequestWithSimpleOneof(RequestWithSimpleOneof&& from) noexcept : RequestWithSimpleOneof() { *this = ::std::move(from); } inline RequestWithSimpleOneof& operator=(RequestWithSimpleOneof&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif static const ::google::protobuf::Descriptor* descriptor(); static const RequestWithSimpleOneof& default_instance(); enum DataCase { kStrData = 2, kIntData = 3, kMessageData = 4, kMoreData = 5, DATA_NOT_SET = 0, }; static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const RequestWithSimpleOneof* internal_default_instance() { return reinterpret_cast( &_RequestWithSimpleOneof_default_instance_); } static constexpr int kIndexInFileMessages = 1; void Swap(RequestWithSimpleOneof* other); friend void swap(RequestWithSimpleOneof& a, RequestWithSimpleOneof& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline RequestWithSimpleOneof* New() const final { return CreateMaybeMessage(NULL); } RequestWithSimpleOneof* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const RequestWithSimpleOneof& from); void MergeFrom(const RequestWithSimpleOneof& from); void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(RequestWithSimpleOneof* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // string value = 1; void clear_value(); static const int kValueFieldNumber = 1; const ::std::string& value() const; void set_value(const ::std::string& value); #if LANG_CXX11 void set_value(::std::string&& value); #endif void set_value(const char* value); void set_value(const char* value, size_t size); ::std::string* mutable_value(); ::std::string* release_value(); void set_allocated_value(::std::string* value); // string str_data = 2; private: bool has_str_data() const; public: void clear_str_data(); static const int kStrDataFieldNumber = 2; const ::std::string& str_data() const; void set_str_data(const ::std::string& value); #if LANG_CXX11 void set_str_data(::std::string&& value); #endif void set_str_data(const char* value); void set_str_data(const char* value, size_t size); ::std::string* mutable_str_data(); ::std::string* release_str_data(); void set_allocated_str_data(::std::string* str_data); // int32 int_data = 3; private: bool has_int_data() const; public: void clear_int_data(); static const int kIntDataFieldNumber = 3; ::google::protobuf::int32 int_data() const; void set_int_data(::google::protobuf::int32 value); // .google.protobuf.testing.oneofs.Data message_data = 4; bool has_message_data() const; void clear_message_data(); static const int kMessageDataFieldNumber = 4; private: const ::google::protobuf::testing::oneofs::Data& _internal_message_data() const; public: const ::google::protobuf::testing::oneofs::Data& message_data() const; ::google::protobuf::testing::oneofs::Data* release_message_data(); ::google::protobuf::testing::oneofs::Data* mutable_message_data(); void set_allocated_message_data(::google::protobuf::testing::oneofs::Data* message_data); // .google.protobuf.testing.oneofs.MoreData more_data = 5; bool has_more_data() const; void clear_more_data(); static const int kMoreDataFieldNumber = 5; private: const ::google::protobuf::testing::oneofs::MoreData& _internal_more_data() const; public: const ::google::protobuf::testing::oneofs::MoreData& more_data() const; ::google::protobuf::testing::oneofs::MoreData* release_more_data(); ::google::protobuf::testing::oneofs::MoreData* mutable_more_data(); void set_allocated_more_data(::google::protobuf::testing::oneofs::MoreData* more_data); void clear_data(); DataCase data_case() const; // @@protoc_insertion_point(class_scope:google.protobuf.testing.oneofs.RequestWithSimpleOneof) private: void set_has_str_data(); void set_has_int_data(); void set_has_message_data(); void set_has_more_data(); inline bool has_data() const; inline void clear_has_data(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr value_; union DataUnion { DataUnion() {} ::google::protobuf::internal::ArenaStringPtr str_data_; ::google::protobuf::int32 int_data_; ::google::protobuf::testing::oneofs::Data* message_data_; ::google::protobuf::testing::oneofs::MoreData* more_data_; } data_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; friend struct ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::TableStruct; }; // ------------------------------------------------------------------- class Data : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.testing.oneofs.Data) */ { public: Data(); virtual ~Data(); Data(const Data& from); inline Data& operator=(const Data& from) { CopyFrom(from); return *this; } #if LANG_CXX11 Data(Data&& from) noexcept : Data() { *this = ::std::move(from); } inline Data& operator=(Data&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif static const ::google::protobuf::Descriptor* descriptor(); static const Data& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const Data* internal_default_instance() { return reinterpret_cast( &_Data_default_instance_); } static constexpr int kIndexInFileMessages = 2; void Swap(Data* other); friend void swap(Data& a, Data& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline Data* New() const final { return CreateMaybeMessage(NULL); } Data* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const Data& from); void MergeFrom(const Data& from); void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Data* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // int32 data_value = 1; void clear_data_value(); static const int kDataValueFieldNumber = 1; ::google::protobuf::int32 data_value() const; void set_data_value(::google::protobuf::int32 value); // @@protoc_insertion_point(class_scope:google.protobuf.testing.oneofs.Data) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::int32 data_value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::TableStruct; }; // ------------------------------------------------------------------- class MoreData : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.testing.oneofs.MoreData) */ { public: MoreData(); virtual ~MoreData(); MoreData(const MoreData& from); inline MoreData& operator=(const MoreData& from) { CopyFrom(from); return *this; } #if LANG_CXX11 MoreData(MoreData&& from) noexcept : MoreData() { *this = ::std::move(from); } inline MoreData& operator=(MoreData&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif static const ::google::protobuf::Descriptor* descriptor(); static const MoreData& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const MoreData* internal_default_instance() { return reinterpret_cast( &_MoreData_default_instance_); } static constexpr int kIndexInFileMessages = 3; void Swap(MoreData* other); friend void swap(MoreData& a, MoreData& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline MoreData* New() const final { return CreateMaybeMessage(NULL); } MoreData* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const MoreData& from); void MergeFrom(const MoreData& from); void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(MoreData* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // string str_value = 1; void clear_str_value(); static const int kStrValueFieldNumber = 1; const ::std::string& str_value() const; void set_str_value(const ::std::string& value); #if LANG_CXX11 void set_str_value(::std::string&& value); #endif void set_str_value(const char* value); void set_str_value(const char* value, size_t size); ::std::string* mutable_str_value(); ::std::string* release_str_value(); void set_allocated_str_value(::std::string* str_value); // @@protoc_insertion_point(class_scope:google.protobuf.testing.oneofs.MoreData) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr str_value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::TableStruct; }; // ------------------------------------------------------------------- class Response : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.testing.oneofs.Response) */ { public: Response(); virtual ~Response(); Response(const Response& from); inline Response& operator=(const Response& from) { CopyFrom(from); return *this; } #if LANG_CXX11 Response(Response&& from) noexcept : Response() { *this = ::std::move(from); } inline Response& operator=(Response&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif static const ::google::protobuf::Descriptor* descriptor(); static const Response& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const Response* internal_default_instance() { return reinterpret_cast( &_Response_default_instance_); } static constexpr int kIndexInFileMessages = 4; void Swap(Response* other); friend void swap(Response& a, Response& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline Response* New() const final { return CreateMaybeMessage(NULL); } Response* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const Response& from); void MergeFrom(const Response& from); void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Response* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // string value = 1; void clear_value(); static const int kValueFieldNumber = 1; const ::std::string& value() const; void set_value(const ::std::string& value); #if LANG_CXX11 void set_value(::std::string&& value); #endif void set_value(const char* value); void set_value(const char* value, size_t size); ::std::string* mutable_value(); ::std::string* release_value(); void set_allocated_value(::std::string* value); // @@protoc_insertion_point(class_scope:google.protobuf.testing.oneofs.Response) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto::TableStruct; }; // =================================================================== // =================================================================== #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ // OneOfsRequest // string value = 1; inline void OneOfsRequest::clear_value() { value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& OneOfsRequest::value() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.OneOfsRequest.value) return value_.GetNoArena(); } inline void OneOfsRequest::set_value(const ::std::string& value) { value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.OneOfsRequest.value) } #if LANG_CXX11 inline void OneOfsRequest::set_value(::std::string&& value) { value_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.testing.oneofs.OneOfsRequest.value) } #endif inline void OneOfsRequest::set_value(const char* value) { GOOGLE_DCHECK(value != NULL); value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.testing.oneofs.OneOfsRequest.value) } inline void OneOfsRequest::set_value(const char* value, size_t size) { value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.testing.oneofs.OneOfsRequest.value) } inline ::std::string* OneOfsRequest::mutable_value() { // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.OneOfsRequest.value) return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* OneOfsRequest::release_value() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.OneOfsRequest.value) return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void OneOfsRequest::set_allocated_value(::std::string* value) { if (value != NULL) { } else { } value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.value) } // string str_data = 2; inline bool OneOfsRequest::has_str_data() const { return data_case() == kStrData; } inline void OneOfsRequest::set_has_str_data() { _oneof_case_[0] = kStrData; } inline void OneOfsRequest::clear_str_data() { if (has_str_data()) { data_.str_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); clear_has_data(); } } inline const ::std::string& OneOfsRequest::str_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.OneOfsRequest.str_data) if (has_str_data()) { return data_.str_data_.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void OneOfsRequest::set_str_data(const ::std::string& value) { // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.OneOfsRequest.str_data) if (!has_str_data()) { clear_data(); set_has_str_data(); data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } data_.str_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.OneOfsRequest.str_data) } #if LANG_CXX11 inline void OneOfsRequest::set_str_data(::std::string&& value) { // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.OneOfsRequest.str_data) if (!has_str_data()) { clear_data(); set_has_str_data(); data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } data_.str_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.testing.oneofs.OneOfsRequest.str_data) } #endif inline void OneOfsRequest::set_str_data(const char* value) { GOOGLE_DCHECK(value != NULL); if (!has_str_data()) { clear_data(); set_has_str_data(); data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } data_.str_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.testing.oneofs.OneOfsRequest.str_data) } inline void OneOfsRequest::set_str_data(const char* value, size_t size) { if (!has_str_data()) { clear_data(); set_has_str_data(); data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } data_.str_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.testing.oneofs.OneOfsRequest.str_data) } inline ::std::string* OneOfsRequest::mutable_str_data() { if (!has_str_data()) { clear_data(); set_has_str_data(); data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.OneOfsRequest.str_data) return data_.str_data_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* OneOfsRequest::release_str_data() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.OneOfsRequest.str_data) if (has_str_data()) { clear_has_data(); return data_.str_data_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } else { return NULL; } } inline void OneOfsRequest::set_allocated_str_data(::std::string* str_data) { if (!has_str_data()) { data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } clear_data(); if (str_data != NULL) { set_has_str_data(); data_.str_data_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), str_data); } // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.str_data) } // int32 int_data = 3; inline bool OneOfsRequest::has_int_data() const { return data_case() == kIntData; } inline void OneOfsRequest::set_has_int_data() { _oneof_case_[0] = kIntData; } inline void OneOfsRequest::clear_int_data() { if (has_int_data()) { data_.int_data_ = 0; clear_has_data(); } } inline ::google::protobuf::int32 OneOfsRequest::int_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.OneOfsRequest.int_data) if (has_int_data()) { return data_.int_data_; } return 0; } inline void OneOfsRequest::set_int_data(::google::protobuf::int32 value) { if (!has_int_data()) { clear_data(); set_has_int_data(); } data_.int_data_ = value; // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.OneOfsRequest.int_data) } // .google.protobuf.testing.oneofs.Data message_data = 4; inline bool OneOfsRequest::has_message_data() const { return data_case() == kMessageData; } inline void OneOfsRequest::set_has_message_data() { _oneof_case_[0] = kMessageData; } inline void OneOfsRequest::clear_message_data() { if (has_message_data()) { delete data_.message_data_; clear_has_data(); } } inline const ::google::protobuf::testing::oneofs::Data& OneOfsRequest::_internal_message_data() const { return *data_.message_data_; } inline ::google::protobuf::testing::oneofs::Data* OneOfsRequest::release_message_data() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.OneOfsRequest.message_data) if (has_message_data()) { clear_has_data(); ::google::protobuf::testing::oneofs::Data* temp = data_.message_data_; data_.message_data_ = NULL; return temp; } else { return NULL; } } inline const ::google::protobuf::testing::oneofs::Data& OneOfsRequest::message_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.OneOfsRequest.message_data) return has_message_data() ? *data_.message_data_ : *reinterpret_cast< ::google::protobuf::testing::oneofs::Data*>(&::google::protobuf::testing::oneofs::_Data_default_instance_); } inline ::google::protobuf::testing::oneofs::Data* OneOfsRequest::mutable_message_data() { if (!has_message_data()) { clear_data(); set_has_message_data(); data_.message_data_ = CreateMaybeMessage< ::google::protobuf::testing::oneofs::Data >( GetArenaNoVirtual()); } // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.OneOfsRequest.message_data) return data_.message_data_; } // .google.protobuf.testing.oneofs.MoreData more_data = 5; inline bool OneOfsRequest::has_more_data() const { return data_case() == kMoreData; } inline void OneOfsRequest::set_has_more_data() { _oneof_case_[0] = kMoreData; } inline void OneOfsRequest::clear_more_data() { if (has_more_data()) { delete data_.more_data_; clear_has_data(); } } inline const ::google::protobuf::testing::oneofs::MoreData& OneOfsRequest::_internal_more_data() const { return *data_.more_data_; } inline ::google::protobuf::testing::oneofs::MoreData* OneOfsRequest::release_more_data() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.OneOfsRequest.more_data) if (has_more_data()) { clear_has_data(); ::google::protobuf::testing::oneofs::MoreData* temp = data_.more_data_; data_.more_data_ = NULL; return temp; } else { return NULL; } } inline const ::google::protobuf::testing::oneofs::MoreData& OneOfsRequest::more_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.OneOfsRequest.more_data) return has_more_data() ? *data_.more_data_ : *reinterpret_cast< ::google::protobuf::testing::oneofs::MoreData*>(&::google::protobuf::testing::oneofs::_MoreData_default_instance_); } inline ::google::protobuf::testing::oneofs::MoreData* OneOfsRequest::mutable_more_data() { if (!has_more_data()) { clear_data(); set_has_more_data(); data_.more_data_ = CreateMaybeMessage< ::google::protobuf::testing::oneofs::MoreData >( GetArenaNoVirtual()); } // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.OneOfsRequest.more_data) return data_.more_data_; } // .google.protobuf.Struct struct_data = 6; inline bool OneOfsRequest::has_struct_data() const { return data_case() == kStructData; } inline void OneOfsRequest::set_has_struct_data() { _oneof_case_[0] = kStructData; } inline const ::google::protobuf::Struct& OneOfsRequest::_internal_struct_data() const { return *data_.struct_data_; } inline ::google::protobuf::Struct* OneOfsRequest::release_struct_data() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.OneOfsRequest.struct_data) if (has_struct_data()) { clear_has_data(); ::google::protobuf::Struct* temp = data_.struct_data_; data_.struct_data_ = NULL; return temp; } else { return NULL; } } inline const ::google::protobuf::Struct& OneOfsRequest::struct_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.OneOfsRequest.struct_data) return has_struct_data() ? *data_.struct_data_ : *reinterpret_cast< ::google::protobuf::Struct*>(&::google::protobuf::_Struct_default_instance_); } inline ::google::protobuf::Struct* OneOfsRequest::mutable_struct_data() { if (!has_struct_data()) { clear_data(); set_has_struct_data(); data_.struct_data_ = CreateMaybeMessage< ::google::protobuf::Struct >( GetArenaNoVirtual()); } // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.OneOfsRequest.struct_data) return data_.struct_data_; } // .google.protobuf.Value value_data = 7; inline bool OneOfsRequest::has_value_data() const { return data_case() == kValueData; } inline void OneOfsRequest::set_has_value_data() { _oneof_case_[0] = kValueData; } inline const ::google::protobuf::Value& OneOfsRequest::_internal_value_data() const { return *data_.value_data_; } inline ::google::protobuf::Value* OneOfsRequest::release_value_data() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.OneOfsRequest.value_data) if (has_value_data()) { clear_has_data(); ::google::protobuf::Value* temp = data_.value_data_; data_.value_data_ = NULL; return temp; } else { return NULL; } } inline const ::google::protobuf::Value& OneOfsRequest::value_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.OneOfsRequest.value_data) return has_value_data() ? *data_.value_data_ : *reinterpret_cast< ::google::protobuf::Value*>(&::google::protobuf::_Value_default_instance_); } inline ::google::protobuf::Value* OneOfsRequest::mutable_value_data() { if (!has_value_data()) { clear_data(); set_has_value_data(); data_.value_data_ = CreateMaybeMessage< ::google::protobuf::Value >( GetArenaNoVirtual()); } // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.OneOfsRequest.value_data) return data_.value_data_; } // .google.protobuf.ListValue list_value_data = 8; inline bool OneOfsRequest::has_list_value_data() const { return data_case() == kListValueData; } inline void OneOfsRequest::set_has_list_value_data() { _oneof_case_[0] = kListValueData; } inline const ::google::protobuf::ListValue& OneOfsRequest::_internal_list_value_data() const { return *data_.list_value_data_; } inline ::google::protobuf::ListValue* OneOfsRequest::release_list_value_data() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.OneOfsRequest.list_value_data) if (has_list_value_data()) { clear_has_data(); ::google::protobuf::ListValue* temp = data_.list_value_data_; data_.list_value_data_ = NULL; return temp; } else { return NULL; } } inline const ::google::protobuf::ListValue& OneOfsRequest::list_value_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.OneOfsRequest.list_value_data) return has_list_value_data() ? *data_.list_value_data_ : *reinterpret_cast< ::google::protobuf::ListValue*>(&::google::protobuf::_ListValue_default_instance_); } inline ::google::protobuf::ListValue* OneOfsRequest::mutable_list_value_data() { if (!has_list_value_data()) { clear_data(); set_has_list_value_data(); data_.list_value_data_ = CreateMaybeMessage< ::google::protobuf::ListValue >( GetArenaNoVirtual()); } // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.OneOfsRequest.list_value_data) return data_.list_value_data_; } // .google.protobuf.Timestamp ts_data = 9; inline bool OneOfsRequest::has_ts_data() const { return data_case() == kTsData; } inline void OneOfsRequest::set_has_ts_data() { _oneof_case_[0] = kTsData; } inline const ::google::protobuf::Timestamp& OneOfsRequest::_internal_ts_data() const { return *data_.ts_data_; } inline ::google::protobuf::Timestamp* OneOfsRequest::release_ts_data() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.OneOfsRequest.ts_data) if (has_ts_data()) { clear_has_data(); ::google::protobuf::Timestamp* temp = data_.ts_data_; data_.ts_data_ = NULL; return temp; } else { return NULL; } } inline const ::google::protobuf::Timestamp& OneOfsRequest::ts_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.OneOfsRequest.ts_data) return has_ts_data() ? *data_.ts_data_ : *reinterpret_cast< ::google::protobuf::Timestamp*>(&::google::protobuf::_Timestamp_default_instance_); } inline ::google::protobuf::Timestamp* OneOfsRequest::mutable_ts_data() { if (!has_ts_data()) { clear_data(); set_has_ts_data(); data_.ts_data_ = CreateMaybeMessage< ::google::protobuf::Timestamp >( GetArenaNoVirtual()); } // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.OneOfsRequest.ts_data) return data_.ts_data_; } // .google.protobuf.Any any_data = 19; inline bool OneOfsRequest::has_any_data() const { return this != internal_default_instance() && any_data_ != NULL; } inline const ::google::protobuf::Any& OneOfsRequest::_internal_any_data() const { return *any_data_; } inline const ::google::protobuf::Any& OneOfsRequest::any_data() const { const ::google::protobuf::Any* p = any_data_; // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.OneOfsRequest.any_data) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Any_default_instance_); } inline ::google::protobuf::Any* OneOfsRequest::release_any_data() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.OneOfsRequest.any_data) ::google::protobuf::Any* temp = any_data_; any_data_ = NULL; return temp; } inline ::google::protobuf::Any* OneOfsRequest::mutable_any_data() { if (any_data_ == NULL) { auto* p = CreateMaybeMessage<::google::protobuf::Any>(GetArenaNoVirtual()); any_data_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.OneOfsRequest.any_data) return any_data_; } inline void OneOfsRequest::set_allocated_any_data(::google::protobuf::Any* any_data) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(any_data_); } if (any_data) { ::google::protobuf::Arena* submessage_arena = NULL; if (message_arena != submessage_arena) { any_data = ::google::protobuf::internal::GetOwnedMessage( message_arena, any_data, submessage_arena); } } else { } any_data_ = any_data; // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.OneOfsRequest.any_data) } inline bool OneOfsRequest::has_data() const { return data_case() != DATA_NOT_SET; } inline void OneOfsRequest::clear_has_data() { _oneof_case_[0] = DATA_NOT_SET; } inline OneOfsRequest::DataCase OneOfsRequest::data_case() const { return OneOfsRequest::DataCase(_oneof_case_[0]); } // ------------------------------------------------------------------- // RequestWithSimpleOneof // string value = 1; inline void RequestWithSimpleOneof::clear_value() { value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& RequestWithSimpleOneof::value() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.RequestWithSimpleOneof.value) return value_.GetNoArena(); } inline void RequestWithSimpleOneof::set_value(const ::std::string& value) { value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.RequestWithSimpleOneof.value) } #if LANG_CXX11 inline void RequestWithSimpleOneof::set_value(::std::string&& value) { value_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.testing.oneofs.RequestWithSimpleOneof.value) } #endif inline void RequestWithSimpleOneof::set_value(const char* value) { GOOGLE_DCHECK(value != NULL); value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.testing.oneofs.RequestWithSimpleOneof.value) } inline void RequestWithSimpleOneof::set_value(const char* value, size_t size) { value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.testing.oneofs.RequestWithSimpleOneof.value) } inline ::std::string* RequestWithSimpleOneof::mutable_value() { // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.RequestWithSimpleOneof.value) return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* RequestWithSimpleOneof::release_value() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.RequestWithSimpleOneof.value) return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void RequestWithSimpleOneof::set_allocated_value(::std::string* value) { if (value != NULL) { } else { } value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.RequestWithSimpleOneof.value) } // string str_data = 2; inline bool RequestWithSimpleOneof::has_str_data() const { return data_case() == kStrData; } inline void RequestWithSimpleOneof::set_has_str_data() { _oneof_case_[0] = kStrData; } inline void RequestWithSimpleOneof::clear_str_data() { if (has_str_data()) { data_.str_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); clear_has_data(); } } inline const ::std::string& RequestWithSimpleOneof::str_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data) if (has_str_data()) { return data_.str_data_.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void RequestWithSimpleOneof::set_str_data(const ::std::string& value) { // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data) if (!has_str_data()) { clear_data(); set_has_str_data(); data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } data_.str_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data) } #if LANG_CXX11 inline void RequestWithSimpleOneof::set_str_data(::std::string&& value) { // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data) if (!has_str_data()) { clear_data(); set_has_str_data(); data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } data_.str_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data) } #endif inline void RequestWithSimpleOneof::set_str_data(const char* value) { GOOGLE_DCHECK(value != NULL); if (!has_str_data()) { clear_data(); set_has_str_data(); data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } data_.str_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data) } inline void RequestWithSimpleOneof::set_str_data(const char* value, size_t size) { if (!has_str_data()) { clear_data(); set_has_str_data(); data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } data_.str_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data) } inline ::std::string* RequestWithSimpleOneof::mutable_str_data() { if (!has_str_data()) { clear_data(); set_has_str_data(); data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data) return data_.str_data_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* RequestWithSimpleOneof::release_str_data() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data) if (has_str_data()) { clear_has_data(); return data_.str_data_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } else { return NULL; } } inline void RequestWithSimpleOneof::set_allocated_str_data(::std::string* str_data) { if (!has_str_data()) { data_.str_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } clear_data(); if (str_data != NULL) { set_has_str_data(); data_.str_data_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), str_data); } // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.RequestWithSimpleOneof.str_data) } // int32 int_data = 3; inline bool RequestWithSimpleOneof::has_int_data() const { return data_case() == kIntData; } inline void RequestWithSimpleOneof::set_has_int_data() { _oneof_case_[0] = kIntData; } inline void RequestWithSimpleOneof::clear_int_data() { if (has_int_data()) { data_.int_data_ = 0; clear_has_data(); } } inline ::google::protobuf::int32 RequestWithSimpleOneof::int_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.RequestWithSimpleOneof.int_data) if (has_int_data()) { return data_.int_data_; } return 0; } inline void RequestWithSimpleOneof::set_int_data(::google::protobuf::int32 value) { if (!has_int_data()) { clear_data(); set_has_int_data(); } data_.int_data_ = value; // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.RequestWithSimpleOneof.int_data) } // .google.protobuf.testing.oneofs.Data message_data = 4; inline bool RequestWithSimpleOneof::has_message_data() const { return data_case() == kMessageData; } inline void RequestWithSimpleOneof::set_has_message_data() { _oneof_case_[0] = kMessageData; } inline void RequestWithSimpleOneof::clear_message_data() { if (has_message_data()) { delete data_.message_data_; clear_has_data(); } } inline const ::google::protobuf::testing::oneofs::Data& RequestWithSimpleOneof::_internal_message_data() const { return *data_.message_data_; } inline ::google::protobuf::testing::oneofs::Data* RequestWithSimpleOneof::release_message_data() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.RequestWithSimpleOneof.message_data) if (has_message_data()) { clear_has_data(); ::google::protobuf::testing::oneofs::Data* temp = data_.message_data_; data_.message_data_ = NULL; return temp; } else { return NULL; } } inline const ::google::protobuf::testing::oneofs::Data& RequestWithSimpleOneof::message_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.RequestWithSimpleOneof.message_data) return has_message_data() ? *data_.message_data_ : *reinterpret_cast< ::google::protobuf::testing::oneofs::Data*>(&::google::protobuf::testing::oneofs::_Data_default_instance_); } inline ::google::protobuf::testing::oneofs::Data* RequestWithSimpleOneof::mutable_message_data() { if (!has_message_data()) { clear_data(); set_has_message_data(); data_.message_data_ = CreateMaybeMessage< ::google::protobuf::testing::oneofs::Data >( GetArenaNoVirtual()); } // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.RequestWithSimpleOneof.message_data) return data_.message_data_; } // .google.protobuf.testing.oneofs.MoreData more_data = 5; inline bool RequestWithSimpleOneof::has_more_data() const { return data_case() == kMoreData; } inline void RequestWithSimpleOneof::set_has_more_data() { _oneof_case_[0] = kMoreData; } inline void RequestWithSimpleOneof::clear_more_data() { if (has_more_data()) { delete data_.more_data_; clear_has_data(); } } inline const ::google::protobuf::testing::oneofs::MoreData& RequestWithSimpleOneof::_internal_more_data() const { return *data_.more_data_; } inline ::google::protobuf::testing::oneofs::MoreData* RequestWithSimpleOneof::release_more_data() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.RequestWithSimpleOneof.more_data) if (has_more_data()) { clear_has_data(); ::google::protobuf::testing::oneofs::MoreData* temp = data_.more_data_; data_.more_data_ = NULL; return temp; } else { return NULL; } } inline const ::google::protobuf::testing::oneofs::MoreData& RequestWithSimpleOneof::more_data() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.RequestWithSimpleOneof.more_data) return has_more_data() ? *data_.more_data_ : *reinterpret_cast< ::google::protobuf::testing::oneofs::MoreData*>(&::google::protobuf::testing::oneofs::_MoreData_default_instance_); } inline ::google::protobuf::testing::oneofs::MoreData* RequestWithSimpleOneof::mutable_more_data() { if (!has_more_data()) { clear_data(); set_has_more_data(); data_.more_data_ = CreateMaybeMessage< ::google::protobuf::testing::oneofs::MoreData >( GetArenaNoVirtual()); } // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.RequestWithSimpleOneof.more_data) return data_.more_data_; } inline bool RequestWithSimpleOneof::has_data() const { return data_case() != DATA_NOT_SET; } inline void RequestWithSimpleOneof::clear_has_data() { _oneof_case_[0] = DATA_NOT_SET; } inline RequestWithSimpleOneof::DataCase RequestWithSimpleOneof::data_case() const { return RequestWithSimpleOneof::DataCase(_oneof_case_[0]); } // ------------------------------------------------------------------- // Data // int32 data_value = 1; inline void Data::clear_data_value() { data_value_ = 0; } inline ::google::protobuf::int32 Data::data_value() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.Data.data_value) return data_value_; } inline void Data::set_data_value(::google::protobuf::int32 value) { data_value_ = value; // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.Data.data_value) } // ------------------------------------------------------------------- // MoreData // string str_value = 1; inline void MoreData::clear_str_value() { str_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& MoreData::str_value() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.MoreData.str_value) return str_value_.GetNoArena(); } inline void MoreData::set_str_value(const ::std::string& value) { str_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.MoreData.str_value) } #if LANG_CXX11 inline void MoreData::set_str_value(::std::string&& value) { str_value_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.testing.oneofs.MoreData.str_value) } #endif inline void MoreData::set_str_value(const char* value) { GOOGLE_DCHECK(value != NULL); str_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.testing.oneofs.MoreData.str_value) } inline void MoreData::set_str_value(const char* value, size_t size) { str_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.testing.oneofs.MoreData.str_value) } inline ::std::string* MoreData::mutable_str_value() { // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.MoreData.str_value) return str_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* MoreData::release_str_value() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.MoreData.str_value) return str_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void MoreData::set_allocated_str_value(::std::string* str_value) { if (str_value != NULL) { } else { } str_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), str_value); // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.MoreData.str_value) } // ------------------------------------------------------------------- // Response // string value = 1; inline void Response::clear_value() { value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& Response::value() const { // @@protoc_insertion_point(field_get:google.protobuf.testing.oneofs.Response.value) return value_.GetNoArena(); } inline void Response::set_value(const ::std::string& value) { value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.testing.oneofs.Response.value) } #if LANG_CXX11 inline void Response::set_value(::std::string&& value) { value_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.testing.oneofs.Response.value) } #endif inline void Response::set_value(const char* value) { GOOGLE_DCHECK(value != NULL); value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.testing.oneofs.Response.value) } inline void Response::set_value(const char* value, size_t size) { value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.testing.oneofs.Response.value) } inline ::std::string* Response::mutable_value() { // @@protoc_insertion_point(field_mutable:google.protobuf.testing.oneofs.Response.value) return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* Response::release_value() { // @@protoc_insertion_point(field_release:google.protobuf.testing.oneofs.Response.value) return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void Response::set_allocated_value(::std::string* value) { if (value != NULL) { } else { } value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set_allocated:google.protobuf.testing.oneofs.Response.value) } #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // @@protoc_insertion_point(namespace_scope) } // namespace oneofs } // namespace testing } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2futil_2finternal_2ftestdata_2foneofs_2eproto