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

#include "tink_key.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 tink {
class KeyData::_Internal {
 public:
  using HasBits = decltype(::std::declval<KeyData>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(KeyData, _impl_._has_bits_);
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000007) ^ 0x00000007) != 0;
  }
};

constexpr KeyData::ParseTableT_ KeyData::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(KeyData, _impl_._has_bits_),
      0, // no _extensions_
      3, 24,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967288,  // skipmap
      offsetof(ParseTableT_, field_entries),
      3,  // 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<::tink::KeyData>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // required string type_url = 1;
      {::_pbi::TcParser::FastBS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(KeyData, _impl_.type_url_)}},
      // required bytes value = 2;
      {::_pbi::TcParser::FastBS1,
       {18, 1, 0,
        PROTOBUF_FIELD_OFFSET(KeyData, _impl_.value_)}},
      // required .tink.KeyData.KeyMaterialType key_material_type = 3;
      {::_pbi::TcParser::FastEr0S1,
       {24, 2, 4,
        PROTOBUF_FIELD_OFFSET(KeyData, _impl_.key_material_type_)}},
    }}, {{
      65535, 65535
    }}, {{
      // required string type_url = 1;
      {PROTOBUF_FIELD_OFFSET(KeyData, _impl_.type_url_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // required bytes value = 2;
      {PROTOBUF_FIELD_OFFSET(KeyData, _impl_.value_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // required .tink.KeyData.KeyMaterialType key_material_type = 3;
      {PROTOBUF_FIELD_OFFSET(KeyData, _impl_.key_material_type_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
    }},
    {{
        {0, 4},
    }},
    {{
    }},
  };
}


inline constexpr KeyData::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        type_url_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        value_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        key_material_type_{static_cast< ::tink::KeyData_KeyMaterialType >(0)} {}

template <typename>
constexpr KeyData::KeyData(::_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 KeyData::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) KeyData(arena);
}
constexpr auto KeyData::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(KeyData), alignof(KeyData));
}
constexpr auto KeyData::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
          KeyData::IsInitializedImpl,
          &KeyData::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<KeyData>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &KeyData::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<KeyData>(), &KeyData::ByteSizeLong,
              &KeyData::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(KeyData, _impl_._cached_size_),
          true,
      },
      "tink.KeyData",
  };
}
struct KeyDataGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr KeyDataGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 KeyData_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(KeyData::InternalGenerateClassData_(
            _default, &KeyData_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<KeyData>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~KeyDataGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) KeyData _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<KeyData>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(KeyDataGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST KeyDataGlobalsTypeInternal KeyData_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* KeyData_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return KeyData_globals_.GetClassData();
#else
  return KeyData_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class Keyset_Key::_Internal {
 public:
  using HasBits = decltype(::std::declval<Keyset_Key>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_._has_bits_);
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x0000000f) ^ 0x0000000f) != 0;
  }
};

constexpr Keyset_Key::ParseTableT_ Keyset_Key::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_._has_bits_),
      0, // no _extensions_
      4, 24,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967280,  // skipmap
      offsetof(ParseTableT_, field_entries),
      4,  // 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<::tink::Keyset_Key>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // required .tink.OutputPrefixType output_prefix_type = 4;
      {::_pbi::TcParser::FastEr0S1,
       {32, 3, 4,
        PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_.output_prefix_type_)}},
      // required .tink.KeyData key_data = 1;
      {::_pbi::TcParser::FastMtS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_.key_data_)}},
      // required .tink.KeyStatusType status = 2;
      {::_pbi::TcParser::FastEr0S1,
       {16, 1, 3,
        PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_.status_)}},
      // required uint32 key_id = 3;
      {::_pbi::TcParser::FastV32S1,
       {24, 2, 0,
        PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_.key_id_)}},
    }}, {{
      65535, 65535
    }}, {{
      // required .tink.KeyData key_data = 1;
      {PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_.key_data_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // required .tink.KeyStatusType status = 2;
      {PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_.status_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
      // required uint32 key_id = 3;
      {PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_.key_id_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // required .tink.OutputPrefixType output_prefix_type = 4;
      {PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_.output_prefix_type_), _Internal::kHasBitsOffset + 3, 2, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::tink::KeyData>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::tink::KeyData_globals_},
        #endif
        {0, 3},
        {0, 4},
    }},
    {{
    }},
  };
}


inline constexpr Keyset_Key::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        key_data_{nullptr},
        status_{static_cast< ::tink::KeyStatusType >(0)},
        key_id_{0u},
        output_prefix_type_{static_cast< ::tink::OutputPrefixType >(0)} {}

template <typename>
constexpr Keyset_Key::Keyset_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 Keyset_Key::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) Keyset_Key(arena);
}
constexpr auto Keyset_Key::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Keyset_Key), alignof(Keyset_Key));
}
constexpr auto Keyset_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
          Keyset_Key::IsInitializedImpl,
          &Keyset_Key::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<Keyset_Key>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &Keyset_Key::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<Keyset_Key>(), &Keyset_Key::ByteSizeLong,
              &Keyset_Key::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_._cached_size_),
          true,
      },
      "tink.Keyset.Key",
  };
}
struct Keyset_KeyGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr Keyset_KeyGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 Keyset_Key_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(Keyset_Key::InternalGenerateClassData_(
            _default, &Keyset_Key_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<Keyset_Key>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~Keyset_KeyGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) Keyset_Key _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<Keyset_Key>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(Keyset_KeyGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST Keyset_KeyGlobalsTypeInternal Keyset_Key_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* Keyset_Key_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return Keyset_Key_globals_.GetClassData();
#else
  return Keyset_Key_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class Keyset::_Internal {
 public:
  using HasBits = decltype(::std::declval<Keyset>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(Keyset, _impl_._has_bits_);
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000002) ^ 0x00000002) != 0;
  }
};

constexpr Keyset::ParseTableT_ Keyset::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(Keyset, _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<::tink::Keyset>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // repeated .tink.Keyset.Key key = 2;
      {::_pbi::TcParser::FastMtR1,
       {18, 0, 0,
        PROTOBUF_FIELD_OFFSET(Keyset, _impl_.key_)}},
      // required uint32 primary_key_id = 1;
      {::_pbi::TcParser::FastV32S1,
       {8, 1, 0,
        PROTOBUF_FIELD_OFFSET(Keyset, _impl_.primary_key_id_)}},
    }}, {{
      65535, 65535
    }}, {{
      // required uint32 primary_key_id = 1;
      {PROTOBUF_FIELD_OFFSET(Keyset, _impl_.primary_key_id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // repeated .tink.Keyset.Key key = 2;
      {PROTOBUF_FIELD_OFFSET(Keyset, _impl_.key_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::tink::Keyset_Key>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::tink::Keyset_Key_globals_},
        #endif
    }},
    {{
    }},
  };
}


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

template <typename>
constexpr Keyset::Keyset(::_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 Keyset::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) Keyset(arena);
}
constexpr auto Keyset::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Keyset), alignof(Keyset));
}
constexpr auto Keyset::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
          Keyset::IsInitializedImpl,
          &Keyset::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<Keyset>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &Keyset::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<Keyset>(), &Keyset::ByteSizeLong,
              &Keyset::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(Keyset, _impl_._cached_size_),
          true,
      },
      "tink.Keyset",
  };
}
struct KeysetGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr KeysetGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 Keyset_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(Keyset::InternalGenerateClassData_(
            _default, &Keyset_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<Keyset>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~KeysetGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) Keyset _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<Keyset>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(KeysetGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST KeysetGlobalsTypeInternal Keyset_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* Keyset_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return Keyset_globals_.GetClassData();
#else
  return Keyset_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace tink
namespace tink {
PROTOBUF_CONSTINIT const uint32_t KeyData_KeyMaterialType_internal_data_[] = {
    327680u, 0u, };
static const char KeyData_KeyMaterialType_names[] = {
    "ASYMMETRIC_PRIVATE"
    "ASYMMETRIC_PUBLIC"
    "REMOTE"
    "SYMMETRIC"
    "UNKNOWN_KEYMATERIAL"
};

static const ::google::protobuf::internal::EnumEntry KeyData_KeyMaterialType_entries[] = {
    {{&KeyData_KeyMaterialType_names[0], 18}, 2},
    {{&KeyData_KeyMaterialType_names[18], 17}, 3},
    {{&KeyData_KeyMaterialType_names[35], 6}, 4},
    {{&KeyData_KeyMaterialType_names[41], 9}, 1},
    {{&KeyData_KeyMaterialType_names[50], 19}, 0},
};

static const int KeyData_KeyMaterialType_entries_by_number[] = {
    4,  // 0 -> UNKNOWN_KEYMATERIAL
    3,  // 1 -> SYMMETRIC
    0,  // 2 -> ASYMMETRIC_PRIVATE
    1,  // 3 -> ASYMMETRIC_PUBLIC
    2,  // 4 -> REMOTE
};

bool KeyData_KeyMaterialType_Parse(::absl::string_view name,
                                  KeyData_KeyMaterialType* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      KeyData_KeyMaterialType_entries, 5, name, &int_value);
  if (success) {
    *value = static_cast<KeyData_KeyMaterialType>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    KeyData_KeyMaterialType_strings[5] = {};

const ::std::string& KeyData_KeyMaterialType_Name(KeyData_KeyMaterialType value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      KeyData_KeyMaterialType_entries, KeyData_KeyMaterialType_entries_by_number, 5,
      KeyData_KeyMaterialType_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(KeyData_KeyMaterialType_entries,
                                  KeyData_KeyMaterialType_entries_by_number,
                                  5, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : KeyData_KeyMaterialType_strings[idx].get();
}
PROTOBUF_CONSTINIT const uint32_t KeyStatusType_internal_data_[] = {
    262144u, 0u, };
static const char KeyStatusType_names[] = {
    "DESTROYED"
    "DISABLED"
    "ENABLED"
    "UNKNOWN_STATUS"
};

static const ::google::protobuf::internal::EnumEntry KeyStatusType_entries[] = {
    {{&KeyStatusType_names[0], 9}, 3},
    {{&KeyStatusType_names[9], 8}, 2},
    {{&KeyStatusType_names[17], 7}, 1},
    {{&KeyStatusType_names[24], 14}, 0},
};

static const int KeyStatusType_entries_by_number[] = {
    3,  // 0 -> UNKNOWN_STATUS
    2,  // 1 -> ENABLED
    1,  // 2 -> DISABLED
    0,  // 3 -> DESTROYED
};

bool KeyStatusType_Parse(::absl::string_view name,
                                  KeyStatusType* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      KeyStatusType_entries, 4, name, &int_value);
  if (success) {
    *value = static_cast<KeyStatusType>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    KeyStatusType_strings[4] = {};

const ::std::string& KeyStatusType_Name(KeyStatusType value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      KeyStatusType_entries, KeyStatusType_entries_by_number, 4,
      KeyStatusType_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(KeyStatusType_entries,
                                  KeyStatusType_entries_by_number,
                                  4, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : KeyStatusType_strings[idx].get();
}
PROTOBUF_CONSTINIT const uint32_t OutputPrefixType_internal_data_[] = {
    327680u, 0u, };
static const char OutputPrefixType_names[] = {
    "CRUNCHY"
    "LEGACY"
    "RAW"
    "TINK"
    "UNKNOWN_PREFIX"
};

static const ::google::protobuf::internal::EnumEntry OutputPrefixType_entries[] = {
    {{&OutputPrefixType_names[0], 7}, 4},
    {{&OutputPrefixType_names[7], 6}, 2},
    {{&OutputPrefixType_names[13], 3}, 3},
    {{&OutputPrefixType_names[16], 4}, 1},
    {{&OutputPrefixType_names[20], 14}, 0},
};

static const int OutputPrefixType_entries_by_number[] = {
    4,  // 0 -> UNKNOWN_PREFIX
    3,  // 1 -> TINK
    1,  // 2 -> LEGACY
    2,  // 3 -> RAW
    0,  // 4 -> CRUNCHY
};

bool OutputPrefixType_Parse(::absl::string_view name,
                                  OutputPrefixType* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      OutputPrefixType_entries, 5, name, &int_value);
  if (success) {
    *value = static_cast<OutputPrefixType>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    OutputPrefixType_strings[5] = {};

const ::std::string& OutputPrefixType_Name(OutputPrefixType value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      OutputPrefixType_entries, OutputPrefixType_entries_by_number, 5,
      OutputPrefixType_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(OutputPrefixType_entries,
                                  OutputPrefixType_entries_by_number,
                                  5, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : OutputPrefixType_strings[idx].get();
}
// ===================================================================

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

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

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

  // @@protoc_insertion_point(copy_constructor:tink.KeyData)
}
PROTOBUF_NDEBUG_INLINE KeyData::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        type_url_(arena),
        value_(arena) {}

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite KeyData_class_data_ =
    KeyData::InternalGenerateClassData_(KeyData_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
KeyData::GetClassData() const {
  return KeyData_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
KeyData::GetClassData() const {
  return KeyData_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const KeyData::ParseTableT_
    KeyData::_table_ =
        KeyData::InternalGenerateParseTable_(KeyData_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void KeyData::Clear() {
// @@protoc_insertion_point(message_clear_start:tink.KeyData)
  ::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 (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.type_url_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.value_.ClearNonDefaultToEmpty();
    }
  }
  _impl_.key_material_type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // required string type_url = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_type_url();
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // required bytes value = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    const ::std::string& _s = this_._internal_value();
    target = stream->WriteBytesMaybeAliased(2, _s, target);
  }

  // required .tink.KeyData.KeyMaterialType key_material_type = 3;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        3, this_._internal_key_material_type(), 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:tink.KeyData)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t KeyData::ByteSizeLong(const MessageLite& base) {
  const KeyData& this_ = static_cast<const KeyData&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t KeyData::ByteSizeLong() const {
  const KeyData& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:tink.KeyData)
  ::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, 0x00000007U)) {
    // required string type_url = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_type_url());
    }
    // required bytes value = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                      this_._internal_value());
    }
    // required .tink.KeyData.KeyMaterialType key_material_type = 3;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_key_material_type());
    }
  }
  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 KeyData::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<KeyData*>(&to_msg);
  auto& from = static_cast<const KeyData&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:tink.KeyData)
  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, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_type_url(from._internal_type_url());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_set_value(from._internal_value());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.key_material_type_ = from._impl_.key_material_type_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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

PROTOBUF_NOINLINE bool KeyData::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const KeyData&>(msg);
  if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
    return false;
  }
  return true;
}

void KeyData::InternalSwap(KeyData* 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_.type_url_, &other->_impl_.type_url_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena);
  swap(_impl_.key_material_type_, other->_impl_.key_material_type_);
}

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

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

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  Keyset_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;
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, status_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, status_),
           offsetof(Impl_, output_prefix_type_) -
               offsetof(Impl_, status_) +
               sizeof(Impl_::output_prefix_type_));

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

inline void Keyset_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_, output_prefix_type_) -
               offsetof(Impl_, key_data_) +
               sizeof(Impl_::output_prefix_type_));
}
Keyset_Key::~Keyset_Key() {
  // @@protoc_insertion_point(destructor:tink.Keyset.Key)
  SharedDtor(*this);
}
inline void Keyset_Key::SharedDtor(MessageLite& self) {
  Keyset_Key& this_ = static_cast<Keyset_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 Keyset_Key_class_data_ =
    Keyset_Key::InternalGenerateClassData_(Keyset_Key_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Keyset_Key::GetClassData() const {
  return Keyset_Key_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Keyset_Key::GetClassData() const {
  return Keyset_Key_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const Keyset_Key::ParseTableT_
    Keyset_Key::_table_ =
        Keyset_Key::InternalGenerateParseTable_(Keyset_Key_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void Keyset_Key::Clear() {
// @@protoc_insertion_point(message_clear_start:tink.Keyset.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();
  }
  if (BatchCheckHasBit(cached_has_bits, 0x0000000eU)) {
    ::memset(&_impl_.status_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.output_prefix_type_) -
        reinterpret_cast<char*>(&_impl_.status_)) + sizeof(_impl_.output_prefix_type_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // required .tink.KeyData 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);
  }

  // required .tink.KeyStatusType status = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        2, this_._internal_status(), target);
  }

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

  // required .tink.OutputPrefixType output_prefix_type = 4;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        4, this_._internal_output_prefix_type(), 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:tink.Keyset.Key)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t Keyset_Key::ByteSizeLong(const MessageLite& base) {
  const Keyset_Key& this_ = static_cast<const Keyset_Key&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t Keyset_Key::ByteSizeLong() const {
  const Keyset_Key& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:tink.Keyset.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, 0x0000000fU)) {
    // required .tink.KeyData key_data = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.key_data_);
    }
    // required .tink.KeyStatusType status = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_status());
    }
    // required uint32 key_id = 3;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_key_id());
    }
    // required .tink.OutputPrefixType output_prefix_type = 4;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_output_prefix_type());
    }
  }
  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 Keyset_Key::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<Keyset_Key*>(&to_msg);
  auto& from = static_cast<const Keyset_Key&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:tink.Keyset.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, 0x0000000fU)) {
    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_.status_ = from._impl_.status_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.key_id_ = from._impl_.key_id_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_impl_.output_prefix_type_ = from._impl_.output_prefix_type_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void Keyset_Key::CopyFrom(const Keyset_Key& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:tink.Keyset.Key)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool Keyset_Key::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const Keyset_Key&>(msg);
  if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
    return false;
  }
  if (CheckHasBit(this_._impl_._has_bits_[0], 0x00000001U)) {
    if (!this_._impl_.key_data_->IsInitialized()) return false;
  }
  return true;
}

void Keyset_Key::InternalSwap(Keyset_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(Keyset_Key, _impl_.output_prefix_type_)
      + sizeof(Keyset_Key::_impl_.output_prefix_type_)
      - PROTOBUF_FIELD_OFFSET(Keyset_Key, _impl_.key_data_)>(
          reinterpret_cast<char*>(&_impl_.key_data_),
          reinterpret_cast<char*>(&other->_impl_.key_data_));
}

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

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

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  Keyset* 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:tink.Keyset)
}
PROTOBUF_NDEBUG_INLINE Keyset::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<
            ::tink::Keyset,
            PROTOBUF_FIELD_OFFSET(::tink::Keyset, _impl_.key_)>()
         }
     {}

inline void Keyset::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.primary_key_id_ = {};
}
Keyset::~Keyset() {
  // @@protoc_insertion_point(destructor:tink.Keyset)
  SharedDtor(*this);
}
inline void Keyset::SharedDtor(MessageLite& self) {
  Keyset& this_ = static_cast<Keyset&>(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 Keyset_class_data_ =
    Keyset::InternalGenerateClassData_(Keyset_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Keyset::GetClassData() const {
  return Keyset_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Keyset::GetClassData() const {
  return Keyset_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const Keyset::ParseTableT_
    Keyset::_table_ =
        Keyset::InternalGenerateParseTable_(Keyset_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void Keyset::Clear() {
// @@protoc_insertion_point(message_clear_start:tink.Keyset)
  ::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 Keyset::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const Keyset& this_ = static_cast<const Keyset&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL Keyset::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const Keyset& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:tink.Keyset)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // required 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 .tink.Keyset.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:tink.Keyset)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t Keyset::ByteSizeLong(const MessageLite& base) {
  const Keyset& this_ = static_cast<const Keyset&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t Keyset::ByteSizeLong() const {
  const Keyset& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:tink.Keyset)
  ::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_);
   {
    // repeated .tink.Keyset.Key key = 2;
    cached_has_bits = this_._impl_._has_bits_[0];
    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);
      }
    }
  }
   {
    // required 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 Keyset::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<Keyset*>(&to_msg);
  auto& from = static_cast<const Keyset&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:tink.Keyset)
  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 Keyset::CopyFrom(const Keyset& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:tink.Keyset)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool Keyset::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const Keyset&>(msg);
  if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
    return false;
  }
  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_key()))
    return false;
  return true;
}

void Keyset::InternalSwap(Keyset* 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 tink
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
