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

#include "ExecutionProtos.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 exec {
namespace bit {
constexpr FragmentHandle::FragmentHandle(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : query_id_(nullptr)
  , parent_query_id_(nullptr)
  , major_fragment_id_(0)
  , minor_fragment_id_(0){}
struct FragmentHandleDefaultTypeInternal {
  constexpr FragmentHandleDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~FragmentHandleDefaultTypeInternal() {}
  union {
    FragmentHandle _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FragmentHandleDefaultTypeInternal _FragmentHandle_default_instance_;
constexpr ServerPreparedStatementState::ServerPreparedStatementState(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : sql_query_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct ServerPreparedStatementStateDefaultTypeInternal {
  constexpr ServerPreparedStatementStateDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ServerPreparedStatementStateDefaultTypeInternal() {}
  union {
    ServerPreparedStatementState _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ServerPreparedStatementStateDefaultTypeInternal _ServerPreparedStatementState_default_instance_;
}  // namespace bit
}  // namespace exec
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ExecutionProtos_2eproto[2];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_ExecutionProtos_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_ExecutionProtos_2eproto = nullptr;

const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_ExecutionProtos_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::exec::bit::FragmentHandle, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::FragmentHandle, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::exec::bit::FragmentHandle, query_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::FragmentHandle, major_fragment_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::FragmentHandle, minor_fragment_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::FragmentHandle, parent_query_id_),
  0,
  2,
  3,
  1,
  PROTOBUF_FIELD_OFFSET(::exec::bit::ServerPreparedStatementState, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::ServerPreparedStatementState, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::exec::bit::ServerPreparedStatementState, sql_query_),
  0,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 9, sizeof(::exec::bit::FragmentHandle)},
  { 13, 19, sizeof(::exec::bit::ServerPreparedStatementState)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::exec::bit::_FragmentHandle_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::exec::bit::_ServerPreparedStatementState_default_instance_),
};

const char descriptor_table_protodef_ExecutionProtos_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\025ExecutionProtos.proto\022\010exec.bit\032\022Coord"
  "ination.proto\032\023UserBitShared.proto\"\235\001\n\016F"
  "ragmentHandle\022&\n\010query_id\030\001 \001(\0132\024.exec.s"
  "hared.QueryId\022\031\n\021major_fragment_id\030\002 \001(\005"
  "\022\031\n\021minor_fragment_id\030\003 \001(\005\022-\n\017parent_qu"
  "ery_id\030\004 \001(\0132\024.exec.shared.QueryId\"1\n\034Se"
  "rverPreparedStatementState\022\021\n\tsql_query\030"
  "\001 \001(\tB+\n\033org.apache.drill.exec.protoB\nEx"
  "ecProtosH\001"
  ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_ExecutionProtos_2eproto_deps[2] = {
  &::descriptor_table_Coordination_2eproto,
  &::descriptor_table_UserBitShared_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ExecutionProtos_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ExecutionProtos_2eproto = {
  false, false, 330, descriptor_table_protodef_ExecutionProtos_2eproto, "ExecutionProtos.proto", 
  &descriptor_table_ExecutionProtos_2eproto_once, descriptor_table_ExecutionProtos_2eproto_deps, 2, 2,
  schemas, file_default_instances, TableStruct_ExecutionProtos_2eproto::offsets,
  file_level_metadata_ExecutionProtos_2eproto, file_level_enum_descriptors_ExecutionProtos_2eproto, file_level_service_descriptors_ExecutionProtos_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_ExecutionProtos_2eproto_getter() {
  return &descriptor_table_ExecutionProtos_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_ExecutionProtos_2eproto(&descriptor_table_ExecutionProtos_2eproto);
namespace exec {
namespace bit {

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

class FragmentHandle::_Internal {
 public:
  using HasBits = decltype(std::declval<FragmentHandle>()._has_bits_);
  static const ::exec::shared::QueryId& query_id(const FragmentHandle* msg);
  static void set_has_query_id(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_major_fragment_id(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_minor_fragment_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::exec::shared::QueryId& parent_query_id(const FragmentHandle* msg);
  static void set_has_parent_query_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::exec::shared::QueryId&
FragmentHandle::_Internal::query_id(const FragmentHandle* msg) {
  return *msg->query_id_;
}
const ::exec::shared::QueryId&
FragmentHandle::_Internal::parent_query_id(const FragmentHandle* msg) {
  return *msg->parent_query_id_;
}
void FragmentHandle::clear_query_id() {
  if (query_id_ != nullptr) query_id_->Clear();
  _has_bits_[0] &= ~0x00000001u;
}
void FragmentHandle::clear_parent_query_id() {
  if (parent_query_id_ != nullptr) parent_query_id_->Clear();
  _has_bits_[0] &= ~0x00000002u;
}
FragmentHandle::FragmentHandle(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:exec.bit.FragmentHandle)
}
FragmentHandle::FragmentHandle(const FragmentHandle& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_query_id()) {
    query_id_ = new ::exec::shared::QueryId(*from.query_id_);
  } else {
    query_id_ = nullptr;
  }
  if (from._internal_has_parent_query_id()) {
    parent_query_id_ = new ::exec::shared::QueryId(*from.parent_query_id_);
  } else {
    parent_query_id_ = nullptr;
  }
  ::memcpy(&major_fragment_id_, &from.major_fragment_id_,
    static_cast<size_t>(reinterpret_cast<char*>(&minor_fragment_id_) -
    reinterpret_cast<char*>(&major_fragment_id_)) + sizeof(minor_fragment_id_));
  // @@protoc_insertion_point(copy_constructor:exec.bit.FragmentHandle)
}

void FragmentHandle::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&query_id_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&minor_fragment_id_) -
    reinterpret_cast<char*>(&query_id_)) + sizeof(minor_fragment_id_));
}

FragmentHandle::~FragmentHandle() {
  // @@protoc_insertion_point(destructor:exec.bit.FragmentHandle)
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

void FragmentHandle::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
  if (this != internal_default_instance()) delete query_id_;
  if (this != internal_default_instance()) delete parent_query_id_;
}

void FragmentHandle::ArenaDtor(void* object) {
  FragmentHandle* _this = reinterpret_cast< FragmentHandle* >(object);
  (void)_this;
}
void FragmentHandle::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void FragmentHandle::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void FragmentHandle::Clear() {
// @@protoc_insertion_point(message_clear_start:exec.bit.FragmentHandle)
  ::PROTOBUF_NAMESPACE_ID::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 & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(query_id_ != nullptr);
      query_id_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(parent_query_id_ != nullptr);
      parent_query_id_->Clear();
    }
  }
  if (cached_has_bits & 0x0000000cu) {
    ::memset(&major_fragment_id_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&minor_fragment_id_) -
        reinterpret_cast<char*>(&major_fragment_id_)) + sizeof(minor_fragment_id_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* FragmentHandle::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .exec.shared.QueryId query_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_query_id(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int32 major_fragment_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          _Internal::set_has_major_fragment_id(&has_bits);
          major_fragment_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int32 minor_fragment_id = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          _Internal::set_has_minor_fragment_id(&has_bits);
          minor_fragment_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional .exec.shared.QueryId parent_query_id = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_parent_query_id(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag == 0) || ((tag & 7) == 4)) {
          CHK_(ptr);
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* FragmentHandle::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:exec.bit.FragmentHandle)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .exec.shared.QueryId query_id = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::query_id(this), target, stream);
  }

  // optional int32 major_fragment_id = 2;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_major_fragment_id(), target);
  }

  // optional int32 minor_fragment_id = 3;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_minor_fragment_id(), target);
  }

  // optional .exec.shared.QueryId parent_query_id = 4;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::parent_query_id(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:exec.bit.FragmentHandle)
  return target;
}

size_t FragmentHandle::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:exec.bit.FragmentHandle)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::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 & 0x0000000fu) {
    // optional .exec.shared.QueryId query_id = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *query_id_);
    }

    // optional .exec.shared.QueryId parent_query_id = 4;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *parent_query_id_);
    }

    // optional int32 major_fragment_id = 2;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_major_fragment_id());
    }

    // optional int32 minor_fragment_id = 3;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_minor_fragment_id());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void FragmentHandle::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:exec.bit.FragmentHandle)
  GOOGLE_DCHECK_NE(&from, this);
  const FragmentHandle* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<FragmentHandle>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:exec.bit.FragmentHandle)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:exec.bit.FragmentHandle)
    MergeFrom(*source);
  }
}

void FragmentHandle::MergeFrom(const FragmentHandle& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:exec.bit.FragmentHandle)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_query_id()->::exec::shared::QueryId::MergeFrom(from._internal_query_id());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_parent_query_id()->::exec::shared::QueryId::MergeFrom(from._internal_parent_query_id());
    }
    if (cached_has_bits & 0x00000004u) {
      major_fragment_id_ = from.major_fragment_id_;
    }
    if (cached_has_bits & 0x00000008u) {
      minor_fragment_id_ = from.minor_fragment_id_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void FragmentHandle::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:exec.bit.FragmentHandle)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void FragmentHandle::CopyFrom(const FragmentHandle& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:exec.bit.FragmentHandle)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool FragmentHandle::IsInitialized() const {
  return true;
}

void FragmentHandle::InternalSwap(FragmentHandle* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(FragmentHandle, minor_fragment_id_)
      + sizeof(FragmentHandle::minor_fragment_id_)
      - PROTOBUF_FIELD_OFFSET(FragmentHandle, query_id_)>(
          reinterpret_cast<char*>(&query_id_),
          reinterpret_cast<char*>(&other->query_id_));
}

::PROTOBUF_NAMESPACE_ID::Metadata FragmentHandle::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_ExecutionProtos_2eproto_getter, &descriptor_table_ExecutionProtos_2eproto_once,
      file_level_metadata_ExecutionProtos_2eproto[0]);
}

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

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

ServerPreparedStatementState::ServerPreparedStatementState(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:exec.bit.ServerPreparedStatementState)
}
ServerPreparedStatementState::ServerPreparedStatementState(const ServerPreparedStatementState& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  sql_query_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_sql_query()) {
    sql_query_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sql_query(), 
      GetArena());
  }
  // @@protoc_insertion_point(copy_constructor:exec.bit.ServerPreparedStatementState)
}

void ServerPreparedStatementState::SharedCtor() {
sql_query_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

ServerPreparedStatementState::~ServerPreparedStatementState() {
  // @@protoc_insertion_point(destructor:exec.bit.ServerPreparedStatementState)
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

void ServerPreparedStatementState::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
  sql_query_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void ServerPreparedStatementState::ArenaDtor(void* object) {
  ServerPreparedStatementState* _this = reinterpret_cast< ServerPreparedStatementState* >(object);
  (void)_this;
}
void ServerPreparedStatementState::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ServerPreparedStatementState::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void ServerPreparedStatementState::Clear() {
// @@protoc_insertion_point(message_clear_start:exec.bit.ServerPreparedStatementState)
  ::PROTOBUF_NAMESPACE_ID::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 & 0x00000001u) {
    sql_query_.ClearNonDefaultToEmpty();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ServerPreparedStatementState::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string sql_query = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_sql_query();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "exec.bit.ServerPreparedStatementState.sql_query");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag == 0) || ((tag & 7) == 4)) {
          CHK_(ptr);
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* ServerPreparedStatementState::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:exec.bit.ServerPreparedStatementState)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string sql_query = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_sql_query().data(), static_cast<int>(this->_internal_sql_query().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "exec.bit.ServerPreparedStatementState.sql_query");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_sql_query(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:exec.bit.ServerPreparedStatementState)
  return target;
}

size_t ServerPreparedStatementState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:exec.bit.ServerPreparedStatementState)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // optional string sql_query = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_sql_query());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ServerPreparedStatementState::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:exec.bit.ServerPreparedStatementState)
  GOOGLE_DCHECK_NE(&from, this);
  const ServerPreparedStatementState* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ServerPreparedStatementState>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:exec.bit.ServerPreparedStatementState)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:exec.bit.ServerPreparedStatementState)
    MergeFrom(*source);
  }
}

void ServerPreparedStatementState::MergeFrom(const ServerPreparedStatementState& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:exec.bit.ServerPreparedStatementState)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_sql_query()) {
    _internal_set_sql_query(from._internal_sql_query());
  }
}

void ServerPreparedStatementState::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:exec.bit.ServerPreparedStatementState)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ServerPreparedStatementState::CopyFrom(const ServerPreparedStatementState& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:exec.bit.ServerPreparedStatementState)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ServerPreparedStatementState::IsInitialized() const {
  return true;
}

void ServerPreparedStatementState::InternalSwap(ServerPreparedStatementState* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  sql_query_.Swap(&other->sql_query_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}

::PROTOBUF_NAMESPACE_ID::Metadata ServerPreparedStatementState::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_ExecutionProtos_2eproto_getter, &descriptor_table_ExecutionProtos_2eproto_once,
      file_level_metadata_ExecutionProtos_2eproto[1]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace bit
}  // namespace exec
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::exec::bit::FragmentHandle* Arena::CreateMaybeMessage< ::exec::bit::FragmentHandle >(Arena* arena) {
  return Arena::CreateMessageInternal< ::exec::bit::FragmentHandle >(arena);
}
template<> PROTOBUF_NOINLINE ::exec::bit::ServerPreparedStatementState* Arena::CreateMaybeMessage< ::exec::bit::ServerPreparedStatementState >(Arena* arena) {
  return Arena::CreateMessageInternal< ::exec::bit::ServerPreparedStatementState >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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