mirror of
https://gitee.com/farsunset/cim.git
synced 2025-06-29 13:51:32 +08:00
835 lines
32 KiB
C++
835 lines
32 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: Message.proto
|
|
|
|
#include "Message.pb.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include <google/protobuf/stubs/common.h>
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <google/protobuf/extension_set.h>
|
|
#include <google/protobuf/wire_format_lite.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>
|
|
// @@protoc_insertion_point(includes)
|
|
#include <google/protobuf/port_def.inc>
|
|
class ModelDefaultTypeInternal {
|
|
public:
|
|
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Model> _instance;
|
|
} _Model_default_instance_;
|
|
static void InitDefaultsscc_info_Model_Message_2eproto() {
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
{
|
|
void* ptr = &::_Model_default_instance_;
|
|
new (ptr) ::Model();
|
|
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
|
|
}
|
|
::Model::InitAsDefaultInstance();
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Model_Message_2eproto =
|
|
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Model_Message_2eproto}, {}};
|
|
|
|
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_Message_2eproto[1];
|
|
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_Message_2eproto = nullptr;
|
|
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_Message_2eproto = nullptr;
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_Message_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::Model, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
PROTOBUF_FIELD_OFFSET(::Model, id_),
|
|
PROTOBUF_FIELD_OFFSET(::Model, action_),
|
|
PROTOBUF_FIELD_OFFSET(::Model, content_),
|
|
PROTOBUF_FIELD_OFFSET(::Model, sender_),
|
|
PROTOBUF_FIELD_OFFSET(::Model, receiver_),
|
|
PROTOBUF_FIELD_OFFSET(::Model, extra_),
|
|
PROTOBUF_FIELD_OFFSET(::Model, title_),
|
|
PROTOBUF_FIELD_OFFSET(::Model, format_),
|
|
PROTOBUF_FIELD_OFFSET(::Model, timestamp_),
|
|
};
|
|
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
{ 0, -1, sizeof(::Model)},
|
|
};
|
|
|
|
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
|
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::_Model_default_instance_),
|
|
};
|
|
|
|
const char descriptor_table_protodef_Message_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
|
"\n\rMessage.proto\"\227\001\n\005Model\022\n\n\002id\030\001 \001(\003\022\016\n"
|
|
"\006action\030\002 \001(\t\022\017\n\007content\030\003 \001(\t\022\016\n\006sender"
|
|
"\030\004 \001(\t\022\020\n\010receiver\030\005 \001(\t\022\r\n\005extra\030\006 \001(\t\022"
|
|
"\r\n\005title\030\007 \001(\t\022\016\n\006format\030\010 \001(\t\022\021\n\ttimest"
|
|
"amp\030\t \001(\003b\006proto3"
|
|
;
|
|
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_Message_2eproto_deps[1] = {
|
|
};
|
|
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_Message_2eproto_sccs[1] = {
|
|
&scc_info_Model_Message_2eproto.base,
|
|
};
|
|
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_Message_2eproto_once;
|
|
static bool descriptor_table_Message_2eproto_initialized = false;
|
|
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_Message_2eproto = {
|
|
&descriptor_table_Message_2eproto_initialized, descriptor_table_protodef_Message_2eproto, "Message.proto", 177,
|
|
&descriptor_table_Message_2eproto_once, descriptor_table_Message_2eproto_sccs, descriptor_table_Message_2eproto_deps, 1, 0,
|
|
schemas, file_default_instances, TableStruct_Message_2eproto::offsets,
|
|
file_level_metadata_Message_2eproto, 1, file_level_enum_descriptors_Message_2eproto, file_level_service_descriptors_Message_2eproto,
|
|
};
|
|
|
|
// Force running AddDescriptors() at dynamic initialization time.
|
|
static bool dynamic_init_dummy_Message_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_Message_2eproto), true);
|
|
|
|
// ===================================================================
|
|
|
|
void Model::InitAsDefaultInstance() {
|
|
}
|
|
class Model::_Internal {
|
|
public:
|
|
};
|
|
|
|
Model::Model()
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(constructor:Model)
|
|
}
|
|
Model::Model(const Model& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
|
_internal_metadata_(nullptr) {
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
action_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
if (!from.action().empty()) {
|
|
action_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.action_);
|
|
}
|
|
content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
if (!from.content().empty()) {
|
|
content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_);
|
|
}
|
|
sender_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
if (!from.sender().empty()) {
|
|
sender_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.sender_);
|
|
}
|
|
receiver_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
if (!from.receiver().empty()) {
|
|
receiver_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.receiver_);
|
|
}
|
|
extra_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
if (!from.extra().empty()) {
|
|
extra_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.extra_);
|
|
}
|
|
title_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
if (!from.title().empty()) {
|
|
title_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.title_);
|
|
}
|
|
format_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
if (!from.format().empty()) {
|
|
format_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.format_);
|
|
}
|
|
::memcpy(&id_, &from.id_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(×tamp_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(timestamp_));
|
|
// @@protoc_insertion_point(copy_constructor:Model)
|
|
}
|
|
|
|
void Model::SharedCtor() {
|
|
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Model_Message_2eproto.base);
|
|
action_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
sender_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
receiver_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
extra_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
title_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
format_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
::memset(&id_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(×tamp_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(timestamp_));
|
|
}
|
|
|
|
Model::~Model() {
|
|
// @@protoc_insertion_point(destructor:Model)
|
|
SharedDtor();
|
|
}
|
|
|
|
void Model::SharedDtor() {
|
|
action_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
sender_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
receiver_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
extra_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
title_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
format_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
|
|
void Model::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
const Model& Model::default_instance() {
|
|
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Model_Message_2eproto.base);
|
|
return *internal_default_instance();
|
|
}
|
|
|
|
|
|
void Model::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:Model)
|
|
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
action_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
content_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
sender_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
receiver_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
extra_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
title_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
format_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
::memset(&id_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(×tamp_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(timestamp_));
|
|
_internal_metadata_.Clear();
|
|
}
|
|
|
|
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
|
const char* Model::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
|
CHK_(ptr);
|
|
switch (tag >> 3) {
|
|
// int64 id = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
|
|
id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
|
|
CHK_(ptr);
|
|
} else goto handle_unusual;
|
|
continue;
|
|
// string action = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_action(), ptr, ctx, "Model.action");
|
|
CHK_(ptr);
|
|
} else goto handle_unusual;
|
|
continue;
|
|
// string content = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_content(), ptr, ctx, "Model.content");
|
|
CHK_(ptr);
|
|
} else goto handle_unusual;
|
|
continue;
|
|
// string sender = 4;
|
|
case 4:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_sender(), ptr, ctx, "Model.sender");
|
|
CHK_(ptr);
|
|
} else goto handle_unusual;
|
|
continue;
|
|
// string receiver = 5;
|
|
case 5:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_receiver(), ptr, ctx, "Model.receiver");
|
|
CHK_(ptr);
|
|
} else goto handle_unusual;
|
|
continue;
|
|
// string extra = 6;
|
|
case 6:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_extra(), ptr, ctx, "Model.extra");
|
|
CHK_(ptr);
|
|
} else goto handle_unusual;
|
|
continue;
|
|
// string title = 7;
|
|
case 7:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_title(), ptr, ctx, "Model.title");
|
|
CHK_(ptr);
|
|
} else goto handle_unusual;
|
|
continue;
|
|
// string format = 8;
|
|
case 8:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_format(), ptr, ctx, "Model.format");
|
|
CHK_(ptr);
|
|
} else goto handle_unusual;
|
|
continue;
|
|
// int64 timestamp = 9;
|
|
case 9:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) {
|
|
timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
|
|
CHK_(ptr);
|
|
} else goto handle_unusual;
|
|
continue;
|
|
default: {
|
|
handle_unusual:
|
|
if ((tag & 7) == 4 || tag == 0) {
|
|
ctx->SetLastTag(tag);
|
|
goto success;
|
|
}
|
|
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
continue;
|
|
}
|
|
} // switch
|
|
} // while
|
|
success:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto success;
|
|
#undef CHK_
|
|
}
|
|
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
|
bool Model::MergePartialFromCodedStream(
|
|
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
|
// @@protoc_insertion_point(parse_start:Model)
|
|
for (;;) {
|
|
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
tag = p.first;
|
|
if (!p.second) goto handle_unusual;
|
|
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// int64 id = 1;
|
|
case 1: {
|
|
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
|
|
|
|
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
|
|
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
|
|
input, &id_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// string action = 2;
|
|
case 2: {
|
|
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_action()));
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->action().data(), static_cast<int>(this->action().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
|
"Model.action"));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// string content = 3;
|
|
case 3: {
|
|
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_content()));
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->content().data(), static_cast<int>(this->content().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
|
"Model.content"));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// string sender = 4;
|
|
case 4: {
|
|
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_sender()));
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->sender().data(), static_cast<int>(this->sender().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
|
"Model.sender"));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// string receiver = 5;
|
|
case 5: {
|
|
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_receiver()));
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->receiver().data(), static_cast<int>(this->receiver().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
|
"Model.receiver"));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// string extra = 6;
|
|
case 6: {
|
|
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_extra()));
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->extra().data(), static_cast<int>(this->extra().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
|
"Model.extra"));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// string title = 7;
|
|
case 7: {
|
|
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) {
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_title()));
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->title().data(), static_cast<int>(this->title().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
|
"Model.title"));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// string format = 8;
|
|
case 8: {
|
|
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) {
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_format()));
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->format().data(), static_cast<int>(this->format().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
|
|
"Model.format"));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// int64 timestamp = 9;
|
|
case 9: {
|
|
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) {
|
|
|
|
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
|
|
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
|
|
input, ×tamp_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_unusual:
|
|
if (tag == 0) {
|
|
goto success;
|
|
}
|
|
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
success:
|
|
// @@protoc_insertion_point(parse_success:Model)
|
|
return true;
|
|
failure:
|
|
// @@protoc_insertion_point(parse_failure:Model)
|
|
return false;
|
|
#undef DO_
|
|
}
|
|
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
|
|
|
void Model::SerializeWithCachedSizes(
|
|
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
|
|
// @@protoc_insertion_point(serialize_start:Model)
|
|
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// int64 id = 1;
|
|
if (this->id() != 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->id(), output);
|
|
}
|
|
|
|
// string action = 2;
|
|
if (this->action().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->action().data(), static_cast<int>(this->action().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.action");
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
2, this->action(), output);
|
|
}
|
|
|
|
// string content = 3;
|
|
if (this->content().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->content().data(), static_cast<int>(this->content().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.content");
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
3, this->content(), output);
|
|
}
|
|
|
|
// string sender = 4;
|
|
if (this->sender().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->sender().data(), static_cast<int>(this->sender().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.sender");
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
4, this->sender(), output);
|
|
}
|
|
|
|
// string receiver = 5;
|
|
if (this->receiver().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->receiver().data(), static_cast<int>(this->receiver().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.receiver");
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
5, this->receiver(), output);
|
|
}
|
|
|
|
// string extra = 6;
|
|
if (this->extra().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->extra().data(), static_cast<int>(this->extra().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.extra");
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
6, this->extra(), output);
|
|
}
|
|
|
|
// string title = 7;
|
|
if (this->title().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->title().data(), static_cast<int>(this->title().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.title");
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
7, this->title(), output);
|
|
}
|
|
|
|
// string format = 8;
|
|
if (this->format().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->format().data(), static_cast<int>(this->format().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.format");
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
8, this->format(), output);
|
|
}
|
|
|
|
// int64 timestamp = 9;
|
|
if (this->timestamp() != 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(9, this->timestamp(), output);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
|
|
_internal_metadata_.unknown_fields(), output);
|
|
}
|
|
// @@protoc_insertion_point(serialize_end:Model)
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::uint8* Model::InternalSerializeWithCachedSizesToArray(
|
|
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:Model)
|
|
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// int64 id = 1;
|
|
if (this->id() != 0) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->id(), target);
|
|
}
|
|
|
|
// string action = 2;
|
|
if (this->action().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->action().data(), static_cast<int>(this->action().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.action");
|
|
target =
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
|
2, this->action(), target);
|
|
}
|
|
|
|
// string content = 3;
|
|
if (this->content().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->content().data(), static_cast<int>(this->content().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.content");
|
|
target =
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
|
3, this->content(), target);
|
|
}
|
|
|
|
// string sender = 4;
|
|
if (this->sender().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->sender().data(), static_cast<int>(this->sender().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.sender");
|
|
target =
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
|
4, this->sender(), target);
|
|
}
|
|
|
|
// string receiver = 5;
|
|
if (this->receiver().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->receiver().data(), static_cast<int>(this->receiver().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.receiver");
|
|
target =
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
|
5, this->receiver(), target);
|
|
}
|
|
|
|
// string extra = 6;
|
|
if (this->extra().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->extra().data(), static_cast<int>(this->extra().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.extra");
|
|
target =
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
|
6, this->extra(), target);
|
|
}
|
|
|
|
// string title = 7;
|
|
if (this->title().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->title().data(), static_cast<int>(this->title().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.title");
|
|
target =
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
|
7, this->title(), target);
|
|
}
|
|
|
|
// string format = 8;
|
|
if (this->format().size() > 0) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->format().data(), static_cast<int>(this->format().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"Model.format");
|
|
target =
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
|
|
8, this->format(), target);
|
|
}
|
|
|
|
// int64 timestamp = 9;
|
|
if (this->timestamp() != 0) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(9, this->timestamp(), target);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields(), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:Model)
|
|
return target;
|
|
}
|
|
|
|
size_t Model::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:Model)
|
|
size_t total_size = 0;
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
_internal_metadata_.unknown_fields());
|
|
}
|
|
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// string action = 2;
|
|
if (this->action().size() > 0) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->action());
|
|
}
|
|
|
|
// string content = 3;
|
|
if (this->content().size() > 0) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->content());
|
|
}
|
|
|
|
// string sender = 4;
|
|
if (this->sender().size() > 0) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->sender());
|
|
}
|
|
|
|
// string receiver = 5;
|
|
if (this->receiver().size() > 0) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->receiver());
|
|
}
|
|
|
|
// string extra = 6;
|
|
if (this->extra().size() > 0) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->extra());
|
|
}
|
|
|
|
// string title = 7;
|
|
if (this->title().size() > 0) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->title());
|
|
}
|
|
|
|
// string format = 8;
|
|
if (this->format().size() > 0) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->format());
|
|
}
|
|
|
|
// int64 id = 1;
|
|
if (this->id() != 0) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
|
|
this->id());
|
|
}
|
|
|
|
// int64 timestamp = 9;
|
|
if (this->timestamp() != 0) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
|
|
this->timestamp());
|
|
}
|
|
|
|
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
|
SetCachedSize(cached_size);
|
|
return total_size;
|
|
}
|
|
|
|
void Model::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
// @@protoc_insertion_point(generalized_merge_from_start:Model)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
const Model* source =
|
|
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Model>(
|
|
&from);
|
|
if (source == nullptr) {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Model)
|
|
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:Model)
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void Model::MergeFrom(const Model& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:Model)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (from.action().size() > 0) {
|
|
|
|
action_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.action_);
|
|
}
|
|
if (from.content().size() > 0) {
|
|
|
|
content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_);
|
|
}
|
|
if (from.sender().size() > 0) {
|
|
|
|
sender_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.sender_);
|
|
}
|
|
if (from.receiver().size() > 0) {
|
|
|
|
receiver_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.receiver_);
|
|
}
|
|
if (from.extra().size() > 0) {
|
|
|
|
extra_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.extra_);
|
|
}
|
|
if (from.title().size() > 0) {
|
|
|
|
title_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.title_);
|
|
}
|
|
if (from.format().size() > 0) {
|
|
|
|
format_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.format_);
|
|
}
|
|
if (from.id() != 0) {
|
|
set_id(from.id());
|
|
}
|
|
if (from.timestamp() != 0) {
|
|
set_timestamp(from.timestamp());
|
|
}
|
|
}
|
|
|
|
void Model::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
// @@protoc_insertion_point(generalized_copy_from_start:Model)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void Model::CopyFrom(const Model& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:Model)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Model::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Model::InternalSwap(Model* other) {
|
|
using std::swap;
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
|
action_.Swap(&other->action_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
content_.Swap(&other->content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
sender_.Swap(&other->sender_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
receiver_.Swap(&other->receiver_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
extra_.Swap(&other->extra_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
title_.Swap(&other->title_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
format_.Swap(&other->format_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
swap(id_, other->id_);
|
|
swap(timestamp_, other->timestamp_);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata Model::GetMetadata() const {
|
|
return GetMetadataStatic();
|
|
}
|
|
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
PROTOBUF_NAMESPACE_OPEN
|
|
template<> PROTOBUF_NOINLINE ::Model* Arena::CreateMaybeMessage< ::Model >(Arena* arena) {
|
|
return Arena::CreateInternal< ::Model >(arena);
|
|
}
|
|
PROTOBUF_NAMESPACE_CLOSE
|
|
|
|
// @@protoc_insertion_point(global_scope)
|
|
#include <google/protobuf/port_undef.inc>
|