// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: mysqlx_expect.proto

#include "mysqlx_expect.pb.h"

#include <algorithm>

#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>

PROTOBUF_PRAGMA_INIT_SEG

namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace Mysqlx {
namespace Expect {
PROTOBUF_CONSTEXPR Open_Condition::Open_Condition(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.condition_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.condition_key_)*/0u
  , /*decltype(_impl_.op_)*/0} {}
struct Open_ConditionDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Open_ConditionDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~Open_ConditionDefaultTypeInternal() {}
  union {
    Open_Condition _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Open_ConditionDefaultTypeInternal _Open_Condition_default_instance_;
PROTOBUF_CONSTEXPR Open::Open(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.cond_)*/{}
  , /*decltype(_impl_.op_)*/0} {}
struct OpenDefaultTypeInternal {
  PROTOBUF_CONSTEXPR OpenDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~OpenDefaultTypeInternal() {}
  union {
    Open _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OpenDefaultTypeInternal _Open_default_instance_;
PROTOBUF_CONSTEXPR Close::Close(
    ::_pbi::ConstantInitialized) {}
struct CloseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR CloseDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~CloseDefaultTypeInternal() {}
  union {
    Close _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CloseDefaultTypeInternal _Close_default_instance_;
}  // namespace Expect
}  // namespace Mysqlx
static ::_pb::Metadata file_level_metadata_mysqlx_5fexpect_2eproto[3];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_mysqlx_5fexpect_2eproto[3];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_mysqlx_5fexpect_2eproto = nullptr;

const uint32_t TableStruct_mysqlx_5fexpect_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::Mysqlx::Expect::Open_Condition, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::Mysqlx::Expect::Open_Condition, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::Mysqlx::Expect::Open_Condition, _impl_.condition_key_),
  PROTOBUF_FIELD_OFFSET(::Mysqlx::Expect::Open_Condition, _impl_.condition_value_),
  PROTOBUF_FIELD_OFFSET(::Mysqlx::Expect::Open_Condition, _impl_.op_),
  1,
  0,
  2,
  PROTOBUF_FIELD_OFFSET(::Mysqlx::Expect::Open, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::Mysqlx::Expect::Open, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::Mysqlx::Expect::Open, _impl_.op_),
  PROTOBUF_FIELD_OFFSET(::Mysqlx::Expect::Open, _impl_.cond_),
  0,
  ~0u,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::Mysqlx::Expect::Close, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 9, -1, sizeof(::Mysqlx::Expect::Open_Condition)},
  { 12, 20, -1, sizeof(::Mysqlx::Expect::Open)},
  { 22, -1, -1, sizeof(::Mysqlx::Expect::Close)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::Mysqlx::Expect::_Open_Condition_default_instance_._instance,
  &::Mysqlx::Expect::_Open_default_instance_._instance,
  &::Mysqlx::Expect::_Close_default_instance_._instance,
};

const char descriptor_table_protodef_mysqlx_5fexpect_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\023mysqlx_expect.proto\022\rMysqlx.Expect\032\014my"
  "sqlx.proto\"\326\003\n\004Open\022B\n\002op\030\001 \001(\0162 .Mysqlx"
  ".Expect.Open.CtxOperation:\024EXPECT_CTX_CO"
  "PY_PREV\022+\n\004cond\030\002 \003(\0132\035.Mysqlx.Expect.Op"
  "en.Condition\032\226\002\n\tCondition\022\025\n\rcondition_"
  "key\030\001 \002(\r\022\027\n\017condition_value\030\002 \001(\014\022K\n\002op"
  "\030\003 \001(\01620.Mysqlx.Expect.Open.Condition.Co"
  "nditionOperation:\rEXPECT_OP_SET\"N\n\003Key\022\023"
  "\n\017EXPECT_NO_ERROR\020\001\022\026\n\022EXPECT_FIELD_EXIS"
  "T\020\002\022\032\n\026EXPECT_DOCID_GENERATED\020\003\"<\n\022Condi"
  "tionOperation\022\021\n\rEXPECT_OP_SET\020\000\022\023\n\017EXPE"
  "CT_OP_UNSET\020\001\">\n\014CtxOperation\022\030\n\024EXPECT_"
  "CTX_COPY_PREV\020\000\022\024\n\020EXPECT_CTX_EMPTY\020\001:\004\210"
  "\3520\030\"\r\n\005Close:\004\210\3520\031B\031\n\027com.mysql.cj.x.pro"
  "tobuf"
  ;
static const ::_pbi::DescriptorTable* const descriptor_table_mysqlx_5fexpect_2eproto_deps[1] = {
  &::descriptor_table_mysqlx_2eproto,
};
static ::_pbi::once_flag descriptor_table_mysqlx_5fexpect_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_mysqlx_5fexpect_2eproto = {
    false, false, 565, descriptor_table_protodef_mysqlx_5fexpect_2eproto,
    "mysqlx_expect.proto",
    &descriptor_table_mysqlx_5fexpect_2eproto_once, descriptor_table_mysqlx_5fexpect_2eproto_deps, 1, 3,
    schemas, file_default_instances, TableStruct_mysqlx_5fexpect_2eproto::offsets,
    file_level_metadata_mysqlx_5fexpect_2eproto, file_level_enum_descriptors_mysqlx_5fexpect_2eproto,
    file_level_service_descriptors_mysqlx_5fexpect_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_mysqlx_5fexpect_2eproto_getter() {
  return &descriptor_table_mysqlx_5fexpect_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_mysqlx_5fexpect_2eproto(&descriptor_table_mysqlx_5fexpect_2eproto);
namespace Mysqlx {
namespace Expect {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Open_Condition_Key_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_mysqlx_5fexpect_2eproto);
  return file_level_enum_descriptors_mysqlx_5fexpect_2eproto[0];
}
bool Open_Condition_Key_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr Open_Condition_Key Open_Condition::EXPECT_NO_ERROR;
constexpr Open_Condition_Key Open_Condition::EXPECT_FIELD_EXIST;
constexpr Open_Condition_Key Open_Condition::EXPECT_DOCID_GENERATED;
constexpr Open_Condition_Key Open_Condition::Key_MIN;
constexpr Open_Condition_Key Open_Condition::Key_MAX;
constexpr int Open_Condition::Key_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Open_Condition_ConditionOperation_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_mysqlx_5fexpect_2eproto);
  return file_level_enum_descriptors_mysqlx_5fexpect_2eproto[1];
}
bool Open_Condition_ConditionOperation_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr Open_Condition_ConditionOperation Open_Condition::EXPECT_OP_SET;
constexpr Open_Condition_ConditionOperation Open_Condition::EXPECT_OP_UNSET;
constexpr Open_Condition_ConditionOperation Open_Condition::ConditionOperation_MIN;
constexpr Open_Condition_ConditionOperation Open_Condition::ConditionOperation_MAX;
constexpr int Open_Condition::ConditionOperation_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Open_CtxOperation_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_mysqlx_5fexpect_2eproto);
  return file_level_enum_descriptors_mysqlx_5fexpect_2eproto[2];
}
bool Open_CtxOperation_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr Open_CtxOperation Open::EXPECT_CTX_COPY_PREV;
constexpr Open_CtxOperation Open::EXPECT_CTX_EMPTY;
constexpr Open_CtxOperation Open::CtxOperation_MIN;
constexpr Open_CtxOperation Open::CtxOperation_MAX;
constexpr int Open::CtxOperation_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

// ===================================================================

class Open_Condition::_Internal {
 public:
  using HasBits = decltype(std::declval<Open_Condition>()._impl_._has_bits_);
  static void set_has_condition_key(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_condition_value(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_op(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000002) ^ 0x00000002) != 0;
  }
};

Open_Condition::Open_Condition(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:Mysqlx.Expect.Open.Condition)
}
Open_Condition::Open_Condition(const Open_Condition& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  Open_Condition* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.condition_value_){}
    , decltype(_impl_.condition_key_){}
    , decltype(_impl_.op_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.condition_value_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.condition_value_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_condition_value()) {
    _this->_impl_.condition_value_.Set(from._internal_condition_value(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.condition_key_, &from._impl_.condition_key_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.op_) -
    reinterpret_cast<char*>(&_impl_.condition_key_)) + sizeof(_impl_.op_));
  // @@protoc_insertion_point(copy_constructor:Mysqlx.Expect.Open.Condition)
}

inline void Open_Condition::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.condition_value_){}
    , decltype(_impl_.condition_key_){0u}
    , decltype(_impl_.op_){0}
  };
  _impl_.condition_value_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.condition_value_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Open_Condition::~Open_Condition() {
  // @@protoc_insertion_point(destructor:Mysqlx.Expect.Open.Condition)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Open_Condition::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.condition_value_.Destroy();
}

void Open_Condition::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Open_Condition::Clear() {
// @@protoc_insertion_point(message_clear_start:Mysqlx.Expect.Open.Condition)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    _impl_.condition_value_.ClearNonDefaultToEmpty();
  }
  if (cached_has_bits & 0x00000006u) {
    ::memset(&_impl_.condition_key_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.op_) -
        reinterpret_cast<char*>(&_impl_.condition_key_)) + sizeof(_impl_.op_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Open_Condition::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // required uint32 condition_key = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_condition_key(&has_bits);
          _impl_.condition_key_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes condition_value = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_condition_value();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .Mysqlx.Expect.Open.Condition.ConditionOperation op = 3 [default = EXPECT_OP_SET];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::Mysqlx::Expect::Open_Condition_ConditionOperation_IsValid(val))) {
            _internal_set_op(static_cast<::Mysqlx::Expect::Open_Condition_ConditionOperation>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Open_Condition::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:Mysqlx.Expect.Open.Condition)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // required uint32 condition_key = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_condition_key(), target);
  }

  // optional bytes condition_value = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteBytesMaybeAliased(
        2, this->_internal_condition_value(), target);
  }

  // optional .Mysqlx.Expect.Open.Condition.ConditionOperation op = 3 [default = EXPECT_OP_SET];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      3, this->_internal_op(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:Mysqlx.Expect.Open.Condition)
  return target;
}

size_t Open_Condition::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Mysqlx.Expect.Open.Condition)
  size_t total_size = 0;

  // required uint32 condition_key = 1;
  if (_internal_has_condition_key()) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_condition_key());
  }
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // optional bytes condition_value = 2;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_condition_value());
  }

  // optional .Mysqlx.Expect.Open.Condition.ConditionOperation op = 3 [default = EXPECT_OP_SET];
  if (cached_has_bits & 0x00000004u) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_op());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Open_Condition::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    Open_Condition::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Open_Condition::GetClassData() const { return &_class_data_; }


void Open_Condition::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<Open_Condition*>(&to_msg);
  auto& from = static_cast<const Open_Condition&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:Mysqlx.Expect.Open.Condition)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_condition_value(from._internal_condition_value());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.condition_key_ = from._impl_.condition_key_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.op_ = from._impl_.op_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Open_Condition::CopyFrom(const Open_Condition& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Mysqlx.Expect.Open.Condition)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Open_Condition::IsInitialized() const {
  if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false;
  return true;
}

void Open_Condition::InternalSwap(Open_Condition* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.condition_value_, lhs_arena,
      &other->_impl_.condition_value_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Open_Condition, _impl_.op_)
      + sizeof(Open_Condition::_impl_.op_)
      - PROTOBUF_FIELD_OFFSET(Open_Condition, _impl_.condition_key_)>(
          reinterpret_cast<char*>(&_impl_.condition_key_),
          reinterpret_cast<char*>(&other->_impl_.condition_key_));
}

::PROTOBUF_NAMESPACE_ID::Metadata Open_Condition::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_mysqlx_5fexpect_2eproto_getter, &descriptor_table_mysqlx_5fexpect_2eproto_once,
      file_level_metadata_mysqlx_5fexpect_2eproto[0]);
}

// ===================================================================

class Open::_Internal {
 public:
  using HasBits = decltype(std::declval<Open>()._impl_._has_bits_);
  static void set_has_op(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

Open::Open(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:Mysqlx.Expect.Open)
}
Open::Open(const Open& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  Open* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.cond_){from._impl_.cond_}
    , decltype(_impl_.op_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _this->_impl_.op_ = from._impl_.op_;
  // @@protoc_insertion_point(copy_constructor:Mysqlx.Expect.Open)
}

inline void Open::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.cond_){arena}
    , decltype(_impl_.op_){0}
  };
}

Open::~Open() {
  // @@protoc_insertion_point(destructor:Mysqlx.Expect.Open)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Open::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.cond_.~RepeatedPtrField();
}

void Open::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Open::Clear() {
// @@protoc_insertion_point(message_clear_start:Mysqlx.Expect.Open)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.cond_.Clear();
  _impl_.op_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Open::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .Mysqlx.Expect.Open.CtxOperation op = 1 [default = EXPECT_CTX_COPY_PREV];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::Mysqlx::Expect::Open_CtxOperation_IsValid(val))) {
            _internal_set_op(static_cast<::Mysqlx::Expect::Open_CtxOperation>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // repeated .Mysqlx.Expect.Open.Condition cond = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_cond(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Open::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:Mysqlx.Expect.Open)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .Mysqlx.Expect.Open.CtxOperation op = 1 [default = EXPECT_CTX_COPY_PREV];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_op(), target);
  }

  // repeated .Mysqlx.Expect.Open.Condition cond = 2;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_cond_size()); i < n; i++) {
    const auto& repfield = this->_internal_cond(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:Mysqlx.Expect.Open)
  return target;
}

size_t Open::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Mysqlx.Expect.Open)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .Mysqlx.Expect.Open.Condition cond = 2;
  total_size += 1UL * this->_internal_cond_size();
  for (const auto& msg : this->_impl_.cond_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // optional .Mysqlx.Expect.Open.CtxOperation op = 1 [default = EXPECT_CTX_COPY_PREV];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_op());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Open::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    Open::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Open::GetClassData() const { return &_class_data_; }


void Open::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<Open*>(&to_msg);
  auto& from = static_cast<const Open&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:Mysqlx.Expect.Open)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.cond_.MergeFrom(from._impl_.cond_);
  if (from._internal_has_op()) {
    _this->_internal_set_op(from._internal_op());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Open::CopyFrom(const Open& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Mysqlx.Expect.Open)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Open::IsInitialized() const {
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.cond_))
    return false;
  return true;
}

void Open::InternalSwap(Open* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.cond_.InternalSwap(&other->_impl_.cond_);
  swap(_impl_.op_, other->_impl_.op_);
}

::PROTOBUF_NAMESPACE_ID::Metadata Open::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_mysqlx_5fexpect_2eproto_getter, &descriptor_table_mysqlx_5fexpect_2eproto_once,
      file_level_metadata_mysqlx_5fexpect_2eproto[1]);
}

// ===================================================================

class Close::_Internal {
 public:
};

Close::Close(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) {
  // @@protoc_insertion_point(arena_constructor:Mysqlx.Expect.Close)
}
Close::Close(const Close& from)
  : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() {
  Close* const _this = this; (void)_this;
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:Mysqlx.Expect.Close)
}





const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Close::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl,
    ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl,
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Close::GetClassData() const { return &_class_data_; }







::PROTOBUF_NAMESPACE_ID::Metadata Close::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_mysqlx_5fexpect_2eproto_getter, &descriptor_table_mysqlx_5fexpect_2eproto_once,
      file_level_metadata_mysqlx_5fexpect_2eproto[2]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace Expect
}  // namespace Mysqlx
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::Mysqlx::Expect::Open_Condition*
Arena::CreateMaybeMessage< ::Mysqlx::Expect::Open_Condition >(Arena* arena) {
  return Arena::CreateMessageInternal< ::Mysqlx::Expect::Open_Condition >(arena);
}
template<> PROTOBUF_NOINLINE ::Mysqlx::Expect::Open*
Arena::CreateMaybeMessage< ::Mysqlx::Expect::Open >(Arena* arena) {
  return Arena::CreateMessageInternal< ::Mysqlx::Expect::Open >(arena);
}
template<> PROTOBUF_NOINLINE ::Mysqlx::Expect::Close*
Arena::CreateMaybeMessage< ::Mysqlx::Expect::Close >(Arena* arena) {
  return Arena::CreateMessageInternal< ::Mysqlx::Expect::Close >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
