123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: parkspace_parameter.proto
- #include "parkspace_parameter.pb.h"
- #include <algorithm>
- #include <google/protobuf/stubs/common.h>
- #include <google/protobuf/stubs/port.h>
- #include <google/protobuf/stubs/once.h>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/wire_format_lite_inl.h>
- #include <google/protobuf/descriptor.h>
- #include <google/protobuf/generated_message_reflection.h>
- #include <google/protobuf/reflection_ops.h>
- #include <google/protobuf/wire_format.h>
- // This is a temporary google only hack
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- #include "third_party/protobuf/version.h"
- #endif
- // @@protoc_insertion_point(includes)
- namespace parkspace_proto {
- class database_configDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<database_config>
- _instance;
- } _database_config_default_instance_;
- } // namespace parkspace_proto
- namespace protobuf_parkspace_5fparameter_2eproto {
- void InitDefaultsdatabase_configImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
- #else
- ::google::protobuf::internal::InitProtobufDefaults();
- #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::parkspace_proto::_database_config_default_instance_;
- new (ptr) ::parkspace_proto::database_config();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::parkspace_proto::database_config::InitAsDefaultInstance();
- }
- void InitDefaultsdatabase_config() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsdatabase_configImpl);
- }
- ::google::protobuf::Metadata file_level_metadata[1];
- const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_ip_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_port_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_username_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_passwd_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_name_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_conn_pool_size_),
- 0,
- 4,
- 1,
- 2,
- 3,
- 5,
- };
- static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, 11, sizeof(::parkspace_proto::database_config)},
- };
- static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::parkspace_proto::_database_config_default_instance_),
- };
- void protobuf_AssignDescriptors() {
- AddDescriptors();
- ::google::protobuf::MessageFactory* factory = NULL;
- AssignDescriptors(
- "parkspace_parameter.proto", schemas, file_default_instances, TableStruct::offsets, factory,
- file_level_metadata, NULL, NULL);
- }
- void protobuf_AssignDescriptorsOnce() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
- }
- void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
- void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
- }
- void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n\031parkspace_parameter.proto\022\017parkspace_p"
- "roto\"\207\001\n\017database_config\022\r\n\005db_ip\030\001 \002(\t\022"
- "\017\n\007db_port\030\002 \002(\003\022\023\n\013db_username\030\003 \002(\t\022\023\n"
- "\tdb_passwd\030\004 \001(\t:\000\022\017\n\007db_name\030\005 \002(\t\022\031\n\021d"
- "b_conn_pool_size\030\006 \001(\003"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 182);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "parkspace_parameter.proto", &protobuf_RegisterTypes);
- }
- void AddDescriptors() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
- }
- // Force AddDescriptors() to be called at dynamic initialization time.
- struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
- } static_descriptor_initializer;
- } // namespace protobuf_parkspace_5fparameter_2eproto
- namespace parkspace_proto {
- // ===================================================================
- void database_config::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int database_config::kDbIpFieldNumber;
- const int database_config::kDbPortFieldNumber;
- const int database_config::kDbUsernameFieldNumber;
- const int database_config::kDbPasswdFieldNumber;
- const int database_config::kDbNameFieldNumber;
- const int database_config::kDbConnPoolSizeFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- database_config::database_config()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_parkspace_5fparameter_2eproto::InitDefaultsdatabase_config();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:parkspace_proto.database_config)
- }
- database_config::database_config(const database_config& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- db_ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_db_ip()) {
- db_ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_ip_);
- }
- db_username_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_db_username()) {
- db_username_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_username_);
- }
- db_passwd_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_db_passwd()) {
- db_passwd_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_passwd_);
- }
- db_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_db_name()) {
- db_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_name_);
- }
- ::memcpy(&db_port_, &from.db_port_,
- static_cast<size_t>(reinterpret_cast<char*>(&db_conn_pool_size_) -
- reinterpret_cast<char*>(&db_port_)) + sizeof(db_conn_pool_size_));
- // @@protoc_insertion_point(copy_constructor:parkspace_proto.database_config)
- }
- void database_config::SharedCtor() {
- _cached_size_ = 0;
- db_ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- db_username_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- db_passwd_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- db_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(&db_port_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&db_conn_pool_size_) -
- reinterpret_cast<char*>(&db_port_)) + sizeof(db_conn_pool_size_));
- }
- database_config::~database_config() {
- // @@protoc_insertion_point(destructor:parkspace_proto.database_config)
- SharedDtor();
- }
- void database_config::SharedDtor() {
- db_ip_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- db_username_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- db_passwd_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- db_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- void database_config::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- }
- const ::google::protobuf::Descriptor* database_config::descriptor() {
- ::protobuf_parkspace_5fparameter_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_parkspace_5fparameter_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const database_config& database_config::default_instance() {
- ::protobuf_parkspace_5fparameter_2eproto::InitDefaultsdatabase_config();
- return *internal_default_instance();
- }
- database_config* database_config::New(::google::protobuf::Arena* arena) const {
- database_config* n = new database_config;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
- }
- void database_config::Clear() {
- // @@protoc_insertion_point(message_clear_start:parkspace_proto.database_config)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 15u) {
- if (cached_has_bits & 0x00000001u) {
- GOOGLE_DCHECK(!db_ip_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
- (*db_ip_.UnsafeRawStringPointer())->clear();
- }
- if (cached_has_bits & 0x00000002u) {
- GOOGLE_DCHECK(!db_username_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
- (*db_username_.UnsafeRawStringPointer())->clear();
- }
- if (cached_has_bits & 0x00000004u) {
- GOOGLE_DCHECK(!db_passwd_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
- (*db_passwd_.UnsafeRawStringPointer())->clear();
- }
- if (cached_has_bits & 0x00000008u) {
- GOOGLE_DCHECK(!db_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
- (*db_name_.UnsafeRawStringPointer())->clear();
- }
- }
- if (cached_has_bits & 48u) {
- ::memset(&db_port_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&db_conn_pool_size_) -
- reinterpret_cast<char*>(&db_port_)) + sizeof(db_conn_pool_size_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear();
- }
- bool database_config::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:parkspace_proto.database_config)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // required string db_ip = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_db_ip()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_ip().data(), static_cast<int>(this->db_ip().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "parkspace_proto.database_config.db_ip");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // required int64 db_port = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
- set_has_db_port();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &db_port_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // required string db_username = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_db_username()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_username().data(), static_cast<int>(this->db_username().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "parkspace_proto.database_config.db_username");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional string db_passwd = 4 [default = ""];
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_db_passwd()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_passwd().data(), static_cast<int>(this->db_passwd().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "parkspace_proto.database_config.db_passwd");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // required string db_name = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_db_name()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_name().data(), static_cast<int>(this->db_name().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "parkspace_proto.database_config.db_name");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional int64 db_conn_pool_size = 6;
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
- set_has_db_conn_pool_size();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &db_conn_pool_size_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:parkspace_proto.database_config)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:parkspace_proto.database_config)
- return false;
- #undef DO_
- }
- void database_config::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:parkspace_proto.database_config)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // required string db_ip = 1;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_ip().data(), static_cast<int>(this->db_ip().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "parkspace_proto.database_config.db_ip");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->db_ip(), output);
- }
- // required int64 db_port = 2;
- if (cached_has_bits & 0x00000010u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->db_port(), output);
- }
- // required string db_username = 3;
- if (cached_has_bits & 0x00000002u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_username().data(), static_cast<int>(this->db_username().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "parkspace_proto.database_config.db_username");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 3, this->db_username(), output);
- }
- // optional string db_passwd = 4 [default = ""];
- if (cached_has_bits & 0x00000004u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_passwd().data(), static_cast<int>(this->db_passwd().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "parkspace_proto.database_config.db_passwd");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 4, this->db_passwd(), output);
- }
- // required string db_name = 5;
- if (cached_has_bits & 0x00000008u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_name().data(), static_cast<int>(this->db_name().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "parkspace_proto.database_config.db_name");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 5, this->db_name(), output);
- }
- // optional int64 db_conn_pool_size = 6;
- if (cached_has_bits & 0x00000020u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->db_conn_pool_size(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:parkspace_proto.database_config)
- }
- ::google::protobuf::uint8* database_config::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:parkspace_proto.database_config)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // required string db_ip = 1;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_ip().data(), static_cast<int>(this->db_ip().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "parkspace_proto.database_config.db_ip");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->db_ip(), target);
- }
- // required int64 db_port = 2;
- if (cached_has_bits & 0x00000010u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->db_port(), target);
- }
- // required string db_username = 3;
- if (cached_has_bits & 0x00000002u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_username().data(), static_cast<int>(this->db_username().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "parkspace_proto.database_config.db_username");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 3, this->db_username(), target);
- }
- // optional string db_passwd = 4 [default = ""];
- if (cached_has_bits & 0x00000004u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_passwd().data(), static_cast<int>(this->db_passwd().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "parkspace_proto.database_config.db_passwd");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 4, this->db_passwd(), target);
- }
- // required string db_name = 5;
- if (cached_has_bits & 0x00000008u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->db_name().data(), static_cast<int>(this->db_name().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "parkspace_proto.database_config.db_name");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 5, this->db_name(), target);
- }
- // optional int64 db_conn_pool_size = 6;
- if (cached_has_bits & 0x00000020u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->db_conn_pool_size(), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:parkspace_proto.database_config)
- return target;
- }
- size_t database_config::RequiredFieldsByteSizeFallback() const {
- // @@protoc_insertion_point(required_fields_byte_size_fallback_start:parkspace_proto.database_config)
- size_t total_size = 0;
- if (has_db_ip()) {
- // required string db_ip = 1;
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->db_ip());
- }
- if (has_db_username()) {
- // required string db_username = 3;
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->db_username());
- }
- if (has_db_name()) {
- // required string db_name = 5;
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->db_name());
- }
- if (has_db_port()) {
- // required int64 db_port = 2;
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->db_port());
- }
- return total_size;
- }
- size_t database_config::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:parkspace_proto.database_config)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- if (((_has_bits_[0] & 0x0000001b) ^ 0x0000001b) == 0) { // All required fields are present.
- // required string db_ip = 1;
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->db_ip());
- // required string db_username = 3;
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->db_username());
- // required string db_name = 5;
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->db_name());
- // required int64 db_port = 2;
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->db_port());
- } else {
- total_size += RequiredFieldsByteSizeFallback();
- }
- // optional string db_passwd = 4 [default = ""];
- if (has_db_passwd()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->db_passwd());
- }
- // optional int64 db_conn_pool_size = 6;
- if (has_db_conn_pool_size()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->db_conn_pool_size());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
- }
- void database_config::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:parkspace_proto.database_config)
- GOOGLE_DCHECK_NE(&from, this);
- const database_config* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const database_config>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:parkspace_proto.database_config)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:parkspace_proto.database_config)
- MergeFrom(*source);
- }
- }
- void database_config::MergeFrom(const database_config& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:parkspace_proto.database_config)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 63u) {
- if (cached_has_bits & 0x00000001u) {
- set_has_db_ip();
- db_ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_ip_);
- }
- if (cached_has_bits & 0x00000002u) {
- set_has_db_username();
- db_username_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_username_);
- }
- if (cached_has_bits & 0x00000004u) {
- set_has_db_passwd();
- db_passwd_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_passwd_);
- }
- if (cached_has_bits & 0x00000008u) {
- set_has_db_name();
- db_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_name_);
- }
- if (cached_has_bits & 0x00000010u) {
- db_port_ = from.db_port_;
- }
- if (cached_has_bits & 0x00000020u) {
- db_conn_pool_size_ = from.db_conn_pool_size_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- }
- void database_config::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:parkspace_proto.database_config)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void database_config::CopyFrom(const database_config& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:parkspace_proto.database_config)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool database_config::IsInitialized() const {
- if ((_has_bits_[0] & 0x0000001b) != 0x0000001b) return false;
- return true;
- }
- void database_config::Swap(database_config* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void database_config::InternalSwap(database_config* other) {
- using std::swap;
- db_ip_.Swap(&other->db_ip_);
- db_username_.Swap(&other->db_username_);
- db_passwd_.Swap(&other->db_passwd_);
- db_name_.Swap(&other->db_name_);
- swap(db_port_, other->db_port_);
- swap(db_conn_pool_size_, other->db_conn_pool_size_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
- }
- ::google::protobuf::Metadata database_config::GetMetadata() const {
- protobuf_parkspace_5fparameter_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_parkspace_5fparameter_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace parkspace_proto
- // @@protoc_insertion_point(global_scope)
|