1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: mysqlx.proto
3
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include "mysqlx.pb.h"
6
7 #include <algorithm>
8
9 #include <google/protobuf/stubs/common.h>
10 #include <google/protobuf/stubs/once.h>
11 #include <google/protobuf/io/coded_stream.h>
12 #include <google/protobuf/wire_format_lite_inl.h>
13 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
14 // @@protoc_insertion_point(includes)
15
16 namespace Mysqlx {
17
protobuf_ShutdownFile_mysqlx_2eproto()18 void protobuf_ShutdownFile_mysqlx_2eproto() {
19 delete ClientMessages::default_instance_;
20 delete ServerMessages::default_instance_;
21 delete Ok::default_instance_;
22 delete Error::default_instance_;
23 }
24
25 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
protobuf_AddDesc_mysqlx_2eproto_impl()26 void protobuf_AddDesc_mysqlx_2eproto_impl() {
27 GOOGLE_PROTOBUF_VERIFY_VERSION;
28
29 #else
30 void protobuf_AddDesc_mysqlx_2eproto() {
31 static bool already_here = false;
32 if (already_here) return;
33 already_here = true;
34 GOOGLE_PROTOBUF_VERIFY_VERSION;
35
36 #endif
37 ::Mysqlx::Sql::protobuf_AddDesc_mysqlx_5fsql_2eproto();
38 ::Mysqlx::Resultset::protobuf_AddDesc_mysqlx_5fresultset_2eproto();
39 ::Mysqlx::Crud::protobuf_AddDesc_mysqlx_5fcrud_2eproto();
40 ::Mysqlx::Session::protobuf_AddDesc_mysqlx_5fsession_2eproto();
41 ::Mysqlx::Connection::protobuf_AddDesc_mysqlx_5fconnection_2eproto();
42 ::Mysqlx::Expect::protobuf_AddDesc_mysqlx_5fexpect_2eproto();
43 ::Mysqlx::Notice::protobuf_AddDesc_mysqlx_5fnotice_2eproto();
44 ClientMessages::default_instance_ = new ClientMessages();
45 ServerMessages::default_instance_ = new ServerMessages();
46 Ok::default_instance_ = new Ok();
47 Error::default_instance_ = new Error();
48 ClientMessages::default_instance_->InitAsDefaultInstance();
49 ServerMessages::default_instance_->InitAsDefaultInstance();
50 Ok::default_instance_->InitAsDefaultInstance();
51 Error::default_instance_->InitAsDefaultInstance();
52 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_mysqlx_2eproto);
53 }
54
55 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
56 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_mysqlx_2eproto_once_);
57 void protobuf_AddDesc_mysqlx_2eproto() {
58 ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_mysqlx_2eproto_once_,
59 &protobuf_AddDesc_mysqlx_2eproto_impl);
60 }
61 #else
62 // Force AddDescriptors() to be called at static initialization time.
63 struct StaticDescriptorInitializer_mysqlx_2eproto {
64 StaticDescriptorInitializer_mysqlx_2eproto() {
65 protobuf_AddDesc_mysqlx_2eproto();
66 }
67 } static_descriptor_initializer_mysqlx_2eproto_;
68 #endif
69
70 // ===================================================================
71
72 bool ClientMessages_Type_IsValid(int value) {
73 switch(value) {
74 case 1:
75 case 2:
76 case 3:
77 case 4:
78 case 5:
79 case 6:
80 case 7:
81 case 12:
82 case 17:
83 case 18:
84 case 19:
85 case 20:
86 case 24:
87 case 25:
88 return true;
89 default:
90 return false;
91 }
92 }
93
94 #ifndef _MSC_VER
95 const ClientMessages_Type ClientMessages::CON_CAPABILITIES_GET;
96 const ClientMessages_Type ClientMessages::CON_CAPABILITIES_SET;
97 const ClientMessages_Type ClientMessages::CON_CLOSE;
98 const ClientMessages_Type ClientMessages::SESS_AUTHENTICATE_START;
99 const ClientMessages_Type ClientMessages::SESS_AUTHENTICATE_CONTINUE;
100 const ClientMessages_Type ClientMessages::SESS_RESET;
101 const ClientMessages_Type ClientMessages::SESS_CLOSE;
102 const ClientMessages_Type ClientMessages::SQL_STMT_EXECUTE;
103 const ClientMessages_Type ClientMessages::CRUD_FIND;
104 const ClientMessages_Type ClientMessages::CRUD_INSERT;
105 const ClientMessages_Type ClientMessages::CRUD_UPDATE;
106 const ClientMessages_Type ClientMessages::CRUD_DELETE;
107 const ClientMessages_Type ClientMessages::EXPECT_OPEN;
108 const ClientMessages_Type ClientMessages::EXPECT_CLOSE;
109 const ClientMessages_Type ClientMessages::Type_MIN;
110 const ClientMessages_Type ClientMessages::Type_MAX;
111 const int ClientMessages::Type_ARRAYSIZE;
112 #endif // _MSC_VER
113 #ifndef _MSC_VER
114 #endif // !_MSC_VER
115
116 ClientMessages::ClientMessages()
117 : ::google::protobuf::MessageLite() {
118 SharedCtor();
119 // @@protoc_insertion_point(constructor:Mysqlx.ClientMessages)
120 }
121
122 void ClientMessages::InitAsDefaultInstance() {
123 }
124
125 ClientMessages::ClientMessages(const ClientMessages& from)
126 : ::google::protobuf::MessageLite() {
127 SharedCtor();
128 MergeFrom(from);
129 // @@protoc_insertion_point(copy_constructor:Mysqlx.ClientMessages)
130 }
131
132 void ClientMessages::SharedCtor() {
133 _cached_size_ = 0;
134 ::memset(_has_bits_, 0, sizeof(_has_bits_));
135 }
136
137 ClientMessages::~ClientMessages() {
138 // @@protoc_insertion_point(destructor:Mysqlx.ClientMessages)
139 SharedDtor();
140 }
141
142 void ClientMessages::SharedDtor() {
143 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
144 if (this != &default_instance()) {
145 #else
146 if (this != default_instance_) {
147 #endif
148 }
149 }
150
151 void ClientMessages::SetCachedSize(int size) const {
152 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
153 _cached_size_ = size;
154 GOOGLE_SAFE_CONCURRENT_WRITES_END();
155 }
156 const ClientMessages& ClientMessages::default_instance() {
157 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
158 protobuf_AddDesc_mysqlx_2eproto();
159 #else
160 if (default_instance_ == NULL) protobuf_AddDesc_mysqlx_2eproto();
161 #endif
162 return *default_instance_;
163 }
164
165 ClientMessages* ClientMessages::default_instance_ = NULL;
166
167 ClientMessages* ClientMessages::New() const {
168 return new ClientMessages;
169 }
170
171 void ClientMessages::Clear() {
172 ::memset(_has_bits_, 0, sizeof(_has_bits_));
173 mutable_unknown_fields()->clear();
174 }
175
176 bool ClientMessages::MergePartialFromCodedStream(
177 ::google::protobuf::io::CodedInputStream* input) {
178 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
179 ::google::protobuf::uint32 tag;
180 ::google::protobuf::io::StringOutputStream unknown_fields_string(
181 mutable_unknown_fields());
182 ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
183 &unknown_fields_string);
184 // @@protoc_insertion_point(parse_start:Mysqlx.ClientMessages)
185 for (;;) {
186 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
187 tag = p.first;
188 if (!p.second) goto handle_unusual;
189 handle_unusual:
190 if (tag == 0 ||
191 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
192 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
193 goto success;
194 }
195 DO_(::google::protobuf::internal::WireFormatLite::SkipField(
196 input, tag, &unknown_fields_stream));
197 }
198 success:
199 // @@protoc_insertion_point(parse_success:Mysqlx.ClientMessages)
200 return true;
201 failure:
202 // @@protoc_insertion_point(parse_failure:Mysqlx.ClientMessages)
203 return false;
204 #undef DO_
205 }
206
207 void ClientMessages::SerializeWithCachedSizes(
208 ::google::protobuf::io::CodedOutputStream* output) const {
209 // @@protoc_insertion_point(serialize_start:Mysqlx.ClientMessages)
210 output->WriteRaw(unknown_fields().data(),
211 unknown_fields().size());
212 // @@protoc_insertion_point(serialize_end:Mysqlx.ClientMessages)
213 }
214
215 int ClientMessages::ByteSize() const {
216 int total_size = 0;
217
218 total_size += unknown_fields().size();
219
220 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
221 _cached_size_ = total_size;
222 GOOGLE_SAFE_CONCURRENT_WRITES_END();
223 return total_size;
224 }
225
226 void ClientMessages::CheckTypeAndMergeFrom(
227 const ::google::protobuf::MessageLite& from) {
228 MergeFrom(*::google::protobuf::down_cast<const ClientMessages*>(&from));
229 }
230
231 void ClientMessages::MergeFrom(const ClientMessages& from) {
232 GOOGLE_CHECK_NE(&from, this);
233 mutable_unknown_fields()->append(from.unknown_fields());
234 }
235
236 void ClientMessages::CopyFrom(const ClientMessages& from) {
237 if (&from == this) return;
238 Clear();
239 MergeFrom(from);
240 }
241
242 bool ClientMessages::IsInitialized() const {
243
244 return true;
245 }
246
247 void ClientMessages::Swap(ClientMessages* other) {
248 if (other != this) {
249 _unknown_fields_.swap(other->_unknown_fields_);
250 std::swap(_cached_size_, other->_cached_size_);
251 }
252 }
253
254 ::std::string ClientMessages::GetTypeName() const {
255 return "Mysqlx.ClientMessages";
256 }
257
258
259 // ===================================================================
260
261 bool ServerMessages_Type_IsValid(int value) {
262 switch(value) {
263 case 0:
264 case 1:
265 case 2:
266 case 3:
267 case 4:
268 case 11:
269 case 12:
270 case 13:
271 case 14:
272 case 15:
273 case 16:
274 case 17:
275 case 18:
276 return true;
277 default:
278 return false;
279 }
280 }
281
282 #ifndef _MSC_VER
283 const ServerMessages_Type ServerMessages::OK;
284 const ServerMessages_Type ServerMessages::ERROR;
285 const ServerMessages_Type ServerMessages::CONN_CAPABILITIES;
286 const ServerMessages_Type ServerMessages::SESS_AUTHENTICATE_CONTINUE;
287 const ServerMessages_Type ServerMessages::SESS_AUTHENTICATE_OK;
288 const ServerMessages_Type ServerMessages::NOTICE;
289 const ServerMessages_Type ServerMessages::RESULTSET_COLUMN_META_DATA;
290 const ServerMessages_Type ServerMessages::RESULTSET_ROW;
291 const ServerMessages_Type ServerMessages::RESULTSET_FETCH_DONE;
292 const ServerMessages_Type ServerMessages::RESULTSET_FETCH_SUSPENDED;
293 const ServerMessages_Type ServerMessages::RESULTSET_FETCH_DONE_MORE_RESULTSETS;
294 const ServerMessages_Type ServerMessages::SQL_STMT_EXECUTE_OK;
295 const ServerMessages_Type ServerMessages::RESULTSET_FETCH_DONE_MORE_OUT_PARAMS;
296 const ServerMessages_Type ServerMessages::Type_MIN;
297 const ServerMessages_Type ServerMessages::Type_MAX;
298 const int ServerMessages::Type_ARRAYSIZE;
299 #endif // _MSC_VER
300 #ifndef _MSC_VER
301 #endif // !_MSC_VER
302
303 ServerMessages::ServerMessages()
304 : ::google::protobuf::MessageLite() {
305 SharedCtor();
306 // @@protoc_insertion_point(constructor:Mysqlx.ServerMessages)
307 }
308
309 void ServerMessages::InitAsDefaultInstance() {
310 }
311
312 ServerMessages::ServerMessages(const ServerMessages& from)
313 : ::google::protobuf::MessageLite() {
314 SharedCtor();
315 MergeFrom(from);
316 // @@protoc_insertion_point(copy_constructor:Mysqlx.ServerMessages)
317 }
318
319 void ServerMessages::SharedCtor() {
320 _cached_size_ = 0;
321 ::memset(_has_bits_, 0, sizeof(_has_bits_));
322 }
323
324 ServerMessages::~ServerMessages() {
325 // @@protoc_insertion_point(destructor:Mysqlx.ServerMessages)
326 SharedDtor();
327 }
328
329 void ServerMessages::SharedDtor() {
330 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
331 if (this != &default_instance()) {
332 #else
333 if (this != default_instance_) {
334 #endif
335 }
336 }
337
338 void ServerMessages::SetCachedSize(int size) const {
339 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
340 _cached_size_ = size;
341 GOOGLE_SAFE_CONCURRENT_WRITES_END();
342 }
343 const ServerMessages& ServerMessages::default_instance() {
344 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
345 protobuf_AddDesc_mysqlx_2eproto();
346 #else
347 if (default_instance_ == NULL) protobuf_AddDesc_mysqlx_2eproto();
348 #endif
349 return *default_instance_;
350 }
351
352 ServerMessages* ServerMessages::default_instance_ = NULL;
353
354 ServerMessages* ServerMessages::New() const {
355 return new ServerMessages;
356 }
357
358 void ServerMessages::Clear() {
359 ::memset(_has_bits_, 0, sizeof(_has_bits_));
360 mutable_unknown_fields()->clear();
361 }
362
363 bool ServerMessages::MergePartialFromCodedStream(
364 ::google::protobuf::io::CodedInputStream* input) {
365 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
366 ::google::protobuf::uint32 tag;
367 ::google::protobuf::io::StringOutputStream unknown_fields_string(
368 mutable_unknown_fields());
369 ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
370 &unknown_fields_string);
371 // @@protoc_insertion_point(parse_start:Mysqlx.ServerMessages)
372 for (;;) {
373 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
374 tag = p.first;
375 if (!p.second) goto handle_unusual;
376 handle_unusual:
377 if (tag == 0 ||
378 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
379 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
380 goto success;
381 }
382 DO_(::google::protobuf::internal::WireFormatLite::SkipField(
383 input, tag, &unknown_fields_stream));
384 }
385 success:
386 // @@protoc_insertion_point(parse_success:Mysqlx.ServerMessages)
387 return true;
388 failure:
389 // @@protoc_insertion_point(parse_failure:Mysqlx.ServerMessages)
390 return false;
391 #undef DO_
392 }
393
394 void ServerMessages::SerializeWithCachedSizes(
395 ::google::protobuf::io::CodedOutputStream* output) const {
396 // @@protoc_insertion_point(serialize_start:Mysqlx.ServerMessages)
397 output->WriteRaw(unknown_fields().data(),
398 unknown_fields().size());
399 // @@protoc_insertion_point(serialize_end:Mysqlx.ServerMessages)
400 }
401
402 int ServerMessages::ByteSize() const {
403 int total_size = 0;
404
405 total_size += unknown_fields().size();
406
407 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
408 _cached_size_ = total_size;
409 GOOGLE_SAFE_CONCURRENT_WRITES_END();
410 return total_size;
411 }
412
413 void ServerMessages::CheckTypeAndMergeFrom(
414 const ::google::protobuf::MessageLite& from) {
415 MergeFrom(*::google::protobuf::down_cast<const ServerMessages*>(&from));
416 }
417
418 void ServerMessages::MergeFrom(const ServerMessages& from) {
419 GOOGLE_CHECK_NE(&from, this);
420 mutable_unknown_fields()->append(from.unknown_fields());
421 }
422
423 void ServerMessages::CopyFrom(const ServerMessages& from) {
424 if (&from == this) return;
425 Clear();
426 MergeFrom(from);
427 }
428
429 bool ServerMessages::IsInitialized() const {
430
431 return true;
432 }
433
434 void ServerMessages::Swap(ServerMessages* other) {
435 if (other != this) {
436 _unknown_fields_.swap(other->_unknown_fields_);
437 std::swap(_cached_size_, other->_cached_size_);
438 }
439 }
440
441 ::std::string ServerMessages::GetTypeName() const {
442 return "Mysqlx.ServerMessages";
443 }
444
445
446 // ===================================================================
447
448 #ifndef _MSC_VER
449 const int Ok::kMsgFieldNumber;
450 #endif // !_MSC_VER
451
452 Ok::Ok()
453 : ::google::protobuf::MessageLite() {
454 SharedCtor();
455 // @@protoc_insertion_point(constructor:Mysqlx.Ok)
456 }
457
458 void Ok::InitAsDefaultInstance() {
459 }
460
461 Ok::Ok(const Ok& from)
462 : ::google::protobuf::MessageLite() {
463 SharedCtor();
464 MergeFrom(from);
465 // @@protoc_insertion_point(copy_constructor:Mysqlx.Ok)
466 }
467
468 void Ok::SharedCtor() {
469 ::google::protobuf::internal::GetEmptyString();
470 _cached_size_ = 0;
471 msg_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
472 ::memset(_has_bits_, 0, sizeof(_has_bits_));
473 }
474
475 Ok::~Ok() {
476 // @@protoc_insertion_point(destructor:Mysqlx.Ok)
477 SharedDtor();
478 }
479
480 void Ok::SharedDtor() {
481 if (msg_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
482 delete msg_;
483 }
484 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
485 if (this != &default_instance()) {
486 #else
487 if (this != default_instance_) {
488 #endif
489 }
490 }
491
492 void Ok::SetCachedSize(int size) const {
493 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
494 _cached_size_ = size;
495 GOOGLE_SAFE_CONCURRENT_WRITES_END();
496 }
497 const Ok& Ok::default_instance() {
498 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
499 protobuf_AddDesc_mysqlx_2eproto();
500 #else
501 if (default_instance_ == NULL) protobuf_AddDesc_mysqlx_2eproto();
502 #endif
503 return *default_instance_;
504 }
505
506 Ok* Ok::default_instance_ = NULL;
507
508 Ok* Ok::New() const {
509 return new Ok;
510 }
511
512 void Ok::Clear() {
513 if (has_msg()) {
514 if (msg_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
515 msg_->clear();
516 }
517 }
518 ::memset(_has_bits_, 0, sizeof(_has_bits_));
519 mutable_unknown_fields()->clear();
520 }
521
522 bool Ok::MergePartialFromCodedStream(
523 ::google::protobuf::io::CodedInputStream* input) {
524 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
525 ::google::protobuf::uint32 tag;
526 ::google::protobuf::io::StringOutputStream unknown_fields_string(
527 mutable_unknown_fields());
528 ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
529 &unknown_fields_string);
530 // @@protoc_insertion_point(parse_start:Mysqlx.Ok)
531 for (;;) {
532 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
533 tag = p.first;
534 if (!p.second) goto handle_unusual;
535 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
536 // optional string msg = 1;
537 case 1: {
538 if (tag == 10) {
539 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
540 input, this->mutable_msg()));
541 } else {
542 goto handle_unusual;
543 }
544 if (input->ExpectAtEnd()) goto success;
545 break;
546 }
547
548 default: {
549 handle_unusual:
550 if (tag == 0 ||
551 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
552 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
553 goto success;
554 }
555 DO_(::google::protobuf::internal::WireFormatLite::SkipField(
556 input, tag, &unknown_fields_stream));
557 break;
558 }
559 }
560 }
561 success:
562 // @@protoc_insertion_point(parse_success:Mysqlx.Ok)
563 return true;
564 failure:
565 // @@protoc_insertion_point(parse_failure:Mysqlx.Ok)
566 return false;
567 #undef DO_
568 }
569
570 void Ok::SerializeWithCachedSizes(
571 ::google::protobuf::io::CodedOutputStream* output) const {
572 // @@protoc_insertion_point(serialize_start:Mysqlx.Ok)
573 // optional string msg = 1;
574 if (has_msg()) {
575 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
576 1, this->msg(), output);
577 }
578
579 output->WriteRaw(unknown_fields().data(),
580 unknown_fields().size());
581 // @@protoc_insertion_point(serialize_end:Mysqlx.Ok)
582 }
583
584 int Ok::ByteSize() const {
585 int total_size = 0;
586
587 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
588 // optional string msg = 1;
589 if (has_msg()) {
590 total_size += 1 +
591 ::google::protobuf::internal::WireFormatLite::StringSize(
592 this->msg());
593 }
594
595 }
596 total_size += unknown_fields().size();
597
598 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
599 _cached_size_ = total_size;
600 GOOGLE_SAFE_CONCURRENT_WRITES_END();
601 return total_size;
602 }
603
604 void Ok::CheckTypeAndMergeFrom(
605 const ::google::protobuf::MessageLite& from) {
606 MergeFrom(*::google::protobuf::down_cast<const Ok*>(&from));
607 }
608
609 void Ok::MergeFrom(const Ok& from) {
610 GOOGLE_CHECK_NE(&from, this);
611 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
612 if (from.has_msg()) {
613 set_msg(from.msg());
614 }
615 }
616 mutable_unknown_fields()->append(from.unknown_fields());
617 }
618
619 void Ok::CopyFrom(const Ok& from) {
620 if (&from == this) return;
621 Clear();
622 MergeFrom(from);
623 }
624
625 bool Ok::IsInitialized() const {
626
627 return true;
628 }
629
630 void Ok::Swap(Ok* other) {
631 if (other != this) {
632 std::swap(msg_, other->msg_);
633 std::swap(_has_bits_[0], other->_has_bits_[0]);
634 _unknown_fields_.swap(other->_unknown_fields_);
635 std::swap(_cached_size_, other->_cached_size_);
636 }
637 }
638
639 ::std::string Ok::GetTypeName() const {
640 return "Mysqlx.Ok";
641 }
642
643
644 // ===================================================================
645
646 bool Error_Severity_IsValid(int value) {
647 switch(value) {
648 case 0:
649 case 1:
650 return true;
651 default:
652 return false;
653 }
654 }
655
656 #ifndef _MSC_VER
657 const Error_Severity Error::ERROR;
658 const Error_Severity Error::FATAL;
659 const Error_Severity Error::Severity_MIN;
660 const Error_Severity Error::Severity_MAX;
661 const int Error::Severity_ARRAYSIZE;
662 #endif // _MSC_VER
663 #ifndef _MSC_VER
664 const int Error::kSeverityFieldNumber;
665 const int Error::kCodeFieldNumber;
666 const int Error::kSqlStateFieldNumber;
667 const int Error::kMsgFieldNumber;
668 #endif // !_MSC_VER
669
670 Error::Error()
671 : ::google::protobuf::MessageLite() {
672 SharedCtor();
673 // @@protoc_insertion_point(constructor:Mysqlx.Error)
674 }
675
676 void Error::InitAsDefaultInstance() {
677 }
678
679 Error::Error(const Error& from)
680 : ::google::protobuf::MessageLite() {
681 SharedCtor();
682 MergeFrom(from);
683 // @@protoc_insertion_point(copy_constructor:Mysqlx.Error)
684 }
685
686 void Error::SharedCtor() {
687 ::google::protobuf::internal::GetEmptyString();
688 _cached_size_ = 0;
689 severity_ = 0;
690 code_ = 0u;
691 sql_state_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
692 msg_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
693 ::memset(_has_bits_, 0, sizeof(_has_bits_));
694 }
695
696 Error::~Error() {
697 // @@protoc_insertion_point(destructor:Mysqlx.Error)
698 SharedDtor();
699 }
700
701 void Error::SharedDtor() {
702 if (sql_state_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
703 delete sql_state_;
704 }
705 if (msg_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
706 delete msg_;
707 }
708 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
709 if (this != &default_instance()) {
710 #else
711 if (this != default_instance_) {
712 #endif
713 }
714 }
715
716 void Error::SetCachedSize(int size) const {
717 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
718 _cached_size_ = size;
719 GOOGLE_SAFE_CONCURRENT_WRITES_END();
720 }
721 const Error& Error::default_instance() {
722 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
723 protobuf_AddDesc_mysqlx_2eproto();
724 #else
725 if (default_instance_ == NULL) protobuf_AddDesc_mysqlx_2eproto();
726 #endif
727 return *default_instance_;
728 }
729
730 Error* Error::default_instance_ = NULL;
731
732 Error* Error::New() const {
733 return new Error;
734 }
735
736 void Error::Clear() {
737 #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
738 &reinterpret_cast<Error*>(16)->f) - \
739 reinterpret_cast<char*>(16))
740
741 #define ZR_(first, last) do { \
742 size_t f = OFFSET_OF_FIELD_(first); \
743 size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
744 ::memset(&first, 0, n); \
745 } while (0)
746
747 if (_has_bits_[0 / 32] & 15) {
748 ZR_(severity_, code_);
749 if (has_sql_state()) {
750 if (sql_state_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
751 sql_state_->clear();
752 }
753 }
754 if (has_msg()) {
755 if (msg_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
756 msg_->clear();
757 }
758 }
759 }
760
761 #undef OFFSET_OF_FIELD_
762 #undef ZR_
763
764 ::memset(_has_bits_, 0, sizeof(_has_bits_));
765 mutable_unknown_fields()->clear();
766 }
767
768 bool Error::MergePartialFromCodedStream(
769 ::google::protobuf::io::CodedInputStream* input) {
770 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
771 ::google::protobuf::uint32 tag;
772 ::google::protobuf::io::StringOutputStream unknown_fields_string(
773 mutable_unknown_fields());
774 ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
775 &unknown_fields_string);
776 // @@protoc_insertion_point(parse_start:Mysqlx.Error)
777 for (;;) {
778 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
779 tag = p.first;
780 if (!p.second) goto handle_unusual;
781 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
782 // optional .Mysqlx.Error.Severity severity = 1 [default = ERROR];
783 case 1: {
784 if (tag == 8) {
785 int value;
786 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
787 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
788 input, &value)));
789 if (::Mysqlx::Error_Severity_IsValid(value)) {
790 set_severity(static_cast< ::Mysqlx::Error_Severity >(value));
791 } else {
792 unknown_fields_stream.WriteVarint32(tag);
793 unknown_fields_stream.WriteVarint32(value);
794 }
795 } else {
796 goto handle_unusual;
797 }
798 if (input->ExpectTag(16)) goto parse_code;
799 break;
800 }
801
802 // required uint32 code = 2;
803 case 2: {
804 if (tag == 16) {
805 parse_code:
806 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
807 ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
808 input, &code_)));
809 set_has_code();
810 } else {
811 goto handle_unusual;
812 }
813 if (input->ExpectTag(26)) goto parse_msg;
814 break;
815 }
816
817 // required string msg = 3;
818 case 3: {
819 if (tag == 26) {
820 parse_msg:
821 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
822 input, this->mutable_msg()));
823 } else {
824 goto handle_unusual;
825 }
826 if (input->ExpectTag(34)) goto parse_sql_state;
827 break;
828 }
829
830 // required string sql_state = 4;
831 case 4: {
832 if (tag == 34) {
833 parse_sql_state:
834 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
835 input, this->mutable_sql_state()));
836 } else {
837 goto handle_unusual;
838 }
839 if (input->ExpectAtEnd()) goto success;
840 break;
841 }
842
843 default: {
844 handle_unusual:
845 if (tag == 0 ||
846 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
847 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
848 goto success;
849 }
850 DO_(::google::protobuf::internal::WireFormatLite::SkipField(
851 input, tag, &unknown_fields_stream));
852 break;
853 }
854 }
855 }
856 success:
857 // @@protoc_insertion_point(parse_success:Mysqlx.Error)
858 return true;
859 failure:
860 // @@protoc_insertion_point(parse_failure:Mysqlx.Error)
861 return false;
862 #undef DO_
863 }
864
865 void Error::SerializeWithCachedSizes(
866 ::google::protobuf::io::CodedOutputStream* output) const {
867 // @@protoc_insertion_point(serialize_start:Mysqlx.Error)
868 // optional .Mysqlx.Error.Severity severity = 1 [default = ERROR];
869 if (has_severity()) {
870 ::google::protobuf::internal::WireFormatLite::WriteEnum(
871 1, this->severity(), output);
872 }
873
874 // required uint32 code = 2;
875 if (has_code()) {
876 ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->code(), output);
877 }
878
879 // required string msg = 3;
880 if (has_msg()) {
881 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
882 3, this->msg(), output);
883 }
884
885 // required string sql_state = 4;
886 if (has_sql_state()) {
887 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
888 4, this->sql_state(), output);
889 }
890
891 output->WriteRaw(unknown_fields().data(),
892 unknown_fields().size());
893 // @@protoc_insertion_point(serialize_end:Mysqlx.Error)
894 }
895
896 int Error::ByteSize() const {
897 int total_size = 0;
898
899 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
900 // optional .Mysqlx.Error.Severity severity = 1 [default = ERROR];
901 if (has_severity()) {
902 total_size += 1 +
903 ::google::protobuf::internal::WireFormatLite::EnumSize(this->severity());
904 }
905
906 // required uint32 code = 2;
907 if (has_code()) {
908 total_size += 1 +
909 ::google::protobuf::internal::WireFormatLite::UInt32Size(
910 this->code());
911 }
912
913 // required string sql_state = 4;
914 if (has_sql_state()) {
915 total_size += 1 +
916 ::google::protobuf::internal::WireFormatLite::StringSize(
917 this->sql_state());
918 }
919
920 // required string msg = 3;
921 if (has_msg()) {
922 total_size += 1 +
923 ::google::protobuf::internal::WireFormatLite::StringSize(
924 this->msg());
925 }
926
927 }
928 total_size += unknown_fields().size();
929
930 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
931 _cached_size_ = total_size;
932 GOOGLE_SAFE_CONCURRENT_WRITES_END();
933 return total_size;
934 }
935
936 void Error::CheckTypeAndMergeFrom(
937 const ::google::protobuf::MessageLite& from) {
938 MergeFrom(*::google::protobuf::down_cast<const Error*>(&from));
939 }
940
941 void Error::MergeFrom(const Error& from) {
942 GOOGLE_CHECK_NE(&from, this);
943 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
944 if (from.has_severity()) {
945 set_severity(from.severity());
946 }
947 if (from.has_code()) {
948 set_code(from.code());
949 }
950 if (from.has_sql_state()) {
951 set_sql_state(from.sql_state());
952 }
953 if (from.has_msg()) {
954 set_msg(from.msg());
955 }
956 }
957 mutable_unknown_fields()->append(from.unknown_fields());
958 }
959
960 void Error::CopyFrom(const Error& from) {
961 if (&from == this) return;
962 Clear();
963 MergeFrom(from);
964 }
965
966 bool Error::IsInitialized() const {
967 if ((_has_bits_[0] & 0x0000000e) != 0x0000000e) return false;
968
969 return true;
970 }
971
972 void Error::Swap(Error* other) {
973 if (other != this) {
974 std::swap(severity_, other->severity_);
975 std::swap(code_, other->code_);
976 std::swap(sql_state_, other->sql_state_);
977 std::swap(msg_, other->msg_);
978 std::swap(_has_bits_[0], other->_has_bits_[0]);
979 _unknown_fields_.swap(other->_unknown_fields_);
980 std::swap(_cached_size_, other->_cached_size_);
981 }
982 }
983
984 ::std::string Error::GetTypeName() const {
985 return "Mysqlx.Error";
986 }
987
988
989 // @@protoc_insertion_point(namespace_scope)
990
991 } // namespace Mysqlx
992
993 // @@protoc_insertion_point(global_scope)
994