// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: components/sync/protocol/agile_encryption_keys.proto
// Protobuf C++ Version: 7.35.1

#include "components/sync/protocol/agile_encryption_keys.pb.h"

#include <algorithm>
#include <type_traits>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/internal_visibility.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
// @@protoc_insertion_point(includes)

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace sync_pb {
class AgileSymmetricKey_Chacha20Poly1305Key::_Internal {
 public:
  using HasBits = decltype(::std::declval<AgileSymmetricKey_Chacha20Poly1305Key>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Chacha20Poly1305Key, _impl_._has_bits_);
};

constexpr AgileSymmetricKey_Chacha20Poly1305Key::ParseTableT_ AgileSymmetricKey_Chacha20Poly1305Key::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Chacha20Poly1305Key, _impl_._has_bits_),
      0, // no _extensions_
      1, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967294,  // skipmap
      offsetof(ParseTableT_, field_entries),
      1,  // num_field_entries
      0,  // num_aux_entries
      offsetof(ParseTableT_, field_names),  // no aux_entries
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sync_pb::AgileSymmetricKey_Chacha20Poly1305Key>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional bytes key = 1;
      {::_pbi::TcParser::FastBS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Chacha20Poly1305Key, _impl_.key_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional bytes key = 1;
      {PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Chacha20Poly1305Key, _impl_.key_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr AgileSymmetricKey_Chacha20Poly1305Key::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        key_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()) {}

template <typename>
constexpr AgileSymmetricKey_Chacha20Poly1305Key::AgileSymmetricKey_Chacha20Poly1305Key(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL AgileSymmetricKey_Chacha20Poly1305Key::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) AgileSymmetricKey_Chacha20Poly1305Key(arena);
}
constexpr auto AgileSymmetricKey_Chacha20Poly1305Key::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(AgileSymmetricKey_Chacha20Poly1305Key), alignof(AgileSymmetricKey_Chacha20Poly1305Key));
}
constexpr auto AgileSymmetricKey_Chacha20Poly1305Key::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &AgileSymmetricKey_Chacha20Poly1305Key::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<AgileSymmetricKey_Chacha20Poly1305Key>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &AgileSymmetricKey_Chacha20Poly1305Key::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<AgileSymmetricKey_Chacha20Poly1305Key>(), &AgileSymmetricKey_Chacha20Poly1305Key::ByteSizeLong,
              &AgileSymmetricKey_Chacha20Poly1305Key::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Chacha20Poly1305Key, _impl_._cached_size_),
          true,
      },
      "sync_pb.AgileSymmetricKey.Chacha20Poly1305Key",
  };
}
struct AgileSymmetricKey_Chacha20Poly1305KeyGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr AgileSymmetricKey_Chacha20Poly1305KeyGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 AgileSymmetricKey_Chacha20Poly1305Key_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(AgileSymmetricKey_Chacha20Poly1305Key::InternalGenerateClassData_(
            _default, &AgileSymmetricKey_Chacha20Poly1305Key_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<AgileSymmetricKey_Chacha20Poly1305Key>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~AgileSymmetricKey_Chacha20Poly1305KeyGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) AgileSymmetricKey_Chacha20Poly1305Key _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<AgileSymmetricKey_Chacha20Poly1305Key>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Chacha20Poly1305KeyGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST AgileSymmetricKey_Chacha20Poly1305KeyGlobalsTypeInternal AgileSymmetricKey_Chacha20Poly1305Key_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* AgileSymmetricKey_Chacha20Poly1305Key_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return AgileSymmetricKey_Chacha20Poly1305Key_globals_.GetClassData();
#else
  return AgileSymmetricKey_Chacha20Poly1305Key_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class AgileSymmetricKey_Aes256GcmKey::_Internal {
 public:
  using HasBits = decltype(::std::declval<AgileSymmetricKey_Aes256GcmKey>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Aes256GcmKey, _impl_._has_bits_);
};

constexpr AgileSymmetricKey_Aes256GcmKey::ParseTableT_ AgileSymmetricKey_Aes256GcmKey::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Aes256GcmKey, _impl_._has_bits_),
      0, // no _extensions_
      1, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967294,  // skipmap
      offsetof(ParseTableT_, field_entries),
      1,  // num_field_entries
      0,  // num_aux_entries
      offsetof(ParseTableT_, field_names),  // no aux_entries
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sync_pb::AgileSymmetricKey_Aes256GcmKey>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional bytes key = 1;
      {::_pbi::TcParser::FastBS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Aes256GcmKey, _impl_.key_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional bytes key = 1;
      {PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Aes256GcmKey, _impl_.key_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr AgileSymmetricKey_Aes256GcmKey::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        key_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()) {}

template <typename>
constexpr AgileSymmetricKey_Aes256GcmKey::AgileSymmetricKey_Aes256GcmKey(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL AgileSymmetricKey_Aes256GcmKey::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) AgileSymmetricKey_Aes256GcmKey(arena);
}
constexpr auto AgileSymmetricKey_Aes256GcmKey::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(AgileSymmetricKey_Aes256GcmKey), alignof(AgileSymmetricKey_Aes256GcmKey));
}
constexpr auto AgileSymmetricKey_Aes256GcmKey::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &AgileSymmetricKey_Aes256GcmKey::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<AgileSymmetricKey_Aes256GcmKey>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &AgileSymmetricKey_Aes256GcmKey::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<AgileSymmetricKey_Aes256GcmKey>(), &AgileSymmetricKey_Aes256GcmKey::ByteSizeLong,
              &AgileSymmetricKey_Aes256GcmKey::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Aes256GcmKey, _impl_._cached_size_),
          true,
      },
      "sync_pb.AgileSymmetricKey.Aes256GcmKey",
  };
}
struct AgileSymmetricKey_Aes256GcmKeyGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr AgileSymmetricKey_Aes256GcmKeyGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 AgileSymmetricKey_Aes256GcmKey_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(AgileSymmetricKey_Aes256GcmKey::InternalGenerateClassData_(
            _default, &AgileSymmetricKey_Aes256GcmKey_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<AgileSymmetricKey_Aes256GcmKey>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~AgileSymmetricKey_Aes256GcmKeyGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) AgileSymmetricKey_Aes256GcmKey _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<AgileSymmetricKey_Aes256GcmKey>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(AgileSymmetricKey_Aes256GcmKeyGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST AgileSymmetricKey_Aes256GcmKeyGlobalsTypeInternal AgileSymmetricKey_Aes256GcmKey_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* AgileSymmetricKey_Aes256GcmKey_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return AgileSymmetricKey_Aes256GcmKey_globals_.GetClassData();
#else
  return AgileSymmetricKey_Aes256GcmKey_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class AgileSymmetricKey::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
      PROTOBUF_FIELD_OFFSET(::sync_pb::AgileSymmetricKey, _impl_._oneof_case_);
};

constexpr AgileSymmetricKey::ParseTableT_ AgileSymmetricKey::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(AgileSymmetricKey,
                            _impl_._cached_size_),  // no hasbits
      0, // no _extensions_
      3, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967288,  // skipmap
      offsetof(ParseTableT_, field_entries),
      3,  // num_field_entries
      3,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sync_pb::AgileSymmetricKey>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // .sync_pb.NigoriKey legacy_nigori = 1;
      {PROTOBUF_FIELD_OFFSET(AgileSymmetricKey, _impl_.key_type_.legacy_nigori_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
      // .sync_pb.AgileSymmetricKey.Aes256GcmKey aes_256_gcm = 2;
      {PROTOBUF_FIELD_OFFSET(AgileSymmetricKey, _impl_.key_type_.aes_256_gcm_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
      // .sync_pb.AgileSymmetricKey.Chacha20Poly1305Key chacha20_poly1305 = 3;
      {PROTOBUF_FIELD_OFFSET(AgileSymmetricKey, _impl_.key_type_.chacha20_poly1305_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sync_pb::NigoriKey>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sync_pb::NigoriKey_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sync_pb::AgileSymmetricKey_Aes256GcmKey>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sync_pb::AgileSymmetricKey_Aes256GcmKey_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sync_pb::AgileSymmetricKey_Chacha20Poly1305Key>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sync_pb::AgileSymmetricKey_Chacha20Poly1305Key_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr AgileSymmetricKey::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : key_type_{},
        _cached_size_{0},
        _oneof_case_{} {}

template <typename>
constexpr AgileSymmetricKey::AgileSymmetricKey(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL AgileSymmetricKey::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) AgileSymmetricKey(arena);
}
constexpr auto AgileSymmetricKey::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(AgileSymmetricKey), alignof(AgileSymmetricKey));
}
constexpr auto AgileSymmetricKey::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &AgileSymmetricKey::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<AgileSymmetricKey>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &AgileSymmetricKey::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<AgileSymmetricKey>(), &AgileSymmetricKey::ByteSizeLong,
              &AgileSymmetricKey::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(AgileSymmetricKey, _impl_._cached_size_),
          true,
      },
      "sync_pb.AgileSymmetricKey",
  };
}
struct AgileSymmetricKeyGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr AgileSymmetricKeyGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 AgileSymmetricKey_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(AgileSymmetricKey::InternalGenerateClassData_(
            _default, &AgileSymmetricKey_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<AgileSymmetricKey>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~AgileSymmetricKeyGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) AgileSymmetricKey _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<AgileSymmetricKey>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(AgileSymmetricKeyGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST AgileSymmetricKeyGlobalsTypeInternal AgileSymmetricKey_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* AgileSymmetricKey_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return AgileSymmetricKey_globals_.GetClassData();
#else
  return AgileSymmetricKey_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class AgileSymmetricKeySet_Key::_Internal {
 public:
  using HasBits = decltype(::std::declval<AgileSymmetricKeySet_Key>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet_Key, _impl_._has_bits_);
};

constexpr AgileSymmetricKeySet_Key::ParseTableT_ AgileSymmetricKeySet_Key::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet_Key, _impl_._has_bits_),
      0, // no _extensions_
      2, 8,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967292,  // skipmap
      offsetof(ParseTableT_, field_entries),
      2,  // num_field_entries
      1,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sync_pb::AgileSymmetricKeySet_Key>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional uint32 key_id = 2;
      {::_pbi::TcParser::FastV32S1,
       {16, 1, 0,
        PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet_Key, _impl_.key_id_)}},
      // optional .sync_pb.AgileSymmetricKey key_data = 1;
      {::_pbi::TcParser::FastMtS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet_Key, _impl_.key_data_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional .sync_pb.AgileSymmetricKey key_data = 1;
      {PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet_Key, _impl_.key_data_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional uint32 key_id = 2;
      {PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet_Key, _impl_.key_id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sync_pb::AgileSymmetricKey>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sync_pb::AgileSymmetricKey_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr AgileSymmetricKeySet_Key::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        key_data_{nullptr},
        key_id_{0u} {}

template <typename>
constexpr AgileSymmetricKeySet_Key::AgileSymmetricKeySet_Key(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL AgileSymmetricKeySet_Key::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) AgileSymmetricKeySet_Key(arena);
}
constexpr auto AgileSymmetricKeySet_Key::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(AgileSymmetricKeySet_Key), alignof(AgileSymmetricKeySet_Key));
}
constexpr auto AgileSymmetricKeySet_Key::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &AgileSymmetricKeySet_Key::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<AgileSymmetricKeySet_Key>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &AgileSymmetricKeySet_Key::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<AgileSymmetricKeySet_Key>(), &AgileSymmetricKeySet_Key::ByteSizeLong,
              &AgileSymmetricKeySet_Key::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet_Key, _impl_._cached_size_),
          true,
      },
      "sync_pb.AgileSymmetricKeySet.Key",
  };
}
struct AgileSymmetricKeySet_KeyGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr AgileSymmetricKeySet_KeyGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 AgileSymmetricKeySet_Key_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(AgileSymmetricKeySet_Key::InternalGenerateClassData_(
            _default, &AgileSymmetricKeySet_Key_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<AgileSymmetricKeySet_Key>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~AgileSymmetricKeySet_KeyGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) AgileSymmetricKeySet_Key _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<AgileSymmetricKeySet_Key>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet_KeyGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST AgileSymmetricKeySet_KeyGlobalsTypeInternal AgileSymmetricKeySet_Key_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* AgileSymmetricKeySet_Key_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return AgileSymmetricKeySet_Key_globals_.GetClassData();
#else
  return AgileSymmetricKeySet_Key_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class AgileSymmetricKeySet::_Internal {
 public:
  using HasBits = decltype(::std::declval<AgileSymmetricKeySet>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet, _impl_._has_bits_);
};

constexpr AgileSymmetricKeySet::ParseTableT_ AgileSymmetricKeySet::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet, _impl_._has_bits_),
      0, // no _extensions_
      2, 8,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967292,  // skipmap
      offsetof(ParseTableT_, field_entries),
      2,  // num_field_entries
      1,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sync_pb::AgileSymmetricKeySet>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // repeated .sync_pb.AgileSymmetricKeySet.Key key = 2;
      {::_pbi::TcParser::FastMtR1,
       {18, 0, 0,
        PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet, _impl_.key_)}},
      // optional uint32 primary_key_id = 1;
      {::_pbi::TcParser::FastV32S1,
       {8, 1, 0,
        PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet, _impl_.primary_key_id_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional uint32 primary_key_id = 1;
      {PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet, _impl_.primary_key_id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // repeated .sync_pb.AgileSymmetricKeySet.Key key = 2;
      {PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet, _impl_.key_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sync_pb::AgileSymmetricKeySet_Key>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sync_pb::AgileSymmetricKeySet_Key_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr AgileSymmetricKeySet::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        key_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sync_pb::AgileSymmetricKeySet,
            PROTOBUF_FIELD_OFFSET(::sync_pb::AgileSymmetricKeySet, _impl_.key_)>()
         }
        ,
        primary_key_id_{0u} {}

template <typename>
constexpr AgileSymmetricKeySet::AgileSymmetricKeySet(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL AgileSymmetricKeySet::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) AgileSymmetricKeySet(arena);
}
constexpr auto AgileSymmetricKeySet::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(AgileSymmetricKeySet), alignof(AgileSymmetricKeySet));
}
constexpr auto AgileSymmetricKeySet::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &AgileSymmetricKeySet::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<AgileSymmetricKeySet>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &AgileSymmetricKeySet::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<AgileSymmetricKeySet>(), &AgileSymmetricKeySet::ByteSizeLong,
              &AgileSymmetricKeySet::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet, _impl_._cached_size_),
          true,
      },
      "sync_pb.AgileSymmetricKeySet",
  };
}
struct AgileSymmetricKeySetGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr AgileSymmetricKeySetGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 AgileSymmetricKeySet_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(AgileSymmetricKeySet::InternalGenerateClassData_(
            _default, &AgileSymmetricKeySet_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<AgileSymmetricKeySet>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~AgileSymmetricKeySetGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) AgileSymmetricKeySet _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<AgileSymmetricKeySet>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySetGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST AgileSymmetricKeySetGlobalsTypeInternal AgileSymmetricKeySet_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* AgileSymmetricKeySet_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return AgileSymmetricKeySet_globals_.GetClassData();
#else
  return AgileSymmetricKeySet_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace sync_pb
namespace sync_pb {
// ===================================================================

AgileSymmetricKey_Aes256GcmKey::AgileSymmetricKey_Aes256GcmKey(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AgileSymmetricKey_Aes256GcmKey_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sync_pb.AgileSymmetricKey.Aes256GcmKey)
}
PROTOBUF_NDEBUG_INLINE AgileSymmetricKey_Aes256GcmKey::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sync_pb::AgileSymmetricKey_Aes256GcmKey& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        key_(arena, from.key_) {}

AgileSymmetricKey_Aes256GcmKey::AgileSymmetricKey_Aes256GcmKey(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const AgileSymmetricKey_Aes256GcmKey& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AgileSymmetricKey_Aes256GcmKey_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  AgileSymmetricKey_Aes256GcmKey* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

  // @@protoc_insertion_point(copy_constructor:sync_pb.AgileSymmetricKey.Aes256GcmKey)
}
PROTOBUF_NDEBUG_INLINE AgileSymmetricKey_Aes256GcmKey::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        key_(arena) {}

inline void AgileSymmetricKey_Aes256GcmKey::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
AgileSymmetricKey_Aes256GcmKey::~AgileSymmetricKey_Aes256GcmKey() {
  // @@protoc_insertion_point(destructor:sync_pb.AgileSymmetricKey.Aes256GcmKey)
  SharedDtor(*this);
}
inline void AgileSymmetricKey_Aes256GcmKey::SharedDtor(MessageLite& self) {
  AgileSymmetricKey_Aes256GcmKey& this_ = static_cast<AgileSymmetricKey_Aes256GcmKey&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.key_.Destroy();
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite AgileSymmetricKey_Aes256GcmKey_class_data_ =
    AgileSymmetricKey_Aes256GcmKey::InternalGenerateClassData_(AgileSymmetricKey_Aes256GcmKey_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AgileSymmetricKey_Aes256GcmKey::GetClassData() const {
  return AgileSymmetricKey_Aes256GcmKey_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AgileSymmetricKey_Aes256GcmKey::GetClassData() const {
  return AgileSymmetricKey_Aes256GcmKey_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const AgileSymmetricKey_Aes256GcmKey::ParseTableT_
    AgileSymmetricKey_Aes256GcmKey::_table_ =
        AgileSymmetricKey_Aes256GcmKey::InternalGenerateParseTable_(AgileSymmetricKey_Aes256GcmKey_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void AgileSymmetricKey_Aes256GcmKey::Clear() {
// @@protoc_insertion_point(message_clear_start:sync_pb.AgileSymmetricKey.Aes256GcmKey)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::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 (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _impl_.key_.ClearNonDefaultToEmpty();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL AgileSymmetricKey_Aes256GcmKey::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const AgileSymmetricKey_Aes256GcmKey& this_ = static_cast<const AgileSymmetricKey_Aes256GcmKey&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL AgileSymmetricKey_Aes256GcmKey::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const AgileSymmetricKey_Aes256GcmKey& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:sync_pb.AgileSymmetricKey.Aes256GcmKey)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional bytes key = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_key();
    target = stream->WriteBytesMaybeAliased(1, _s, target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sync_pb.AgileSymmetricKey.Aes256GcmKey)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t AgileSymmetricKey_Aes256GcmKey::ByteSizeLong(const MessageLite& base) {
  const AgileSymmetricKey_Aes256GcmKey& this_ = static_cast<const AgileSymmetricKey_Aes256GcmKey&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t AgileSymmetricKey_Aes256GcmKey::ByteSizeLong() const {
  const AgileSymmetricKey_Aes256GcmKey& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sync_pb.AgileSymmetricKey.Aes256GcmKey)
  ::size_t total_size = 0;

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

   {
    // optional bytes key = 1;
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                      this_._internal_key());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void AgileSymmetricKey_Aes256GcmKey::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<AgileSymmetricKey_Aes256GcmKey*>(&to_msg);
  auto& from = static_cast<const AgileSymmetricKey_Aes256GcmKey&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:sync_pb.AgileSymmetricKey.Aes256GcmKey)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _this->_internal_set_key(from._internal_key());
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void AgileSymmetricKey_Aes256GcmKey::CopyFrom(const AgileSymmetricKey_Aes256GcmKey& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:sync_pb.AgileSymmetricKey.Aes256GcmKey)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void AgileSymmetricKey_Aes256GcmKey::InternalSwap(AgileSymmetricKey_Aes256GcmKey* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena);
}

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

AgileSymmetricKey_Chacha20Poly1305Key::AgileSymmetricKey_Chacha20Poly1305Key(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AgileSymmetricKey_Chacha20Poly1305Key_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sync_pb.AgileSymmetricKey.Chacha20Poly1305Key)
}
PROTOBUF_NDEBUG_INLINE AgileSymmetricKey_Chacha20Poly1305Key::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sync_pb::AgileSymmetricKey_Chacha20Poly1305Key& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        key_(arena, from.key_) {}

AgileSymmetricKey_Chacha20Poly1305Key::AgileSymmetricKey_Chacha20Poly1305Key(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const AgileSymmetricKey_Chacha20Poly1305Key& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AgileSymmetricKey_Chacha20Poly1305Key_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  AgileSymmetricKey_Chacha20Poly1305Key* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

  // @@protoc_insertion_point(copy_constructor:sync_pb.AgileSymmetricKey.Chacha20Poly1305Key)
}
PROTOBUF_NDEBUG_INLINE AgileSymmetricKey_Chacha20Poly1305Key::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        key_(arena) {}

inline void AgileSymmetricKey_Chacha20Poly1305Key::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
AgileSymmetricKey_Chacha20Poly1305Key::~AgileSymmetricKey_Chacha20Poly1305Key() {
  // @@protoc_insertion_point(destructor:sync_pb.AgileSymmetricKey.Chacha20Poly1305Key)
  SharedDtor(*this);
}
inline void AgileSymmetricKey_Chacha20Poly1305Key::SharedDtor(MessageLite& self) {
  AgileSymmetricKey_Chacha20Poly1305Key& this_ = static_cast<AgileSymmetricKey_Chacha20Poly1305Key&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.key_.Destroy();
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite AgileSymmetricKey_Chacha20Poly1305Key_class_data_ =
    AgileSymmetricKey_Chacha20Poly1305Key::InternalGenerateClassData_(AgileSymmetricKey_Chacha20Poly1305Key_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AgileSymmetricKey_Chacha20Poly1305Key::GetClassData() const {
  return AgileSymmetricKey_Chacha20Poly1305Key_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AgileSymmetricKey_Chacha20Poly1305Key::GetClassData() const {
  return AgileSymmetricKey_Chacha20Poly1305Key_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const AgileSymmetricKey_Chacha20Poly1305Key::ParseTableT_
    AgileSymmetricKey_Chacha20Poly1305Key::_table_ =
        AgileSymmetricKey_Chacha20Poly1305Key::InternalGenerateParseTable_(AgileSymmetricKey_Chacha20Poly1305Key_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void AgileSymmetricKey_Chacha20Poly1305Key::Clear() {
// @@protoc_insertion_point(message_clear_start:sync_pb.AgileSymmetricKey.Chacha20Poly1305Key)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::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 (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _impl_.key_.ClearNonDefaultToEmpty();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL AgileSymmetricKey_Chacha20Poly1305Key::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const AgileSymmetricKey_Chacha20Poly1305Key& this_ = static_cast<const AgileSymmetricKey_Chacha20Poly1305Key&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL AgileSymmetricKey_Chacha20Poly1305Key::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const AgileSymmetricKey_Chacha20Poly1305Key& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:sync_pb.AgileSymmetricKey.Chacha20Poly1305Key)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional bytes key = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_key();
    target = stream->WriteBytesMaybeAliased(1, _s, target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sync_pb.AgileSymmetricKey.Chacha20Poly1305Key)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t AgileSymmetricKey_Chacha20Poly1305Key::ByteSizeLong(const MessageLite& base) {
  const AgileSymmetricKey_Chacha20Poly1305Key& this_ = static_cast<const AgileSymmetricKey_Chacha20Poly1305Key&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t AgileSymmetricKey_Chacha20Poly1305Key::ByteSizeLong() const {
  const AgileSymmetricKey_Chacha20Poly1305Key& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sync_pb.AgileSymmetricKey.Chacha20Poly1305Key)
  ::size_t total_size = 0;

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

   {
    // optional bytes key = 1;
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                      this_._internal_key());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void AgileSymmetricKey_Chacha20Poly1305Key::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<AgileSymmetricKey_Chacha20Poly1305Key*>(&to_msg);
  auto& from = static_cast<const AgileSymmetricKey_Chacha20Poly1305Key&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:sync_pb.AgileSymmetricKey.Chacha20Poly1305Key)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _this->_internal_set_key(from._internal_key());
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void AgileSymmetricKey_Chacha20Poly1305Key::CopyFrom(const AgileSymmetricKey_Chacha20Poly1305Key& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:sync_pb.AgileSymmetricKey.Chacha20Poly1305Key)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void AgileSymmetricKey_Chacha20Poly1305Key::InternalSwap(AgileSymmetricKey_Chacha20Poly1305Key* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena);
}

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

void AgileSymmetricKey::set_allocated_legacy_nigori(::sync_pb::NigoriKey* PROTOBUF_NULLABLE legacy_nigori) {
  ::google::protobuf::Arena* message_arena = GetArena();
  clear_key_type();
  if (legacy_nigori) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(legacy_nigori)->GetArena();
    if (message_arena != submessage_arena) {
      legacy_nigori = ::google::protobuf::internal::GetOwnedMessage(message_arena, legacy_nigori, submessage_arena);
    }
    set_has_legacy_nigori();
    _impl_.key_type_.legacy_nigori_ = legacy_nigori;
  }
  // @@protoc_insertion_point(field_set_allocated:sync_pb.AgileSymmetricKey.legacy_nigori)
}
void AgileSymmetricKey::clear_legacy_nigori() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (key_type_case() == kLegacyNigori) {
    if (GetArena() == nullptr) {
      delete _impl_.key_type_.legacy_nigori_;
    } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
      if (_impl_.key_type_.legacy_nigori_ != nullptr) {
        _impl_.key_type_.legacy_nigori_->Clear();
      }
    }
    clear_has_key_type();
  }
}
void AgileSymmetricKey::set_allocated_aes_256_gcm(::sync_pb::AgileSymmetricKey_Aes256GcmKey* PROTOBUF_NULLABLE aes_256_gcm) {
  ::google::protobuf::Arena* message_arena = GetArena();
  clear_key_type();
  if (aes_256_gcm) {
    ::google::protobuf::Arena* submessage_arena = aes_256_gcm->GetArena();
    if (message_arena != submessage_arena) {
      aes_256_gcm = ::google::protobuf::internal::GetOwnedMessage(message_arena, aes_256_gcm, submessage_arena);
    }
    set_has_aes_256_gcm();
    _impl_.key_type_.aes_256_gcm_ = aes_256_gcm;
  }
  // @@protoc_insertion_point(field_set_allocated:sync_pb.AgileSymmetricKey.aes_256_gcm)
}
void AgileSymmetricKey::set_allocated_chacha20_poly1305(::sync_pb::AgileSymmetricKey_Chacha20Poly1305Key* PROTOBUF_NULLABLE chacha20_poly1305) {
  ::google::protobuf::Arena* message_arena = GetArena();
  clear_key_type();
  if (chacha20_poly1305) {
    ::google::protobuf::Arena* submessage_arena = chacha20_poly1305->GetArena();
    if (message_arena != submessage_arena) {
      chacha20_poly1305 = ::google::protobuf::internal::GetOwnedMessage(message_arena, chacha20_poly1305, submessage_arena);
    }
    set_has_chacha20_poly1305();
    _impl_.key_type_.chacha20_poly1305_ = chacha20_poly1305;
  }
  // @@protoc_insertion_point(field_set_allocated:sync_pb.AgileSymmetricKey.chacha20_poly1305)
}
AgileSymmetricKey::AgileSymmetricKey(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AgileSymmetricKey_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sync_pb.AgileSymmetricKey)
}
PROTOBUF_NDEBUG_INLINE AgileSymmetricKey::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sync_pb::AgileSymmetricKey& from_msg)
      : key_type_{},
        _cached_size_{0},
        _oneof_case_{from._oneof_case_[0]} {}

AgileSymmetricKey::AgileSymmetricKey(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const AgileSymmetricKey& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AgileSymmetricKey_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  AgileSymmetricKey* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  switch (key_type_case()) {
    case KEY_TYPE_NOT_SET:
      break;
      case kLegacyNigori:
        _impl_.key_type_.legacy_nigori_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.key_type_.legacy_nigori_);
        break;
      case kAes256Gcm:
        _impl_.key_type_.aes_256_gcm_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.key_type_.aes_256_gcm_);
        break;
      case kChacha20Poly1305:
        _impl_.key_type_.chacha20_poly1305_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.key_type_.chacha20_poly1305_);
        break;
  }

  // @@protoc_insertion_point(copy_constructor:sync_pb.AgileSymmetricKey)
}
PROTOBUF_NDEBUG_INLINE AgileSymmetricKey::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : key_type_{},
        _cached_size_{0},
        _oneof_case_{} {}

inline void AgileSymmetricKey::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
AgileSymmetricKey::~AgileSymmetricKey() {
  // @@protoc_insertion_point(destructor:sync_pb.AgileSymmetricKey)
  SharedDtor(*this);
}
inline void AgileSymmetricKey::SharedDtor(MessageLite& self) {
  AgileSymmetricKey& this_ = static_cast<AgileSymmetricKey&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  if (this_.has_key_type()) {
    this_.clear_key_type();
  }
  this_._impl_.~Impl_();
}

void AgileSymmetricKey::clear_key_type() {
// @@protoc_insertion_point(one_of_clear_start:sync_pb.AgileSymmetricKey)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  switch (key_type_case()) {
    case kLegacyNigori: {
      if (GetArena() == nullptr) {
        delete _impl_.key_type_.legacy_nigori_;
      } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
        if (_impl_.key_type_.legacy_nigori_ != nullptr) {
          _impl_.key_type_.legacy_nigori_->Clear();
        }
      }
      break;
    }
    case kAes256Gcm: {
      if (GetArena() == nullptr) {
        delete _impl_.key_type_.aes_256_gcm_;
      } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
        if (_impl_.key_type_.aes_256_gcm_ != nullptr) {
          _impl_.key_type_.aes_256_gcm_->Clear();
        }
      }
      break;
    }
    case kChacha20Poly1305: {
      if (GetArena() == nullptr) {
        delete _impl_.key_type_.chacha20_poly1305_;
      } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
        if (_impl_.key_type_.chacha20_poly1305_ != nullptr) {
          _impl_.key_type_.chacha20_poly1305_->Clear();
        }
      }
      break;
    }
    case KEY_TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = KEY_TYPE_NOT_SET;
}


#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite AgileSymmetricKey_class_data_ =
    AgileSymmetricKey::InternalGenerateClassData_(AgileSymmetricKey_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AgileSymmetricKey::GetClassData() const {
  return AgileSymmetricKey_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AgileSymmetricKey::GetClassData() const {
  return AgileSymmetricKey_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const AgileSymmetricKey::ParseTableT_
    AgileSymmetricKey::_table_ =
        AgileSymmetricKey::InternalGenerateParseTable_(AgileSymmetricKey_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void AgileSymmetricKey::Clear() {
// @@protoc_insertion_point(message_clear_start:sync_pb.AgileSymmetricKey)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_key_type();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL AgileSymmetricKey::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const AgileSymmetricKey& this_ = static_cast<const AgileSymmetricKey&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL AgileSymmetricKey::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const AgileSymmetricKey& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:sync_pb.AgileSymmetricKey)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  switch (this_.key_type_case()) {
    case kLegacyNigori: {
      target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
          1, *this_._impl_.key_type_.legacy_nigori_, this_._impl_.key_type_.legacy_nigori_->GetCachedSize(), target,
          stream);
      break;
    }
    case kAes256Gcm: {
      target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
          2, *this_._impl_.key_type_.aes_256_gcm_, this_._impl_.key_type_.aes_256_gcm_->GetCachedSize(), target,
          stream);
      break;
    }
    case kChacha20Poly1305: {
      target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
          3, *this_._impl_.key_type_.chacha20_poly1305_, this_._impl_.key_type_.chacha20_poly1305_->GetCachedSize(), target,
          stream);
      break;
    }
    default:
      break;
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sync_pb.AgileSymmetricKey)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t AgileSymmetricKey::ByteSizeLong(const MessageLite& base) {
  const AgileSymmetricKey& this_ = static_cast<const AgileSymmetricKey&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t AgileSymmetricKey::ByteSizeLong() const {
  const AgileSymmetricKey& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sync_pb.AgileSymmetricKey)
  ::size_t total_size = 0;

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

  switch (this_.key_type_case()) {
    // .sync_pb.NigoriKey legacy_nigori = 1;
    case kLegacyNigori: {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.key_type_.legacy_nigori_);
      break;
    }
    // .sync_pb.AgileSymmetricKey.Aes256GcmKey aes_256_gcm = 2;
    case kAes256Gcm: {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.key_type_.aes_256_gcm_);
      break;
    }
    // .sync_pb.AgileSymmetricKey.Chacha20Poly1305Key chacha20_poly1305 = 3;
    case kChacha20Poly1305: {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.key_type_.chacha20_poly1305_);
      break;
    }
    case KEY_TYPE_NOT_SET: {
      break;
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void AgileSymmetricKey::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<AgileSymmetricKey*>(&to_msg);
  auto& from = static_cast<const AgileSymmetricKey&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:sync_pb.AgileSymmetricKey)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  if (const uint32_t oneof_from_case =
          from._impl_._oneof_case_[0]) {
    const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0];
    const bool oneof_needs_init = oneof_to_case != oneof_from_case;
    if (oneof_needs_init) {
      if (oneof_to_case != 0) {
        _this->clear_key_type();
      }
      _this->_impl_._oneof_case_[0] = oneof_from_case;
    }

    switch (oneof_from_case) {
      case kLegacyNigori: {
        if (oneof_needs_init) {
          _this->_impl_.key_type_.legacy_nigori_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.key_type_.legacy_nigori_);
        } else {
          _this->_impl_.key_type_.legacy_nigori_->CheckTypeAndMergeFrom(*from._impl_.key_type_.legacy_nigori_);
        }
        break;
      }
      case kAes256Gcm: {
        if (oneof_needs_init) {
          _this->_impl_.key_type_.aes_256_gcm_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.key_type_.aes_256_gcm_);
        } else {
          _this->_impl_.key_type_.aes_256_gcm_->CheckTypeAndMergeFrom(*from._impl_.key_type_.aes_256_gcm_);
        }
        break;
      }
      case kChacha20Poly1305: {
        if (oneof_needs_init) {
          _this->_impl_.key_type_.chacha20_poly1305_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.key_type_.chacha20_poly1305_);
        } else {
          _this->_impl_.key_type_.chacha20_poly1305_->CheckTypeAndMergeFrom(*from._impl_.key_type_.chacha20_poly1305_);
        }
        break;
      }
      case KEY_TYPE_NOT_SET:
        break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void AgileSymmetricKey::InternalSwap(AgileSymmetricKey* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.key_type_, other->_impl_.key_type_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

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

AgileSymmetricKeySet_Key::AgileSymmetricKeySet_Key(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AgileSymmetricKeySet_Key_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sync_pb.AgileSymmetricKeySet.Key)
}
PROTOBUF_NDEBUG_INLINE AgileSymmetricKeySet_Key::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sync_pb::AgileSymmetricKeySet_Key& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

AgileSymmetricKeySet_Key::AgileSymmetricKeySet_Key(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const AgileSymmetricKeySet_Key& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AgileSymmetricKeySet_Key_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  AgileSymmetricKeySet_Key* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.key_data_ = (CheckHasBit(cached_has_bits, 0x00000001U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.key_data_)
                : nullptr;
  _impl_.key_id_ = from._impl_.key_id_;

  // @@protoc_insertion_point(copy_constructor:sync_pb.AgileSymmetricKeySet.Key)
}
PROTOBUF_NDEBUG_INLINE AgileSymmetricKeySet_Key::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

inline void AgileSymmetricKeySet_Key::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, key_data_),
           0,
           offsetof(Impl_, key_id_) -
               offsetof(Impl_, key_data_) +
               sizeof(Impl_::key_id_));
}
AgileSymmetricKeySet_Key::~AgileSymmetricKeySet_Key() {
  // @@protoc_insertion_point(destructor:sync_pb.AgileSymmetricKeySet.Key)
  SharedDtor(*this);
}
inline void AgileSymmetricKeySet_Key::SharedDtor(MessageLite& self) {
  AgileSymmetricKeySet_Key& this_ = static_cast<AgileSymmetricKeySet_Key&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  delete this_._impl_.key_data_;
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite AgileSymmetricKeySet_Key_class_data_ =
    AgileSymmetricKeySet_Key::InternalGenerateClassData_(AgileSymmetricKeySet_Key_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AgileSymmetricKeySet_Key::GetClassData() const {
  return AgileSymmetricKeySet_Key_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AgileSymmetricKeySet_Key::GetClassData() const {
  return AgileSymmetricKeySet_Key_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const AgileSymmetricKeySet_Key::ParseTableT_
    AgileSymmetricKeySet_Key::_table_ =
        AgileSymmetricKeySet_Key::InternalGenerateParseTable_(AgileSymmetricKeySet_Key_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void AgileSymmetricKeySet_Key::Clear() {
// @@protoc_insertion_point(message_clear_start:sync_pb.AgileSymmetricKeySet.Key)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::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 (CheckHasBit(cached_has_bits, 0x00000001U)) {
    ABSL_DCHECK(_impl_.key_data_ != nullptr);
    _impl_.key_data_->Clear();
  }
  _impl_.key_id_ = 0u;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL AgileSymmetricKeySet_Key::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const AgileSymmetricKeySet_Key& this_ = static_cast<const AgileSymmetricKeySet_Key&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL AgileSymmetricKeySet_Key::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const AgileSymmetricKeySet_Key& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:sync_pb.AgileSymmetricKeySet.Key)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional .sync_pb.AgileSymmetricKey key_data = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        1, *this_._impl_.key_data_, this_._impl_.key_data_->GetCachedSize(), target,
        stream);
  }

  // optional uint32 key_id = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        2, this_._internal_key_id(), target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sync_pb.AgileSymmetricKeySet.Key)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t AgileSymmetricKeySet_Key::ByteSizeLong(const MessageLite& base) {
  const AgileSymmetricKeySet_Key& this_ = static_cast<const AgileSymmetricKeySet_Key&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t AgileSymmetricKeySet_Key::ByteSizeLong() const {
  const AgileSymmetricKeySet_Key& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sync_pb.AgileSymmetricKeySet.Key)
  ::size_t total_size = 0;

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    // optional .sync_pb.AgileSymmetricKey key_data = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.key_data_);
    }
    // optional uint32 key_id = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_key_id());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void AgileSymmetricKeySet_Key::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<AgileSymmetricKeySet_Key*>(&to_msg);
  auto& from = static_cast<const AgileSymmetricKeySet_Key&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:sync_pb.AgileSymmetricKeySet.Key)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      ABSL_DCHECK(from._impl_.key_data_ != nullptr);
      if (_this->_impl_.key_data_ == nullptr) {
        _this->_impl_.key_data_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.key_data_);
      } else {
        _this->_impl_.key_data_->MergeFrom(*from._impl_.key_data_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_impl_.key_id_ = from._impl_.key_id_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void AgileSymmetricKeySet_Key::CopyFrom(const AgileSymmetricKeySet_Key& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:sync_pb.AgileSymmetricKeySet.Key)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void AgileSymmetricKeySet_Key::InternalSwap(AgileSymmetricKeySet_Key* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet_Key, _impl_.key_id_)
      + sizeof(AgileSymmetricKeySet_Key::_impl_.key_id_)
      - PROTOBUF_FIELD_OFFSET(AgileSymmetricKeySet_Key, _impl_.key_data_)>(
          reinterpret_cast<char*>(&_impl_.key_data_),
          reinterpret_cast<char*>(&other->_impl_.key_data_));
}

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

AgileSymmetricKeySet::AgileSymmetricKeySet(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AgileSymmetricKeySet_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sync_pb.AgileSymmetricKeySet)
}
PROTOBUF_NDEBUG_INLINE AgileSymmetricKeySet::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sync_pb::AgileSymmetricKeySet& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        key_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::sync_pb::AgileSymmetricKeySet,
              PROTOBUF_FIELD_OFFSET(::sync_pb::AgileSymmetricKeySet, _impl_.key_)>()
          , from.key_
        }
     {}

AgileSymmetricKeySet::AgileSymmetricKeySet(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const AgileSymmetricKeySet& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AgileSymmetricKeySet_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  AgileSymmetricKeySet* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  _impl_.primary_key_id_ = from._impl_.primary_key_id_;

  // @@protoc_insertion_point(copy_constructor:sync_pb.AgileSymmetricKeySet)
}
PROTOBUF_NDEBUG_INLINE AgileSymmetricKeySet::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        key_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sync_pb::AgileSymmetricKeySet,
            PROTOBUF_FIELD_OFFSET(::sync_pb::AgileSymmetricKeySet, _impl_.key_)>()
         }
     {}

inline void AgileSymmetricKeySet::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.primary_key_id_ = {};
}
AgileSymmetricKeySet::~AgileSymmetricKeySet() {
  // @@protoc_insertion_point(destructor:sync_pb.AgileSymmetricKeySet)
  SharedDtor(*this);
}
inline void AgileSymmetricKeySet::SharedDtor(MessageLite& self) {
  AgileSymmetricKeySet& this_ = static_cast<AgileSymmetricKeySet&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite AgileSymmetricKeySet_class_data_ =
    AgileSymmetricKeySet::InternalGenerateClassData_(AgileSymmetricKeySet_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AgileSymmetricKeySet::GetClassData() const {
  return AgileSymmetricKeySet_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AgileSymmetricKeySet::GetClassData() const {
  return AgileSymmetricKeySet_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const AgileSymmetricKeySet::ParseTableT_
    AgileSymmetricKeySet::_table_ =
        AgileSymmetricKeySet::InternalGenerateParseTable_(AgileSymmetricKeySet_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void AgileSymmetricKeySet::Clear() {
// @@protoc_insertion_point(message_clear_start:sync_pb.AgileSymmetricKeySet)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::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 (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _impl_.key_.Clear();
  }
  _impl_.primary_key_id_ = 0u;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL AgileSymmetricKeySet::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const AgileSymmetricKeySet& this_ = static_cast<const AgileSymmetricKeySet&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL AgileSymmetricKeySet::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const AgileSymmetricKeySet& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:sync_pb.AgileSymmetricKeySet)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional uint32 primary_key_id = 1;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        1, this_._internal_primary_key_id(), target);
  }

  // repeated .sync_pb.AgileSymmetricKeySet.Key key = 2;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_key_size());
         i < n; i++) {
      const auto& repfield = this_._internal_key().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              2, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sync_pb.AgileSymmetricKeySet)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t AgileSymmetricKeySet::ByteSizeLong(const MessageLite& base) {
  const AgileSymmetricKeySet& this_ = static_cast<const AgileSymmetricKeySet&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t AgileSymmetricKeySet::ByteSizeLong() const {
  const AgileSymmetricKeySet& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sync_pb.AgileSymmetricKeySet)
  ::size_t total_size = 0;

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    // repeated .sync_pb.AgileSymmetricKeySet.Key key = 2;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_key_size();
      for (const auto& msg : this_._internal_key()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // optional uint32 primary_key_id = 1;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_primary_key_id());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void AgileSymmetricKeySet::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<AgileSymmetricKeySet*>(&to_msg);
  auto& from = static_cast<const AgileSymmetricKeySet&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:sync_pb.AgileSymmetricKeySet)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_key()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_key());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_impl_.primary_key_id_ = from._impl_.primary_key_id_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void AgileSymmetricKeySet::InternalSwap(AgileSymmetricKeySet* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.key_.InternalSwap(&other->_impl_.key_);
  swap(_impl_.primary_key_id_, other->_impl_.primary_key_id_);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace sync_pb
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
