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

#include "replication_asynchronous_connection_failover.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/io/zero_copy_stream_impl_lite.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 protobuf_replication_asynchronous_connection_failover {
PROTOBUF_CONSTEXPR Source::Source(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.channel_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.host_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.network_namespace_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.managed_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.port_)*/uint64_t{0u}
  , /*decltype(_impl_.weight_)*/uint64_t{0u}} {}
struct SourceDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SourceDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SourceDefaultTypeInternal() {}
  union {
    Source _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SourceDefaultTypeInternal _Source_default_instance_;
PROTOBUF_CONSTEXPR SourceList::SourceList(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.source_)*/{}
  , /*decltype(_impl_.origin_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.version_)*/uint64_t{0u}} {}
struct SourceListDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SourceListDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SourceListDefaultTypeInternal() {}
  union {
    SourceList _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SourceListDefaultTypeInternal _SourceList_default_instance_;
PROTOBUF_CONSTEXPR Managed::Managed(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.channel_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.managed_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.managed_type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.configuration_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
struct ManagedDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ManagedDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ManagedDefaultTypeInternal() {}
  union {
    Managed _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ManagedDefaultTypeInternal _Managed_default_instance_;
PROTOBUF_CONSTEXPR ManagedList::ManagedList(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.managed_)*/{}
  , /*decltype(_impl_.origin_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.version_)*/uint64_t{0u}} {}
struct ManagedListDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ManagedListDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ManagedListDefaultTypeInternal() {}
  union {
    ManagedList _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ManagedListDefaultTypeInternal _ManagedList_default_instance_;
PROTOBUF_CONSTEXPR VariableStatus::VariableStatus(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.channel_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.status_)*/0u} {}
struct VariableStatusDefaultTypeInternal {
  PROTOBUF_CONSTEXPR VariableStatusDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~VariableStatusDefaultTypeInternal() {}
  union {
    VariableStatus _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VariableStatusDefaultTypeInternal _VariableStatus_default_instance_;
PROTOBUF_CONSTEXPR VariableStatusList::VariableStatusList(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.status_)*/{}
  , /*decltype(_impl_.origin_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.version_)*/uint64_t{0u}} {}
struct VariableStatusListDefaultTypeInternal {
  PROTOBUF_CONSTEXPR VariableStatusListDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~VariableStatusListDefaultTypeInternal() {}
  union {
    VariableStatusList _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VariableStatusListDefaultTypeInternal _VariableStatusList_default_instance_;
PROTOBUF_CONSTEXPR SourceAndManagedAndStatusList::SourceAndManagedAndStatusList(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.source_)*/{}
  , /*decltype(_impl_.managed_)*/{}
  , /*decltype(_impl_.status_)*/{}
  , /*decltype(_impl_.origin_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.source_version_)*/uint64_t{0u}
  , /*decltype(_impl_.managed_version_)*/uint64_t{0u}
  , /*decltype(_impl_.status_version_)*/uint64_t{0u}} {}
struct SourceAndManagedAndStatusListDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SourceAndManagedAndStatusListDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SourceAndManagedAndStatusListDefaultTypeInternal() {}
  union {
    SourceAndManagedAndStatusList _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SourceAndManagedAndStatusListDefaultTypeInternal _SourceAndManagedAndStatusList_default_instance_;
}  // namespace protobuf_replication_asynchronous_connection_failover
namespace protobuf_replication_asynchronous_connection_failover {

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

class Source::_Internal {
 public:
  using HasBits = decltype(std::declval<Source>()._impl_._has_bits_);
  static void set_has_channel(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_host(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_port(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_network_namespace(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_weight(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_managed_name(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x0000003f) ^ 0x0000003f) != 0;
  }
};

Source::Source(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:protobuf_replication_asynchronous_connection_failover.Source)
}
Source::Source(const Source& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Source* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.channel_){}
    , decltype(_impl_.host_){}
    , decltype(_impl_.network_namespace_){}
    , decltype(_impl_.managed_name_){}
    , decltype(_impl_.port_){}
    , decltype(_impl_.weight_){}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.channel_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.channel_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_channel()) {
    _this->_impl_.channel_.Set(from._internal_channel(), 
      _this->GetArenaForAllocation());
  }
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.host_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_host()) {
    _this->_impl_.host_.Set(from._internal_host(), 
      _this->GetArenaForAllocation());
  }
  _impl_.network_namespace_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.network_namespace_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_network_namespace()) {
    _this->_impl_.network_namespace_.Set(from._internal_network_namespace(), 
      _this->GetArenaForAllocation());
  }
  _impl_.managed_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.managed_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_managed_name()) {
    _this->_impl_.managed_name_.Set(from._internal_managed_name(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.port_, &from._impl_.port_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.weight_) -
    reinterpret_cast<char*>(&_impl_.port_)) + sizeof(_impl_.weight_));
  // @@protoc_insertion_point(copy_constructor:protobuf_replication_asynchronous_connection_failover.Source)
}

inline void Source::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_.channel_){}
    , decltype(_impl_.host_){}
    , decltype(_impl_.network_namespace_){}
    , decltype(_impl_.managed_name_){}
    , decltype(_impl_.port_){uint64_t{0u}}
    , decltype(_impl_.weight_){uint64_t{0u}}
  };
  _impl_.channel_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.channel_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.host_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.network_namespace_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.network_namespace_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.managed_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.managed_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Source::~Source() {
  // @@protoc_insertion_point(destructor:protobuf_replication_asynchronous_connection_failover.Source)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Source::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.channel_.Destroy();
  _impl_.host_.Destroy();
  _impl_.network_namespace_.Destroy();
  _impl_.managed_name_.Destroy();
}

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

void Source::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_replication_asynchronous_connection_failover.Source)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.channel_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.host_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.network_namespace_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      _impl_.managed_name_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x00000030u) {
    ::memset(&_impl_.port_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.weight_) -
        reinterpret_cast<char*>(&_impl_.port_)) + sizeof(_impl_.weight_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Source::_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 string channel = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_channel();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required string host = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required uint64 port = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_port(&has_bits);
          _impl_.port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required string network_namespace = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_network_namespace();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required uint64 weight = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_weight(&has_bits);
          _impl_.weight_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required string managed_name = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_managed_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(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<std::string>(),
        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* Source::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_replication_asynchronous_connection_failover.Source)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // required string channel = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_channel(), target);
  }

  // required string host = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_host(), target);
  }

  // required uint64 port = 3;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_port(), target);
  }

  // required string network_namespace = 4;
  if (cached_has_bits & 0x00000004u) {
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_network_namespace(), target);
  }

  // required uint64 weight = 5;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_weight(), target);
  }

  // required string managed_name = 6;
  if (cached_has_bits & 0x00000008u) {
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_managed_name(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_replication_asynchronous_connection_failover.Source)
  return target;
}

size_t Source::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:protobuf_replication_asynchronous_connection_failover.Source)
  size_t total_size = 0;

  if (_internal_has_channel()) {
    // required string channel = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_channel());
  }

  if (_internal_has_host()) {
    // required string host = 2;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_host());
  }

  if (_internal_has_network_namespace()) {
    // required string network_namespace = 4;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_network_namespace());
  }

  if (_internal_has_managed_name()) {
    // required string managed_name = 6;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_managed_name());
  }

  if (_internal_has_port()) {
    // required uint64 port = 3;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_port());
  }

  if (_internal_has_weight()) {
    // required uint64 weight = 5;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_weight());
  }

  return total_size;
}
size_t Source::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_replication_asynchronous_connection_failover.Source)
  size_t total_size = 0;

  if (((_impl_._has_bits_[0] & 0x0000003f) ^ 0x0000003f) == 0) {  // All required fields are present.
    // required string channel = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_channel());

    // required string host = 2;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_host());

    // required string network_namespace = 4;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_network_namespace());

    // required string managed_name = 6;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_managed_name());

    // required uint64 port = 3;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_port());

    // required uint64 weight = 5;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_weight());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Source::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Source*>(
      &from));
}

void Source::MergeFrom(const Source& from) {
  Source* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_replication_asynchronous_connection_failover.Source)
  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 & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_channel(from._internal_channel());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_host(from._internal_host());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_network_namespace(from._internal_network_namespace());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_set_managed_name(from._internal_managed_name());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.port_ = from._impl_.port_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.weight_ = from._impl_.weight_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Source::InternalSwap(Source* 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_.channel_, lhs_arena,
      &other->_impl_.channel_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.host_, lhs_arena,
      &other->_impl_.host_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.network_namespace_, lhs_arena,
      &other->_impl_.network_namespace_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.managed_name_, lhs_arena,
      &other->_impl_.managed_name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Source, _impl_.weight_)
      + sizeof(Source::_impl_.weight_)
      - PROTOBUF_FIELD_OFFSET(Source, _impl_.port_)>(
          reinterpret_cast<char*>(&_impl_.port_),
          reinterpret_cast<char*>(&other->_impl_.port_));
}

std::string Source::GetTypeName() const {
  return "protobuf_replication_asynchronous_connection_failover.Source";
}


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

class SourceList::_Internal {
 public:
  using HasBits = decltype(std::declval<SourceList>()._impl_._has_bits_);
  static void set_has_origin(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_version(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0;
  }
};

SourceList::SourceList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:protobuf_replication_asynchronous_connection_failover.SourceList)
}
SourceList::SourceList(const SourceList& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  SourceList* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.source_){from._impl_.source_}
    , decltype(_impl_.origin_){}
    , decltype(_impl_.version_){}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.origin_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.origin_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_origin()) {
    _this->_impl_.origin_.Set(from._internal_origin(), 
      _this->GetArenaForAllocation());
  }
  _this->_impl_.version_ = from._impl_.version_;
  // @@protoc_insertion_point(copy_constructor:protobuf_replication_asynchronous_connection_failover.SourceList)
}

inline void SourceList::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_.source_){arena}
    , decltype(_impl_.origin_){}
    , decltype(_impl_.version_){uint64_t{0u}}
  };
  _impl_.origin_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.origin_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

SourceList::~SourceList() {
  // @@protoc_insertion_point(destructor:protobuf_replication_asynchronous_connection_failover.SourceList)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void SourceList::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.source_.~RepeatedPtrField();
  _impl_.origin_.Destroy();
}

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

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

  _impl_.source_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    _impl_.origin_.ClearNonDefaultToEmpty();
  }
  _impl_.version_ = uint64_t{0u};
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* SourceList::_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 string origin = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_origin();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required uint64 version = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_version(&has_bits);
          _impl_.version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .protobuf_replication_asynchronous_connection_failover.Source source = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_source(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(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<std::string>(),
        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* SourceList::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_replication_asynchronous_connection_failover.SourceList)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // required string origin = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_origin(), target);
  }

  // required uint64 version = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_version(), target);
  }

  // repeated .protobuf_replication_asynchronous_connection_failover.Source source = 3;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_source_size()); i < n; i++) {
    const auto& repfield = this->_internal_source(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_replication_asynchronous_connection_failover.SourceList)
  return target;
}

size_t SourceList::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:protobuf_replication_asynchronous_connection_failover.SourceList)
  size_t total_size = 0;

  if (_internal_has_origin()) {
    // required string origin = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_origin());
  }

  if (_internal_has_version()) {
    // required uint64 version = 2;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_version());
  }

  return total_size;
}
size_t SourceList::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_replication_asynchronous_connection_failover.SourceList)
  size_t total_size = 0;

  if (((_impl_._has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) {  // All required fields are present.
    // required string origin = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_origin());

    // required uint64 version = 2;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_version());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .protobuf_replication_asynchronous_connection_failover.Source source = 3;
  total_size += 1UL * this->_internal_source_size();
  for (const auto& msg : this->_impl_.source_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void SourceList::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const SourceList*>(
      &from));
}

void SourceList::MergeFrom(const SourceList& from) {
  SourceList* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_replication_asynchronous_connection_failover.SourceList)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.source_.MergeFrom(from._impl_.source_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_origin(from._internal_origin());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.version_ = from._impl_.version_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

bool SourceList::IsInitialized() const {
  if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false;
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.source_))
    return false;
  return true;
}

void SourceList::InternalSwap(SourceList* 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]);
  _impl_.source_.InternalSwap(&other->_impl_.source_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.origin_, lhs_arena,
      &other->_impl_.origin_, rhs_arena
  );
  swap(_impl_.version_, other->_impl_.version_);
}

std::string SourceList::GetTypeName() const {
  return "protobuf_replication_asynchronous_connection_failover.SourceList";
}


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

class Managed::_Internal {
 public:
  using HasBits = decltype(std::declval<Managed>()._impl_._has_bits_);
  static void set_has_channel(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_managed_name(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_managed_type(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_configuration(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x0000000f) ^ 0x0000000f) != 0;
  }
};

Managed::Managed(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:protobuf_replication_asynchronous_connection_failover.Managed)
}
Managed::Managed(const Managed& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Managed* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.channel_){}
    , decltype(_impl_.managed_name_){}
    , decltype(_impl_.managed_type_){}
    , decltype(_impl_.configuration_){}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.channel_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.channel_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_channel()) {
    _this->_impl_.channel_.Set(from._internal_channel(), 
      _this->GetArenaForAllocation());
  }
  _impl_.managed_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.managed_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_managed_name()) {
    _this->_impl_.managed_name_.Set(from._internal_managed_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.managed_type_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.managed_type_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_managed_type()) {
    _this->_impl_.managed_type_.Set(from._internal_managed_type(), 
      _this->GetArenaForAllocation());
  }
  _impl_.configuration_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.configuration_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_configuration()) {
    _this->_impl_.configuration_.Set(from._internal_configuration(), 
      _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:protobuf_replication_asynchronous_connection_failover.Managed)
}

inline void Managed::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_.channel_){}
    , decltype(_impl_.managed_name_){}
    , decltype(_impl_.managed_type_){}
    , decltype(_impl_.configuration_){}
  };
  _impl_.channel_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.channel_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.managed_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.managed_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.managed_type_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.managed_type_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.configuration_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.configuration_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Managed::~Managed() {
  // @@protoc_insertion_point(destructor:protobuf_replication_asynchronous_connection_failover.Managed)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Managed::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.channel_.Destroy();
  _impl_.managed_name_.Destroy();
  _impl_.managed_type_.Destroy();
  _impl_.configuration_.Destroy();
}

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

void Managed::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_replication_asynchronous_connection_failover.Managed)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.channel_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.managed_name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.managed_type_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      _impl_.configuration_.ClearNonDefaultToEmpty();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Managed::_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 string channel = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_channel();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required string managed_name = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_managed_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required string managed_type = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_managed_type();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required string configuration = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_configuration();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(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<std::string>(),
        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* Managed::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_replication_asynchronous_connection_failover.Managed)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // required string channel = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_channel(), target);
  }

  // required string managed_name = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_managed_name(), target);
  }

  // required string managed_type = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_managed_type(), target);
  }

  // required string configuration = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_configuration(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_replication_asynchronous_connection_failover.Managed)
  return target;
}

size_t Managed::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:protobuf_replication_asynchronous_connection_failover.Managed)
  size_t total_size = 0;

  if (_internal_has_channel()) {
    // required string channel = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_channel());
  }

  if (_internal_has_managed_name()) {
    // required string managed_name = 2;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_managed_name());
  }

  if (_internal_has_managed_type()) {
    // required string managed_type = 3;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_managed_type());
  }

  if (_internal_has_configuration()) {
    // required string configuration = 4;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_configuration());
  }

  return total_size;
}
size_t Managed::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_replication_asynchronous_connection_failover.Managed)
  size_t total_size = 0;

  if (((_impl_._has_bits_[0] & 0x0000000f) ^ 0x0000000f) == 0) {  // All required fields are present.
    // required string channel = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_channel());

    // required string managed_name = 2;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_managed_name());

    // required string managed_type = 3;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_managed_type());

    // required string configuration = 4;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_configuration());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Managed::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Managed*>(
      &from));
}

void Managed::MergeFrom(const Managed& from) {
  Managed* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_replication_asynchronous_connection_failover.Managed)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_channel(from._internal_channel());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_managed_name(from._internal_managed_name());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_managed_type(from._internal_managed_type());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_set_configuration(from._internal_configuration());
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Managed::InternalSwap(Managed* 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_.channel_, lhs_arena,
      &other->_impl_.channel_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.managed_name_, lhs_arena,
      &other->_impl_.managed_name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.managed_type_, lhs_arena,
      &other->_impl_.managed_type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.configuration_, lhs_arena,
      &other->_impl_.configuration_, rhs_arena
  );
}

std::string Managed::GetTypeName() const {
  return "protobuf_replication_asynchronous_connection_failover.Managed";
}


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

class ManagedList::_Internal {
 public:
  using HasBits = decltype(std::declval<ManagedList>()._impl_._has_bits_);
  static void set_has_origin(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_version(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0;
  }
};

ManagedList::ManagedList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:protobuf_replication_asynchronous_connection_failover.ManagedList)
}
ManagedList::ManagedList(const ManagedList& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  ManagedList* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.managed_){from._impl_.managed_}
    , decltype(_impl_.origin_){}
    , decltype(_impl_.version_){}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.origin_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.origin_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_origin()) {
    _this->_impl_.origin_.Set(from._internal_origin(), 
      _this->GetArenaForAllocation());
  }
  _this->_impl_.version_ = from._impl_.version_;
  // @@protoc_insertion_point(copy_constructor:protobuf_replication_asynchronous_connection_failover.ManagedList)
}

inline void ManagedList::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_.managed_){arena}
    , decltype(_impl_.origin_){}
    , decltype(_impl_.version_){uint64_t{0u}}
  };
  _impl_.origin_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.origin_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

ManagedList::~ManagedList() {
  // @@protoc_insertion_point(destructor:protobuf_replication_asynchronous_connection_failover.ManagedList)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ManagedList::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.managed_.~RepeatedPtrField();
  _impl_.origin_.Destroy();
}

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

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

  _impl_.managed_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    _impl_.origin_.ClearNonDefaultToEmpty();
  }
  _impl_.version_ = uint64_t{0u};
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* ManagedList::_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 string origin = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_origin();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required uint64 version = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_version(&has_bits);
          _impl_.version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .protobuf_replication_asynchronous_connection_failover.Managed managed = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_managed(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(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<std::string>(),
        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* ManagedList::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_replication_asynchronous_connection_failover.ManagedList)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // required string origin = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_origin(), target);
  }

  // required uint64 version = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_version(), target);
  }

  // repeated .protobuf_replication_asynchronous_connection_failover.Managed managed = 3;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_managed_size()); i < n; i++) {
    const auto& repfield = this->_internal_managed(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_replication_asynchronous_connection_failover.ManagedList)
  return target;
}

size_t ManagedList::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:protobuf_replication_asynchronous_connection_failover.ManagedList)
  size_t total_size = 0;

  if (_internal_has_origin()) {
    // required string origin = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_origin());
  }

  if (_internal_has_version()) {
    // required uint64 version = 2;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_version());
  }

  return total_size;
}
size_t ManagedList::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_replication_asynchronous_connection_failover.ManagedList)
  size_t total_size = 0;

  if (((_impl_._has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) {  // All required fields are present.
    // required string origin = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_origin());

    // required uint64 version = 2;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_version());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .protobuf_replication_asynchronous_connection_failover.Managed managed = 3;
  total_size += 1UL * this->_internal_managed_size();
  for (const auto& msg : this->_impl_.managed_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ManagedList::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const ManagedList*>(
      &from));
}

void ManagedList::MergeFrom(const ManagedList& from) {
  ManagedList* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_replication_asynchronous_connection_failover.ManagedList)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.managed_.MergeFrom(from._impl_.managed_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_origin(from._internal_origin());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.version_ = from._impl_.version_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

bool ManagedList::IsInitialized() const {
  if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false;
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.managed_))
    return false;
  return true;
}

void ManagedList::InternalSwap(ManagedList* 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]);
  _impl_.managed_.InternalSwap(&other->_impl_.managed_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.origin_, lhs_arena,
      &other->_impl_.origin_, rhs_arena
  );
  swap(_impl_.version_, other->_impl_.version_);
}

std::string ManagedList::GetTypeName() const {
  return "protobuf_replication_asynchronous_connection_failover.ManagedList";
}


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

class VariableStatus::_Internal {
 public:
  using HasBits = decltype(std::declval<VariableStatus>()._impl_._has_bits_);
  static void set_has_channel(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_key(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_status(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000007) ^ 0x00000007) != 0;
  }
};

VariableStatus::VariableStatus(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:protobuf_replication_asynchronous_connection_failover.VariableStatus)
}
VariableStatus::VariableStatus(const VariableStatus& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  VariableStatus* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.channel_){}
    , decltype(_impl_.key_){}
    , decltype(_impl_.status_){}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.channel_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.channel_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_channel()) {
    _this->_impl_.channel_.Set(from._internal_channel(), 
      _this->GetArenaForAllocation());
  }
  _impl_.key_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.key_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_key()) {
    _this->_impl_.key_.Set(from._internal_key(), 
      _this->GetArenaForAllocation());
  }
  _this->_impl_.status_ = from._impl_.status_;
  // @@protoc_insertion_point(copy_constructor:protobuf_replication_asynchronous_connection_failover.VariableStatus)
}

inline void VariableStatus::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_.channel_){}
    , decltype(_impl_.key_){}
    , decltype(_impl_.status_){0u}
  };
  _impl_.channel_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.channel_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.key_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.key_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

VariableStatus::~VariableStatus() {
  // @@protoc_insertion_point(destructor:protobuf_replication_asynchronous_connection_failover.VariableStatus)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void VariableStatus::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.channel_.Destroy();
  _impl_.key_.Destroy();
}

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

void VariableStatus::Clear() {
// @@protoc_insertion_point(message_clear_start:protobuf_replication_asynchronous_connection_failover.VariableStatus)
  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 & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.channel_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.key_.ClearNonDefaultToEmpty();
    }
  }
  _impl_.status_ = 0u;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* VariableStatus::_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 string channel = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_channel();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required string key = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_key();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required uint32 status = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_status(&has_bits);
          _impl_.status_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(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<std::string>(),
        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* VariableStatus::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_replication_asynchronous_connection_failover.VariableStatus)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // required string channel = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_channel(), target);
  }

  // required string key = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_key(), target);
  }

  // required uint32 status = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_status(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_replication_asynchronous_connection_failover.VariableStatus)
  return target;
}

size_t VariableStatus::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:protobuf_replication_asynchronous_connection_failover.VariableStatus)
  size_t total_size = 0;

  if (_internal_has_channel()) {
    // required string channel = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_channel());
  }

  if (_internal_has_key()) {
    // required string key = 2;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_key());
  }

  if (_internal_has_status()) {
    // required uint32 status = 3;
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_status());
  }

  return total_size;
}
size_t VariableStatus::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_replication_asynchronous_connection_failover.VariableStatus)
  size_t total_size = 0;

  if (((_impl_._has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) {  // All required fields are present.
    // required string channel = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_channel());

    // required string key = 2;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_key());

    // required uint32 status = 3;
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_status());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void VariableStatus::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const VariableStatus*>(
      &from));
}

void VariableStatus::MergeFrom(const VariableStatus& from) {
  VariableStatus* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_replication_asynchronous_connection_failover.VariableStatus)
  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_channel(from._internal_channel());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_key(from._internal_key());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.status_ = from._impl_.status_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void VariableStatus::InternalSwap(VariableStatus* 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_.channel_, lhs_arena,
      &other->_impl_.channel_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.key_, lhs_arena,
      &other->_impl_.key_, rhs_arena
  );
  swap(_impl_.status_, other->_impl_.status_);
}

std::string VariableStatus::GetTypeName() const {
  return "protobuf_replication_asynchronous_connection_failover.VariableStatus";
}


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

class VariableStatusList::_Internal {
 public:
  using HasBits = decltype(std::declval<VariableStatusList>()._impl_._has_bits_);
  static void set_has_origin(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_version(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0;
  }
};

VariableStatusList::VariableStatusList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:protobuf_replication_asynchronous_connection_failover.VariableStatusList)
}
VariableStatusList::VariableStatusList(const VariableStatusList& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  VariableStatusList* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.status_){from._impl_.status_}
    , decltype(_impl_.origin_){}
    , decltype(_impl_.version_){}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.origin_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.origin_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_origin()) {
    _this->_impl_.origin_.Set(from._internal_origin(), 
      _this->GetArenaForAllocation());
  }
  _this->_impl_.version_ = from._impl_.version_;
  // @@protoc_insertion_point(copy_constructor:protobuf_replication_asynchronous_connection_failover.VariableStatusList)
}

inline void VariableStatusList::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_.status_){arena}
    , decltype(_impl_.origin_){}
    , decltype(_impl_.version_){uint64_t{0u}}
  };
  _impl_.origin_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.origin_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

VariableStatusList::~VariableStatusList() {
  // @@protoc_insertion_point(destructor:protobuf_replication_asynchronous_connection_failover.VariableStatusList)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void VariableStatusList::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.status_.~RepeatedPtrField();
  _impl_.origin_.Destroy();
}

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

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

  _impl_.status_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    _impl_.origin_.ClearNonDefaultToEmpty();
  }
  _impl_.version_ = uint64_t{0u};
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* VariableStatusList::_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 string origin = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_origin();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required uint64 version = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_version(&has_bits);
          _impl_.version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .protobuf_replication_asynchronous_connection_failover.VariableStatus status = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_status(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(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<std::string>(),
        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* VariableStatusList::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_replication_asynchronous_connection_failover.VariableStatusList)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // required string origin = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_origin(), target);
  }

  // required uint64 version = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_version(), target);
  }

  // repeated .protobuf_replication_asynchronous_connection_failover.VariableStatus status = 3;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_status_size()); i < n; i++) {
    const auto& repfield = this->_internal_status(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_replication_asynchronous_connection_failover.VariableStatusList)
  return target;
}

size_t VariableStatusList::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:protobuf_replication_asynchronous_connection_failover.VariableStatusList)
  size_t total_size = 0;

  if (_internal_has_origin()) {
    // required string origin = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_origin());
  }

  if (_internal_has_version()) {
    // required uint64 version = 2;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_version());
  }

  return total_size;
}
size_t VariableStatusList::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_replication_asynchronous_connection_failover.VariableStatusList)
  size_t total_size = 0;

  if (((_impl_._has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) {  // All required fields are present.
    // required string origin = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_origin());

    // required uint64 version = 2;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_version());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .protobuf_replication_asynchronous_connection_failover.VariableStatus status = 3;
  total_size += 1UL * this->_internal_status_size();
  for (const auto& msg : this->_impl_.status_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void VariableStatusList::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const VariableStatusList*>(
      &from));
}

void VariableStatusList::MergeFrom(const VariableStatusList& from) {
  VariableStatusList* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_replication_asynchronous_connection_failover.VariableStatusList)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.status_.MergeFrom(from._impl_.status_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_origin(from._internal_origin());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.version_ = from._impl_.version_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

bool VariableStatusList::IsInitialized() const {
  if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false;
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.status_))
    return false;
  return true;
}

void VariableStatusList::InternalSwap(VariableStatusList* 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]);
  _impl_.status_.InternalSwap(&other->_impl_.status_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.origin_, lhs_arena,
      &other->_impl_.origin_, rhs_arena
  );
  swap(_impl_.version_, other->_impl_.version_);
}

std::string VariableStatusList::GetTypeName() const {
  return "protobuf_replication_asynchronous_connection_failover.VariableStatusList";
}


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

class SourceAndManagedAndStatusList::_Internal {
 public:
  using HasBits = decltype(std::declval<SourceAndManagedAndStatusList>()._impl_._has_bits_);
  static void set_has_origin(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_source_version(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_managed_version(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_status_version(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x0000000f) ^ 0x0000000f) != 0;
  }
};

SourceAndManagedAndStatusList::SourceAndManagedAndStatusList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:protobuf_replication_asynchronous_connection_failover.SourceAndManagedAndStatusList)
}
SourceAndManagedAndStatusList::SourceAndManagedAndStatusList(const SourceAndManagedAndStatusList& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  SourceAndManagedAndStatusList* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.source_){from._impl_.source_}
    , decltype(_impl_.managed_){from._impl_.managed_}
    , decltype(_impl_.status_){from._impl_.status_}
    , decltype(_impl_.origin_){}
    , decltype(_impl_.source_version_){}
    , decltype(_impl_.managed_version_){}
    , decltype(_impl_.status_version_){}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.origin_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.origin_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_origin()) {
    _this->_impl_.origin_.Set(from._internal_origin(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.source_version_, &from._impl_.source_version_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.status_version_) -
    reinterpret_cast<char*>(&_impl_.source_version_)) + sizeof(_impl_.status_version_));
  // @@protoc_insertion_point(copy_constructor:protobuf_replication_asynchronous_connection_failover.SourceAndManagedAndStatusList)
}

inline void SourceAndManagedAndStatusList::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_.source_){arena}
    , decltype(_impl_.managed_){arena}
    , decltype(_impl_.status_){arena}
    , decltype(_impl_.origin_){}
    , decltype(_impl_.source_version_){uint64_t{0u}}
    , decltype(_impl_.managed_version_){uint64_t{0u}}
    , decltype(_impl_.status_version_){uint64_t{0u}}
  };
  _impl_.origin_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.origin_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

SourceAndManagedAndStatusList::~SourceAndManagedAndStatusList() {
  // @@protoc_insertion_point(destructor:protobuf_replication_asynchronous_connection_failover.SourceAndManagedAndStatusList)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void SourceAndManagedAndStatusList::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.source_.~RepeatedPtrField();
  _impl_.managed_.~RepeatedPtrField();
  _impl_.status_.~RepeatedPtrField();
  _impl_.origin_.Destroy();
}

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

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

  _impl_.source_.Clear();
  _impl_.managed_.Clear();
  _impl_.status_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    _impl_.origin_.ClearNonDefaultToEmpty();
  }
  if (cached_has_bits & 0x0000000eu) {
    ::memset(&_impl_.source_version_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.status_version_) -
        reinterpret_cast<char*>(&_impl_.source_version_)) + sizeof(_impl_.status_version_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* SourceAndManagedAndStatusList::_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 string origin = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_origin();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required uint64 source_version = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_source_version(&has_bits);
          _impl_.source_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .protobuf_replication_asynchronous_connection_failover.Source source = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_source(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else
          goto handle_unusual;
        continue;
      // required uint64 managed_version = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_managed_version(&has_bits);
          _impl_.managed_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .protobuf_replication_asynchronous_connection_failover.Managed managed = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_managed(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
        } else
          goto handle_unusual;
        continue;
      // required uint64 status_version = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_status_version(&has_bits);
          _impl_.status_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .protobuf_replication_asynchronous_connection_failover.VariableStatus status = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_status(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(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<std::string>(),
        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* SourceAndManagedAndStatusList::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:protobuf_replication_asynchronous_connection_failover.SourceAndManagedAndStatusList)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // required string origin = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_origin(), target);
  }

  // required uint64 source_version = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_source_version(), target);
  }

  // repeated .protobuf_replication_asynchronous_connection_failover.Source source = 3;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_source_size()); i < n; i++) {
    const auto& repfield = this->_internal_source(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
  }

  // required uint64 managed_version = 4;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_managed_version(), target);
  }

  // repeated .protobuf_replication_asynchronous_connection_failover.Managed managed = 5;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_managed_size()); i < n; i++) {
    const auto& repfield = this->_internal_managed(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
  }

  // required uint64 status_version = 6;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_status_version(), target);
  }

  // repeated .protobuf_replication_asynchronous_connection_failover.VariableStatus status = 7;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_status_size()); i < n; i++) {
    const auto& repfield = this->_internal_status(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(7, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:protobuf_replication_asynchronous_connection_failover.SourceAndManagedAndStatusList)
  return target;
}

size_t SourceAndManagedAndStatusList::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:protobuf_replication_asynchronous_connection_failover.SourceAndManagedAndStatusList)
  size_t total_size = 0;

  if (_internal_has_origin()) {
    // required string origin = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_origin());
  }

  if (_internal_has_source_version()) {
    // required uint64 source_version = 2;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_source_version());
  }

  if (_internal_has_managed_version()) {
    // required uint64 managed_version = 4;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_managed_version());
  }

  if (_internal_has_status_version()) {
    // required uint64 status_version = 6;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_status_version());
  }

  return total_size;
}
size_t SourceAndManagedAndStatusList::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:protobuf_replication_asynchronous_connection_failover.SourceAndManagedAndStatusList)
  size_t total_size = 0;

  if (((_impl_._has_bits_[0] & 0x0000000f) ^ 0x0000000f) == 0) {  // All required fields are present.
    // required string origin = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_origin());

    // required uint64 source_version = 2;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_source_version());

    // required uint64 managed_version = 4;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_managed_version());

    // required uint64 status_version = 6;
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_status_version());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .protobuf_replication_asynchronous_connection_failover.Source source = 3;
  total_size += 1UL * this->_internal_source_size();
  for (const auto& msg : this->_impl_.source_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .protobuf_replication_asynchronous_connection_failover.Managed managed = 5;
  total_size += 1UL * this->_internal_managed_size();
  for (const auto& msg : this->_impl_.managed_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .protobuf_replication_asynchronous_connection_failover.VariableStatus status = 7;
  total_size += 1UL * this->_internal_status_size();
  for (const auto& msg : this->_impl_.status_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void SourceAndManagedAndStatusList::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const SourceAndManagedAndStatusList*>(
      &from));
}

void SourceAndManagedAndStatusList::MergeFrom(const SourceAndManagedAndStatusList& from) {
  SourceAndManagedAndStatusList* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_replication_asynchronous_connection_failover.SourceAndManagedAndStatusList)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.source_.MergeFrom(from._impl_.source_);
  _this->_impl_.managed_.MergeFrom(from._impl_.managed_);
  _this->_impl_.status_.MergeFrom(from._impl_.status_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_origin(from._internal_origin());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.source_version_ = from._impl_.source_version_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.managed_version_ = from._impl_.managed_version_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.status_version_ = from._impl_.status_version_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

bool SourceAndManagedAndStatusList::IsInitialized() const {
  if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false;
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.source_))
    return false;
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.managed_))
    return false;
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.status_))
    return false;
  return true;
}

void SourceAndManagedAndStatusList::InternalSwap(SourceAndManagedAndStatusList* 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]);
  _impl_.source_.InternalSwap(&other->_impl_.source_);
  _impl_.managed_.InternalSwap(&other->_impl_.managed_);
  _impl_.status_.InternalSwap(&other->_impl_.status_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.origin_, lhs_arena,
      &other->_impl_.origin_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SourceAndManagedAndStatusList, _impl_.status_version_)
      + sizeof(SourceAndManagedAndStatusList::_impl_.status_version_)
      - PROTOBUF_FIELD_OFFSET(SourceAndManagedAndStatusList, _impl_.source_version_)>(
          reinterpret_cast<char*>(&_impl_.source_version_),
          reinterpret_cast<char*>(&other->_impl_.source_version_));
}

std::string SourceAndManagedAndStatusList::GetTypeName() const {
  return "protobuf_replication_asynchronous_connection_failover.SourceAndManagedAndStatusList";
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace protobuf_replication_asynchronous_connection_failover
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::protobuf_replication_asynchronous_connection_failover::Source*
Arena::CreateMaybeMessage< ::protobuf_replication_asynchronous_connection_failover::Source >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_replication_asynchronous_connection_failover::Source >(arena);
}
template<> PROTOBUF_NOINLINE ::protobuf_replication_asynchronous_connection_failover::SourceList*
Arena::CreateMaybeMessage< ::protobuf_replication_asynchronous_connection_failover::SourceList >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_replication_asynchronous_connection_failover::SourceList >(arena);
}
template<> PROTOBUF_NOINLINE ::protobuf_replication_asynchronous_connection_failover::Managed*
Arena::CreateMaybeMessage< ::protobuf_replication_asynchronous_connection_failover::Managed >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_replication_asynchronous_connection_failover::Managed >(arena);
}
template<> PROTOBUF_NOINLINE ::protobuf_replication_asynchronous_connection_failover::ManagedList*
Arena::CreateMaybeMessage< ::protobuf_replication_asynchronous_connection_failover::ManagedList >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_replication_asynchronous_connection_failover::ManagedList >(arena);
}
template<> PROTOBUF_NOINLINE ::protobuf_replication_asynchronous_connection_failover::VariableStatus*
Arena::CreateMaybeMessage< ::protobuf_replication_asynchronous_connection_failover::VariableStatus >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_replication_asynchronous_connection_failover::VariableStatus >(arena);
}
template<> PROTOBUF_NOINLINE ::protobuf_replication_asynchronous_connection_failover::VariableStatusList*
Arena::CreateMaybeMessage< ::protobuf_replication_asynchronous_connection_failover::VariableStatusList >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_replication_asynchronous_connection_failover::VariableStatusList >(arena);
}
template<> PROTOBUF_NOINLINE ::protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList*
Arena::CreateMaybeMessage< ::protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList >(Arena* arena) {
  return Arena::CreateMessageInternal< ::protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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