parkspace_parameter.pb.cc 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: parkspace_parameter.proto
  3. #include "parkspace_parameter.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/stubs/once.h>
  8. #include <google/protobuf/io/coded_stream.h>
  9. #include <google/protobuf/wire_format_lite_inl.h>
  10. #include <google/protobuf/descriptor.h>
  11. #include <google/protobuf/generated_message_reflection.h>
  12. #include <google/protobuf/reflection_ops.h>
  13. #include <google/protobuf/wire_format.h>
  14. // This is a temporary google only hack
  15. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  16. #include "third_party/protobuf/version.h"
  17. #endif
  18. // @@protoc_insertion_point(includes)
  19. namespace parkspace_proto {
  20. class database_configDefaultTypeInternal {
  21. public:
  22. ::google::protobuf::internal::ExplicitlyConstructed<database_config>
  23. _instance;
  24. } _database_config_default_instance_;
  25. } // namespace parkspace_proto
  26. namespace protobuf_parkspace_5fparameter_2eproto {
  27. void InitDefaultsdatabase_configImpl() {
  28. GOOGLE_PROTOBUF_VERIFY_VERSION;
  29. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  30. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  31. #else
  32. ::google::protobuf::internal::InitProtobufDefaults();
  33. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  34. {
  35. void* ptr = &::parkspace_proto::_database_config_default_instance_;
  36. new (ptr) ::parkspace_proto::database_config();
  37. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  38. }
  39. ::parkspace_proto::database_config::InitAsDefaultInstance();
  40. }
  41. void InitDefaultsdatabase_config() {
  42. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  43. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsdatabase_configImpl);
  44. }
  45. ::google::protobuf::Metadata file_level_metadata[1];
  46. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  47. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, _has_bits_),
  48. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, _internal_metadata_),
  49. ~0u, // no _extensions_
  50. ~0u, // no _oneof_case_
  51. ~0u, // no _weak_field_map_
  52. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_ip_),
  53. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_port_),
  54. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_username_),
  55. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_passwd_),
  56. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_name_),
  57. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::parkspace_proto::database_config, db_conn_pool_size_),
  58. 0,
  59. 4,
  60. 1,
  61. 2,
  62. 3,
  63. 5,
  64. };
  65. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  66. { 0, 11, sizeof(::parkspace_proto::database_config)},
  67. };
  68. static ::google::protobuf::Message const * const file_default_instances[] = {
  69. reinterpret_cast<const ::google::protobuf::Message*>(&::parkspace_proto::_database_config_default_instance_),
  70. };
  71. void protobuf_AssignDescriptors() {
  72. AddDescriptors();
  73. ::google::protobuf::MessageFactory* factory = NULL;
  74. AssignDescriptors(
  75. "parkspace_parameter.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  76. file_level_metadata, NULL, NULL);
  77. }
  78. void protobuf_AssignDescriptorsOnce() {
  79. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  80. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  81. }
  82. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  83. void protobuf_RegisterTypes(const ::std::string&) {
  84. protobuf_AssignDescriptorsOnce();
  85. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
  86. }
  87. void AddDescriptorsImpl() {
  88. InitDefaults();
  89. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  90. "\n\031parkspace_parameter.proto\022\017parkspace_p"
  91. "roto\"\207\001\n\017database_config\022\r\n\005db_ip\030\001 \002(\t\022"
  92. "\017\n\007db_port\030\002 \002(\003\022\023\n\013db_username\030\003 \002(\t\022\023\n"
  93. "\tdb_passwd\030\004 \001(\t:\000\022\017\n\007db_name\030\005 \002(\t\022\031\n\021d"
  94. "b_conn_pool_size\030\006 \001(\003"
  95. };
  96. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  97. descriptor, 182);
  98. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  99. "parkspace_parameter.proto", &protobuf_RegisterTypes);
  100. }
  101. void AddDescriptors() {
  102. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  103. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  104. }
  105. // Force AddDescriptors() to be called at dynamic initialization time.
  106. struct StaticDescriptorInitializer {
  107. StaticDescriptorInitializer() {
  108. AddDescriptors();
  109. }
  110. } static_descriptor_initializer;
  111. } // namespace protobuf_parkspace_5fparameter_2eproto
  112. namespace parkspace_proto {
  113. // ===================================================================
  114. void database_config::InitAsDefaultInstance() {
  115. }
  116. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  117. const int database_config::kDbIpFieldNumber;
  118. const int database_config::kDbPortFieldNumber;
  119. const int database_config::kDbUsernameFieldNumber;
  120. const int database_config::kDbPasswdFieldNumber;
  121. const int database_config::kDbNameFieldNumber;
  122. const int database_config::kDbConnPoolSizeFieldNumber;
  123. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  124. database_config::database_config()
  125. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  126. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  127. ::protobuf_parkspace_5fparameter_2eproto::InitDefaultsdatabase_config();
  128. }
  129. SharedCtor();
  130. // @@protoc_insertion_point(constructor:parkspace_proto.database_config)
  131. }
  132. database_config::database_config(const database_config& from)
  133. : ::google::protobuf::Message(),
  134. _internal_metadata_(NULL),
  135. _has_bits_(from._has_bits_),
  136. _cached_size_(0) {
  137. _internal_metadata_.MergeFrom(from._internal_metadata_);
  138. db_ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  139. if (from.has_db_ip()) {
  140. db_ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_ip_);
  141. }
  142. db_username_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  143. if (from.has_db_username()) {
  144. db_username_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_username_);
  145. }
  146. db_passwd_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  147. if (from.has_db_passwd()) {
  148. db_passwd_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_passwd_);
  149. }
  150. db_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  151. if (from.has_db_name()) {
  152. db_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_name_);
  153. }
  154. ::memcpy(&db_port_, &from.db_port_,
  155. static_cast<size_t>(reinterpret_cast<char*>(&db_conn_pool_size_) -
  156. reinterpret_cast<char*>(&db_port_)) + sizeof(db_conn_pool_size_));
  157. // @@protoc_insertion_point(copy_constructor:parkspace_proto.database_config)
  158. }
  159. void database_config::SharedCtor() {
  160. _cached_size_ = 0;
  161. db_ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  162. db_username_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  163. db_passwd_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  164. db_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  165. ::memset(&db_port_, 0, static_cast<size_t>(
  166. reinterpret_cast<char*>(&db_conn_pool_size_) -
  167. reinterpret_cast<char*>(&db_port_)) + sizeof(db_conn_pool_size_));
  168. }
  169. database_config::~database_config() {
  170. // @@protoc_insertion_point(destructor:parkspace_proto.database_config)
  171. SharedDtor();
  172. }
  173. void database_config::SharedDtor() {
  174. db_ip_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  175. db_username_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  176. db_passwd_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  177. db_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  178. }
  179. void database_config::SetCachedSize(int size) const {
  180. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  181. _cached_size_ = size;
  182. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  183. }
  184. const ::google::protobuf::Descriptor* database_config::descriptor() {
  185. ::protobuf_parkspace_5fparameter_2eproto::protobuf_AssignDescriptorsOnce();
  186. return ::protobuf_parkspace_5fparameter_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  187. }
  188. const database_config& database_config::default_instance() {
  189. ::protobuf_parkspace_5fparameter_2eproto::InitDefaultsdatabase_config();
  190. return *internal_default_instance();
  191. }
  192. database_config* database_config::New(::google::protobuf::Arena* arena) const {
  193. database_config* n = new database_config;
  194. if (arena != NULL) {
  195. arena->Own(n);
  196. }
  197. return n;
  198. }
  199. void database_config::Clear() {
  200. // @@protoc_insertion_point(message_clear_start:parkspace_proto.database_config)
  201. ::google::protobuf::uint32 cached_has_bits = 0;
  202. // Prevent compiler warnings about cached_has_bits being unused
  203. (void) cached_has_bits;
  204. cached_has_bits = _has_bits_[0];
  205. if (cached_has_bits & 15u) {
  206. if (cached_has_bits & 0x00000001u) {
  207. GOOGLE_DCHECK(!db_ip_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
  208. (*db_ip_.UnsafeRawStringPointer())->clear();
  209. }
  210. if (cached_has_bits & 0x00000002u) {
  211. GOOGLE_DCHECK(!db_username_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
  212. (*db_username_.UnsafeRawStringPointer())->clear();
  213. }
  214. if (cached_has_bits & 0x00000004u) {
  215. GOOGLE_DCHECK(!db_passwd_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
  216. (*db_passwd_.UnsafeRawStringPointer())->clear();
  217. }
  218. if (cached_has_bits & 0x00000008u) {
  219. GOOGLE_DCHECK(!db_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
  220. (*db_name_.UnsafeRawStringPointer())->clear();
  221. }
  222. }
  223. if (cached_has_bits & 48u) {
  224. ::memset(&db_port_, 0, static_cast<size_t>(
  225. reinterpret_cast<char*>(&db_conn_pool_size_) -
  226. reinterpret_cast<char*>(&db_port_)) + sizeof(db_conn_pool_size_));
  227. }
  228. _has_bits_.Clear();
  229. _internal_metadata_.Clear();
  230. }
  231. bool database_config::MergePartialFromCodedStream(
  232. ::google::protobuf::io::CodedInputStream* input) {
  233. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  234. ::google::protobuf::uint32 tag;
  235. // @@protoc_insertion_point(parse_start:parkspace_proto.database_config)
  236. for (;;) {
  237. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  238. tag = p.first;
  239. if (!p.second) goto handle_unusual;
  240. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  241. // required string db_ip = 1;
  242. case 1: {
  243. if (static_cast< ::google::protobuf::uint8>(tag) ==
  244. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  245. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  246. input, this->mutable_db_ip()));
  247. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  248. this->db_ip().data(), static_cast<int>(this->db_ip().length()),
  249. ::google::protobuf::internal::WireFormat::PARSE,
  250. "parkspace_proto.database_config.db_ip");
  251. } else {
  252. goto handle_unusual;
  253. }
  254. break;
  255. }
  256. // required int64 db_port = 2;
  257. case 2: {
  258. if (static_cast< ::google::protobuf::uint8>(tag) ==
  259. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  260. set_has_db_port();
  261. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  262. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  263. input, &db_port_)));
  264. } else {
  265. goto handle_unusual;
  266. }
  267. break;
  268. }
  269. // required string db_username = 3;
  270. case 3: {
  271. if (static_cast< ::google::protobuf::uint8>(tag) ==
  272. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  273. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  274. input, this->mutable_db_username()));
  275. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  276. this->db_username().data(), static_cast<int>(this->db_username().length()),
  277. ::google::protobuf::internal::WireFormat::PARSE,
  278. "parkspace_proto.database_config.db_username");
  279. } else {
  280. goto handle_unusual;
  281. }
  282. break;
  283. }
  284. // optional string db_passwd = 4 [default = ""];
  285. case 4: {
  286. if (static_cast< ::google::protobuf::uint8>(tag) ==
  287. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  288. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  289. input, this->mutable_db_passwd()));
  290. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  291. this->db_passwd().data(), static_cast<int>(this->db_passwd().length()),
  292. ::google::protobuf::internal::WireFormat::PARSE,
  293. "parkspace_proto.database_config.db_passwd");
  294. } else {
  295. goto handle_unusual;
  296. }
  297. break;
  298. }
  299. // required string db_name = 5;
  300. case 5: {
  301. if (static_cast< ::google::protobuf::uint8>(tag) ==
  302. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  303. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  304. input, this->mutable_db_name()));
  305. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  306. this->db_name().data(), static_cast<int>(this->db_name().length()),
  307. ::google::protobuf::internal::WireFormat::PARSE,
  308. "parkspace_proto.database_config.db_name");
  309. } else {
  310. goto handle_unusual;
  311. }
  312. break;
  313. }
  314. // optional int64 db_conn_pool_size = 6;
  315. case 6: {
  316. if (static_cast< ::google::protobuf::uint8>(tag) ==
  317. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  318. set_has_db_conn_pool_size();
  319. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  320. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  321. input, &db_conn_pool_size_)));
  322. } else {
  323. goto handle_unusual;
  324. }
  325. break;
  326. }
  327. default: {
  328. handle_unusual:
  329. if (tag == 0) {
  330. goto success;
  331. }
  332. DO_(::google::protobuf::internal::WireFormat::SkipField(
  333. input, tag, _internal_metadata_.mutable_unknown_fields()));
  334. break;
  335. }
  336. }
  337. }
  338. success:
  339. // @@protoc_insertion_point(parse_success:parkspace_proto.database_config)
  340. return true;
  341. failure:
  342. // @@protoc_insertion_point(parse_failure:parkspace_proto.database_config)
  343. return false;
  344. #undef DO_
  345. }
  346. void database_config::SerializeWithCachedSizes(
  347. ::google::protobuf::io::CodedOutputStream* output) const {
  348. // @@protoc_insertion_point(serialize_start:parkspace_proto.database_config)
  349. ::google::protobuf::uint32 cached_has_bits = 0;
  350. (void) cached_has_bits;
  351. cached_has_bits = _has_bits_[0];
  352. // required string db_ip = 1;
  353. if (cached_has_bits & 0x00000001u) {
  354. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  355. this->db_ip().data(), static_cast<int>(this->db_ip().length()),
  356. ::google::protobuf::internal::WireFormat::SERIALIZE,
  357. "parkspace_proto.database_config.db_ip");
  358. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  359. 1, this->db_ip(), output);
  360. }
  361. // required int64 db_port = 2;
  362. if (cached_has_bits & 0x00000010u) {
  363. ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->db_port(), output);
  364. }
  365. // required string db_username = 3;
  366. if (cached_has_bits & 0x00000002u) {
  367. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  368. this->db_username().data(), static_cast<int>(this->db_username().length()),
  369. ::google::protobuf::internal::WireFormat::SERIALIZE,
  370. "parkspace_proto.database_config.db_username");
  371. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  372. 3, this->db_username(), output);
  373. }
  374. // optional string db_passwd = 4 [default = ""];
  375. if (cached_has_bits & 0x00000004u) {
  376. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  377. this->db_passwd().data(), static_cast<int>(this->db_passwd().length()),
  378. ::google::protobuf::internal::WireFormat::SERIALIZE,
  379. "parkspace_proto.database_config.db_passwd");
  380. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  381. 4, this->db_passwd(), output);
  382. }
  383. // required string db_name = 5;
  384. if (cached_has_bits & 0x00000008u) {
  385. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  386. this->db_name().data(), static_cast<int>(this->db_name().length()),
  387. ::google::protobuf::internal::WireFormat::SERIALIZE,
  388. "parkspace_proto.database_config.db_name");
  389. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  390. 5, this->db_name(), output);
  391. }
  392. // optional int64 db_conn_pool_size = 6;
  393. if (cached_has_bits & 0x00000020u) {
  394. ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->db_conn_pool_size(), output);
  395. }
  396. if (_internal_metadata_.have_unknown_fields()) {
  397. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  398. _internal_metadata_.unknown_fields(), output);
  399. }
  400. // @@protoc_insertion_point(serialize_end:parkspace_proto.database_config)
  401. }
  402. ::google::protobuf::uint8* database_config::InternalSerializeWithCachedSizesToArray(
  403. bool deterministic, ::google::protobuf::uint8* target) const {
  404. (void)deterministic; // Unused
  405. // @@protoc_insertion_point(serialize_to_array_start:parkspace_proto.database_config)
  406. ::google::protobuf::uint32 cached_has_bits = 0;
  407. (void) cached_has_bits;
  408. cached_has_bits = _has_bits_[0];
  409. // required string db_ip = 1;
  410. if (cached_has_bits & 0x00000001u) {
  411. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  412. this->db_ip().data(), static_cast<int>(this->db_ip().length()),
  413. ::google::protobuf::internal::WireFormat::SERIALIZE,
  414. "parkspace_proto.database_config.db_ip");
  415. target =
  416. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  417. 1, this->db_ip(), target);
  418. }
  419. // required int64 db_port = 2;
  420. if (cached_has_bits & 0x00000010u) {
  421. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->db_port(), target);
  422. }
  423. // required string db_username = 3;
  424. if (cached_has_bits & 0x00000002u) {
  425. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  426. this->db_username().data(), static_cast<int>(this->db_username().length()),
  427. ::google::protobuf::internal::WireFormat::SERIALIZE,
  428. "parkspace_proto.database_config.db_username");
  429. target =
  430. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  431. 3, this->db_username(), target);
  432. }
  433. // optional string db_passwd = 4 [default = ""];
  434. if (cached_has_bits & 0x00000004u) {
  435. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  436. this->db_passwd().data(), static_cast<int>(this->db_passwd().length()),
  437. ::google::protobuf::internal::WireFormat::SERIALIZE,
  438. "parkspace_proto.database_config.db_passwd");
  439. target =
  440. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  441. 4, this->db_passwd(), target);
  442. }
  443. // required string db_name = 5;
  444. if (cached_has_bits & 0x00000008u) {
  445. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  446. this->db_name().data(), static_cast<int>(this->db_name().length()),
  447. ::google::protobuf::internal::WireFormat::SERIALIZE,
  448. "parkspace_proto.database_config.db_name");
  449. target =
  450. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  451. 5, this->db_name(), target);
  452. }
  453. // optional int64 db_conn_pool_size = 6;
  454. if (cached_has_bits & 0x00000020u) {
  455. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->db_conn_pool_size(), target);
  456. }
  457. if (_internal_metadata_.have_unknown_fields()) {
  458. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  459. _internal_metadata_.unknown_fields(), target);
  460. }
  461. // @@protoc_insertion_point(serialize_to_array_end:parkspace_proto.database_config)
  462. return target;
  463. }
  464. size_t database_config::RequiredFieldsByteSizeFallback() const {
  465. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:parkspace_proto.database_config)
  466. size_t total_size = 0;
  467. if (has_db_ip()) {
  468. // required string db_ip = 1;
  469. total_size += 1 +
  470. ::google::protobuf::internal::WireFormatLite::StringSize(
  471. this->db_ip());
  472. }
  473. if (has_db_username()) {
  474. // required string db_username = 3;
  475. total_size += 1 +
  476. ::google::protobuf::internal::WireFormatLite::StringSize(
  477. this->db_username());
  478. }
  479. if (has_db_name()) {
  480. // required string db_name = 5;
  481. total_size += 1 +
  482. ::google::protobuf::internal::WireFormatLite::StringSize(
  483. this->db_name());
  484. }
  485. if (has_db_port()) {
  486. // required int64 db_port = 2;
  487. total_size += 1 +
  488. ::google::protobuf::internal::WireFormatLite::Int64Size(
  489. this->db_port());
  490. }
  491. return total_size;
  492. }
  493. size_t database_config::ByteSizeLong() const {
  494. // @@protoc_insertion_point(message_byte_size_start:parkspace_proto.database_config)
  495. size_t total_size = 0;
  496. if (_internal_metadata_.have_unknown_fields()) {
  497. total_size +=
  498. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  499. _internal_metadata_.unknown_fields());
  500. }
  501. if (((_has_bits_[0] & 0x0000001b) ^ 0x0000001b) == 0) { // All required fields are present.
  502. // required string db_ip = 1;
  503. total_size += 1 +
  504. ::google::protobuf::internal::WireFormatLite::StringSize(
  505. this->db_ip());
  506. // required string db_username = 3;
  507. total_size += 1 +
  508. ::google::protobuf::internal::WireFormatLite::StringSize(
  509. this->db_username());
  510. // required string db_name = 5;
  511. total_size += 1 +
  512. ::google::protobuf::internal::WireFormatLite::StringSize(
  513. this->db_name());
  514. // required int64 db_port = 2;
  515. total_size += 1 +
  516. ::google::protobuf::internal::WireFormatLite::Int64Size(
  517. this->db_port());
  518. } else {
  519. total_size += RequiredFieldsByteSizeFallback();
  520. }
  521. // optional string db_passwd = 4 [default = ""];
  522. if (has_db_passwd()) {
  523. total_size += 1 +
  524. ::google::protobuf::internal::WireFormatLite::StringSize(
  525. this->db_passwd());
  526. }
  527. // optional int64 db_conn_pool_size = 6;
  528. if (has_db_conn_pool_size()) {
  529. total_size += 1 +
  530. ::google::protobuf::internal::WireFormatLite::Int64Size(
  531. this->db_conn_pool_size());
  532. }
  533. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  534. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  535. _cached_size_ = cached_size;
  536. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  537. return total_size;
  538. }
  539. void database_config::MergeFrom(const ::google::protobuf::Message& from) {
  540. // @@protoc_insertion_point(generalized_merge_from_start:parkspace_proto.database_config)
  541. GOOGLE_DCHECK_NE(&from, this);
  542. const database_config* source =
  543. ::google::protobuf::internal::DynamicCastToGenerated<const database_config>(
  544. &from);
  545. if (source == NULL) {
  546. // @@protoc_insertion_point(generalized_merge_from_cast_fail:parkspace_proto.database_config)
  547. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  548. } else {
  549. // @@protoc_insertion_point(generalized_merge_from_cast_success:parkspace_proto.database_config)
  550. MergeFrom(*source);
  551. }
  552. }
  553. void database_config::MergeFrom(const database_config& from) {
  554. // @@protoc_insertion_point(class_specific_merge_from_start:parkspace_proto.database_config)
  555. GOOGLE_DCHECK_NE(&from, this);
  556. _internal_metadata_.MergeFrom(from._internal_metadata_);
  557. ::google::protobuf::uint32 cached_has_bits = 0;
  558. (void) cached_has_bits;
  559. cached_has_bits = from._has_bits_[0];
  560. if (cached_has_bits & 63u) {
  561. if (cached_has_bits & 0x00000001u) {
  562. set_has_db_ip();
  563. db_ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_ip_);
  564. }
  565. if (cached_has_bits & 0x00000002u) {
  566. set_has_db_username();
  567. db_username_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_username_);
  568. }
  569. if (cached_has_bits & 0x00000004u) {
  570. set_has_db_passwd();
  571. db_passwd_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_passwd_);
  572. }
  573. if (cached_has_bits & 0x00000008u) {
  574. set_has_db_name();
  575. db_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.db_name_);
  576. }
  577. if (cached_has_bits & 0x00000010u) {
  578. db_port_ = from.db_port_;
  579. }
  580. if (cached_has_bits & 0x00000020u) {
  581. db_conn_pool_size_ = from.db_conn_pool_size_;
  582. }
  583. _has_bits_[0] |= cached_has_bits;
  584. }
  585. }
  586. void database_config::CopyFrom(const ::google::protobuf::Message& from) {
  587. // @@protoc_insertion_point(generalized_copy_from_start:parkspace_proto.database_config)
  588. if (&from == this) return;
  589. Clear();
  590. MergeFrom(from);
  591. }
  592. void database_config::CopyFrom(const database_config& from) {
  593. // @@protoc_insertion_point(class_specific_copy_from_start:parkspace_proto.database_config)
  594. if (&from == this) return;
  595. Clear();
  596. MergeFrom(from);
  597. }
  598. bool database_config::IsInitialized() const {
  599. if ((_has_bits_[0] & 0x0000001b) != 0x0000001b) return false;
  600. return true;
  601. }
  602. void database_config::Swap(database_config* other) {
  603. if (other == this) return;
  604. InternalSwap(other);
  605. }
  606. void database_config::InternalSwap(database_config* other) {
  607. using std::swap;
  608. db_ip_.Swap(&other->db_ip_);
  609. db_username_.Swap(&other->db_username_);
  610. db_passwd_.Swap(&other->db_passwd_);
  611. db_name_.Swap(&other->db_name_);
  612. swap(db_port_, other->db_port_);
  613. swap(db_conn_pool_size_, other->db_conn_pool_size_);
  614. swap(_has_bits_[0], other->_has_bits_[0]);
  615. _internal_metadata_.Swap(&other->_internal_metadata_);
  616. swap(_cached_size_, other->_cached_size_);
  617. }
  618. ::google::protobuf::Metadata database_config::GetMetadata() const {
  619. protobuf_parkspace_5fparameter_2eproto::protobuf_AssignDescriptorsOnce();
  620. return ::protobuf_parkspace_5fparameter_2eproto::file_level_metadata[kIndexInFileMessages];
  621. }
  622. // @@protoc_insertion_point(namespace_scope)
  623. } // namespace parkspace_proto
  624. // @@protoc_insertion_point(global_scope)